summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-01-25 12:58:43 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-01-25 12:58:43 +0000
commitccdfda6d5cfd0e138da7f976925496f3d3c69ab5 (patch)
treeed33d443e7b11aafd93ba7f3ef3f04b37d9d10d4 /templates
parentfbc67798371ec5c43edee4d2be8b969691fc89f7 (diff)
downloadthemes-ccdfda6d5cfd0e138da7f976925496f3d3c69ab5.tar.gz
themes-ccdfda6d5cfd0e138da7f976925496f3d3c69ab5.tar.bz2
themes-ccdfda6d5cfd0e138da7f976925496f3d3c69ab5.zip
introduce new drag and drop interface for layout. old, non-js method still available
Diffstat (limited to 'templates')
-rw-r--r--templates/header_inc.tpl47
1 files changed, 44 insertions, 3 deletions
diff --git a/templates/header_inc.tpl b/templates/header_inc.tpl
index 305ee4f..fac89e5 100644
--- a/templates/header_inc.tpl
+++ b/templates/header_inc.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_themes/templates/header_inc.tpl,v 1.9 2006/01/14 19:55:32 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_themes/templates/header_inc.tpl,v 1.10 2006/01/25 12:58:43 squareing Exp $ *}
{strip}
{if $gBitSystem->mStyles.styleSheet}
<link rel="stylesheet" title="{$style}" type="text/css" href="{$gBitSystem->mStyles.styleSheet}" media="all" />
@@ -16,11 +16,52 @@
{if $gBitSystemPrefs.disable_jstabs ne 'y'}
<script type="text/javascript" src="{$smarty.const.UTIL_PKG_URL}javascript/libs/tabpane.js"></script>
{/if}
+{/strip}
+
+{* drag and drop javascript doesn't work with fat loaded - hardcode css for now *}
+{if $loadDragDrop}
+ <script type="text/javascript" src="{$smarty.const.UTIL_PKG_URL}javascript/libs/drag/coordinates.js"></script>
+ <script type="text/javascript" src="{$smarty.const.UTIL_PKG_URL}javascript/libs/drag/drag.js"></script>
+ <script type="text/javascript" src="{$smarty.const.UTIL_PKG_URL}javascript/libs/drag/dragdrop.js"></script>
+
+ {literal}
+ <style type="text/css">
+ ul.boxy,
+ ul.boxy li {min-height:2em; list-style-type:none; border:#ccc solid 1px; padding:4px 4px 0 4px; margin:0px; border:#ccc 1px solid;}
+ ul.boxy {background:#fff; margin:0px;}
+ ul.boxy li {background:#edf; cursor:move; margin:0 0 4px 0; padding:2px;}
+ ul.boxy li {position:absolute; width:250px;}
+ .layout ul.boxy li {position:relative !important; width:auto !important;}
+ ul#center li {background:#def;}
+ </style>
+
+ <script type="text/javascript">//<![CDATA[
+ window.onload = function() {
+ var list = $( "left" );
+ DragDrop.makeListContainer( list, 'side_columns' );
+ list.onDragOver = function() { this.style["background"] = "#feb"; };
+ list.onDragOut = function() {this.style["background"] = "none"; };
-{if $gBitSystemPrefs.disable_fat ne 'y'}
+ list = $( "center" );
+ DragDrop.makeListContainer( list, 'center_column' );
+ list.onDragOver = function() { this.style["background"] = "#dfe"; };
+ list.onDragOut = function() {this.style["background"] = "none"; };
+
+ list = $( "right" );
+ DragDrop.makeListContainer( list, 'side_columns' );
+ list.onDragOver = function() { this.style["background"] = "#feb"; };
+ list.onDragOut = function() {this.style["background"] = "none"; };
+ };
+
+ function getSort( id ) {
+ order = $( id );
+ order.value = DragDrop.serData( id, null );
+ }
+ //]]></script>
+ {/literal}
+{elseif !$gBitSystemPrefs.disable_fat}
<script type="text/javascript" src="{$smarty.const.UTIL_PKG_URL}javascript/libs/fat.js"></script>
{/if}
-{/strip}
{if $browserInfo.browser eq 'ie'}
<!-- this wierdness fixes png display and CSS driven dropdown menus in GUESS WHAT BROWSER -->