Вход Регистрация
Файл: static/plugins/admin/js/drag_and_drop.js
Строк: 70
<?php
PEEP_Components_DragAndDrop 
= function() {
    var 
self this;
    
    
this.prepare();
    
this.defaultSettings.handle '.dd_handle';
    
this.initialize();
    
    
this.events.allowCustomize = [];
    
    $(
'#allow_customize_btn').click(function(){
        
self.trigger('allowCustomize', [this.checked]);
    });
};

PEEP_Components_DragAndDrop.prototype = new componentDragAndDrop ({
    
    
initializeSections: function() {
        var 
self this;
        var 
sectionSettings this.extendSettings({
            
items'.component',
            
receive: function(eui){
                if (
ui.placeholder.hasClass('peep_dnd_placeholder')) {
                    
self.transfered true;
                }
            },
    
            
over: function(eui){
                
ui.placeholder.removeClass('placeholder-hidden');
                
ui.placeholder.addClass('peep_dnd_placeholder');
            },
            
            
change: function(eui) {
               
self.handleSectionChange(thiseui);
            },
    
            
update: function(eui) {
                
self.arrangeFreezed(this);
                if (
ui.item.cloning && self.transfered) {
                    
ui.item.clone = self.clone(thisui.item);
                } else {
                    
self.update(this);
                }
            }
    
        });
        
        
this.$sections.sortable(sectionSettings).disableSelection();
    },
    
    
setHandler: function(handler) {
        
        
this.bind('allowCustomize', function(statecallbackFnc){
                    
handler.allowCustomize(statecallbackFnc);
        });
    
        
this.parent_setHandler(handler);
    }
});
?>
Онлайн: 3
Реклама