aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-13 14:34:55 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-13 14:34:55 +0000
commit1708fa3e330894854f5bfea4d90cf07fb3bdc714 (patch)
tree74e1d1a8557d4e977a28fd9e93f65971816f710d
parent2493e2824833fbd36a5dd303206ac46549fe22a7 (diff)
downloadelgg-1708fa3e330894854f5bfea4d90cf07fb3bdc714.tar.gz
elgg-1708fa3e330894854f5bfea4d90cf07fb3bdc714.tar.bz2
Added the stub for Pete's widget reorderer
git-svn-id: https://code.elgg.org/elgg/trunk@911 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/default/canvas/layouts/widgets.php124
1 files changed, 124 insertions, 0 deletions
diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php
index 39a5b92c9..820c41f19 100644
--- a/views/default/canvas/layouts/widgets.php
+++ b/views/default/canvas/layouts/widgets.php
@@ -17,6 +17,130 @@
?>
+<div id="customise_editpanel">
+<!-- temporarily include customise panel js here -->
+
+<!-- jQuery UI Base -->
+<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/ui.base.js"></script>
+<!-- jQuery UI Plugins -->
+<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/ui.draggable.js"></script>
+<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/ui.droppable.js"></script>
+<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/ui.sortable.js"></script>
+
+<script type="text/javascript">
+$(document).ready(function () {
+
+ var els = ['#widget_picker_gallery', '#main_widgets', '#rightsidebar_widgets'];
+ var $els = $(els.toString());
+
+ $els.sortable({
+ items: '> table',
+ handle: 'img.drag_handle',
+ cursor: 'move',
+ revert: true,
+ opacity: 0.8,
+ ghosting: true,
+ appendTo: 'body',
+ placeholder: 'placeholder',
+ connectWith: els,
+ });
+
+});
+</script>
+
+<div id="widget_picker_gallery" style="float:right;border:1px solid black;width:210px;height:198px;padding:10px;overflow:auto;overflow-x:hidden;">
+<h2>Widget gallery</h2>
+
+<?php
+
+ foreach($widgettypes as $widget) {
+
+?>
+
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3><?php echo $widget->name; ?></h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+
+<?php
+
+ }
+
+?>
+<br />
+</div>
+
+
+<div id="customise_page_view">
+<table>
+<tr>
+
+<td width="300px">
+<h2>Main content area widgets</h2>
+<div id="main_widgets">
+
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 1 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 2 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 3 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 4 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 5 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+</div>
+</td>
+
+<td width="240px">
+<div id="rightsidebar_widgets">
+<h2>Right sidebar widgets</h2>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 6 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 7 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 8 Title</h3></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_remove.gif" class="remove_me" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_info.gif" /></a></td>
+<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/icon_customise_drag.gif" class="drag_handle" /></a></td>
+</tr></table>
+</div>
+</td>
+
+</tr>
+</table>
+
+</div><!-- /#customise_page_view -->
+
+<input type="submit" value="Save changes" class="submit_button" />
+
+</div><!-- /customise_editpanel -->
+
+<!-- temporary customise button here -->
+<a href="javascript:void(0);" class="toggle_customise_edit_panel">Customise Layout</a>
+
<p>
<b>Temporarily, add a widget to this page:</b><br />