diff --git a/resources/js/DDList.js b/resources/js/DDList.js index be47fec..1f0689f 100644 --- a/resources/js/DDList.js +++ b/resources/js/DDList.js @@ -1,5 +1,4 @@ YAHOO.example.DDList = function(id, sGroup, config) { - if (id) { this.init(id, sGroup, config); this.initFrame(); @@ -56,6 +55,9 @@ YAHOO.example.DDList.prototype.onDragOver = function(e, id) { if(p.id != 'dashboard-container-left' && p.id != 'dashboard-container-right') { return; } + if(el2.id === 'end-left' || el2.id === 'end-right'){ + return; + } p.insertBefore(el2, el); } diff --git a/resources/js/dashboard.js b/resources/js/dashboard.js index 2ade8cb..13ba48b 100644 --- a/resources/js/dashboard.js +++ b/resources/js/dashboard.js @@ -101,6 +101,12 @@ KTDashboard.prototype = { //new YAHOO.util.DD(e.id); } }, this.getDashletBlocks()); + map(function(e) { + if(e.id) { + new YAHOO.example.DDList(e.id); + //new YAHOO.util.DD(e.id); + } + }, this.getDashletBlockStoppers()); new YAHOO.example.DDListBoundary('copyrightbar'); new YAHOO.example.DDListBoundary('breadcrumbs'); new YAHOO.example.DDListBoundary('bodyLeftRepeat'); @@ -111,6 +117,10 @@ KTDashboard.prototype = { 'getDashletBlocks' : function() { return getElementsByTagAndClassName('*', 'dashboard_block', this.element); }, + + 'getDashletBlockStoppers' : function(){ + return getElementsByTagAndClassName('*', 'dashboard_block_empty', this.element); + }, 'hideAddButton' : function() { hideElement(this.addButton); @@ -298,4 +308,4 @@ addLoadEvent( } }); - \ No newline at end of file + diff --git a/templates/kt3/dashboard.smarty b/templates/kt3/dashboard.smarty index e907281..bad91b0 100644 --- a/templates/kt3/dashboard.smarty +++ b/templates/kt3/dashboard.smarty @@ -1,5 +1,4 @@