PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
modules
define(['module/base'],function(base) { return createModuleDefinition([base], function($file_manager,$dialog) { this.initializeData = {src:window.top.basePath + '/sample_images/sample.swf', width:990,height:250}; this.controller = function($scope, $moduleInstance) { $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.src = ImageUtil.decodeImageURL(image.full_url); $scope.changeSource(); }); } $scope.onUploadComplete = function(files) { if(files!= undefined && files.length > 0) { var file = files[0].response; $scope.data.src = ImageUtil.decodeImageURL(file.full_url); $scope.changeSource(); } }; $scope.changeSource = function() { $moduleInstance.module_data.src = $scope.data.src; $moduleInstance.changeSource(); } }; this.changeSource = function() { var element = jQuery(this.getElement()); var id = this.page_id; var swfid = 'swf-' + id; } }); }); $.module('widget.flash',['widget']); $.module('module.flash','image',{ loadDefaultData : function() { var data = {src:'/fanpage/upload///intro.swf', width:990,height:250}; return data; }, loadData : function() { var v = {}; v.src = $('#source').attr('src'); v.width = this.width; v.height = this.height; return v; }, getFooterButtons : function() { var that = this; this.buttons = [ { tooltip: t('LBL_COPY_TOOLTIP'), icon_class: 'font-copy', icon:true, onpress : function() { that.getChildModule().duplicate(); } }, { tooltip: t('LBL_MOVE_TOOLTIP'), icon_class: 'font-move', icon:true, onpress : function() { //that.openSkinManager(); } }, { tooltip: t('LBL_DESIGN_TOOLTIP'), icon_class: 'font-cogs', icon:true, onpress : function() { that.openSkinManager(); } }, { tooltip: t('LBL_DELETE_TOOLTIP'), icon_class: 'font-trash', icon:true, onpress : function() { that.delete(); } }, { name: t('LBL_FLASH_CHANGE_ITEM'), tooltip: t('LBL_FLASH_CHANGE_ITEM_TOOLTIP'), class: 'addButton', onpress : function() { that.openAddImageDialog(); } } ]; }, selectFlash : function(src,ow,oh) { this.getChildModule().changeSource( {src:src, width:ow, height:oh}); }, createUploader : function() { var that = this; if(this.uploader != undefined) delete this.uploader; this.uploader = new FileUploader({ browse_button : 'uploadimage', filters : [ {title : "Flash files", extensions : "swf"} ], onFileUploaded : function(up, file, json) { that.selectImage(json['url'],json['width'], json['height']); }, }); }, childInit : function() { this.initSlider(); }, openFlashManagerDialog : function() { var that = this; if(that.imageManager == undefined) { that.imageManager = new ImageManager(); that.imageManager.select = function(json) { if(json.length > 0) { json = json[0]; that.selectFlash(json['url'], json['width'], json['height']); } }; } that.imageManager.open({extensions:['.swf']}); }, });
[+]
..
[-] 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]