From 2da8c3e8428f09bab7aefa39cadc0a4f2d6f7a80 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 19 Nov 2010 22:34:17 +0000 Subject: improving interactions of widgets - containment wasn't working due to height issues git-svn-id: http://code.elgg.org/elgg/trunk@7353 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/css.php | 12 +++++++---- views/default/layouts/widgets.php | 7 ++++++- views/default/widgets/add.php | 34 ------------------------------ views/default/widgets/add_panel.php | 34 ++++++++++++++++++++++++++++++ views/default/widgets/editwrapper.php | 39 ----------------------------------- views/default/widgets/settings.php | 39 +++++++++++++++++++++++++++++++++++ views/default/widgets/wrapper.php | 2 +- 7 files changed, 88 insertions(+), 79 deletions(-) delete mode 100644 views/default/widgets/add.php create mode 100644 views/default/widgets/add_panel.php delete mode 100644 views/default/widgets/editwrapper.php create mode 100644 views/default/widgets/settings.php (limited to 'views/default') diff --git a/views/default/css.php b/views/default/css.php index 29930d445..286beeece 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -881,21 +881,21 @@ li.navigation_more ul li { margin-bottom: 15px; margin-right: 5px; } -.widgets_add { +.widgets_add_panel { padding: 10px; margin: 0 5px 15px; background: #dedede; } -.widgets_add ul { +.widgets_add_panel ul { padding: 0; margin: 0; } -.widgets_add li { +.widgets_add_panel li { float: left; margin: 2px 10px; list-style: none; } -.widgets_add li a { +.widgets_add_panel li a { display: block; width: 200px; padding: 4px; @@ -906,7 +906,11 @@ li.navigation_more ul li { padding: 2px; margin: 0 5px 15px; } +.widget:hover { + background-color: #cccccc; +} .widget_title { + background-color: #dedede; height: 30px; line-height: 30px; } diff --git a/views/default/layouts/widgets.php b/views/default/layouts/widgets.php index 055b0453e..692d01acc 100644 --- a/views/default/layouts/widgets.php +++ b/views/default/layouts/widgets.php @@ -25,9 +25,11 @@ if (elgg_can_edit_widgets()) { 'widgets' => $widgets, 'context' => $context, ); - echo elgg_view('widgets/add', $params); + echo elgg_view('widgets/add_panel', $params); } +echo '
'; + echo $vars['box']; $widget_class = "widget_{$num_columns}_columns"; @@ -43,4 +45,7 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) { echo '
'; } +echo '
'; +echo ''; + elgg_pop_context(); \ No newline at end of file diff --git a/views/default/widgets/add.php b/views/default/widgets/add.php deleted file mode 100644 index c8576cf06..000000000 --- a/views/default/widgets/add.php +++ /dev/null @@ -1,34 +0,0 @@ - - diff --git a/views/default/widgets/add_panel.php b/views/default/widgets/add_panel.php new file mode 100644 index 000000000..70d80f41c --- /dev/null +++ b/views/default/widgets/add_panel.php @@ -0,0 +1,34 @@ + + diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php deleted file mode 100644 index 73166b718..000000000 --- a/views/default/widgets/editwrapper.php +++ /dev/null @@ -1,39 +0,0 @@ -handler/edit"; -$custom_form_section = elgg_view($edit_view, array('entity' => $widget)); - -$access_text = elgg_echo('access'); -$access = elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $widget->access_id)); -$hidden = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $widget->guid)); -$submit = elgg_view('input/submit', array('value' => elgg_echo('save'))); - -$body = <<<___END - $custom_form_section -

- $access -

-

- $hidden - $submit -

-___END; - -?> -
- $body, - 'action' => "action/widgets/save" -); -echo elgg_view('input/form', $params); -?> -
diff --git a/views/default/widgets/settings.php b/views/default/widgets/settings.php new file mode 100644 index 000000000..73166b718 --- /dev/null +++ b/views/default/widgets/settings.php @@ -0,0 +1,39 @@ +handler/edit"; +$custom_form_section = elgg_view($edit_view, array('entity' => $widget)); + +$access_text = elgg_echo('access'); +$access = elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $widget->access_id)); +$hidden = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $widget->guid)); +$submit = elgg_view('input/submit', array('value' => elgg_echo('save'))); + +$body = <<<___END + $custom_form_section +

+ $access +

+

+ $hidden + $submit +

+___END; + +?> +
+ $body, + 'action' => "action/widgets/save" +); +echo elgg_view('input/form', $params); +?> +
diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index 8e92c119b..6963989f9 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -35,7 +35,7 @@ $can_edit = $widget->canEdit(); $widget)); + echo elgg_view('widgets/settings', array('widget' => $widget)); } ?>
-- cgit v1.2.3