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.', image:'/sample_images/iphone-6.png', size:30, align:'top-right', button_text:'More Info', button_link:'#' }; this.subModules = [ {type:'button',selector:'.module-button',uniqueName:'button'} ] this.controller = function($scope, $moduleInstance) { $scope.changeSize = function() { $moduleInstance.getElement().find('.sts-icon').css('font-size', $scope.data.size + 'px'); } $scope.changeIcon = function() { var img = $moduleInstance.getElement().find('img.info_banner_img'); img.attr('src', $scope.data.image); } $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); } $scope.changeImage_effect = function() { $scope.changeAlign(); } $scope.changeAlign = function() { var banner = $moduleInstance.getElement().find('.info_banner'); var img = $moduleInstance.getElement().find('img'); if($scope.data.align == 'full-width') { img.attr('class', 'img-responsive ' + $scope.data.image_effect); banner.addClass('responsive'); } else { img.attr('class', 'info_banner_img info_banner-' + $scope.data.align + ' ' + $scope.data.image_effect); banner.removeClass('responsive'); } } $scope.changeTextAlign = function() { var banner = $moduleInstance.getElement().find('.info_banner'); var arr = ['center','left','right']; for(var i = 0;i < arr.length;i++) { banner.removeClass('info-' + arr[i]); } banner.addClass('info-' + $scope.data.text_align); } $scope.changeButton = function() { $moduleInstance.getElement().find('.button_text').html($scope.data.button_text); $moduleInstance.getElement().find('a.button').attr('href', $scope.data.button_link); } }; }) });
[+]
..
[-] 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]