From 947eda7867df1f4846f18fc0326ff0ed20626c34 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 29 Dec 2010 23:54:04 +0000 Subject: stage 1 in moving the forms markup to elgg- namespaced css - buttons still need work git-svn-id: http://code.elgg.org/elgg/trunk@7763 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/admin/components/plugin.php | 4 +- views/default/admin/plugins/advanced.php | 106 ------------ views/default/admin/plugins/plugins_advanced.php | 106 ++++++++++++ views/default/css/admin.php | 2 +- views/default/css/elements/forms.php | 203 +++++++++++------------ views/default/css/screen.php | 2 +- views/default/input/access.php | 2 +- views/default/input/checkbox.php | 2 +- views/default/input/checkboxes.php | 2 +- views/default/input/email.php | 2 +- views/default/input/file.php | 2 +- views/default/input/longtext.php | 2 +- views/default/input/password.php | 2 +- views/default/input/plaintext.php | 2 +- views/default/input/pulldown.php | 2 +- views/default/input/radio.php | 2 +- views/default/input/tags.php | 2 +- views/default/input/text.php | 2 +- views/default/input/url.php | 2 +- views/default/page/shells/walled_garden.php | 4 +- 20 files changed, 222 insertions(+), 231 deletions(-) delete mode 100644 views/default/admin/plugins/advanced.php create mode 100644 views/default/admin/plugins/plugins_advanced.php (limited to 'views/default') diff --git a/views/default/admin/components/plugin.php b/views/default/admin/components/plugin.php index 60a1e3f86..ae611af07 100644 --- a/views/default/admin/components/plugin.php +++ b/views/default/admin/components/plugin.php @@ -50,10 +50,10 @@ if ($vars['order'] < $vars['maxorder']) { if ($active) { $url = elgg_get_site_url()."action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; - $enable_disable = '' . elgg_echo('disable') . ''; + $enable_disable = '' . elgg_echo('disable') . ''; } else { $url = elgg_get_site_url()."action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; - $enable_disable = '' . elgg_echo('enable') . ''; + $enable_disable = '' . elgg_echo('enable') . ''; } diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php deleted file mode 100644 index ead930090..000000000 --- a/views/default/admin/plugins/advanced.php +++ /dev/null @@ -1,106 +0,0 @@ - $plugin) { - $plugin_categories = $plugin['manifest']['category']; - - // handle plugins that don't declare categories - if ((!$plugin_categories && $show_category) || ($show_category && !in_array($show_category, $plugin_categories))) { - unset($installed_plugins[$id]); - } - - if (isset($plugin_categories)) { - foreach ($plugin_categories as $category) { - if (!array_key_exists($category, $categories)) { - $categories[$category] = elgg_echo("admin:plugins:label:moreinfo:categories:$category"); - } - } - } -} - -$ts = time(); -$token = generate_action_token($ts); -$categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories); - -$category_pulldown = elgg_view('input/pulldown', array( - 'internalname' => 'category', - 'options_values' => $categories, - 'value' => $show_category -)); - -$category_button = elgg_view('input/submit', array( - 'value' => elgg_echo('filter'), - 'class' => 'elgg-action-button' -)); - -$category_form = elgg_view('input/form', array( - 'body' => $category_pulldown . $category_button -)); - -// Page Header elements -$title = elgg_view_title(elgg_echo('admin:plugins')); - -// @todo Until "en/disable all" means "All plugins on this page" hide when not looking at all. -if (!isset($show_category) || empty($show_category)) { - $buttons = "url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')." url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')." "; - $buttons .= "

"; -} else { - $buttons = ''; -} - -$buttons .= $category_form; - -// construct page header -?> -
-
-
-
-
- $foo) { - if ($key > $max) $max = $key; -} - -// Display list of plugins -$n = 0; -foreach ($installed_plugins as $plugin => $data) { - echo elgg_view('admin/components/plugin', array( - 'plugin' => $plugin, - 'details' => $data, - 'maxorder' => $max, - 'order' => array_search($plugin, $plugin_list) - )); - $n++; -} -?> - \ No newline at end of file diff --git a/views/default/admin/plugins/plugins_advanced.php b/views/default/admin/plugins/plugins_advanced.php new file mode 100644 index 000000000..ead930090 --- /dev/null +++ b/views/default/admin/plugins/plugins_advanced.php @@ -0,0 +1,106 @@ + $plugin) { + $plugin_categories = $plugin['manifest']['category']; + + // handle plugins that don't declare categories + if ((!$plugin_categories && $show_category) || ($show_category && !in_array($show_category, $plugin_categories))) { + unset($installed_plugins[$id]); + } + + if (isset($plugin_categories)) { + foreach ($plugin_categories as $category) { + if (!array_key_exists($category, $categories)) { + $categories[$category] = elgg_echo("admin:plugins:label:moreinfo:categories:$category"); + } + } + } +} + +$ts = time(); +$token = generate_action_token($ts); +$categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories); + +$category_pulldown = elgg_view('input/pulldown', array( + 'internalname' => 'category', + 'options_values' => $categories, + 'value' => $show_category +)); + +$category_button = elgg_view('input/submit', array( + 'value' => elgg_echo('filter'), + 'class' => 'elgg-action-button' +)); + +$category_form = elgg_view('input/form', array( + 'body' => $category_pulldown . $category_button +)); + +// Page Header elements +$title = elgg_view_title(elgg_echo('admin:plugins')); + +// @todo Until "en/disable all" means "All plugins on this page" hide when not looking at all. +if (!isset($show_category) || empty($show_category)) { + $buttons = "url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')." url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')." "; + $buttons .= "

"; +} else { + $buttons = ''; +} + +$buttons .= $category_form; + +// construct page header +?> +
+
+
+
+
+ $foo) { + if ($key > $max) $max = $key; +} + +// Display list of plugins +$n = 0; +foreach ($installed_plugins as $plugin => $data) { + echo elgg_view('admin/components/plugin', array( + 'plugin' => $plugin, + 'details' => $data, + 'maxorder' => $max, + 'order' => array_search($plugin, $plugin_list) + )); + $n++; +} +?> + \ No newline at end of file diff --git a/views/default/css/admin.php b/views/default/css/admin.php index ce31a0036..d6180db83 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -143,7 +143,7 @@ table.mceLayout { font-size:100%; font-weight:normal; } -.elgg-admin .input-textarea { +.elgg-admin .elgg-input-textarea { width:98%; } .elgg-admin form#plugin_settings { diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index 698d5fdf3..b4f8c7429 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -10,41 +10,30 @@ Form Elements *************************************** */ /* default elgg core input field classes */ -.input-text, -.input-tags, -.input-url, -.input-textarea { - width:98%; -} -.input-access { - margin:5px 0 0 0; -} -.input-password { - width:200px; -} -.input-textarea { - height: 200px; - width:718px; -} -input[type="checkbox"], -input.input-radio { - margin:0 3px 0 0; - padding:0; - border:none; -} label { font-weight: bold; - color:#333333; + color: #333333; font-size: 110%; } input { font: 120% Arial, Helvetica, sans-serif; padding: 5px; border: 1px solid #cccccc; - color:#666666; + color: #666666; -webkit-border-radius: 5px; -moz-border-radius: 5px; } +input[type="text"], textarea { + width: 96%; +} +input[type="password"] { + width: 200px; +} +input[type="text"]:focus, input[type="password"]:focus { + border: solid 1px #4690d6; + background: #e4ecf5; + color:#333333; +} textarea { font: 120% Arial, Helvetica, sans-serif; border: solid 1px #cccccc; @@ -52,50 +41,106 @@ textarea { color:#666666; -webkit-border-radius: 5px; -moz-border-radius: 5px; + height: 200px; + width: 96%; } -textarea:focus, -input[type="text"]:focus { - border: solid 1px #4690d6; - background: #e4ecf5; - color:#333333; -} -.input-textarea.monospace { - font-family:Monaco,"Courier New",Courier,monospace; - font-size:13px; +textarea.monospace { + font-family: Monaco,"Courier New",Courier,monospace; + font-size: 13px; } a.longtext-control { float:right; margin-left:14px; } -.elgg-submit-button { +.elgg-input-access { + margin:5px 0 0 0; +} +input[type="checkbox"], +input[type="radio"] { + margin:0 3px 0 0; + padding:0; + border:none; +} + +input[type="submit"], +input[type="button"], +.elgg-button { font-size: 14px; font-weight: bold; - color: white; - text-shadow:1px 1px 0px black; - text-decoration:none; - border: 1px solid #4690d6; - background-color:#4690d6; - background-image: url(_graphics/button_graduation.png); - background-repeat: repeat-x; - background-position: left 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; width: auto; padding: 2px 4px; - margin:0 10px 10px 0; + margin: 10px 0 10px 0; cursor: pointer; + outline: none; -webkit-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.40); -moz-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.40); } -.elgg-submit-button:hover { +input[type="submit"], +.elgg-submit-button { color: white; + text-shadow: 1px 1px 0px black; + text-decoration: none; + border: 1px solid #4690d6; + background-color: #4690d6; + background-image: url(_graphics/button_graduation.png); + background-repeat: repeat-x; + background-position: left 10px; +} +input[type="submit"]:hover, +.elgg-submit-button:hover { border-color: #0054a7; - text-decoration:none; - background-color:#0054a7; - background-image: url(_graphics/button_graduation.png); + text-decoration: none; + color: white; + background-color: #0054a7; + background-image: url(_graphics/button_graduation.png); + background-repeat: repeat-x; + background-position: left 10px; +} +.elgg-cancel-button { + color: #333333; + background-color: #dddddd; + background-image: url(_graphics/button_graduation.png); + background-repeat: repeat-x; + background-position: left 10px; + border: 1px solid #999999; +} +.elgg-cancel-button:hover { + color: white; + background-color: #999999; + background-position: left 10px; + text-decoration: none; +} +.elgg-action-button { + background-color:#cccccc; + background-image: url(_graphics/button_background.gif); background-repeat: repeat-x; - background-position: left 10px; + background-position: 0 0; + border:1px solid #999999; + color: #333333; + padding: 2px 15px 2px 15px; + text-align: center; + font-weight: bold; + text-decoration: none; + text-shadow: 0 1px 0 white; + cursor: pointer; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +.elgg-action-button:hover, +.elgg-action-button:focus { + background-position: 0 -15px; + background-image: url(_graphics/button_background.gif); + background-repeat: repeat-x; + color: #111111; + text-decoration: none; + background-color: #cccccc; + border: 1px solid #999999; } +/* .elgg-submit-button.disabled { background-color:#999999; border-color:#999999; @@ -106,64 +151,7 @@ a.longtext-control { border-color:#999999; color:#dedede; } -input[type="password"]:focus { - border: solid 1px #4690d6; - background-color: #e4ecf5; - color:#333333; -} -input[type="submit"] { - font-size: 14px; - font-weight: bold; - color: white; - text-shadow:1px 1px 0px black; - text-decoration:none; - border: 1px solid #4690d6; - background-color:#4690d6; - background-image: url(_graphics/button_graduation.png); - background-repeat: repeat-x; - background-position: left 10px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - width: auto; - padding: 2px 4px; - margin:10px 0 10px 0; - cursor: pointer; - -moz-outline-style: none; - outline: none; - -webkit-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.40); - -moz-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.40); -} -input[type="submit"]:hover { - border-color: #0054a7; - text-decoration:none; - background-color:#0054a7; - background-image: url(_graphics/button_graduation.png); - background-repeat: repeat-x; - background-position: left 10px; -} -.elgg-cancel-button { - font-size: 14px; - font-weight: bold; - text-decoration:none; - color: #333333; - background-color:#dddddd; - background-image: url(_graphics/button_graduation.png); - background-repeat: repeat-x; - background-position: left 10px; - border: 1px solid #999999; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - width: auto; - padding: 2px 4px; - margin:10px 0 10px 10px; - cursor: pointer; -} -.elgg-cancel-button:hover { - background-color: #999999; - background-position: left 10px; - text-decoration:none; - color:white; -} + .elgg-action-button { margin-left: 10px; } @@ -240,6 +228,9 @@ a.elgg-action-button:focus { color:white; text-shadow:0 -1px 0 black; } + +*/ + /* small round delete button */ .delete-button { width:14px; diff --git a/views/default/css/screen.php b/views/default/css/screen.php index 1aaffaaa8..bccbf9f47 100644 --- a/views/default/css/screen.php +++ b/views/default/css/screen.php @@ -278,7 +278,7 @@ a.elgg-widget-edit-button:hover, a.elgg-widget-delete-button:hover { .elgg-river-content .elgg-user-icon { float: left; } -.elgg-river-layout .input-pulldown { +.elgg-river-layout .elgg-input-dropdown { float: right; margin: 10px 0; } diff --git a/views/default/input/access.php b/views/default/input/access.php index d4f366363..56123d49a 100644 --- a/views/default/input/access.php +++ b/views/default/input/access.php @@ -14,7 +14,7 @@ * */ -$class = "input-access"; +$class = "elgg-input-access"; if (isset($vars['class'])) { $class = $vars['class']; } diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php index 59af3216f..0fea3d3c6 100644 --- a/views/default/input/checkbox.php +++ b/views/default/input/checkbox.php @@ -15,7 +15,7 @@ */ $defaults = array( - 'class' => 'input-checkbox', + 'class' => 'elgg-input-checkbox', ); $vars = array_merge($defaults, $vars); diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php index 4abeabf58..2222875d8 100644 --- a/views/default/input/checkboxes.php +++ b/views/default/input/checkboxes.php @@ -29,7 +29,7 @@ if (!isset($vars['value']) || $vars['value'] === FALSE) { $vars['value'] = elgg_get_sticky_value($vars['internalname']); } -$class = (isset($vars['class'])) ? $vars['class'] : 'input-checkboxes'; +$class = (isset($vars['class'])) ? $vars['class'] : 'elgg-input-checkboxes'; $value = (isset($vars['value'])) ? $vars['value'] : NULL; $value_array = (is_array($value)) ? array_map('strtolower', $value) : array(strtolower($value)); $internalname = (isset($vars['internalname'])) ? $vars['internalname'] : ''; diff --git a/views/default/input/email.php b/views/default/input/email.php index c973ff7e4..577cfbbdb 100644 --- a/views/default/input/email.php +++ b/views/default/input/email.php @@ -8,7 +8,7 @@ */ $defaults = array( - 'class' => 'input-text', //@todo input-email? + 'class' => 'elgg-input-email', 'disabled' => FALSE, ); diff --git a/views/default/input/file.php b/views/default/input/file.php index 8f0461083..28ab54f94 100644 --- a/views/default/input/file.php +++ b/views/default/input/file.php @@ -19,7 +19,7 @@ if (!empty($vars['value'])) { echo elgg_echo('fileexists') . "
"; } -$class = "input-file"; +$class = "elgg-input-file"; if (isset($vars['class'])) { $class = $vars['class']; } diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php index d784c6014..d9862f95c 100644 --- a/views/default/input/longtext.php +++ b/views/default/input/longtext.php @@ -14,7 +14,7 @@ * @uses $vars['disabled'] Is the input field disabled? */ -$class = "input-textarea"; +$class = "elgg-input-textarea"; if (isset($vars['class'])) { $class = $vars['class']; } diff --git a/views/default/input/password.php b/views/default/input/password.php index 0d1523977..86bae9c7f 100644 --- a/views/default/input/password.php +++ b/views/default/input/password.php @@ -14,7 +14,7 @@ $class = $vars['class']; if (!$class) { - $class = "input-password"; + $class = "elgg-input-password"; } ?> diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php index e2b8c5ed2..0ca8c07ee 100644 --- a/views/default/input/plaintext.php +++ b/views/default/input/plaintext.php @@ -14,7 +14,7 @@ $class = $vars['class']; if (!$class) { - $class = "input-textarea"; + $class = "elgg-input-textarea"; } if (!isset($vars['value']) || $vars['value'] === FALSE) { diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php index f789d1020..25e3e3c37 100644 --- a/views/default/input/pulldown.php +++ b/views/default/input/pulldown.php @@ -18,7 +18,7 @@ $class = $vars['class']; if (!$class) { - $class = "input-pulldown"; + $class = "elgg-input-dropdown"; } if (!isset($vars['value'])) { diff --git a/views/default/input/radio.php b/views/default/input/radio.php index 0a5885f8b..b2b67616c 100644 --- a/views/default/input/radio.php +++ b/views/default/input/radio.php @@ -15,7 +15,7 @@ $class = $vars['class']; if (!$class) { - $class = "input-radio"; + $class = "elgg-input-radio"; } if (!isset($vars['value']) || $vars['value'] === FALSE) { diff --git a/views/default/input/tags.php b/views/default/input/tags.php index 6ce074a2a..c48793518 100644 --- a/views/default/input/tags.php +++ b/views/default/input/tags.php @@ -8,7 +8,7 @@ */ $defaults = array( - 'class' => 'input-tags', + 'class' => 'elgg-input-tags', 'disabled' => FALSE, ); diff --git a/views/default/input/text.php b/views/default/input/text.php index 9f3076ed3..668102d81 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -8,7 +8,7 @@ */ $defaults = array( - 'class' => 'input-text', + 'class' => 'elgg-input-text', 'disabled' => FALSE, ); diff --git a/views/default/input/url.php b/views/default/input/url.php index fddf44a5b..607720078 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -8,7 +8,7 @@ */ $defaults = array( - 'class' => 'input-url', + 'class' => 'elgg-input-url', ); $vars = array_merge($defaults, $vars); diff --git a/views/default/page/shells/walled_garden.php b/views/default/page/shells/walled_garden.php index 4e64276c1..bdd010496 100644 --- a/views/default/page/shells/walled_garden.php +++ b/views/default/page/shells/walled_garden.php @@ -128,10 +128,10 @@ body {background: white;} -moz-box-shadow: none; box-shadow: none; } -.walledgardenlogin .input-password { +.walledgardenlogin .elgg-input-password { width:200px; } -.walledgardenlogin input.input-password:focus { +.walledgardenlogin input.elgg-input-password:focus { border: solid 1px #4690d6; background-color: #e4ecf5; color:#333333; -- cgit v1.2.3