aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/layouts/widgets.php2
-rw-r--r--views/default/widgets/wrapper.php4
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>