aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-18 09:14:58 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-18 09:14:58 +0000
commitbc503749d88ae14966069724a3bbfc5c4ccc86ce (patch)
tree7a51f128837819991ac93d5a911a9befd9a4b1bf
parentf6e39063c40ea92efcd54d11f55d97d50790d4de (diff)
downloadelgg-bc503749d88ae14966069724a3bbfc5c4ccc86ce.tar.gz
elgg-bc503749d88ae14966069724a3bbfc5c4ccc86ce.tar.bz2
Added GUIDs and handlers to the widget panel
git-svn-id: https://code.elgg.org/elgg/trunk@958 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/default/canvas/layouts/widgets.php34
1 files changed, 24 insertions, 10 deletions
diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php
index a649e34de..547d35088 100644
--- a/views/default/canvas/layouts/widgets.php
+++ b/views/default/canvas/layouts/widgets.php
@@ -26,11 +26,17 @@
<?php
- foreach($widgettypes as $widget) {
+ foreach($widgettypes as $handler => $widget) {
?>
-<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3><?php echo $widget->name; ?></h3></td>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px">
+ <h3>
+ <?php echo $widget->name; ?>
+ <input type="hidden" name="handler" value="<?php echo htmlentities($handler); ?>" />
+ <input type="hidden" name="guid" value="0" />
+ </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" class="more_info" /></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>
@@ -53,27 +59,32 @@
<div id="main_widgets">
<h2>Main content area widgets</h2>
-<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 1 Title</h3></td>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 1 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="0" /></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" class="more_info" /></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 megacalculatorextrodinaire</h3></td>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 2 Title megacalculatorextrodinaire<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="0" /></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" class="more_info" /></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>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 3 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="0" /></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" class="more_info" /></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>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 4 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="0" /></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" class="more_info" /></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>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 5 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="8" /></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" class="more_info" /></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>
@@ -84,17 +95,20 @@
<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>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 6 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="30" /></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" class="more_info" /></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>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 7 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="7" /></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" class="more_info" /></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>
+<table class="draggable_widget" cellspacing="0"><tr><td width="149px"><h3>Widget 8 Title<input type="hidden" name="handler" value="placeholder" />
+ <input type="hidden" name="guid" value="9" /></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" class="more_info" /></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>