From d4f36e7d2aca0913ddb747e29b757b0f278058e3 Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 14 Nov 2006 05:04:15 +0000 Subject: [PATCH] Merged from 1.7. --- lib/ajax/block_classes.js | 145 +++++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 65 deletions(-) diff --git a/lib/ajax/block_classes.js b/lib/ajax/block_classes.js index 1ce3181740..4292eb4e0b 100644 --- a/lib/ajax/block_classes.js +++ b/lib/ajax/block_classes.js @@ -21,39 +21,40 @@ YAHOO.extend(block_class, YAHOO.util.DDProxy); block_class.prototype.debug = false; -block_class.prototype.init_block = function(id, sGroup, config){ - if (!id) { return; } - //Drag and Drop +block_class.prototype.init_block = function(id, sGroup, config) { + + if (!id) { + return; + } + + //Drag and Drop this.init(id, sGroup, config); this.initFrame(); this.createFrame(); - - this.is = 'block'; - this.instanceId = this.getEl().id.replace(/inst/i,''); - - + + this.is = 'block'; + this.instanceId = this.getEl().id.replace(/inst/i, ''); + this.addInvalidHandleType('a'); - + var s = this.getEl().style; s.opacity = 0.76; s.filter = "alpha(opacity=76)"; - - + // specify that this is not currently a drop target this.isTarget = false; - - this.region = YAHOO.util.Region.getRegion(this.getEl()); + this.region = YAHOO.util.Region.getRegion(this.getEl()); this.type = block_class.TYPE; - - - //DHTML + + //DHTML this.viewbutton = null; this.originalClass = this.getEl().className; - + this.init_buttons(); - } +} + block_class.prototype.startDrag = function(x, y) { //operates in intersect mode @@ -189,61 +190,75 @@ block_class.prototype.move_block = function(columnid){ } -block_class.prototype.reset_regions = function(){ - var blockcount = main.blocks.length; - for(i=0;i