PATH:
home
/
letacommog
/
letaweb
/
scripts
angular.module("uib/template/tabs/tab2.html", []) .run(["$templateCache", function($templateCache) { $templateCache.put("uib/template/tabs/tab2.html", "<li ng-class=\"[{active: active, disabled: disabled}, classes]\" class=\"uib-tab nav-item\">\n" + " <a href ng-click=\"select()\" class=\"nav-link\" uib-tab-heading-transclude>{{heading}}</a>\n" + "</li>\n" + ""); }]); angular.module("uib/template/tabs/tabset2.html", []) .run(["$templateCache", function($templateCache) { $templateCache.put('uib/template/tabs/tabset2.html', "<div>\n" + "<div class=\"col-md-2\">\n" + " <ul class=\"nav nav-{{tabset.type || 'tabs'}}\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\" ng-transclude></ul>\n" + " </div>\n" + "<div class=\"col-md-10\">\n" + " <div class=\"tab-content\">\n" + " <div class=\"tab-pane\"\n" + " ng-repeat=\"tab in tabset.tabs\"\n" + " ng-class=\"{active: tabset.active === tab.index}\"\n" + " uib-tab-content-transclude=\"tab\">\n" + " </div>\n" + " </div>\n" + " </div>\n" + "</div>\n" + ""); }]); angular.module("template/tabs/uiTab.html", []) .run(["$templateCache", function($templateCache) { $templateCache.put("template/tabs/uiTab.html", "<li ng-class=\"{active: active, disabled: disabled}\">\n" + " <a href=\"#/{{url}}\" ui-tab-heading-transclude>{{heading}}<span ng-if=\"changed\">*</span></a>\n" + "</li>\n" + ""); }]); angular.module("template/tabs/uiTabset.html", []) .run(["$templateCache", function($templateCache) { $templateCache.put("template/tabs/uiTabset.html", "<div>\n" + " <ul class=\"nav nav-{{type || 'tabs'}}\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\" ng-transclude></ul>\n" + " <div class=\"tab-content\">\n" + " <div ui-tab-pane class=\"tab-pane\" \n" + " ng-repeat=\"tab in tabs\" \n" + " ng-class=\"{active: tab.active}\"\n" + " ui-tab-content-transclude=\"tab\"\n" + " ui-tab-dynamic-content-transclude=\"tab\">\n" + " </div>\n" + " </div>\n" + "</div>\n" + ""); }]); angular.module('ui.tabcontent',['ui.dialog','stgrid','pagemanager.communication',"uib/template/tabs/tabset2.html", "uib/template/tabs/tab2.html","template/tabs/uiTab.html","template/tabs/uiTabset.html"]) .config(function($logProvider){ $logProvider.debugEnabled(true); }) .controller('uiTabsetController', ['$scope','$state','$rootScope', function uiTabsetCtrl($scope,$state,$rootScope) { this.addedLastTab = false; function getParentList(state) { var parentList = []; var state = state.parent; while(state) { parentList.push(state); state = state.parent; } return parentList; } var ctrl = this, tabs = ctrl.tabs = $scope.tabs = []; ctrl.refresh = function() { angular.forEach(tabs, function(tab) { var active = false; active = ctrl.isActive(tab.url.replace(/\//g,'.')); if(active) { ctrl.select(tab); return; } }); var flag = false; for(var i = 0;i < tabs.length;i++) { if(tabs[i].active) { flag = true; } } if(!flag) { tabs[0].active = true; } } $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { if(!$rootScope.configuration_load_completed) { $rootScope.nextState = toState.name; event.preventDefault(); return false; } }); $rootScope.$on("$stateChangeSuccess", function(event, toState, toParams, fromState, fromParams) { ctrl.refresh(); }); ctrl.select = function(selectedTab) { angular.forEach(tabs, function(tab) { if (tab.active && tab !== selectedTab) { tab.active = false; tab.onDeselect(); } }); if (selectedTab.active && selectedTab.loaded) return; if (selectedTab.load !== undefined) { selectedTab.load(); } selectedTab.active = true; selectedTab.loaded = true; selectedTab.onSelect(); }; ctrl.isActive = function(route){ var parents = getParentList($state.$current); var result = $state.is(route); if(!result) { for(var i = 0;i < parents.length-1;i++) { if(parents[i].name==route) {return true;}; } } return result; }; ctrl.addTab = function addTab(tab, last) { tabs.push(tab); var active = ctrl.isActive(tab.url.replace(/\//g,'.')); if(active) { ctrl.select(tab); } else if (tab.active) { ctrl.select(tab); } if(last) { if($state.$current.name=="") {return;} var flag = false; for(var i = 0;i < tabs.length;i++) { if(tabs[i].active) { flag = true; } } if(!flag) { tabs[0].active = true; } this.addedLastTab = true; } }; ctrl.removeTab = function removeTab(tab) { var index = tabs.indexOf(tab); //Select a new tab if the tab to be removed is selected and not destroyed if (tab.active && tabs.length > 1 && !destroyed) { //If this is the last tab, select the previous tab. else, the next tab. var newActiveIndex = index == tabs.length - 1 ? index - 1 : index + 1; ctrl.select(tabs[newActiveIndex]); } tabs.splice(index, 1); }; var destroyed; $scope.$on('$destroy', function() { destroyed = true; }); }]) .directive('uiTabset', function() { return { restrict: 'E', transclude: true, replace: true, scope: { type: '@' }, controller: 'uiTabsetController', templateUrl: 'template/tabs/uiTabset.html', link: function(scope, element, attrs) { scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false; scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false; } }; }) .directive('uiTabPane', function() { return { controller: function($scope) { this.changed = function() { $scope.changed = true; $scope.tab.changed = true;; } this.unchanged = function() { $scope.changed = false; $scope.tab.changed = false; } }, link: function(scope, element, attrs) { } }; }) .directive('uiTabForm', ['$parse','$controller','communication','$compile', function($parse,$controller,communication,$compile) { return { require: '^uiTabPane', controller: function($scope) { $scope.changed = false; this.changed = function() { $scope.uiTabPaneCtrl.changed(); } this.unchanged = function() { $scope.uiTabPaneCtrl.unchanged(); } }, compile: function(elm, attrs, transclude) { return function postLink(scope, elm, attrs, uiTabPaneCtrl) { scope.uiTabPaneCtrl = uiTabPaneCtrl; } } } }]) .directive('uiTab', ['$parse','$controller','communication','$compile','$state', function($parse,$controller,communication,$compile,$state) { return { require: '^uiTabset', restrict: 'E', replace: true, templateUrl: 'template/tabs/uiTab.html', transclude: true, scope: { active: '=?', heading: '@', onSelect: '&select', //This callback is called in contentHeadingTransclude //once it inserts the tab's content into the dom onDeselect: '&deselect', url:'@templateUrl' }, controller: function($scope) { }, compile: function(elm, attrs, transclude) { return function postLink(scope, elm, attrs, uiTabsetCtrl) { scope.changed= false; scope.$watch('active', function(active) { if (active) { uiTabsetCtrl.select(scope); } }); scope.disabled = false; if ( attrs.disabled ) { scope.$parent.$watch($parse(attrs.disabled), function(value) { scope.disabled = !! value; }); } scope.path = scope.url.replace(/\//g,'.'); scope.select = function() { }; var templateCtrl, templateScope; if (angular.isDefined(attrs.templateUrl) && (angular.isDefined(attrs.controller) || angular.isDefined(attrs.dynamicCtrl))) { scope._compile = function() { var createElement = function(f) { // try // { templateScope = scope.$new(); templateScope.isTabbedPane = true; if(f != undefined) templateCtrl = $controller(f, {$scope: templateScope}); else templateCtrl = $controller(attrs.controller, {$scope: templateScope}); $compile(scope.contentElement)(templateScope); scope.loaded = true; //} //catch(e) //{ // console.log(e); //} } if(angular.isDefined(attrs.dynamicCtrl) ) { require([attrs.dynamicCtrl], function(f) { createElement(f); }); } else createElement(); } scope.load = function() { if(!scope.loaded || angular.isDefined(attrs.noCache)) communication.getHtml(attrs.templateUrl).then(function(response) { var element = angular.element(response); //var contents = element.contents(); scope.contentElement = element; //if (!scope.$$phase) //scope.$digest(); }); }; } uiTabsetCtrl.addTab(scope, elm.next().length==0); scope.$on('$destroy', function() { uiTabsetCtrl.removeTab(scope); }); //We need to transclude later, once the content container is ready. //when this link happens, we're inside a tab heading. scope.$transcludeFn = transclude; }; } }; }]) .directive('uiTabHeadingTransclude', [function() { return { restrict: 'A', require: '^uiTab', link: function(scope, elm, attrs, tabCtrl) { scope.$watch('headingElement', function updateHeadingElement(heading) { if (heading) { elm.html(''); elm.append(heading); } }); } }; }]) .directive('uiTabDynamicContentTransclude', function() { return { restrict: 'A', require: '^uiTabset', link: function(scope, elm, attrs) { var tab = scope.$eval(attrs.uiTabDynamicContentTransclude); tab.$watch('contentElement', function updateContentlement(content) { if (content) { elm.html(''); elm.append(content); tab._compile(); } }); } }; }) .directive('uiTabContentTransclude', function() { return { restrict: 'A', require: '^uiTabset', link: function(scope, elm, attrs) { var tab = scope.$eval(attrs.uiTabContentTransclude); //Now our tab is ready to be transcluded: both the tab heading area //and the tab content area are loaded. Transclude 'em both. tab.$transcludeFn(tab.$parent, function(contents) { angular.forEach(contents, function(node) { if (isTabHeading(node)) { //Let tabHeadingTransclude know. tab.headingElement = node; } else { elm.append(node); } }); }); } }; function isTabHeading(node) { return node.tagName && ( node.hasAttribute('tab-heading') || node.hasAttribute('data-tab-heading') || node.tagName.toLowerCase() === 'tab-heading' || node.tagName.toLowerCase() === 'data-tab-heading' ); } }) ;
[+]
..
[+]
sample_images
[-] ssultils.js
[edit]
[-] dialog.js
[edit]
[-] colorpicker.js
[edit]
[-] script.js
[edit]
[+]
libraries
[-] ui.dbfilter-editing.js
[edit]
[-] stgrid.js
[edit]
[-] ui.category-editing.js
[edit]
[-] forms.js
[edit]
[-] player.swf
[edit]
[-] language.js
[edit]
[-] im.js
[edit]
[-] terms_en.js
[edit]
[-] skinutils.js
[edit]
[-] create_page.js
[edit]
[-] ihover.js
[edit]
[-] builder.js
[edit]
[-] ui.tab-content.js
[edit]
[-] admin.js
[edit]
[-] ui.tab-editing.js
[edit]
[-] login.js
[edit]
[-] popup.js
[edit]
[-] ecommerce.js
[edit]
[-] stEditor.js
[edit]
[-] colorutils.js
[edit]
[-] livedemo.js
[edit]
[-] palette.js
[edit]
[+]
editor