PATH:
home
/
letacommog
/
letaweb
/
admin
/
modules
/
infobanner
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.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); } $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() { var img = $moduleInstance.getElement().find('img.info_banner_img'); img.attr('class', 'info_banner_img info_banner-' + $scope.data.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); } }; }) });
[+]
..
[-] frontend_view.php
[edit]
[-] backend.php
[edit]
[-] frontend_class.php
[edit]
[-] backend.js
[edit]