PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
modules
define(['module/base'],function(base) { return createModuleDefinition([base], function($window,$file_manager) { this.initializeData = { title:'This is an icon box.', description:'Write a short description, that will describe the title or something informational and useful.', icon_type:'fa', icon:"fa fa-filter", image_type:'icon', size:30, align:'top' }; this.controller = function($scope, $moduleInstance) { $scope.changeSize = function() { $moduleInstance.getElement().find('.sts-icon').css('font-size', $scope.data.size + 'px'); } $scope.changeIcon = function() { var icon_inner = $moduleInstance.getElement().find('.sts-icon-inner'); if($scope.data.image_type=='image') { icon_inner.html('<img src="' + $scope.data.image + '">'); } if($scope.data.image_type=='icon') { icon_inner.html('<span class="icon ' + $scope.data.icon_type + ' ' + $scope.data.icon + '"></span>'); } if($scope.data.image_type=='text') { icon_inner.html('<span class="text">' + $scope.data.text_icon + '</span>'); } $moduleInstance.getElement().find('.sts-icon').attr('class', 'sts-icon sts-icon-' + $scope.data.image_type); $moduleInstance.module_data.icon = $scope.data.icon; } $scope.enter_url_mode = 0; $scope.selectFile = function() { $file_manager.open().result.then(function(images) { if(images.length == 0) return; var image = images[0]; $scope.data.image = (image.full_url); $scope.changeSource(); }); } $scope.onUploadComplete = function(files) { if(files!= undefined && files.length > 0) { var file = files[0].response; $scope.data.image = (file.full_url); $scope.changeSource(); } }; $scope.changeSource = function() { $moduleInstance.module_data.image = $scope.data.image; $scope.changeIcon(); } $scope.changeTitle = function() { var title = $moduleInstance.getElement().find('.info_title'); title.children('h3').html($scope.data.title); } $scope.changeDescription = function() { var title = $moduleInstance.getElement().find('.info_description'); title.children('p').html($scope.data.description); } $types = { fa:'font-awesome', glyphicon:'bootstrap', flaticon:'linecons', typcn:'typicons', oi:'open-iconic' }; $scope.font_type = $types[$scope.data.icon_type]; $scope.changeIconType = function() { $scope.font_type = $types[$scope.data.icon_type]; var icon = $moduleInstance.getElement().find('.sts-icon-inner').children('.icon'); icon.attr('class','icon '+ $scope.data.icon_type + ' ' + $scope.data.icon); } $scope.changeAlign = function() { $moduleInstance.getElement().children(".info_box").attr('class', 'info_box info_box_' + $scope.data.align); } }; }) });
[+]
..
[-] 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]