diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-19 03:28:41 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-19 03:28:41 +0000 |
commit | 4dc9076224a0d93f0dc078124aa9fb94a669f16c (patch) | |
tree | c4fb116cfab0dab64f92e3183012515322b04b30 /views/default | |
parent | 28a52ae81a78bff05d864dce226d3b1a9517a8c3 (diff) | |
download | elgg-4dc9076224a0d93f0dc078124aa9fb94a669f16c.tar.gz elgg-4dc9076224a0d93f0dc078124aa9fb94a669f16c.tar.bz2 |
saving widget position after moving
git-svn-id: http://code.elgg.org/elgg/trunk@7343 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/layouts/widgets.php | 2 | ||||
-rw-r--r-- | views/default/widgets/wrapper.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/views/default/layouts/widgets.php b/views/default/layouts/widgets.php index 74cb6da8d..055b0453e 100644 --- a/views/default/layouts/widgets.php +++ b/views/default/layouts/widgets.php @@ -34,7 +34,7 @@ $widget_class = "widget_{$num_columns}_columns"; for ($column_index = 1; $column_index <= $num_columns; $column_index++) { $column_widgets = $widgets[$column_index]; - echo "<div class=\"widget_column $widget_class widget_col_$column_index\">"; + echo "<div class=\"widget_column $widget_class\" id=\"widget_col_$column_index\">"; if (is_array($column_widgets) && sizeof($column_widgets) > 0) { foreach ($column_widgets as $widget) { echo elgg_view_entity($widget); diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index 51f4725b9..fd849bdee 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -8,6 +8,8 @@ $widgettypes = get_widget_types(); +$widget = $vars['entity']; + if ($vars['entity'] instanceof ElggObject && $vars['entity']->getSubtype() == 'widget') { $handler = $vars['entity']->handler; $title = $widgettypes[$vars['entity']->handler]->name; @@ -23,7 +25,7 @@ $display_view = "widgets/$handler/view"; $edit_view = "widgets/$handler/edit"; ?> -<div class="widget draggable"> +<div class="widget draggable" id="widget_<?php echo $widget->guid; ?>"> <div class="widget_title drag_handle"> <h3>Widget Title</h3> </div> |