PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
modules
define(['module/base'],function(base) { return createModuleDefinition([base], function($file_manager,$dialog, pageEdit_event) { this.initializeData = { arrange:'horizontal', style:'circle', align:'left', buttons: [{type: 'facebook', title:'Facebook', link:'#'}, {type: 'twitter', title:'Twitter', link:'#'}, {type: 'rss', title:'RSS', link:'#'}, ] }; this.controller = function($scope, $moduleInstance) { $scope.editImageItem = function(index) { if($scope.editing_item == index) return false; $scope.editing_item = $scope.data.buttons[index]; $scope.editing = true; $scope.editing_index = index; }; $scope.addImageItem = function() { var n = {type: 'facebook', title:'Facebook', link:'#'}; $scope.data.buttons.push(n); $scope.editImageItem($scope.data.buttons.length-1); var buttons = $moduleInstance.getElement().children('.buttons').children('ul'); var li = jQuery('<li/>'); buttons.append(li); var a = jQuery('<a/>').attr('class','social_icon social_icon_'+n.type); a.attr('title',n.title); a.attr('href',n.link); li.append(a); } $scope.changeButton = function() { var buttons = $moduleInstance.getElement().children('.buttons'); var li = buttons.children('ul').children('li:eq(' + $scope.editing_index+')'); var a = li.children('a').attr('class','social_icon social_icon_' + $scope.editing_item.type); a.attr('title',$scope.editing_item.title); a.attr('href',$scope.editing_item.link); }; $scope.deleteImageItem = function(index) { if(index == $scope.editing_index) $scope.editing=false; $moduleInstance.module_data = $scope.data; $scope.data.buttons.splice(index ,1); var buttons = $moduleInstance.getElement().children('.buttons'); var li = buttons.children('ul').children('li:eq(' + index+')'); li.remove(); }; $scope.changeArrange = function(data) { $moduleInstance.module_data = $scope.data; var id = $moduleInstance.page_id; var buttons = $moduleInstance.getElement().children('.buttons'); var css = '#' + id + ' li'; buttons.removeClass('vertical-buttons'); $scope.data.arrange == 'vertical' ? buttons.addClass('vertical-buttons') : ''; }; $scope.changeAlign = function(data) { $moduleInstance.module_data = $scope.data; var id = $moduleInstance.page_id; var buttons = $moduleInstance.getElement().children('.buttons'); var a = ['left','right','center']; for(var i =0;i < a.length;i++) buttons.removeClass('text-'+a[i]); buttons.addClass('text-'+$scope.data.align); }; $scope.changeStyle = function(data) { var id = $moduleInstance.page_id; var css = '#' + id + ' a'; var buttons = $moduleInstance.getElement().children('.buttons'); var v = $scope.data.style == 'character' ? 'uppercase' : 'lowercase'; var a = ['uppercase','lowercase']; for(var i =0;i < a.length;i++) buttons.removeClass('text-'+a[i]); buttons.addClass('text-'+v); } }; }); });
[+]
..
[-] productlist.js
[edit]
[-] facebookvideo.js
[edit]
[-] newslist.js
[edit]
[-] image.js
[edit]
[-] video.js
[edit]
[-] button.js
[edit]
[-] zone.js
[edit]
[-] text.js
[edit]
[-] newscategory.js
[edit]
[-] googlemap.js
[edit]
[-] base_structure.js
[edit]
[-] contactform.js
[edit]
[-] spacer.js
[edit]
[-] infobox.js
[edit]
[-] html.js
[edit]
[-] testmodule.js
[edit]
[-] facebookcomment.js
[edit]
[-] iframe.js
[edit]
[-] twitterfeed.js
[edit]
[-] recentnews.js
[edit]
[-] audio_player.js
[edit]
[-] slick.js
[edit]
[-] newsdetail.js
[edit]
[-] facebookpost.js
[edit]
[-] pagezone.js
[edit]
[-] panigation.js
[edit]
[-] row.js
[edit]
[-] __custom_module_template.js
[edit]
[-] carousel.js
[edit]
[-] icon.js
[edit]
[-] typedtext.js
[edit]
[-] newscomment.js
[edit]
[-] box.js
[edit]
[-] base_custom.js
[edit]
[-] wordpress.js
[edit]
[-] base.js
[edit]
[-] column.js
[edit]
[-] fancytext.js
[edit]
[-] recentproduct.js
[edit]
[-] statcounter.js
[edit]
[-] tab.js
[edit]
[-] bootstrap_slider.js
[edit]
[-] ihover.js
[edit]
[-] line.js
[edit]
[-] blogger.js
[edit]
[-] slideshow.js
[edit]
[-] title.js
[edit]
[-] facebookpage.js
[edit]
[-] share_buttons.js
[edit]
[-] facebooklike.js
[edit]
[-] infobanner.js
[edit]
[-] rssfeed.js
[edit]
[-] flash.js
[edit]
[-] countdown.js
[edit]
[-] facebooksend.js
[edit]
[-] mailchimp.js
[edit]
[-] infotable.js
[edit]
[-] navbar.js
[edit]
[-] cycleslider.js
[edit]
[-] modal.js
[edit]
[-] embed.js
[edit]
[-] alert.js
[edit]
[-] progress_bar.js
[edit]
[-] accordion.js
[edit]
[-] youtube.js
[edit]
[-] social_buttons.js
[edit]
[-] productcategory.js
[edit]
[-] menu.js
[edit]
[-] pricetable.js
[edit]
[-] productdetail.js
[edit]
[-] gallery.js
[edit]