PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
popup
$.popup('special_module_style_editor','popupconfirm', { init : function(element) { StyleSheet.global.backupCSS(); var that = this; //this.element = $('#module-' + this.options.module); if(!window.module[this.options.module]) this.moduleClass = $.module('module.' + this.options.module,'BaseSpecialModuleClass'); else this.moduleClass = window.module[this.options.module]; this.moduleObj = new this.moduleClass; this.createSkinList(); }, createSkinList : function(format) { var popup_content = $('#skin_list'); var that = this; var f = format || 0; var skin = this.options.skin; this.noskin = false; this.skinchanged = false; var module = this.options.module; PM.communication.getSkinList(this.moduleObj, f, function(json) { if(json != undefined && json.length > 0) $.each(json, function(i) { var itm = $(that.options.item); //itm.append(name); itm.attr('id', 'skin' + json[i]['id']); itm.data('name', json[i]['name']); // itm.data('sub_element', sub_element); popup_content.append(itm); $('.name', itm).html(json[i]['display_name']); $('.preview', itm).css('background-image', 'url(' + json[i]['thumbnail'] + ')'); itm.bind('click',function(e) { that.skinchanged = true; $(this).siblings().removeClass('item-selected'); var name = itm.data('name'); var sub_element = itm.data('sub_element'); if(!$(this).hasClass('item-selected')) { if(that.changeSkin) { that.changeSkin(name); } } $(this).addClass('item-selected'); $('.btn-edit', this).unbind(); $('.btn-edit', this).click(function() { var name = itm.data('name'); if(that.editSkin) { that.editSkin( name); } }); }); if(skin && skin == json[i]['name']) { itm.addClass('item-selected'); itm.trigger('click'); } }); else { that.noskin = true; popup_content.html(that.options.noskincontent); } }); }, changeSkin : function(name) { var skin = this.moduleObj.getSkin(name); this.selected_skin = name; skin.apply(this.moduleObj); }, editSkin : function(name) { var skin = this.moduleObj.getSkin(name); skin.openEditor(this.moduleObj); }, addDataItem : function(item) { var popup_content = $('.bgimage_list', this.element); item.thumbnail = ImageUtil.decodeImageURL(item.thumbnail); var itm = $("<div class='item'><div class='image'><img src='" + item.thumbnail + "'</div></div>"); itm.data('data', item); popup_content.append(itm); itm.click(function() { if($(this).hasClass('selected')) return; $(this).addClass('selected'); $(this).siblings().removeClass('selected'); var item = itm.data('data'); var src = ImageUtil.decodeImageURL(item.full_url); StyleSheet.global.setCSS('background-image','url(' + src + ')'); }); }, onOK : function() { if(this.options.onOK) this.options.onOK(this.selected_skin); }, onCancel : function() { if(this.options.onCancel) this.options.onCancel(); }, close : function() { if(this.options.onCancel) this.options.onCancel(); this._destroy(); }, getButtons : function() { var that = this; return [ { name: t('LBL_OK'), needvalidation : true, class:'btn-primary', closeAfterClick:true, onpress: function() { if(that.onOK) that.onOK(); } }, { name: t('LBL_CANCEL'), class:'btn-danger', closeAfterClick:true, onpress: function() { if(that.onCancel) that.onCancel(); } } ]; } }, { item:'<div id="skin" class="item"><div class="preview_wrapper"><div class="preview"></div><button class="btn btn-mini btn-edit"><i class="font-pencil"></i>Edit</button></div><div class="name"></div></div>', });
[+]
..
[-] profile.js
[edit]
[-] pagelist.js
[edit]
[-] order.js
[edit]
[-] customer_group.js
[edit]
[-] module_list.js
[edit]
[-] backgroundeditor.js
[edit]
[-] product.js
[edit]
[-] visualcsseditor.js
[edit]
[-] shipping_rule.js
[edit]
[-] profile_change_password.js
[edit]
[-] review.js
[edit]
[-] contributor_invite.js
[edit]
[-] dbfilter.js
[edit]
[-] tax_class.js
[edit]
[-] special_module_style_editor.js
[edit]
[-] idletimeout.js
[edit]
[-] address.js
[edit]
[-] contributor.js
[edit]
[-] login.js
[edit]
[-] skin.js
[edit]
[-] mail.js
[edit]
[-] discount.js
[edit]
[-] customer.js
[edit]
[-] productgrid.js
[edit]
[-] socialsharebuttonconfig.js
[edit]
[-] news.js
[edit]
[-] color.js
[edit]
[-] palette.js
[edit]
[-] newsgrid.js
[edit]
[-] product_option_combination_grid.js
[edit]
[-] page.js
[edit]
[-] product_option.js
[edit]
[-] tax_rate.js
[edit]
[-] coupons.js
[edit]
[-] zone.js
[edit]
[-] product_bulk_price.js
[edit]
[-] option_set.js
[edit]
[-] product_option_combination.js
[edit]