PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
var content_app = angular.module('content', ['ui.category_edit','pagemanager.file_manager','ui.colorpicker','ui.dialog','ui.popup','ui.router','ui.bootstrap','ngLocale','base','pagemanger.authentication','pagemanager.communication','pageEdit.widgets','pagemanager.iframe','ui.category_edit']) .value('data', { noIframe: false, name:'content', }) .directive('draggableElement', [function($window) { return { link: function(scope,element, attrs) { angular.element(element).draggable(); } } }]) .directive('draggableZone', ['$window', 'pageEdit_ddManager','pageEdit_layout',function($window, pageEdit_ddManager, pageEdit_layout) { return { link: function(scope,element, attrs) { var updateAutoScroll = function(a) { var e = $('#edit_page').contents(); //window.clearTimeout(window.updatescroll); if(!(a==true&&window.scrolling==false)) if(a==true||window.scrolling==false) { if(window.scrollingDirection=="up") { var s = e.scrollTop(); e.scrollTop(s-15); } else if(window.scrollingDirection=="down") { var s = e.scrollTop(); e.scrollTop(s+15); } //window.clearTimeout(window.updatescroll); if(!window.updatescroll) window.updatescroll = window.setInterval ( function() { updateAutoScroll(true); },30 ); } }; var handleScroll = function(event, ui) { var edit_page_top = $("#edit_page").offset().top, edit_page_height = $("#edit_page").height(), edit_page_bottom = edit_page_top + edit_page_height, ui_top = $(ui.helper).offset().top, ui_bottom = ui_top + $(ui.helper).height(); var o = (ui_top - edit_page_top), g = edit_page_bottom - ui_bottom; if(o < 10) { window.scrolling=true; window.scrollingDirection="up"; } else if(g < 10) { window.scrolling=true; window.scrollingDirection="down"; } else { window.scrolling=false; window.scrollingDirection=null; } updateAutoScroll(); }; angular.element(element).draggable( { appendTo: "body", scroll:false, iframeFix: true, //cursorAt: { left: 40,top:40 }, helper: function(event) { return '<div class="ww_widget_drag_helper ww_widget_drag_zone_helper">' + '<span class="ww_widget_drag_helper_image">'+ '<img class="img-responsive" src="' + window.top.basePath+ '/images/zones/' + attrs.name + '.png" alt="" />'+ '</span>' + '</div>'; }, start : function(event,ui) { window.scrolling=false; window.scrollingDirection=null; $('body').css('overflow', 'hidden'); $('.leftPanel').hide(); jQuery(ui.helper).attr("name", attrs.name); pageEdit_ddManager.init(); $window.dragging = true; }, drag : function(event,ui) { handleScroll(event, ui); var edit_page = $('#edit_page').contents(); var x = $('#edit_page').offset().left + 14; var f = event.pageX - x; var b = $('#top').outerHeight() + 10 ; var a = event.pageY -b; event.pageX = f + edit_page.scrollLeft(); event.pageY = a + + edit_page.scrollTop(); pageEdit_ddManager._dragDrag(event, ui); }, stop : function(event,ui) { $('body').css('overflow', ''); $('.leftPanel').show(); //var that = this; $window.dragging = false; window.scrolling=false; window.scrollingDirection=null; window.clearInterval(window.updatescroll); delete window.updatescroll; pageEdit_ddManager.destroy(); pageEdit_ddManager._drop_inner().then(function(drp) { var element = drp.element; var pos = drp.direction; var dropInfo = drp.dropInfo; var name = jQuery(ui.helper).attr("name"); pageEdit_layout._insertZoneTemplate(element, name, dropInfo); }); } } ); } } }]) .directive('widgetModule', ['$window', 'pageEdit_ddManager','pageEdit_layout',function($window, pageEdit_ddManager, pageEdit_layout) { return { link: function(scope,element, attrs) { var updateAutoScroll = function(a) { var e = $('#edit_page').contents(); //window.clearTimeout(window.updatescroll); if(!(a==true&&window.scrolling==false)) if(a==true||window.scrolling==false) { if(window.scrollingDirection=="up") { var s = e.scrollTop(); e.scrollTop(s-15); } else if(window.scrollingDirection=="down") { var s = e.scrollTop(); e.scrollTop(s+15); } //window.clearTimeout(window.updatescroll); if(!window.updatescroll) window.updatescroll = window.setInterval ( function() { updateAutoScroll(true); },30 ); } }; var handleScroll = function(event, ui) { var edit_page_top = $("#edit_page").offset().top, edit_page_height = $("#edit_page").height(), edit_page_bottom = edit_page_top + edit_page_height, ui_top = $(ui.helper).offset().top, ui_bottom = ui_top + $(ui.helper).height(); var o = (ui_top - edit_page_top), g = edit_page_bottom - ui_bottom; if(o < 10) { window.scrolling=true; window.scrollingDirection="up"; } else if(g < 10) { window.scrolling=true; window.scrollingDirection="down"; } else { window.scrolling=false; window.scrollingDirection=null; } updateAutoScroll(); }; angular.element(element).draggable( { appendTo: "body", scroll:false, iframeFix: true, //cursorAt: { left: 40,top:40 }, helper: function(event) { return '<div class="ww_widget_drag_helper">' + '<span class="ww_widget_drag_helper_image">'+ '<img class="" src="' + window.top.basePath + attrs.preview + '" alt="" />'+ '</span>' + '</div>'; }, start : function(event,ui) { window.scrolling=false; window.scrollingDirection=null; $('body').css('overflow', 'hidden'); $('.leftPanel').hide(); jQuery(ui.helper).attr("type", attrs.type); pageEdit_ddManager.init(); $window.dragging = true; }, drag : function(event,ui) { handleScroll(event, ui); var edit_page = $('#edit_page').contents(); var x = $('#edit_page').offset().left + 14; var f = event.pageX - x; var b = $('#top').outerHeight() + 10 ; var a = event.pageY -b; event.pageX = f + edit_page.scrollLeft(); event.pageY = a + + edit_page.scrollTop(); pageEdit_ddManager._dragDrag(event, ui); }, stop : function(event,ui) { $('body').css('overflow', ''); $('.leftPanel').show(); //var that = this; $window.dragging = false; window.scrolling=false; window.scrollingDirection=null; window.clearInterval(window.updatescroll); delete window.updatescroll; pageEdit_ddManager.destroy(); var type = jQuery(ui.helper).attr("type"); pageEdit_ddManager._drop_inner().then(function(drp) { var element = drp.element; var pos = drp.direction; var dropInfo = drp.dropInfo; pageEdit_layout._insertModule(element, type, dropInfo); }); } } ); } } }]) .service('handlerService',['$window', 'iframeService','$rootElement','childService','data',function($window,iframeService,$rootElement,childService,data) { this._attachHandler = function() {}; this.init=function() { }; this.loadCompleted = function() { if(!data.noIframe) { $('#edit_page').show(); childService.load(); } $('#editor_container').addClass('editor_' + data.name); }; this._detachHandler = function() { } }]) .directive('leftPanelHover', function() { return { link: function(scope,element) { var cl = 'text-hidden'; $(element).mouseleave(function() { $(this).addClass(cl); }) $(element).mouseenter(function() { $(this).removeClass(cl); }) } } }) .controller('leftPanelController', function($dialog,pageEdit,popup_profile,$scope,AuthenticationSvc,$location,communication,pageEdit_modules) { $scope.profile = function() { popup_profile.open(); } $scope.logout = function() { AuthenticationSvc.logout().then(function() { $location.path('/signin'); }); }; $scope.add = function() { $dialog.addNewZone().result.then(function(type) { var direction = type==1?'top':'bottom'; pageEdit_layout.rowHelper_clickEvent(that.getElement(),direction) }); }; $scope.save = function() { var structure = pageEdit.getPageStructure(); structure.page_id = pageEdit.get_page_file_name(); structure.styleSheets = StyleSheet.getContent(); structure.deleted = pageEdit_modules.deleted_modules; communication.api('updateSite', structure).then(function(json) { $dialog.message({ message:window.t('LBL_UPDATE_SITE_SUCCESSFULL') }); }); }; }) .service('iframeService', ['$window','pageEdit','pageEdit_ddManager','$rootScope',function($window,pageEdit,pageEdit_ddManager,rootScope) { this.changeMode = function(mode,oldMode) { pageEdit.changeMode(mode,oldMode); }; this.initDragDrop = function(a) { pageEdit_ddManager.init(); }; this.destroyDragDrop = function() { pageEdit_ddManager.destroy(); }; this.handleDrop = function(event, ui) { var that = this; $window.dragging = false; pageEdit_ddManager._drop(event, ui).then(function(moduleInstance) { moduleInstance.openEditor(); }); }; this.handleOver = function(event, ui) { var st = jQuery(document).scrollTop(); var sl = jQuery(document).scrollLeft(); event.pageX = event.clientX + sl; event.pageY = event.clientY + st; pageEdit_ddManager._dragDrag(event, ui); }; this.init = function() { }; this.destroy = function() { }; }]) .service('popupStateService', ['$state', '$rootScope','$location','popup','$uibModalStack',function($state ,$rootScope,$location,popup,$uibModalStack) { this.backgroundState = { onEnter : function(popup_background_editor,$stateParams) { var background_index = $stateParams.background_element; if(!StyleSheet.background_tags.hasOwnProperty(background_index)) { $state.go('content.design.background'); return; } var background_element = StyleSheet.background_tags[background_index][1]; popup_background_editor.open(background_element).result.then(function() { StyleSheet.global.endBackupMode(); $state.go('content.design.background'); },function() { StyleSheet.global.restoreCSS(); $state.go('content.design.background'); }); }, onExit: function() { $uibModalStack.dismissAll(0); }, }; this.fontState = { onEnter : function($stateParams) { var font_index = $stateParams.font_index; if(!StyleSheet.font_tags.hasOwnProperty(font_index)) { $state.go('content.design.font'); return; } var font_element = StyleSheet.font_tags[font_index]; popup.open({ name:'font_customize', controller: function($scope,communication) { $scope.font_families = StyleSheet.fonts; var dynamic_fonts_fnc = DynamicFonts.getFonts(communication); if(dynamic_fonts_fnc.then != undefined) { dynamic_fonts_fnc.then(function(fonts) { $scope.dynamic_font_families = fonts; }); } else $scope.dynamic_font_families = dynamic_fonts_fnc; $scope.changeSize = function() { StyleSheet.common_skin.setEditedSelector(font_element[1]); StyleSheet.common_skin.setCSS("font-size", $scope.font_size+ StyleSheet.defaultUnit); } $scope.changeFont = function() { StyleSheet.common_skin.setEditedSelector(font_element[1]); StyleSheet.common_skin.setCSS("font-family", $scope.font_family); } $scope.changeColor = function() { StyleSheet.common_skin.setEditedSelector(font_element[1]); StyleSheet.common_skin.setCSS("color", $scope.color); } $scope.changeLineHeight = function() { StyleSheet.common_skin.setEditedSelector(font_element[1]); StyleSheet.common_skin.setCSS("line-height", $scope.line_height+ StyleSheet.defaultUnit); } var fm = jQuery(font_element[2]); jQuery('body').append(fm); fm.css('left', '-9999px'); fm.css('position', 'absolute'); $scope.font_family = fm.css('font-family'); var fs = fm.css('font-size'); $scope.font_size = StyleSheet.stripUnits(fs); var fs = fm.css('line-height'); $scope.line_height = StyleSheet.stripUnits(fs); fm.remove(); StyleSheet.common_skin.backupCSS(); } }).result.then(function() { StyleSheet.global.endBackupMode(); delete $rootScope.popup_font_customize; $state.go('content.design.font.customize'); },function() { StyleSheet.global.restoreCSS(); $state.go('content.design.font.customize'); }); }, onExit: function() { $uibModalStack.dismissAll(0); }, }; this.colorState = { onEnter : function($stateParams) { popup.open({ name:'color_palette_customize', size:'sm', controller: function($scope,$window) { $scope.changePalettecolor = function(index, color) { $scope.colors[index] = color; $window.palette.setColor(color,index); $scope.changePallete(); } $scope.changeMainColor = function(index, color) { $window.palette.mainColors[index].setColor(color); $window.palette.regenerate(index); refreshPalette(); $scope.changePallete(); } $scope.changePallete = function() { var colors = $window.palette.colors; for(var i = 0;i < 5;i++) { for(var j = 0;j < 5;j++) { var index = i * 5 + j; var c = colors[j][i].toString(); var colorClass = '.color-' + index; StyleSheet.common_skin._setCSS(colorClass, 'color', c); } } $(document).trigger('changePalette'); } var colors = $window.palette.colors; var refreshPalette = function() { $scope.colors = []; $scope.main_colors = []; var color_list = []; for(var i = 0;i < 5;i++) { for(var j = 0;j < 5;j++) { var index = i * 5 + j; var color = colors[j][i]; var color_hex= color.toHex(); $scope.colors.push(color_hex); if(i==2) $scope.main_colors.push(color_hex); } } } refreshPalette(); } }).result.then(function() { $state.go('content.design.color'); },function() { $state.go('content.design.color'); }); }, onExit: function() { $uibModalStack.dismissAll(0); }, } }]) .config(function($stateProvider) { // provider-injector $stateProvider .state('content', { url: "/content", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/main', deepStateRedirect: true, onEnter : function($rootScope) { $rootScope.mode = 'content'; }, onExit : function() { } }) .state('content.page', { url: "/page", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/page/main', deepStateRedirect: true, controller : function($scope,communication, $rootScope,pageEdit_modules,pageEdit,$dialog,popup_form,category_edit_helperService,childService) { $scope.relativeUrl = getRelativeUrl(); $scope.page_id = pageEdit.page_id; communication.api('getHomepage',{},'settings.page').then(function(json) { $scope.homepage = json; }); $scope.item_template ='<div ng-class="{active: item.id == page_id}" class="wrap ui_category_edit_draggable" ng-init="item.level=$parent.level" ng-class="{active: item.id == page_id}">' + '<table class="table table-responsive">' + '<tr>'+ '<td>'+ '<span style="padding:{{item.level*10}}px">'+ '</span>' + '<i class="fa fa-eye-slash" ng-hide="item.no_display==0"></i>'+ '<i class="fa fa-home" ng-hide="item.id != homepage"></i>'+ '<a href="javascript:void(0);" ng-click="changePage(item)" ng-hide="item.id == page_id">{{item.display_name}}</a>'+ '<span class="" ng-hide="item.id != page_id">{{item.display_name}}</span>'+ '</td>'+ '<td class="buttons">'+ '<a href="javascript:void(0);" ng-click="editPage(item)">' + '<i class="fa fa-cog"></i>'+ '</a>'+ '<a ng-hide="item.file_name === homepage|| item.system_page==1" href="javascript:void(0);" ng-click="deletePage($event,$index)">' + '<i class="fa fa-trash"></i>'+ '</a>'+ '</td>'+ '</table>' + '</div>' + '<ul>' + '<li ng-repeat="item in item.items" ng-init="level= level+1" ng-include="\'uiCategoryEdit_recursiveTpl.html\'" category-draggable ng-model="item">' + '</li>'+ '</ul>'; $scope.list = []; $scope.max_page_count = window.max_page_count; $scope.page_count = 0; communication.api('getPageCount', {},'settings.page').then(function(pc) { $scope.page_count = pc; }); communication.getList('pages',{}, 'settings.page').then( function(json) { $scope.list = json; if(!$scope.$$phase) $scope.$digest(); }); $scope.level = -1; $scope.page_menu_changed_event_name = 'page_menu_changed'; $scope.changeOrder = function(item,oldIndex,new_parent) { var items = new_parent.items; if(items == undefined) items = new_parent; var rs =[]; for(var i = 0;i < items.length;i++) { if(items[i].id != undefined) rs.push(items[i].id); } communication.api('changeOrder',{parent_id:new_parent.id || 0, orders:rs},'settings.page').then(function() { $(document).trigger($scope.page_menu_changed_event_name); }); } $scope.onChangePageItem = function(item,oldIndex,new_parent) { var items = new_parent.items; if(items == undefined) items = new_parent; var rs =[]; for(var i = 0;i < items.length;i++) { if(items[i].id != undefined) rs.push(items[i].id); } communication.api('changeOrder',{parent_id:new_parent.id || 0, orders:rs},'settings.page').then(function() { $(document).trigger($scope.page_menu_changed_event_name); }); } $scope.savePage = function() { var structure = pageEdit.getPageStructure(); structure.page_id = pageEdit.get_page_file_name(); structure.styleSheets = StyleSheet.getContent(); structure.deleted = pageEdit_modules.deleted_modules; return communication.api('updateSite', structure,"content"); }; $scope.changePage = function(item) { if(item.id == $scope.page_id) return; $dialog.confirm2( { message:window.t('LBL_CHANGE_PAGE_CONFIRM_MESSAGE') }).result.then(function(result) { if(result == 1) $scope.savePage().then(function(data) { $scope.doChangePage(item); }); else { $scope.doChangePage(item); } }); } $scope.doChangePage = function(item) { pageEdit.changePage(item.id,item.name,item.file_name, function() { $scope.page_id = pageEdit.page_id; //childService.loadCompleted(); //childService.init(); }); } $scope.setClass = function(scope, locals) { return '{active: item.id == page_id}'; } $scope.addPage = function() { if($scope.max_page_count>=0 && $scope.max_page_count <= $scope.page_count) { alert(window.t("LBL_MAX_PAGE_LIMITED")); return; } return popup_form.open({ name:'pagelist_add_page_item', form_name:'PageForm', execute_path:'settings.page', size:'lg', controller: function($scope) { $scope.data = {}; $scope.data.sample_page = 'blank'; $scope.basePath = function(){ return window.top.basePath;} $scope.ok = function() { $scope.save(); } } }).result.then(function(data) { $scope.list.push(data); if(data.is_homepage==1) $scope.homepage = data.id; $(document).trigger($scope.page_menu_changed_event_name); }); } $scope.editPage = function(item) { if($scope.max_page_count>=0 && $scope.max_page_count < $scope.page_count) { alert(window.t("LBL_MAX_PAGE_LIMITED")); return; } return popup_form.open({ name:'pagelist_edit_page_item', form_name:'PageForm', execute_path:'settings.page', controller: function($scope) { $scope.data = item; $scope.ok = function() { $scope.save(); } } }).result.then(function(data) { var index = $scope.list.indexOf(item); $scope.list[index] = $.extend({}, $scope.list[index], data); if(data.is_homepage==1) $scope.homepage = data.id; $(document).trigger($scope.page_menu_changed_event_name); }) } $scope.deletePage = function($event, $index) { $dialog.confirm({title:'Delete Page?',message:'Are you sure to delete this page?'}).result.then(function() { var target = ($event.currentTarget); var li = $(target).parents('li:first'); var parentData = category_edit_helperService.getParentData(li); var index = li.index(); if($.isArray(parentData)) { var value = $.extend(true, {},parentData[index]); $scope._deletePage(value.id).then(function(data) { parentData.splice(index ,1); if(value.items != undefined) { for(var i in value.items) { if(!value.items.hasOwnProperty(i)) continue; parentData.splice(index ,0,value.items[i]); } } }); } else { if(!parentData.items) parentData.items = []; var value = $.extend(true, {},parentData.items[index]); $scope._deletePage(value.id).then(function(data) { parentData.items.splice(index ,1); if(value.items != undefined) { for(var i in value.items) { if(!value.items.hasOwnProperty(i)) continue; parentData.items.splice(index ,0,value.items[i]); } } }); } $(document).trigger($scope.page_menu_changed_event_name); }); } $scope._deletePage = function(id) { return communication.api('deleteItem',{id:id}, 'settings.page').then(function(data) { if(data.modules != undefined) { for(var i = 0;i < data.modules.length;i++) { StyleSheet.skin.removeStylesById( data.modules[i] ); StyleSheet.local.removeStylesById( data.modules[i] ); } } return data; }); } } }) .state('content.page.page_child', { url: "/:page_child", controller : function($scope,$stateParams) { }, deepStateRedirect: true }) .state('content.add', { url: "/add", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/add', controller: function($scope, communication) { communication.getList('zone_templates',{}, 'content').then(function(json) { $scope.zones = json; }); communication.getList('FullModule',{}, 'content').then(function(json) { $scope.modules = json; }); }, deepStateRedirect: true, }) .state('content.design', { url: "/design", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/main_menu', deepStateRedirect: true, }) .state('content.design.background', { url: "/background", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/background', controller: function($scope) { $scope.backgrounds = StyleSheet.background_tags; }, deepStateRedirect: true }) .state('content.design.background.child', { url: "/:background_element", onEnter : function(popupStateService,popup_background_editor,$stateParams,$rootScope,$location) { popupStateService.backgroundState.onEnter(popup_background_editor,$stateParams); }, onExit: function(popupStateService) { popupStateService.backgroundState.onExit(); }, deepStateRedirect: true }) .state('content.design.color', { url: "/color", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/color', controller: function($scope, communication,$window,popup) { $scope.colorSchemes = []; $scope.system_colorSchemes = []; communication.getList('colors', {}).then( function(json) { $scope.colorSchemes = json; if(!$scope.$$phase) $scope.$digest(); }); $scope.loopValues = ['color1','color2','color3','color4','color5']; communication.getColorList().then(function(json) { $scope.system_colorSchemes = json; }); $scope.applyScheme = function(colorScheme) { var color1 = '#' + colorScheme['color1']; var color2 = '#' + colorScheme['color2']; var color3 = '#' + colorScheme['color3']; var color4 = '#' + colorScheme['color4']; var color5 = '#' + colorScheme['color5']; var p = [color1, color2, color3, color4, color5]; $window.palette.createPalette(p); $scope.changePallete(); } $scope.changePallete = function() { var colors = $window.palette.colors; for(var i = 0;i < 5;i++) { for(var j = 0;j < 5;j++) { var index = i * 5 + j; var c = colors[j][i].toString(); var colorClass = '.color-' + index; StyleSheet.common_skin._setCSS(colorClass, 'color', c); } } $(document).trigger('changePalette'); } } }) .state('content.design.color.customize', { url: "/customize", onEnter : function(popupStateService,$stateParams,$rootScope,$location) { popupStateService.colorState.onEnter($stateParams); }, onExit: function(popupStateService) { popupStateService.colorState.onExit(); }, deepStateRedirect: true }) .state('content.design.special_element', { url: "/special_element", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/special_element', controller: function($scope,popup) { $scope.special_modules = StyleSheet.special_modules; $scope.configModule = function(module) { } } }) .state('content.design.special_element.child', { url: "/:special_element_index", onEnter : function(popupStateService,$stateParams,$rootScope,$location) { popupStateService.special_elementState.onEnter($stateParams); }, onExit: function(popupStateService) { popupStateService.special_elementState.onExit(); }, deepStateRedirect: true }) .state('content.design.css', { url: "/css", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/css', controller: function($scope,$state) { if(StyleSheet.main) { StyleSheet.main.backupCSS(); $scope.code = StyleSheet.main.getCSSCode(); } else return; $scope.preview = function() { StyleSheet.main.replaceContent($scope.code); } $scope.apply = function() { StyleSheet.main.endBackupMode(); $state.go('content.design'); } $scope.discard = function() { StyleSheet.main.restoreCSS(); $state.go('content.design'); } } }) .state('content.design.font', { url: "/font", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/font', controller: function($scope,popup,communication) { $scope.fonts = StyleSheet.fonts; var dynamic_fonts_fnc = DynamicFonts.getFonts(communication); if(dynamic_fonts_fnc.then != undefined) { dynamic_fonts_fnc.then(function(fonts) { $scope.dynamic_fonts = fonts; }); } else $scope.dynamic_fonts = dynamic_fonts_fnc; $scope.applyFont = function(font) { StyleSheet.global.setEditedSelector('body'); StyleSheet.global.setCSS('font-family', font); } } }) .state('content.design.font.customize', { url: "/customize", templateUrl: getRelativeUrl() + 'api?path=content&action=getHtml&name=content/design/font_customize', controller: function($scope, popup) { $scope.font_customizes = StyleSheet.font_tags; } }) .state('content.design.font.customize.child', { url: "/:font_index", onEnter : function(popupStateService,$stateParams,$rootScope,$location) { popupStateService.fontState.onEnter($stateParams); }, onExit: function(popupStateService) { popupStateService.fontState.onExit(); }, deepStateRedirect: true }) }) .run(function(setupFactory, $rootScope, iframeService,stylesheetService) { $rootScope.$watch('mode', function(n,o) { iframeService.changeMode(n,o); }); $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { if(!$rootScope.child_load_completed) { $rootScope.nextState = toState.name; event.preventDefault(); } }); setupFactory.run(); });;
[+]
..
[-] pagemanager.js
[edit]
[-] customize.js
[edit]
[+]
viewer
[-] ecommerce.js
[edit]
[-] pagemanager.iframe.js
[edit]
[+]
popup
[-] pagemanager.modules.js
[edit]
[+]
customize
[+]
blog
[-] settings.js
[edit]
[+]
modules
[-] content.js
[edit]
[-] blog.js
[edit]
[-] base.js
[edit]
[+]
settings
[+]
ecommerce