diff --git a/share/upgrades/7.10.4-8.0.0/one_over_three.wgpkg b/share/upgrades/7.10.4-8.0.0/one_over_three.wgpkg new file mode 100644 index 000000000..87037f01e Binary files /dev/null and b/share/upgrades/7.10.4-8.0.0/one_over_three.wgpkg differ diff --git a/share/upgrades/7.10.4-8.0.0/one_over_two.wgpkg b/share/upgrades/7.10.4-8.0.0/one_over_two.wgpkg new file mode 100644 index 000000000..180d5eacc Binary files /dev/null and b/share/upgrades/7.10.4-8.0.0/one_over_two.wgpkg differ diff --git a/share/upgrades/7.10.4-8.0.0/plainblacknews.wgpkg b/share/upgrades/7.10.4-8.0.0/plainblacknews.wgpkg new file mode 100644 index 000000000..178a3b987 Binary files /dev/null and b/share/upgrades/7.10.4-8.0.0/plainblacknews.wgpkg differ diff --git a/share/upgrades/7.10.4-8.0.0/right_column.wgpkg b/share/upgrades/7.10.4-8.0.0/right_column.wgpkg new file mode 100644 index 000000000..5898f56c3 Binary files /dev/null and b/share/upgrades/7.10.4-8.0.0/right_column.wgpkg differ diff --git a/share/upgrades/7.10.4-8.0.0/side_by_side.wgpkg b/share/upgrades/7.10.4-8.0.0/side_by_side.wgpkg new file mode 100644 index 000000000..add9aabd2 Binary files /dev/null and b/share/upgrades/7.10.4-8.0.0/side_by_side.wgpkg differ diff --git a/share/upgrades/7.10.4-8.0.0/three-columns.wgpkg b/share/upgrades/7.10.4-8.0.0/three-columns.wgpkg new file mode 100644 index 000000000..58ad75b8b Binary files /dev/null and b/share/upgrades/7.10.4-8.0.0/three-columns.wgpkg differ diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index 84b4e0d0a..d16d1d08d 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -99,6 +99,8 @@ WebGUI.Admin = function(cfg){ getWebguiProperty( 'extrasURL' ) + 'yui/build/yahoo-dom-event/yahoo-dom-event.js', getWebguiProperty( 'extrasURL' ) + 'yui/build/utilities/utilities.js', getWebguiProperty( 'extrasURL' ) + 'yui/build/element/element-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/connection/connection-debug.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/selector/selector-min.js', getWebguiProperty( 'extrasURL' ) + 'yui/build/animation/animation-min.js', getWebguiProperty( 'extrasURL' ) + 'yui/build/dragdrop/dragdrop-min.js', getWebguiProperty( 'extrasURL' ) + 'admin/layout.js' @@ -106,7 +108,12 @@ WebGUI.Admin = function(cfg){ { win : viewWin, onSuccess : function(data) { - new data.win.WebGUI.Layout(data.win.document.body); + new data.win.WebGUI.Layout( + data.win.document.body, + { + url: self.currentAssetDef.url + '?func=setContentPositions;' + } + ); } } ); diff --git a/www/extras/admin/layout.js b/www/extras/admin/layout.js index 9e64b5555..3e2c409ed 100644 --- a/www/extras/admin/layout.js +++ b/www/extras/admin/layout.js @@ -23,6 +23,7 @@ WebGUI.Layout = function (elem, cfg) { // Some special vars this.scrollJump = 50; + this.blankCount = 0; // Init layout positions var positions = this.getPositions(); @@ -58,7 +59,14 @@ WebGUI.Layout.prototype.getPositions */ WebGUI.Layout.prototype.getPositionElements = function ( pos ) { - return pos.getElementsByTagName( '*' ); + var elems = []; + for ( var i = 0; i < pos.childNodes.length; i++ ) { + var child = pos.childNodes[i]; + if ( child.nodeType == 1 ) { // Only elements + elems.push(child); + } + } + return elems; }; /** @@ -112,7 +120,7 @@ WebGUI.Layout.prototype.addBlankTarget = function ( el ) { var blank = document.createElement("div"); blank.className="blank"; - blank.id = "blank" + new Date().getTime() + blankCount++; + blank.id = "blank" + new Date().getTime() + this.blankCount++; el.appendChild(blank); blank.style.top = 0+"px"; blank.style.left = 0+"px"; @@ -171,7 +179,7 @@ WebGUI.Layout.prototype.move */ WebGUI.Layout.prototype.isBlank = function ( obj ) { - return obj.className.indexOf( "blank" ) == -1; + return obj.className.indexOf( "blank" ) != -1; }; /** @@ -181,32 +189,32 @@ WebGUI.Layout.prototype.save = function () { // Create the content map contentMap = ""; - contentCount=1; - var contentArea = document.getElementById("position1"); - while (contentArea) { - if ((contentMap != "") || ( contentCount == 2 )) { + var positions = this.getPositions(); + for ( var i = 0; i < positions.length; i ++ ) { + var pos = positions[i]; + + // Seperator character + if ((contentMap != "") || ( i == 1 )) { // if first position is blank, still add a . contentMap+="."; } - //get down to the tr area - children = dragable_getElementChildren(contentArea); - children=dragable_getElementChildren(children[0]); - for (i=0;i this.lastY) { @@ -339,7 +348,7 @@ WebGUI.LayoutItem.prototype.onDragOver var srcEl = this.getEl(); if(srcEl.id == id){return;} - var obj = Dom.get(id); + var obj = YAHOO.util.Dom.get(id); // We are only concerned with list items, we ignore the dragover // notifications for the list. if ( this.layout.isBlank( obj ) ) { diff --git a/www/extras/draggable.css b/www/extras/draggable.css index c1e5703bc..2e10e24a3 100644 --- a/www/extras/draggable.css +++ b/www/extras/draggable.css @@ -12,20 +12,26 @@ div.dragable:hover { } .dragTriggerWrap{ width: 100%; - height: 18px; + height: 25px; font-size: 10px; color: #888888; background-color: #cccccc; border: 1px solid #888888; text-align: right; } +.dragTriggerWrap img { + border: none; + margin-top: 4px; + margin-right: 4px; +} + .dragging{ position: relative; opacity:0.6; -moz-opacity:0.6; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60); cursor: pointer; - z-index: 2000; + z-index: 2000; } .draggedOverTop{ position: relative; @@ -56,13 +62,20 @@ div.dragable:hover { width: 50px; height: 100px; } -/* TODO: Make the buttons appear inside the drag toolbar! Maybe JS? -.wg-content-position > * { +.dragging, .empty { + background-image: url(opaque.gif); +} + +/* Make the buttons appear inside the drag toolbar */ +.wg-content-position > *, .dragging { position: relative; } -.wg-content-position .wg-admin-toolbar { +.wg-content-position .wg-admin-toolbar, +.dragging .wg-admin-toolbar { position: absolute; left: auto; top: 0px; + margin-top: 2px; + margin-left: 2px; } -*/ +