aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets')
-rw-r--r--views/default/widgets/add_panel.php11
-rw-r--r--views/default/widgets/wrapper.php5
2 files changed, 13 insertions, 3 deletions
diff --git a/views/default/widgets/add_panel.php b/views/default/widgets/add_panel.php
index 09511487c..a010d1e9e 100644
--- a/views/default/widgets/add_panel.php
+++ b/views/default/widgets/add_panel.php
@@ -19,7 +19,8 @@ foreach ($widgets as $column_widgets) {
</p>
<ul>
<?php
- foreach ($widget_types as $handler => $widget_type) {
+ foreach ($widget_types as $handler => $widget_type) {
+ $id = "widget_type_$handler";
// check if widget added and only one instance allowed
if ($widget_type->multiple == false && in_array($handler, $current_handlers)) {
$class = 'widget_unavailable';
@@ -29,7 +30,13 @@ foreach ($widgets as $column_widgets) {
$tooltip = $widget_type->description;
}
- echo "<li title=\"$tooltip\" id=\"$handler\" class=\"$class\">$widget_type->name</li>";
+ if ($widget_type->multiple) {
+ $class .= ' widget_multiple';
+ } else {
+ $class .= ' widget_single';
+ }
+
+ echo "<li title=\"$tooltip\" id=\"$id\" class=\"$class\">$widget_type->name</li>";
}
?>
</ul>
diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php
index 6963989f9..a8651e666 100644
--- a/views/default/widgets/wrapper.php
+++ b/views/default/widgets/wrapper.php
@@ -23,8 +23,11 @@ if (!$title) {
$can_edit = $widget->canEdit();
+$widget_id = "widget_$widget->guid";
+$widget_instance = "widget_instance_$handler";
+
?>
-<div class="widget draggable" id="widget_<?php echo $widget->guid; ?>">
+<div class="widget draggable <?php echo $widget_instance?>" id="<?php echo $widget_id; ?>">
<div class="widget_title drag_handle">
<h3><?php echo $title; ?></h3>
<?php