├── .gitattributes ├── .gitignore ├── README.md ├── app.js ├── bower_components ├── angular-bootstrap │ ├── ui-bootstrap-tpls.min.js │ └── ui-bootstrap.min.js ├── angular-chart │ ├── Chart.min.js │ ├── angular-chart.css │ └── angular-chart.js ├── angular-ng-table │ ├── ng-table.min.css │ └── ng-table.min.js ├── angular-ui-router │ └── angular-ui-router.min.js ├── angular-validation │ ├── angular-validation-rule.js │ └── angular-validation.js ├── angular │ ├── angular.js │ ├── angular.min.js │ └── angular.min.js.map ├── bootstrap │ ├── bootstrap-responsive.min.css │ ├── bootstrap.min.css │ ├── bootstrap.min.js │ ├── glyphicons-halflings-white.html │ └── glyphicons-halflings.html ├── font │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.svgz │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfontd41d.eot └── jquery │ └── jquery-1.11.0.js ├── css ├── dashboard.css ├── font-awesome.css ├── signin.css └── style.css ├── img ├── body-bg.png ├── glyphicons-halflings-white.html ├── glyphicons-halflings.html ├── icons-sa7c41345d9.png ├── message_avatar1.png ├── message_avatar2.png └── signin │ ├── check.png │ ├── fb_btn.png │ ├── password.png │ ├── twitter_btn.png │ └── user.png ├── index.html └── partials ├── common ├── footer.html ├── loginHeader.html ├── mock │ ├── error.json │ └── success.json └── userHeader.html ├── customers ├── addCustomer.html ├── customerTab.html ├── customers.html ├── customers.js ├── editCustomer.html ├── mock │ ├── customers.json │ └── get_customer.json └── viewCustomer.html ├── dashboard ├── dashboard.html ├── dashboard.js └── mock │ ├── customers_last_five.json │ ├── recent_news.json │ └── todays_stats.json ├── reports ├── mock │ ├── customers_reports.json │ └── orders_reports.json ├── reports.html └── reports.js └── users ├── login.html ├── mock └── login.json ├── signup.html └── users.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Please have a look at http://www.amasik.com/angularjs-sample-project/ 2 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Declare app level module which depends on views, and components 4 | var myApp = angular.module('myApp', [ 5 | 'ui.router', 6 | 'ui.bootstrap', 7 | 'validation', 8 | 'validation.rule', 9 | 'users', 10 | 'dashboard', 11 | 'reports', 12 | 'customers' 13 | ]); 14 | 15 | //Config phase 16 | myApp.config(function($urlRouterProvider, $httpProvider) { 17 | //session check and redirect to specific state 18 | if(!window.sessionStorage["userInfo"]){ 19 | $urlRouterProvider.otherwise("/login"); 20 | }else{ 21 | $urlRouterProvider.otherwise("/dashboard"); 22 | } 23 | 24 | }); 25 | 26 | //Run phase 27 | myApp.run(function($rootScope, $state) { 28 | $rootScope.$state = $state; //Get state info in view 29 | 30 | if(window.sessionStorage["userInfo"]){ 31 | $rootScope.userInfo = JSON.parse(window.sessionStorage["userInfo"]); 32 | } 33 | 34 | //Check session and redirect to specific page 35 | $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){ 36 | if(toState && toState.data && toState.data.auth && !window.sessionStorage["userInfo"]){ 37 | event.preventDefault(); 38 | window.location.href = "#login"; 39 | } 40 | 41 | if(!toState && !toState.data && !toState.data.auth && window.sessionStorage["userInfo"]){ 42 | event.preventDefault(); 43 | window.location.href = "#dashboard"; 44 | } 45 | }); 46 | }); 47 | 48 | //Datatable 49 | myApp.factory('dataTable', ['$filter', 'ngTableParams', function($filter, ngTableParams) { 50 | 51 | var factoryDefinition = { 52 | render: function($scope, config, componentId, data) { 53 | 54 | if(!config) config ={}; 55 | var config = angular.extend({}, {page:1, count:10}, config) 56 | 57 | $scope[componentId] = new ngTableParams(config, { 58 | total: data.length, // length of data 59 | getData: function($defer, params) { 60 | // use build-in angular filter 61 | var filteredData = params.filter() ? 62 | $filter('filter')(data, params.filter()) : 63 | data; 64 | var orderedData = params.sorting() ? 65 | $filter('orderBy')(filteredData, params.orderBy()) : 66 | data; 67 | params.total(orderedData.length); // set total for recalc pagination 68 | $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count())); 69 | } 70 | }); 71 | 72 | 73 | } 74 | } 75 | 76 | return factoryDefinition; 77 | } 78 | ]); 79 | 80 | //For top sub menu (look others menu) 81 | $(function () { 82 | $('.subnavbar').find ('li').each (function (i) { 83 | var mod = i % 3; 84 | if (mod === 2) { 85 | $(this).addClass ('subnavbar-open-right'); 86 | } 87 | }); 88 | }); -------------------------------------------------------------------------------- /bower_components/angular-chart/angular-chart.css: -------------------------------------------------------------------------------- 1 | .chart-legend,.bar-legend,.line-legend,.pie-legend,.radar-legend,.polararea-legend,.doughnut-legend{list-style-type:none;margin-top:5px;text-align:center}.chart-legend li,.bar-legend li,.line-legend li,.pie-legend li,.radar-legend li,.polararea-legend li,.doughnut-legend li{display:inline-block;white-space:nowrap;position:relative;margin-bottom:4px;border-radius:5px;padding:2px 8px 2px 28px;font-size:smaller;cursor:default}.chart-legend li span,.bar-legend li span,.line-legend li span,.pie-legend li span,.radar-legend li span,.polararea-legend li span,.doughnut-legend li span{display:block;position:absolute;left:0;top:0;width:20px;height:20px;border-radius:5px} 2 | /*# sourceMappingURL=angular-chart.css.map */ -------------------------------------------------------------------------------- /bower_components/angular-chart/angular-chart.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";function t(t){return{restrict:"CA",scope:{data:"=",labels:"=",options:"=",series:"=",colours:"=",chartType:"=",legend:"@",click:"="},link:function(e,n){function a(o){if(o&&o.length){var l=t||e.chartType;l&&(g&&g.destroy(),g=r(l,e,n))}}var g,f=document.createElement("div");f.className="chart-container",n.replaceWith(f),f.appendChild(n[0]),"object"==typeof G_vmlCanvasManager&&null!==G_vmlCanvasManager&&"function"==typeof G_vmlCanvasManager.initElement&&G_vmlCanvasManager.initElement(n[0]),e.$watch("data",function(a,f){if(a&&a.length&&(!i(t)||a[0].length)){var c=t||e.chartType;if(c){if(g){if(o(c,a,f))return l(g,c,a,e);g.destroy()}g=r(c,e,n)}}},!0),e.$watch("series",a,!0),e.$watch("labels",a,!0),e.$watch("chartType",function(t){t&&(g&&g.destroy(),g=r(t,e,n))})}}}function o(t,o,r){return o&&r&&o.length&&r.length?i(t)?o.length===r.length&&o[0].length===r[0].length:o.length===r.length:!1}function r(t,o,r){var l=r[0],n=l.getContext("2d"),g=i(t)?a(o.labels,o.data,o.series||[],o.colours):f(o.labels,o.data,o.colours),c=new Chart(n)[t](g,o.options||{});return o.click&&(l.onclick=function(r){if(c.getPointsAtEvent||c.getSegmentsAtEvent){var e=i(t)?c.getPointsAtEvent(r):c.getSegmentsAtEvent(r);o.click(e,r)}}),o.legend&&"false"!==o.legend&&e(r,c),c}function e(t,o){var r=t.parent(),e=r.find("chart-legend"),l=""+o.generateLegend()+"";e.length?e.replaceWith(l):r.append(l)}function l(t,o,r,e){i(o)?t.datasets.forEach(function(t,o){e.colours&&n(t,e.colours[o]),(t.points||t.bars).forEach(function(t,e){t.value=r[o][e]})}):t.segments.forEach(function(t,o){t.value=r[o],e.colours&&n(t,e.colours[o])}),t.update()}function n(t,o){t.fillColor=o.fillColor,t.highlightColor=o.highlightColor,t.strokeColor=o.strokeColor,t.pointColor=o.pointColor,t.pointStrokeColor=o.pointStrokeColor}function i(t){return["Line","Bar","Radar"].indexOf(t)>-1}function a(t,o,r,e){return e=e||Chart.defaults.global.colours,{labels:t,datasets:o.map(function(t,o){var l=g(e[o]);return l.label=r[o],l.data=t,l})}}function g(t){var o={};for(var r in t)t.hasOwnProperty(r)&&(o[r]=t[r]);return o}function f(t,o,r){return r=r||Chart.defaults.global.colours,t.map(function(t,e){return{label:t,value:o[e],color:r[e].strokeColor,highlight:r[e].pointHighlightStroke}})}Chart.defaults.global.responsive=!0,Chart.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",Chart.defaults.global.colours=[{fillColor:"rgba(151,187,205,0.2)",strokeColor:"rgba(151,187,205,1)",pointColor:"rgba(151,187,205,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(151,187,205,0.8)"},{fillColor:"rgba(220,220,220,0.2)",strokeColor:"rgba(220,220,220,1)",pointColor:"rgba(220,220,220,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(220,220,220,0.8)"},{fillColor:"rgba(247,70,74,0.2)",strokeColor:"rgba(247,70,74,1)",pointColor:"rgba(247,70,74,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(247,70,74,0.8)"},{fillColor:"rgba(70,191,189,0.2)",strokeColor:"rgba(70,191,189,1)",pointColor:"rgba(70,191,189,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(70,191,189,0.8)"},{fillColor:"rgba(253,180,92,0.2)",strokeColor:"rgba(253,180,92,1)",pointColor:"rgba(253,180,92,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(253,180,92,0.8)"},{fillColor:"rgba(148,159,177,0.2)",strokeColor:"rgba(148,159,177,1)",pointColor:"rgba(148,159,177,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(148,159,177,0.8)"},{fillColor:"rgba(77,83,96,0.2)",strokeColor:"rgba(77,83,96,1)",pointColor:"rgba(77,83,96,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(77,83,96,1)"}],angular.module("chart.js",[]).directive("chartBase",function(){return t()}).directive("chartLine",function(){return t("Line")}).directive("chartBar",function(){return t("Bar")}).directive("chartRadar",function(){return t("Radar")}).directive("chartDoughnut",function(){return t("Doughnut")}).directive("chartPie",function(){return t("Pie")}).directive("chartPolarArea",function(){return t("PolarArea")})}(); 2 | //# sourceMappingURL=angular-chart.js.map -------------------------------------------------------------------------------- /bower_components/angular-ng-table/ng-table.min.css: -------------------------------------------------------------------------------- 1 | /*! ngTable v0.3.0 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */ 2 | 3 | .ng-table th{text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table th.sortable{cursor:pointer}.ng-table th.sortable div{padding-right:18px;position:relative}.ng-table th.sortable div:after,.ng-table th.sortable div:before{content:"";border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:visible;right:8px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table th.sortable div:before{margin-top:2px;border-bottom:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000}.ng-table th.sortable div:hover:after,.ng-table th.sortable div:hover:before{opacity:1;visibility:visible}.ng-table th.sortable.sort-desc,.ng-table th.sortable.sort-asc{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px rgba(255,255,255,.75)}.ng-table th.sortable.sort-desc div:after,.ng-table th.sortable.sort-asc div:after{margin-top:-2px}.ng-table th.sortable.sort-desc div:before,.ng-table th.sortable.sort-asc div:before{visibility:hidden}.ng-table th.sortable.sort-asc div:after,.ng-table th.sortable.sort-asc div:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.sortable.sort-desc div:after{border-bottom:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.filter .input-filter{margin:0;display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-table+.pagination{margin-top:0}@media only screen and (max-width:800px){.ng-table-responsive{border-bottom:1px solid #999}.ng-table-responsive tr{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive td:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive thead tr th{text-align:left}.ng-table-responsive thead tr.ng-table-filters th{padding:0}.ng-table-responsive thead tr.ng-table-filters th form>div{padding:8px}.ng-table-responsive td{border:0;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive td:before{content:attr(data-title-text)}.ng-table-responsive,.ng-table-responsive thead,.ng-table-responsive tbody,.ng-table-responsive th,.ng-table-responsive td,.ng-table-responsive tr{display:block}} -------------------------------------------------------------------------------- /bower_components/angular-ng-table/ng-table.min.js: -------------------------------------------------------------------------------- 1 | /*! ngTable v0.3.1 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */ 2 | !function(a,b){return"function"==typeof define&&define.amd?(define(["angular"],function(a){return b(a)}),void 0):b(a)}(angular||null,function(a){var b=a.module("ngTable",[]);b.factory("ngTableParams",["$q","$log",function(b,c){var d=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},e=function(e,f){var g=this;this.data=[],this.parameters=function(b,e){if(e=e||!1,a.isDefined(b)){for(var f in b){var g=b[f];if(e&&f.indexOf("[")>=0){for(var i=f.split(/\[(.*)\]/).reverse(),j="",k=0,l=i.length;l>k;k++){var m=i[k];if(""!==m){var n=g;g={},g[j=m]=d(n)?parseFloat(n):n}}"sorting"===j&&(h[j]={}),h[j]=a.extend(h[j]||{},g[j])}else h[f]=d(b[f])?parseFloat(b[f]):b[f]}return c.debug&&c.debug("ngTable: set parameters",h),this}return h},this.settings=function(b){return a.isDefined(b)?(j=a.extend(j,b),c.debug&&c.debug("ngTable: set settings",h),this):j},this.page=function(b){return a.isDefined(b)?this.parameters({page:b}):h.page},this.total=function(b){return a.isDefined(b)?this.settings({total:b}):j.total},this.count=function(b){return a.isDefined(b)?this.parameters({count:b,page:1}):h.count},this.filter=function(b){return a.isDefined(b)?this.parameters({filter:b}):h.filter},this.sorting=function(b){if(2==arguments.length){var c={};return c[b]=arguments[1],this.parameters({sorting:c}),this}return a.isDefined(b)?this.parameters({sorting:b}):h.sorting},this.isSortBy=function(b,c){return a.isDefined(h.sorting[b])&&h.sorting[b]==c},this.orderBy=function(){var a=[];for(var b in h.sorting)a.push(("asc"===h.sorting[b]?"+":"-")+b);return a},this.getData=function(a){a.resolve([])},this.getGroups=function(d,e){var f=b.defer();f.promise.then(function(b){var f={};for(var g in b){var h=b[g],i=a.isFunction(e)?e(h):h[e];f[i]=f[i]||{data:[]},f[i].value=i,f[i].data.push(h)}var j=[];for(var k in f)j.push(f[k]);c.debug&&c.debug("ngTable: refresh groups",j),d.resolve(j)}),this.getData(f,g)},this.generatePagesArray=function(a,b,c){var d,e,f,g,h,j;if(d=11,j=[],h=Math.ceil(b/c),h>1){for(j.push({type:"prev",number:Math.max(1,a-1),active:a>1}),j.push({type:"first",number:1,active:a>1}),f=Math.round((d-5)/2),g=Math.max(2,a-f),e=Math.min(h-1,a+2*f-(a-g)),g=Math.max(2,g-(2*f-(e-g))),i=g;e>=i;)i===g&&2!==i||i===e&&i!==h-1?j.push({type:"more",active:!1}):j.push({type:"page",number:i,active:a!==i}),i++;j.push({type:"last",number:h,active:a!==h}),j.push({type:"next",number:Math.min(h,a+1),active:h>a})}return j},this.url=function(b){b=b||!1;var c=b?[]:{};for(key in h)if(h.hasOwnProperty(key)){var d=h[key],e=encodeURIComponent(key);if("object"==typeof d){for(var f in d)if(!a.isUndefined(d[f])&&""!==d[f]){var g=e+"["+encodeURIComponent(f)+"]";b?c.push(g+"="+encodeURIComponent(d[f])):c[g]=encodeURIComponent(d[f])}}else a.isFunction(d)||a.isUndefined(d)||""===d||(b?c.push(e+"="+encodeURIComponent(d)):c[e]=encodeURIComponent(d))}return c},this.reload=function(){var a=b.defer(),d=this;j.$loading=!0,j.groupBy?j.getGroups(a,j.groupBy,this):j.getData(a,this),c.debug&&c.debug("ngTable: reload data"),a.promise.then(function(a){j.$loading=!1,c.debug&&c.debug("ngTable: current scope",j.$scope),d.data=j.groupBy?j.$scope.$groups=a:j.$scope.$data=a,j.$scope.pages=d.generatePagesArray(d.page(),d.total(),d.count())})},this.reloadPages=function(){var a=this;j.$scope.pages=a.generatePagesArray(a.page(),a.total(),a.count())};var h=this.$params={page:1,count:1,filter:{},sorting:{},group:{},groupBy:null},j={$scope:null,$loading:!1,total:0,counts:[10,25,50,100],getGroups:this.getGroups,getData:this.getData};return this.settings(f),this.parameters(e,!0),this};return e}]);var c=["$scope","ngTableParams","$q",function(a,b){a.$loading=!1,a.params||(a.params=new b),a.params.settings().$scope=a,a.$watch("params.$params",function(){a.params.settings().$scope=a,a.params.reload()},!0),a.sortBy=function(b){var c=a.parse(b.sortable);if(c){var d=a.params.sorting()&&a.params.sorting()[c]&&"desc"===a.params.sorting()[c],e={};e[c]=d?"asc":"desc",a.params.parameters({sorting:e})}}}];return b.directive("ngTable",["$compile","$q","$parse",function(b,d,e){"use strict";return{restrict:"A",priority:1001,scope:!0,controller:c,compile:function(c){var d=[],f=0,g=null,h=c.find("thead");return a.forEach(a.element(c.find("tr")),function(b){b=a.element(b),b.hasClass("ng-table-group")||g||(g=b)}),g?(a.forEach(g.find("td"),function(b){var c=a.element(b);if(!c.attr("ignore-cell")||"true"!==c.attr("ignore-cell")){var g=function(a,b){return function(f){return e(c.attr("x-data-"+a)||c.attr("data-"+a)||c.attr(a))(f,{$columns:d})||b}},h=g("title"," "),i=g("header",!1),j=g("filter",!1)(),k=!1;j&&j.templateURL&&(k=j.templateURL,delete j.templateURL),c.attr("data-title-text",h()),d.push({id:f++,title:h,sortable:g("sortable",!1),"class":c.attr("x-data-header-class")||c.attr("data-header-class")||c.attr("header-class"),filter:j,filterTemplateURL:k,headerTemplateURL:i,filterData:c.attr("filter-data")?c.attr("filter-data"):null,show:c.attr("ng-show")?function(a){return e(c.attr("ng-show"))(a)}:function(){return!0}})}}),function(c,f,g){if(c.$loading=!1,c.$columns=d,c.$watch(g.ngTable,function(b){a.isUndefined(b)||(c.paramsModel=e(g.ngTable),c.params=b)},!0),c.parse=function(b){return a.isDefined(b)?b(c):""},g.showFilter&&c.$parent.$watch(g.showFilter,function(a){c.show_filter=a}),a.forEach(d,function(b){var d;if(b.filterData){if(d=e(b.filterData)(c,{$column:b}),!a.isObject(d)||!a.isObject(d.promise))throw new Error("Function "+b.filterData+" must be instance of $q.defer()");return delete b.filterData,d.promise.then(function(c){a.isArray(c)||(c=[]),c.unshift({title:"-",id:""}),b.data=c})}}),!f.hasClass("ng-table")){c.templates={header:g.templateHeader?g.templateHeader:"ng-table/header.html",pagination:g.templatePagination?g.templatePagination:"ng-table/pager.html"};var i=h.length>0?h:a.element(document.createElement("thead")).attr("ng-include","templates.header"),j=a.element(document.createElement("div")).attr("ng-include","templates.pagination");return f.find("thead").remove(),f.find("tbody"),f.prepend(i),b(i)(c),b(j)(c),f.addClass("ng-table"),f.after(j)}}):void 0}}}]),a.module("ngTable").run(["$templateCache",function(a){a.put("ng-table/filters/select.html",''),a.put("ng-table/filters/text.html",''),a.put("ng-table/header.html",'
'),a.put("ng-table/pager.html",'
')}]),b}); 3 | //# sourceMappingURL=ng-table.map -------------------------------------------------------------------------------- /bower_components/angular-ui-router/angular-ui-router.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * State-based routing for AngularJS 3 | * @version v0.2.11 4 | * @link http://angular-ui.github.com/ 5 | * @license MIT License, http://www.opensource.org/licenses/MIT 6 | */ 7 | "undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return J(new(J(function(){},{prototype:a})),b)}function e(a){return I(arguments,function(b){b!==a&&I(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var c=[];return b.forEach(a,function(a,b){c.push(b)}),c}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return J({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e "));if(o[c]=d,F(a))m.push(c,[function(){return b.get(a)}],h);else{var e=b.annotate(a);I(e,function(a){a!==c&&g.hasOwnProperty(a)&&k(g[a],a)}),m.push(c,a,e)}n.pop(),o[c]=f}}function l(a){return G(a)&&a.then&&a.$$promises}if(!G(g))throw new Error("'invocables' must be an object");var m=[],n=[],o={};return I(g,k),g=n=o=null,function(d,f,g){function h(){--s||(t||e(r,f.$$values),p.$$values=r,p.$$promises=!0,delete p.$$inheritedValues,o.resolve(r))}function k(a){p.$$failure=a,o.reject(a)}function n(c,e,f){function i(a){l.reject(a),k(a)}function j(){if(!D(p.$$failure))try{l.resolve(b.invoke(e,g,r)),l.promise.then(function(a){r[c]=a,h()},i)}catch(a){i(a)}}var l=a.defer(),m=0;I(f,function(a){q.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,q[a].then(function(b){r[a]=b,--m||j()},i))}),m||j(),q[c]=l.promise}if(l(d)&&g===c&&(g=f,f=d,d=null),d){if(!G(d))throw new Error("'locals' must be an object")}else d=i;if(f){if(!l(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=j;var o=a.defer(),p=o.promise,q=p.$$promises={},r=J({},d),s=1+m.length/3,t=!1;if(D(f.$$failure))return k(f.$$failure),p;f.$$inheritedValues&&e(r,f.$$inheritedValues),f.$$values?(t=e(r,f.$$values),p.$$inheritedValues=f.$$values,h()):(f.$$inheritedValues&&(p.$$inheritedValues=f.$$inheritedValues),J(q,f.$$promises),f.then(h,k));for(var u=0,v=m.length;v>u;u+=3)d.hasOwnProperty(m[u])?h():n(m[u],m[u+1],m[u+2]);return p}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function m(a,b,c){this.fromConfig=function(a,b,c){return D(a.template)?this.fromString(a.template,b):D(a.templateUrl)?this.fromUrl(a.templateUrl,b):D(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return E(a)?a(b):a},this.fromUrl=function(c,d){return E(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function n(a,d){function e(a){return D(a)?this.type.decode(a):p.$$getDefaultValue(this)}function f(b,c,d){if(!/^\w+(-+\w+)*$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(n[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");n[b]=J({type:c||new o,$value:e},d)}function g(a,b,c){var d=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return d;var e=c?"?":"";return d+e+"("+b+")"+e}function h(a){if(!d.params||!d.params[a])return{};var b=d.params[a];return G(b)?b:{value:b}}d=b.isObject(d)?d:{};var i,j=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k="^",l=0,m=this.segments=[],n=this.params={};this.source=a;for(var q,r,s,t,u;(i=j.exec(a))&&(q=i[2]||i[3],r=i[4]||("*"==i[1]?".*":"[^/]*"),s=a.substring(l,i.index),t=this.$types[r]||new o({pattern:new RegExp(r)}),u=h(q),!(s.indexOf("?")>=0));)k+=g(s,t.$subPattern(),D(u.value)),f(q,t,u),m.push(s),l=j.lastIndex;s=a.substring(l);var v=s.indexOf("?");if(v>=0){var w=this.sourceSearch=s.substring(v);s=s.substring(0,v),this.sourcePath=a.substring(0,l+v),I(w.substring(1).split(/[&?]/),function(a){f(a,null,h(a))})}else this.sourcePath=a,this.sourceSearch="";k+=g(s)+(d.strict===!1?"/?":"")+"$",m.push(s),this.regexp=new RegExp(k,d.caseInsensitive?"i":c),this.prefix=m[0]}function o(a){J(this,a)}function p(){function a(){return{strict:f,caseInsensitive:e}}function b(a){return E(a)||H(a)&&E(a[a.length-1])}function c(){I(h,function(a){if(n.prototype.$types[a.name])throw new Error("A type named '"+a.name+"' has already been defined.");var c=new o(b(a.def)?d.invoke(a.def):a.def);n.prototype.$types[a.name]=c})}var d,e=!1,f=!0,g=!0,h=[],i={"int":{decode:function(a){return parseInt(a,10)},is:function(a){return D(a)?this.decode(a.toString())===a:!1},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0===parseInt(a,10)?!1:!0},is:function(a){return a===!0||a===!1},pattern:/0|1/},string:{pattern:/[^\/]*/},date:{equals:function(a,b){return a.toISOString()===b.toISOString()},decode:function(a){return new Date(a)},encode:function(a){return[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-")},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/}};p.$$getDefaultValue=function(a){if(!b(a.value))return a.value;if(!d)throw new Error("Injectable functions cannot be called at configuration time");return d.invoke(a.value)},this.caseInsensitive=function(a){e=a},this.strictMode=function(a){f=a},this.compile=function(b,c){return new n(b,J(a(),c))},this.isMatcher=function(a){if(!G(a))return!1;var b=!0;return I(n.prototype,function(c,d){E(c)&&(b=b&&D(a[d])&&E(a[d]))}),b},this.type=function(a,b){return D(b)?(h.push({name:a,def:b}),g||c(),this):n.prototype.$types[a]},this.$get=["$injector",function(a){return d=a,g=!1,n.prototype.$types={},c(),I(i,function(a,b){n.prototype.$types[b]||(n.prototype.$types[b]=new o(a))}),this}]}function q(a,b){function d(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function e(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function f(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return D(d)?d:!0}function g(b,c,d,e){function f(a,b,c){return"/"===m?a:b?m.slice(0,-1)+a:c?m.slice(1)+a:a}function g(a){function c(a){var c=a(d,b);return c?(F(c)&&b.replace().url(c),!0):!1}if(!a||!a.defaultPrevented){var e,f=i.length;for(e=0;f>e;e++)if(c(i[e]))return;j&&c(j)}}function l(){return h=h||c.$on("$locationChangeSuccess",g)}var m=e.baseHref(),n=b.url();return k||l(),{sync:function(){g()},listen:function(){return l()},update:function(a){return a?void(n=b.url()):void(b.url()!==n&&(b.url(n),b.replace()))},push:function(a,c,d){b.url(a.format(c||{})),d&&d.replace&&b.replace()},href:function(c,d,e){if(!c.validates(d))return null;var g=a.html5Mode(),h=c.format(d);if(e=e||{},g||null===h||(h="#"+a.hashPrefix()+h),h=f(h,g,e.absolute),!e.absolute||!h)return h;var i=!g&&h?"/":"",j=b.port();return j=80===j||443===j?"":":"+j,[b.protocol(),"://",b.host(),j,i,h].join("")}}}var h,i=[],j=null,k=!1;this.rule=function(a){if(!E(a))throw new Error("'rule' must be a function");return i.push(a),this},this.otherwise=function(a){if(F(a)){var b=a;a=function(){return b}}else if(!E(a))throw new Error("'rule' must be a function");return j=a,this},this.when=function(a,c){var g,h=F(c);if(F(a)&&(a=b.compile(a)),!h&&!E(c)&&!H(c))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,c){return h&&(g=b.compile(c),c=["$match",function(a){return g.format(a)}]),J(function(b,d){return f(b,c,a.exec(d.path(),d.search()))},{prefix:F(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(g=b,b=["$match",function(a){return e(g,a)}]),J(function(c,d){return f(c,b,a.exec(d.path()))},{prefix:d(a)})}},j={matcher:b.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,c));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),k=a},this.$get=g,g.$inject=["$location","$rootScope","$injector","$browser"]}function r(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function h(a,b){if(!a)return c;var d=F(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=v[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function l(a,b){w[a]||(w[a]=[]),w[a].push(b)}function m(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!F(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(v.hasOwnProperty(c))throw new Error("State '"+c+"'' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):F(b.parent)?b.parent:"";if(e&&!v[e])return l(e,b.self);for(var f in y)E(y[f])&&(b[f]=y[f](b,y.$delegates[f]));if(v[c]=b,!b[x]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){u.$current.navigable==b&&j(a,c)||u.transitionTo(b,a,{location:!1})}]),w[c])for(var g=0;g-1}function o(a){var b=a.split("."),c=u.$current.name.split(".");if("**"===b[0]&&(c=c.slice(c.indexOf(b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(c.indexOf(b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length)return!1;for(var d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return c.join("")===b.join("")}function p(a,b){return F(a)&&!D(b)?y[a]:E(b)&&F(a)?(y[a]&&!y.$delegates[a]&&(y.$delegates[a]=y[a]),y[a]=b,this):this}function q(a,b){return G(a)?b=a:b.name=a,m(b),this}function r(a,e,f,l,m,p,q){function r(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return q.update(),A;if(!g.retry)return null;if(f.$retry)return q.update(),B;var h=u.transition=e.when(g.retry);return h.then(function(){return h!==u.transition?y:(b.options.$retry=!0,u.transitionTo(b.to,b.toParams,b.options))},function(){return A}),q.update(),h}function w(a,c,d,h,i){var j=d?c:k(g(a.params),c),n={$stateParams:j};i.resolve=m.resolve(a.resolve,n,i.resolve,a);var o=[i.resolve.then(function(a){i.globals=a})];return h&&o.push(h),I(a.views,function(c,d){var e=c.resolve&&c.resolve!==a.resolve?c.resolve:{};e.$template=[function(){return f.load(d,{view:c,locals:n,params:j})||""}],o.push(m.resolve(e,n,i.resolve,a).then(function(f){if(E(c.controllerProvider)||H(c.controllerProvider)){var g=b.extend({},e,n);f.$$controller=l.invoke(c.controllerProvider,null,g)}else f.$$controller=c.controller;f.$$state=a,f.$$controllerAs=c.controllerAs,i[d]=f}))}),e.all(o).then(function(){return i})}var y=e.reject(new Error("transition superseded")),z=e.reject(new Error("transition prevented")),A=e.reject(new Error("transition aborted")),B=e.reject(new Error("transition failed"));return t.locals={resolve:null,globals:{$stateParams:{}}},u={params:{},current:t.self,$current:t,transition:null},u.reload=function(){u.transitionTo(u.current,p,{reload:!0,inherit:!1,notify:!1})},u.go=function(a,b,c){return u.transitionTo(a,b,J({inherit:!0,relative:u.$current},c))},u.transitionTo=function(b,c,f){c=c||{},f=J({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var m,n=u.$current,o=u.params,v=n.path,A=h(b,f.relative);if(!D(A)){var B={to:b,toParams:c,options:f},C=r(B,n.self,o,f);if(C)return C;if(b=B.to,c=B.toParams,f=B.options,A=h(b,f.relative),!D(A)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(A[x])throw new Error("Cannot transition to abstract state '"+b+"'");f.inherit&&(c=i(p,c||{},u.$current,A)),b=A;var E=b.path,F=0,G=E[F],H=t.locals,I=[];if(!f.reload)for(;G&&G===v[F]&&j(c,o,G.ownParams);)H=I[F]=G.locals,F++,G=E[F];if(s(b,n,H,f))return b.self.reloadOnSearch!==!1&&q.update(),u.transition=null,e.when(u.current);if(c=k(g(b.params),c||{}),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,n.self,o).defaultPrevented)return q.update(),z;for(var L=e.when(H),M=F;M=F;d--)g=v[d],g.self.onExit&&l.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=F;d=0?c:c+"@"+(b?b.state.name:"")}function x(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function y(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function z(a,c){var d=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,f,g,h){var i=x(g.uiSref,a.current.name),j=null,k=y(f)||a.$current,l="FORM"===f[0].nodeName,m=l?"action":"href",n=!0,o={relative:k,inherit:!0},p=e.$eval(g.uiSrefOpts)||{};b.forEach(d,function(a){a in p&&(o[a]=p[a])});var q=function(b){if(b&&(j=b),n){var c=a.href(i.state,j,o),d=h[1]||h[0];return d&&d.$$setStateInfo(i.state,j),null===c?(n=!1,!1):void(f[0][m]=c)}};i.paramExpr&&(e.$watch(i.paramExpr,function(a){a!==j&&q(a)},!0),j=e.$eval(i.paramExpr)),q(),l||f.bind("click",function(b){var d=b.which||b.button;if(!(d>1||b.ctrlKey||b.metaKey||b.shiftKey||f.attr("target"))){var e=c(function(){a.go(i.state,j,o)});b.preventDefault(),b.preventDefault=function(){c.cancel(e)}}})}}}function A(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs",function(d,e,f){function g(){h()?e.addClass(m):e.removeClass(m)}function h(){return"undefined"!=typeof f.uiSrefActiveEq?a.$current.self===k&&i():a.includes(k.name)&&i()}function i(){return!l||j(l,b)}var k,l,m;m=c(f.uiSrefActiveEq||f.uiSrefActive||"",!1)(d),this.$$setStateInfo=function(b,c){k=a.get(b,y(e)),l=c,g()},d.$on("$stateChangeSuccess",g)}]}}function B(a){return function(b){return a.is(b)}}function C(a){return function(b){return a.includes(b)}}var D=b.isDefined,E=b.isFunction,F=b.isString,G=b.isObject,H=b.isArray,I=b.forEach,J=b.extend,K=b.copy;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),l.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",l),m.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",m),n.prototype.concat=function(a,b){return new n(this.sourcePath+a+this.sourceSearch,b)},n.prototype.toString=function(){return this.source},n.prototype.exec=function(a,b){var c=this.regexp.exec(a);if(!c)return null;b=b||{};var d,e,f,g=this.parameters(),h=g.length,i=this.segments.length-1,j={};if(i!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(d=0;i>d;d++)f=g[d],e=this.params[f],j[f]=e.$value(c[d+1]);for(;h>d;d++)f=g[d],e=this.params[f],j[f]=e.$value(b[f]);return j},n.prototype.parameters=function(a){return D(a)?this.params[a]||null:g(this.params)},n.prototype.validates=function(a){var b,c,d=!0,e=this;return I(a,function(a,f){e.params[f]&&(c=e.params[f],b=!a&&D(c.value),d=d&&(b||c.type.is(a)))}),d},n.prototype.format=function(a){var b=this.segments,c=this.parameters();if(!a)return b.join("").replace("//","/");var d,e,f,g,h,i,j=b.length-1,k=c.length,l=b[0];if(!this.validates(a))return null;for(d=0;j>d;d++)g=c[d],f=a[g],h=this.params[g],(D(f)||"/"!==b[d]&&"/"!==b[d+1])&&(null!=f&&(l+=encodeURIComponent(h.type.encode(f))),l+=b[d+1]);for(;k>d;d++)g=c[d],f=a[g],null!=f&&(i=H(f),i&&(f=f.map(encodeURIComponent).join("&"+g+"=")),l+=(e?"&":"?")+g+"="+(i?f:encodeURIComponent(f)),e=!0);return l},n.prototype.$types={},o.prototype.is=function(){return!0},o.prototype.encode=function(a){return a},o.prototype.decode=function(a){return a},o.prototype.equals=function(a,b){return a==b},o.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},o.prototype.pattern=/.*/,b.module("ui.router.util").provider("$urlMatcherFactory",p),q.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",q),r.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").value("$stateParams",{}).provider("$state",r),s.$inject=[],b.module("ui.router.state").provider("$view",s),b.module("ui.router.state").provider("$uiViewScroll",t),u.$inject=["$state","$injector","$uiViewScroll"],v.$inject=["$compile","$controller","$state"],b.module("ui.router.state").directive("uiView",u),b.module("ui.router.state").directive("uiView",v),z.$inject=["$state","$timeout"],A.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",z).directive("uiSrefActive",A).directive("uiSrefActiveEq",A),B.$inject=["$state"],C.$inject=["$state"],b.module("ui.router.state").filter("isState",B).filter("includedByState",C)}(window,window.angular); 8 | -------------------------------------------------------------------------------- /bower_components/angular-validation/angular-validation-rule.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | angular.module('validation.rule', ['validation']) 3 | .config(['$validationProvider', 4 | function($validationProvider) { 5 | 6 | var expression = { 7 | required: function(value) { 8 | return !!value; 9 | }, 10 | url: /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/, 11 | email: /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/, 12 | number: /^\d+$/, 13 | validateAlphaspecial: /^[a-zA-Z.,]+$/, 14 | validateAlphanumSpecial: /^[a-zA-Z0-9\s-*&()!@#$%^|\\/\:;?_+=.,`~'"]+$/, 15 | validateNotEmpty: function(value){ 16 | if(value.length==0){ 17 | return false; 18 | }else{ 19 | return true; 20 | } 21 | }, 22 | validateNumberWithDollar: function(text){ 23 | firstCharName=text.substring(0,1); 24 | totalCharName=text.substring(1,text.length); 25 | //firstCharName = firstCharName.ReplaceAll("$",""); 26 | firstCharName = firstCharName.replace(/$/g,""); 27 | text=firstCharName+totalCharName; 28 | text = text.replace(/[,]/g,""); 29 | if (text.indexOf("(") != -1) { 30 | if (text.indexOf(")") != -1) { 31 | text = text.replace(/[(]/g,"-"); 32 | } else { 33 | return true; 34 | } 35 | } 36 | text = text.replace(/[)]/g,""); 37 | var dot = text.indexOf("."); 38 | if (dot != -1) { 39 | var dotArr = text.split("."); 40 | if (dotArr.length >= 3) { 41 | text = dotArr[0] + "." +dotArr[1]; 42 | } 43 | } 44 | if (text.match(/-/)) { 45 | return true; 46 | } 47 | if (!text.match(/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/)) { 48 | return true; 49 | } 50 | return false; 51 | } 52 | }; 53 | 54 | var defaultMsg = { 55 | required: { 56 | error: 'This should be Required!!', 57 | success: 'It\'s Required' 58 | }, 59 | url: { 60 | error: 'This should be Url', 61 | success: 'It\'s Url' 62 | }, 63 | email: { 64 | error: 'This should be Email', 65 | success: 'It\'s Email' 66 | }, 67 | number: { 68 | error: 'This should be Number', 69 | success: 'It\'s Number' 70 | } 71 | }; 72 | 73 | $validationProvider.setExpression(expression).setDefaultMsg(defaultMsg); 74 | 75 | $validationProvider.showSuccessMessage = false; // or true(default) 76 | $validationProvider.showErrorMessage = true; // or true(default) 77 | 78 | /*$validationProvider.setErrorHTML(function (msg) { 79 | // remember to return your HTML 80 | // eg: return '

' + msg + '

'; 81 | return ""; 82 | });*/ 83 | /*$validationProvider.setSuccessHTML(function (msg) { 84 | // eg: return '

' + msg + '

'; 85 | });*/ 86 | 87 | } 88 | ]); 89 | 90 | }).call(this); 91 | -------------------------------------------------------------------------------- /bower_components/angular-validation/angular-validation.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | angular.module('validation', ['validation.provider', 'validation.directive']); 3 | }).call(this); 4 | 5 | (function() { 6 | angular.module('validation.provider', []) 7 | .provider('$validation', function() { 8 | 9 | 10 | var $injector, 11 | $scope, 12 | $http, 13 | $q, 14 | $timeout, 15 | _this = this; 16 | 17 | 18 | /** 19 | * Setup the provider 20 | * @param injector 21 | */ 22 | var setup = function(injector) { 23 | $injector = injector; 24 | $scope = $injector.get('$rootScope'); 25 | $http = $injector.get('$http'); 26 | $q = $injector.get('$q'); 27 | $timeout = $injector.get('$timeout'); 28 | }; 29 | 30 | 31 | /** 32 | * Define validation type RegExp 33 | * @type {{}} 34 | */ 35 | var expression = {}; 36 | 37 | 38 | /** 39 | * default error, success message 40 | * @type {{}} 41 | */ 42 | var defaultMsg = {}; 43 | 44 | 45 | /** 46 | * Allow user to set a custom Expression, do remember set the default message using setDefaultMsg 47 | * @param obj 48 | * @returns {*} 49 | */ 50 | this.setExpression = function(obj) { 51 | angular.extend(expression, obj); 52 | return _this; 53 | }; 54 | 55 | 56 | /** 57 | * Get the Expression 58 | * @param exprs 59 | * @returns {*} 60 | */ 61 | this.getExpression = function(exprs) { 62 | return expression[exprs]; 63 | }; 64 | 65 | 66 | /** 67 | * Allow user to set default message 68 | * @param obj 69 | * @returns {*} 70 | */ 71 | this.setDefaultMsg = function(obj) { 72 | angular.extend(defaultMsg, obj); 73 | return _this; 74 | }; 75 | 76 | 77 | /** 78 | * Get the Default Message 79 | * @param msg 80 | * @returns {*} 81 | */ 82 | this.getDefaultMsg = function(msg) { 83 | return defaultMsg[msg]; 84 | }; 85 | 86 | 87 | /** 88 | * Override the errorHTML function 89 | * @param func 90 | * @returns {*} 91 | */ 92 | this.setErrorHTML = function(func) { 93 | if (func.constructor !== Function) { 94 | return; 95 | } 96 | 97 | _this.getErrorHTML = func; 98 | 99 | return _this; 100 | }; 101 | 102 | 103 | /** 104 | * Invalid message HTML, here's the default 105 | * @param message 106 | * @returns {string} 107 | */ 108 | this.getErrorHTML = function(message) { 109 | return '

' + message + '

'; 110 | }; 111 | 112 | 113 | /** 114 | * Override the successHTML function 115 | * @param func 116 | * @returns {*} 117 | */ 118 | this.setSuccessHTML = function(func) { 119 | if (func.constructor !== Function) { 120 | return; 121 | } 122 | 123 | _this.getSuccessHTML = func; 124 | 125 | return _this; 126 | }; 127 | 128 | 129 | /** 130 | * Valid message HTML, here's the default 131 | * @param message 132 | * @returns {string} 133 | */ 134 | this.getSuccessHTML = function(message) { 135 | return '

' + message + '

'; 136 | }; 137 | 138 | 139 | /** 140 | * Whether show the validation success message 141 | * You can easily change this to false in your config 142 | * example: $validationProvider.showSuccessMessage = false; 143 | * @type {boolean} 144 | */ 145 | this.showSuccessMessage = true; 146 | 147 | 148 | /** 149 | * Whether show the validation error message 150 | * You can easily change this to false in your config 151 | * example: $validationProvider.showErrorMessage = false; 152 | * @type {boolean} 153 | */ 154 | this.showErrorMessage = true; 155 | 156 | 157 | /** 158 | * Check form valid, return true 159 | * checkValid(Form): Check the specific form(Form) valid from angular `$valid` 160 | * @param form 161 | * @returns {boolean} 162 | */ 163 | this.checkValid = function(form) { 164 | if (form.$valid === undefined) { 165 | return false; 166 | } 167 | return (form && form.$valid === true); 168 | }; 169 | 170 | 171 | /** 172 | * Validate the form when click submit, when `validMethod = submit` 173 | * @param form 174 | * @returns {promise|*} 175 | */ 176 | this.validate = function(form) { 177 | 178 | var deferred = $q.defer(), 179 | idx = 0; 180 | 181 | if (form === undefined) { 182 | console.error('This is not a regular Form name scope'); 183 | deferred.reject('This is not a regular Form name scope'); 184 | return deferred.promise; 185 | } 186 | 187 | if (form.validationId) { // single 188 | $scope.$broadcast(form.$name + 'submit-' + form.validationId, idx++); 189 | } else if (form.constructor === Array) { // multiple 190 | for (var k in form) { 191 | $scope.$broadcast(form[k].$name + 'submit-' + form[k].validationId, idx++); 192 | } 193 | } else { 194 | for (var i in form) { // whole scope 195 | if (form[i] && form[i].hasOwnProperty('$dirty')) { 196 | $scope.$broadcast(i + 'submit-' + form[i].validationId, idx++); 197 | } 198 | } 199 | } 200 | 201 | deferred.promise.success = function(fn) { 202 | deferred.promise.then(function(value) { 203 | fn(value); 204 | }); 205 | return deferred.promise; 206 | }; 207 | 208 | deferred.promise.error = function(fn) { 209 | deferred.promise.then(null, function(value) { 210 | fn(value); 211 | }); 212 | return deferred.promise; 213 | }; 214 | 215 | $timeout(function() { 216 | if (_this.checkValid(form)) { 217 | deferred.resolve('success'); 218 | } else { 219 | deferred.reject('error'); 220 | } 221 | }); 222 | 223 | return deferred.promise; 224 | }; 225 | 226 | 227 | /** 228 | * reset the specific form 229 | * @param form 230 | */ 231 | this.reset = function(form) { 232 | 233 | if (form === undefined) { 234 | console.error('This is not a regular Form name scope'); 235 | return; 236 | } 237 | 238 | if (form.validationId) { 239 | $scope.$broadcast(form.$name + 'reset-' + form.validationId); 240 | } else if (form.constructor === Array) { 241 | for (var k in form) { 242 | $scope.$broadcast(form[k].$name + 'reset-' + form[k].validationId); 243 | } 244 | } else { 245 | for (var i in form) { 246 | if (form[i].hasOwnProperty('$dirty')) { 247 | $scope.$broadcast(i + 'reset-' + form[i].validationId); 248 | } 249 | } 250 | } 251 | }; 252 | 253 | 254 | /** 255 | * $get 256 | * @returns {{setErrorHTML: *, getErrorHTML: Function, setSuccessHTML: *, getSuccessHTML: Function, setExpression: *, getExpression: Function, setDefaultMsg: *, getDefaultMsg: Function, checkValid: Function, validate: Function, reset: Function}} 257 | */ 258 | this.$get = ['$injector', 259 | function($injector) { 260 | setup($injector); 261 | return { 262 | setErrorHTML: this.setErrorHTML, 263 | getErrorHTML: this.getErrorHTML, 264 | setSuccessHTML: this.setSuccessHTML, 265 | getSuccessHTML: this.getSuccessHTML, 266 | setExpression: this.setExpression, 267 | getExpression: this.getExpression, 268 | setDefaultMsg: this.setDefaultMsg, 269 | getDefaultMsg: this.getDefaultMsg, 270 | showSuccessMessage: this.showSuccessMessage, 271 | showErrorMessage: this.showErrorMessage, 272 | checkValid: this.checkValid, 273 | validate: this.validate, 274 | reset: this.reset 275 | }; 276 | } 277 | ]; 278 | 279 | }); 280 | }).call(this); 281 | 282 | (function() { 283 | angular.module('validation.directive', ['validation.provider']) 284 | .directive('validator', ['$injector', 285 | function($injector) { 286 | 287 | var $validationProvider = $injector.get('$validation'), 288 | $q = $injector.get('$q'), 289 | $timeout = $injector.get('$timeout'); 290 | 291 | /** 292 | * Do this function if validation valid 293 | * @param element 294 | * @param validMessage 295 | * @param validation 296 | * @param callback 297 | * @param ctrl 298 | * @returns {} 299 | */ 300 | var validFunc = function(element, validMessage, validation, callback, ctrl) { 301 | if ($validationProvider.showSuccessMessage) { 302 | element.next().html($validationProvider.getSuccessHTML(validMessage || $validationProvider.getDefaultMsg(validation).success)); 303 | } else { 304 | element.next().html(''); 305 | } 306 | ctrl.$setValidity(ctrl.$name, true); 307 | if (callback) callback(); 308 | 309 | return true; 310 | }; 311 | 312 | 313 | /** 314 | * Do this function if validation invalid 315 | * @param element 316 | * @param validMessage 317 | * @param validation 318 | * @param callback 319 | * @param ctrl 320 | * @returns {} 321 | */ 322 | var invalidFunc = function(element, validMessage, validation, callback, ctrl) { 323 | if ($validationProvider.showErrorMessage) { 324 | element.next().html($validationProvider.getErrorHTML(validMessage || $validationProvider.getDefaultMsg(validation).error)); 325 | } else { 326 | element.next().html(''); 327 | } 328 | ctrl.$setValidity(ctrl.$name, false); 329 | if (callback) callback(); 330 | 331 | return false; 332 | }; 333 | 334 | 335 | /** 336 | * If var is true, focus element when validate end 337 | * @type {boolean} 338 | ***private variable 339 | */ 340 | var isFocusElement = false; 341 | 342 | 343 | /** 344 | * Check Validation with Function or RegExp 345 | * @param scope 346 | * @param element 347 | * @param attrs 348 | * @param ctrl 349 | * @param validation 350 | * @param value 351 | * @returns {} 352 | */ 353 | var checkValidation = function(scope, element, attrs, ctrl, validation, value) { 354 | 355 | var validators = validation.slice(0), 356 | validator = trim(validators[0]), 357 | leftValidation = validators.slice(1), 358 | successMessage = validator + 'SuccessMessage', 359 | errorMessage = validator + 'ErrorMessage', 360 | expression = $validationProvider.getExpression(validator), 361 | valid = { 362 | success: function() { 363 | validFunc(element, attrs[successMessage], validator, scope.validCallback, ctrl); 364 | if (leftValidation.length) { 365 | checkValidation(scope, element, attrs, ctrl, leftValidation, value); 366 | } else { 367 | return true; 368 | } 369 | }, 370 | error: function() { 371 | return invalidFunc(element, attrs[errorMessage], validator, scope.invalidCallback, ctrl); 372 | } 373 | }; 374 | 375 | if (expression === undefined) { 376 | console.error('You are using undefined validator "%s"', validator); 377 | if (leftValidation.length) { 378 | checkValidation(scope, element, attrs, ctrl, leftValidation, value); 379 | } else { 380 | return; 381 | } 382 | } 383 | // Check with Function 384 | if (expression.constructor === Function) { 385 | return $q.all([$validationProvider.getExpression(validator)(value, scope, element, attrs)]) 386 | .then(function(data) { 387 | if (data && data.length > 0 && data[0]) { 388 | return valid.success(); 389 | } else { 390 | return valid.error(); 391 | } 392 | }, function() { 393 | return valid.error(); 394 | }); 395 | } 396 | // Check with RegExp 397 | else if (expression.constructor === RegExp) { 398 | return $validationProvider.getExpression(validator).test(value) ? valid.success() : valid.error(); 399 | } else { 400 | return valid.error(); 401 | } 402 | }; 403 | 404 | var trim = function(elementValue) { 405 | return elementValue.replace(/^\s+/, '').replace(/\s+$/, ''); 406 | }; 407 | 408 | /** 409 | * generate unique guid 410 | */ 411 | var s4 = function() { 412 | return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); 413 | }; 414 | var guid = function() { 415 | return (s4() + s4() + s4() + s4()); 416 | }; 417 | 418 | 419 | return { 420 | restrict: 'A', 421 | require: 'ngModel', 422 | scope: { 423 | model: '=ngModel', 424 | initialValidity: '=initialValidity', 425 | validCallback: '&', 426 | invalidCallback: '&' 427 | }, 428 | link: function(scope, element, attrs, ctrl) { 429 | 430 | /** 431 | * watch 432 | * @type {watch} 433 | * 434 | * Use to collect scope.$watch method 435 | * 436 | * use watch() to destroy the $watch method 437 | */ 438 | var watch = function() {}; 439 | 440 | /** 441 | * validator 442 | * @type {Array} 443 | * 444 | * Convert user input String to Array 445 | */ 446 | var validation = attrs.validator.split(','); 447 | 448 | /** 449 | * guid use 450 | */ 451 | var uid = ctrl.validationId = guid(); 452 | 453 | /** 454 | * Valid/Invalid Message 455 | */ 456 | element.after(''); 457 | 458 | /** 459 | * Set initial validity to false if no boolean value is transmitted 460 | */ 461 | var initialValidity = false; 462 | if (typeof scope.initialValidity === 'boolean') { 463 | initialValidity = scope.initialValidity; 464 | } 465 | 466 | /** 467 | * Set custom initial validity 468 | * Usage: 469 | */ 470 | ctrl.$setValidity(ctrl.$name, initialValidity); 471 | 472 | /** 473 | * Reset the validation for specific form 474 | */ 475 | scope.$on(ctrl.$name + 'reset-' + uid, function() { 476 | 477 | /** 478 | * clear scope.$watch here 479 | * when reset status 480 | * clear the $watch method to prevent 481 | * $watch again while reset the form 482 | */ 483 | watch(); 484 | 485 | isFocusElement = false; 486 | ctrl.$setViewValue(''); 487 | ctrl.$setPristine(); 488 | ctrl.$setValidity(ctrl.$name, false); 489 | ctrl.$render(); 490 | element.next().html(''); 491 | }); 492 | 493 | /** 494 | * Check validator 495 | */ 496 | 497 | (function() { 498 | /** 499 | * Click submit form, check the validity when submit 500 | */ 501 | scope.$on(ctrl.$name + 'submit-' + uid, function(event, index) { 502 | var value = element[0].value, 503 | isValid = false; 504 | 505 | if (index === 0) { 506 | isFocusElement = false; 507 | } 508 | 509 | isValid = checkValidation(scope, element, attrs, ctrl, validation, value); 510 | 511 | if (attrs.validMethod === 'submit') { 512 | watch(); // clear previous scope.$watch 513 | watch = scope.$watch('model', function(value, oldValue) { 514 | 515 | // don't watch when init 516 | if (value === oldValue) { 517 | return; 518 | } 519 | 520 | // scope.$watch will translate '' to undefined 521 | // undefined/null will pass the required submit /^.+/ 522 | // cause some error in this validation 523 | if (value === undefined || value === null) { 524 | value = ''; 525 | } 526 | 527 | isValid = checkValidation(scope, element, attrs, ctrl, validation, value); 528 | }); 529 | 530 | } 531 | 532 | // Focus first input element when submit error #11 533 | if (!isFocusElement && !isValid) { 534 | isFocusElement = true; 535 | element[0].focus(); 536 | } 537 | }); 538 | 539 | /** 540 | * Validate blur method 541 | */ 542 | if (attrs.validMethod === 'blur') { 543 | element.bind('blur', function() { 544 | var value = element[0].value; 545 | scope.$apply(function() { 546 | checkValidation(scope, element, attrs, ctrl, validation, value); 547 | }); 548 | }); 549 | 550 | return; 551 | } 552 | 553 | /** 554 | * Validate submit & submit-only method 555 | */ 556 | if (attrs.validMethod === 'submit' || attrs.validMethod === 'submit-only') { 557 | return; 558 | } 559 | 560 | /** 561 | * Validate watch method 562 | * This is the default method 563 | */ 564 | scope.$watch('model', function(value) { 565 | /** 566 | * dirty, pristine, viewValue control here 567 | */ 568 | if (ctrl.$pristine && ctrl.$viewValue) { 569 | // has value when initial 570 | ctrl.$setViewValue(ctrl.$viewValue); 571 | } else if (ctrl.$pristine) { 572 | // Don't validate form when the input is clean(pristine) 573 | element.next().html(''); 574 | return; 575 | } 576 | checkValidation(scope, element, attrs, ctrl, validation, value); 577 | }); 578 | 579 | })(); 580 | 581 | $timeout(function() { 582 | /** 583 | * Don't showup the validation Message 584 | */ 585 | attrs.$observe('noValidationMessage', function(value) { 586 | var el = element.next(); 587 | if (value == 'true' || value === true) { 588 | el.css('display', 'none'); 589 | } else if (value == 'false' || value === false) { 590 | el.css('display', 'block'); 591 | } else {} 592 | }); 593 | }); 594 | 595 | } 596 | }; 597 | } 598 | ]) 599 | 600 | .directive('validationSubmit', ['$injector', 601 | function($injector) { 602 | 603 | var $validationProvider = $injector.get('$validation'), 604 | $timeout = $injector.get('$timeout'), 605 | $parse = $injector.get('$parse'); 606 | 607 | return { 608 | priority: 1, // execute before ng-click (0) 609 | require: '?ngClick', 610 | link: function postLink(scope, element, attrs) { 611 | var form = $parse(attrs.validationSubmit)(scope); 612 | 613 | $timeout(function() { 614 | // Disable ng-click event propagation 615 | element.off('click'); 616 | element.on('click', function(e) { 617 | e.preventDefault(); 618 | 619 | $validationProvider.validate(form) 620 | .success(function() { 621 | $parse(attrs.ngClick)(scope); 622 | }); 623 | }); 624 | }); 625 | 626 | } 627 | }; 628 | } 629 | ]) 630 | 631 | .directive('validationReset', ['$injector', 632 | function($injector) { 633 | 634 | var $validationProvider = $injector.get('$validation'), 635 | $timeout = $injector.get('$timeout'), 636 | $parse = $injector.get('$parse'); 637 | 638 | return { 639 | link: function postLink(scope, element, attrs) { 640 | var form = $parse(attrs.validationReset)(scope); 641 | 642 | $timeout(function() { 643 | element.on('click', function(e) { 644 | e.preventDefault(); 645 | $validationProvider.reset(form); 646 | }); 647 | }); 648 | 649 | } 650 | }; 651 | } 652 | ]); 653 | 654 | }).call(this); 655 | -------------------------------------------------------------------------------- /bower_components/bootstrap/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} 2 | .clearfix:after{clear:both;} 3 | .hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;} 4 | .input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} 5 | .hidden{display:none;visibility:hidden;} 6 | .visible-phone{display:none;} 7 | .visible-tablet{display:none;} 8 | .visible-desktop{display:block;} 9 | .hidden-phone{display:block;} 10 | .hidden-tablet{display:block;} 11 | .hidden-desktop{display:none;} 12 | @media (max-width:767px){.visible-phone{display:block;} .hidden-phone{display:none;} .hidden-desktop{display:block;} .visible-desktop{display:none;}}@media (min-width:768px) and (max-width:979px){.visible-tablet{display:block;} .hidden-tablet{display:none;} .hidden-desktop{display:block;} .visible-desktop{display:none;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top{margin-left:-20px;margin-right:-20px;} .container{width:auto;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;} .thumbnails [class*="span"]{width:auto;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid > .span12{width:99.999999993%;} .row-fluid > .span11{width:91.436464082%;} .row-fluid > .span10{width:82.87292817100001%;} .row-fluid > .span9{width:74.30939226%;} .row-fluid > .span8{width:65.74585634900001%;} .row-fluid > .span7{width:57.182320438000005%;} .row-fluid > .span6{width:48.618784527%;} .row-fluid > .span5{width:40.055248616%;} .row-fluid > .span4{width:31.491712705%;} .row-fluid > .span3{width:22.928176794%;} .row-fluid > .span2{width:14.364640883%;} .row-fluid > .span1{width:5.801104972%;} input,textarea,.uneditable-input{margin-left:0;} input.span12, textarea.span12, .uneditable-input.span12{width:714px;} input.span11, textarea.span11, .uneditable-input.span11{width:652px;} input.span10, textarea.span10, .uneditable-input.span10{width:590px;} input.span9, textarea.span9, .uneditable-input.span9{width:528px;} input.span8, textarea.span8, .uneditable-input.span8{width:466px;} input.span7, textarea.span7, .uneditable-input.span7{width:404px;} input.span6, textarea.span6, .uneditable-input.span6{width:342px;} input.span5, textarea.span5, .uneditable-input.span5{width:280px;} input.span4, textarea.span4, .uneditable-input.span4{width:218px;} input.span3, textarea.span3, .uneditable-input.span3{width:156px;} input.span2, textarea.span2, .uneditable-input.span2{width:94px;} input.span1, textarea.span1, .uneditable-input.span1{width:32px;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav .nav-header{color:#999999;text-shadow:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.564102564%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid > .span12{width:100%;} .row-fluid > .span11{width:91.45299145300001%;} .row-fluid > .span10{width:82.905982906%;} .row-fluid > .span9{width:74.358974359%;} .row-fluid > .span8{width:65.81196581200001%;} .row-fluid > .span7{width:57.264957265%;} .row-fluid > .span6{width:48.717948718%;} .row-fluid > .span5{width:40.170940171000005%;} .row-fluid > .span4{width:31.623931624%;} .row-fluid > .span3{width:23.076923077%;} .row-fluid > .span2{width:14.529914530000001%;} .row-fluid > .span1{width:5.982905983%;} input,textarea,.uneditable-input{margin-left:0;} input.span12, textarea.span12, .uneditable-input.span12{width:1160px;} input.span11, textarea.span11, .uneditable-input.span11{width:1060px;} input.span10, textarea.span10, .uneditable-input.span10{width:960px;} input.span9, textarea.span9, .uneditable-input.span9{width:860px;} input.span8, textarea.span8, .uneditable-input.span8{width:760px;} input.span7, textarea.span7, .uneditable-input.span7{width:660px;} input.span6, textarea.span6, .uneditable-input.span6{width:560px;} input.span5, textarea.span5, .uneditable-input.span5{width:460px;} input.span4, textarea.span4, .uneditable-input.span4{width:360px;} input.span3, textarea.span3, .uneditable-input.span3{width:260px;} input.span2, textarea.span2, .uneditable-input.span2{width:160px;} input.span1, textarea.span1, .uneditable-input.span1{width:60px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;}} 13 | -------------------------------------------------------------------------------- /bower_components/bootstrap/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.2.0 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('