From 8784c7282009b9cd14b166d57617525424ef94a5 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 19 Dec 2010 21:22:20 +0000 Subject: namespaced the widget code git-svn-id: http://code.elgg.org/elgg/trunk@7693 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/css/screen.php | 46 +++++++++++----------- views/default/layout/objects/widget.php | 12 +++--- views/default/layout/objects/widget/controls.php | 14 +++---- views/default/layout/objects/widget/settings.php | 2 +- views/default/layout/shells/widgets.php | 2 +- views/default/layout/shells/widgets/add_button.php | 15 +++---- views/default/layout/shells/widgets/add_panel.php | 14 +++---- 7 files changed, 49 insertions(+), 56 deletions(-) (limited to 'views/default') diff --git a/views/default/css/screen.php b/views/default/css/screen.php index 971b5b734..a96aaaa90 100644 --- a/views/default/css/screen.php +++ b/views/default/css/screen.php @@ -142,22 +142,20 @@ echo elgg_view('css/elements/skin', $vars); float: right; min-height: 30px; } -#widget-add-button { - padding: 0px; +.elgg-widget-add-control { text-align: right; - margin-bottom: 15px; - margin-right: 5px; + margin: 5px 5px 15px; } -.widgets-add-panel { +.elgg-widgets-add-panel { padding: 10px; margin: 0 5px 15px; background: #dedede; } -.widgets-add-panel ul { +.elgg-widgets-add-panel ul { padding: 0; margin: 0; } -.widgets-add-panel li { +.elgg-widgets-add-panel li { float: left; margin: 2px 10px; list-style: none; @@ -165,36 +163,36 @@ echo elgg_view('css/elements/skin', $vars); padding: 4px; background-color: #cccccc; } -.widgets-add-panel li a { +.elgg-widgets-add-panel li a { display: block; } -.widget-available { +.elgg-widget-available { cursor: pointer; } -.widget-unavailable { +.elgg-widget-unavailable { color: #888888; } -.widget { +.elgg-widget { background-color: #dedede; padding: 2px; margin: 0 5px 15px; position: relative; } -.widget:hover { +.elgg-widget:hover { background-color: #cccccc; } -.widget-title { +.elgg-widget-title { background-color: #dedede; height: 30px; line-height: 30px; overflow: hidden; } -.widget-title h3 { +.elgg-widget-title h3 { float: left; padding: 0 45px 0 20px; color: #333333; } -.widget-controls a { +.elgg-widget-controls a { position: absolute; top: 5px; display: block; @@ -202,42 +200,42 @@ echo elgg_view('css/elements/skin', $vars); height: 18px; border: 1px solid transparent; } -a.widget-collapse-button { +a.elgg-widget-collapse-button { left: 5px; background:transparent url(_graphics/elgg_sprites.png) no-repeat 0px -385px; } -.widget-controls a.widget-collapsed { +.elgg-widget-controls a.elgg-widget-collapsed { background-position: 0px -365px; } -a.widget-delete-button { +a.elgg-widget-delete-button { right: 5px; background:transparent url(_graphics/elgg_sprites.png) no-repeat -198px 3px; } -a.widget-edit-button { +a.elgg-widget-edit-button { right: 25px; background:transparent url(_graphics/elgg_sprites.png) no-repeat -300px -1px; } -a.widget-edit-button:hover, a.widget-delete-button:hover { +a.elgg-widget-edit-button:hover, a.elgg-widget-delete-button:hover { border: 1px solid #cccccc; } -.widget-container { +.elgg-widget-container { background-color: white; width: 100%; overflow: hidden; } -.widget-edit { +.elgg-widget-edit { display: none; width: 96%; padding: 2%; border-bottom: 2px solid #dedede; } -.widget-content { +.elgg-widget-content { padding: 10px; } .drag-handle { cursor: move; } -.widget-placeholder { +.elgg-widget-placeholder { border: 2px dashed #dedede; margin-bottom: 15px; } diff --git a/views/default/layout/objects/widget.php b/views/default/layout/objects/widget.php index d109693e1..1ba274aa6 100644 --- a/views/default/layout/objects/widget.php +++ b/views/default/layout/objects/widget.php @@ -19,12 +19,12 @@ $title = $widget->getTitle(); $can_edit = $widget->canEdit(); -$widget_id = "widget-$widget->guid"; -$widget_instance = "widget-instance-$handler"; +$widget_id = "elgg-widget-$widget->guid"; +$widget_instance = "elgg-widget-instance-$handler"; ?> -
-
+
+

$widget)); } ?> -
+
$widget)); } ?> -
+
' ', 'href' => "#", - 'class' => 'widget-collapse-button', - 'internalid' => "widget-collapse-button_$widget->guid" + 'class' => 'elgg-widget-collapse-button', + 'internalid' => "elgg-widget-collapse-button-$widget->guid" ); $collapse_link = elgg_view('output/url', $params); @@ -21,8 +21,8 @@ $params = array( 'title' => elgg_echo('widget:delete', array($widget->getTitle())), 'href' => elgg_get_site_url() . "action/widgets/delete?guid=$widget->guid", 'is_action' => true, - 'class' => 'widget-delete-button', - 'internalid' => "widget-delete-button_$widget->guid" + 'class' => 'elgg-widget-delete-button', + 'internalid' => "elgg-widget-delete-button-$widget->guid" ); $delete_link = elgg_view('output/url', $params); @@ -30,13 +30,13 @@ $params = array( 'text' => ' ', 'title' => elgg_echo('widget:edit'), 'href' => "#", - 'class' => 'widget-edit-button', - 'internalid' => "widget-edit-button_$widget->guid" + 'class' => 'elgg-widget-edit-button', + 'internalid' => "elgg-widget-edit-button-$widget->guid" ); $edit_link = elgg_view('output/url', $params); echo <<<___END -
+
$collapse_link $delete_link $edit_link diff --git a/views/default/layout/objects/widget/settings.php b/views/default/layout/objects/widget/settings.php index 5814e5821..c1e00c3f1 100644 --- a/views/default/layout/objects/widget/settings.php +++ b/views/default/layout/objects/widget/settings.php @@ -33,7 +33,7 @@ $body = <<<___END ___END; ?> -
+
$body, diff --git a/views/default/layout/shells/widgets.php b/views/default/layout/shells/widgets.php index e35e8c6c4..0c21e7042 100644 --- a/views/default/layout/shells/widgets.php +++ b/views/default/layout/shells/widgets.php @@ -34,7 +34,7 @@ $widget_class = "elgg-col-1of{$num_columns}"; for ($column_index = 1; $column_index <= $num_columns; $column_index++) { $column_widgets = $widgets[$column_index]; - echo "
"; + echo "
"; if (is_array($column_widgets) && sizeof($column_widgets) > 0) { foreach ($column_widgets as $widget) { echo elgg_view_entity($widget); diff --git a/views/default/layout/shells/widgets/add_button.php b/views/default/layout/shells/widgets/add_button.php index d281a2ffa..492f0f6fc 100644 --- a/views/default/layout/shells/widgets/add_button.php +++ b/views/default/layout/shells/widgets/add_button.php @@ -1,13 +1,8 @@ -
- '#', - 'text' => elgg_echo('widgets:add'), - 'class' => 'elgg-action-button', -); -echo elgg_view('output/url', $options); +/** + * Button area for showing the add widgets panel + */ ?> +
+
diff --git a/views/default/layout/shells/widgets/add_panel.php b/views/default/layout/shells/widgets/add_panel.php index d9acc5518..1e2dc3bbc 100644 --- a/views/default/layout/shells/widgets/add_panel.php +++ b/views/default/layout/shells/widgets/add_panel.php @@ -13,27 +13,27 @@ foreach ($widgets as $column_widgets) { } ?> -