This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function (grunt) { | |
| // Load grunt tasks automatically | |
| require('load-grunt-tasks')(grunt); | |
| // Time how long tasks take. Can help when optimizing build times | |
| require('time-grunt')(grunt); | |
| grunt.initConfig({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var classRoute = angular.module('directives.classRoute',[]); | |
| classRoute.directive('classRoute', function($rootScope, $route) { | |
| return function(scope, elem, attr) { | |
| var previous = ''; | |
| $rootScope.$on('$routeChangeSuccess', function(event, currentRoute) { | |
| var route = currentRoute.$$route; | |
| if(route) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fileModel = angular.module('directives.fileModel', []); | |
| fileModel.directive('fileModel', ['$parse', function ($parse) { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| var model = $parse(attrs.fileModel); | |
| var modelSetter = model.assign; | |
| element.bind('change', function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var securityInterceptor = angular.module('security.interceptor', []); | |
| //securityInterceptor, add token to page_header | |
| securityInterceptor.factory('securityInterceptor', ['$q', '$cookieStore', '$location', 'toaster', | |
| function ($q, $cookieStore, $location, toaster) { | |
| var token = $cookieStore.get('token'); | |
| return { | |
| 'request': function (config) { | |
| config.headers = config.headers || {}; | |
| if (token) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var securityService = angular.module('security.service', []); | |
| //Security | |
| securityService.factory('Security', [ | |
| '$http', '$location', '$cookieStore', 'API_SERVER', '$window', '$route', 'toaster', | |
| function ($http, $location, $cookieStore, API_SERVER, $window, $route, toaster) { | |
| var security = {}; | |
| //login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.filter('rangeFilter', function () { | |
| return function (items, sliderRanges) { | |
| var filtered = []; | |
| var expectedReturnMin = sliderRanges.expectedReturnMin; | |
| var expectedReturnMax = sliderRanges.expectedReturnMax; | |
| var durationMin = sliderRanges.durationMin; | |
| var durationMax = sliderRanges.durationMax; | |
| angular.forEach(items, function (item) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var routeData = angular.module('RouteData', []); | |
| routeData.provider('RouteData', function () { | |
| var settings = {}; | |
| var hookToRootScope = false; | |
| this.applyConfig = function (newSettings) { | |
| settings = newSettings; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> | |
| <meta http-equiv="Pragma" content="no-cache" /> | |
| <meta http-equiv="Expires" content="0" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var flag = false; | |
| var timer = null; | |
| window.addEventListener('load', function () { | |
| if (!flag) { | |
| flag = true; | |
| document.getElementById("load").style["display"] = "none"; | |
| clearTimeout(timer); | |
| } | |
| }, false); | |
| timer = setTimeout(function () { |
OlderNewer