##// END OF EJS Templates
plugins: allow to set callables that execute after application gets run
ergo -
Show More
@@ -2814,6 +2814,7 b' function kickstartAE(initialUserData) {'
2814
2814
2815 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
2815 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
2816 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
2816 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
2817
2817 if (initialUserData){
2818 if (initialUserData){
2818 stateHolder.AeUser.update(initialUserData);
2819 stateHolder.AeUser.update(initialUserData);
2819
2820
@@ -2873,8 +2874,12 b' function kickstartAE(initialUserData) {'
2873 }
2874 }
2874 return true;
2875 return true;
2875 };
2876 };
2876 $transitions.onBefore({}, transitionApp);
2877
2877
2878 for (var i=0; i < stateHolder.plugins.callables.length; i++){
2879
2880 }
2881
2882 $transitions.onBefore({}, transitionApp);
2878 }]);
2883 }]);
2879 }
2884 }
2880
2885
@@ -6894,6 +6899,11 b' function kickstartAE(initialUserData) {'
6894 );
6899 );
6895
6900
6896
6901
6902 $templateCache.put('templates/admin/groups/parent_view.html',
6903 "<div ui-view></div>"
6904 );
6905
6906
6897 $templateCache.put('templates/directives/search_type_ahead.html',
6907 $templateCache.put('templates/directives/search_type_ahead.html',
6898 "<a>\n" +
6908 "<a>\n" +
6899 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
6909 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
@@ -11921,9 +11931,8 b" angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig"
11921 PluginConfig.$inject = ['stateHolder'];
11931 PluginConfig.$inject = ['stateHolder'];
11922
11932
11923 function PluginConfig(stateHolder) {
11933 function PluginConfig(stateHolder) {
11924 var vm = this;
11934 this.plugins = {};
11925 vm.plugins = {};
11935 this.inclusions = stateHolder.plugins.inclusions[this.section];
11926 vm.inclusions = stateHolder.plugins.inclusions[vm.section];
11927 }
11936 }
11928 });
11937 });
11929
11938
@@ -13159,6 +13168,7 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder',"
13159 var Plugins = {
13168 var Plugins = {
13160 enabled: [],
13169 enabled: [],
13161 configs: {},
13170 configs: {},
13171 callables: [],
13162 inclusions: {},
13172 inclusions: {},
13163 addInclusion: function (name, inclusion) {
13173 addInclusion: function (name, inclusion) {
13164 var self = this;
13174 var self = this;
@@ -178,6 +178,7 b' function kickstartAE(initialUserData) {'
178
178
179 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
179 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
180 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
180 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
181 console.log('appenlight run()');
181 if (initialUserData){
182 if (initialUserData){
182 stateHolder.AeUser.update(initialUserData);
183 stateHolder.AeUser.update(initialUserData);
183
184
@@ -237,7 +238,12 b' function kickstartAE(initialUserData) {'
237 }
238 }
238 return true;
239 return true;
239 };
240 };
240 $transitions.onBefore({}, transitionApp);
241
241
242 for (var i=0; i < stateHolder.plugins.callables.length; i++){
243 console.log('X', stateHolder.plugins.callables.length)
244 stateHolder.plugins.callables[i]();
245 }
246
247 $transitions.onBefore({}, transitionApp);
242 }]);
248 }]);
243 }
249 }
@@ -33,8 +33,7 b" angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig"
33 PluginConfig.$inject = ['stateHolder'];
33 PluginConfig.$inject = ['stateHolder'];
34
34
35 function PluginConfig(stateHolder) {
35 function PluginConfig(stateHolder) {
36 var vm = this;
36 this.plugins = {};
37 vm.plugins = {};
37 this.inclusions = stateHolder.plugins.inclusions[this.section];
38 vm.inclusions = stateHolder.plugins.inclusions[vm.section];
39 }
38 }
40 });
39 });
@@ -139,6 +139,7 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder',"
139 var Plugins = {
139 var Plugins = {
140 enabled: [],
140 enabled: [],
141 configs: {},
141 configs: {},
142 callables: [],
142 inclusions: {},
143 inclusions: {},
143 addInclusion: function (name, inclusion) {
144 addInclusion: function (name, inclusion) {
144 var self = this;
145 var self = this;
General Comments 0
You need to be logged in to leave comments. Login now