summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gallery.common.css27
-rw-r--r--modules/server_add/controllers/admin_server_add.php4
-rw-r--r--modules/server_add/css/server_add.css38
-rw-r--r--modules/server_add/helpers/server_add_theme.php2
-rw-r--r--modules/server_add/js/admin.js2
-rw-r--r--modules/server_add/views/admin_server_add.html.php15
-rw-r--r--modules/user/controllers/admin_users.php3
-rw-r--r--modules/user/controllers/users.php1
-rw-r--r--modules/user/css/user.css56
-rw-r--r--modules/user/helpers/user.php2
-rw-r--r--modules/user/helpers/user_theme.php28
-rw-r--r--themes/admin_wind/css/screen.css44
-rw-r--r--themes/night_wind/css/screen.css33
-rw-r--r--themes/wind/css/screen.css33
14 files changed, 157 insertions, 131 deletions
diff --git a/lib/gallery.common.css b/lib/gallery.common.css
index c94a8421..d0d41ecf 100644
--- a/lib/gallery.common.css
+++ b/lib/gallery.common.css
@@ -170,17 +170,28 @@ input[type="reset"] {
* 3) Dimension and scale
**********************************************************************/
-.g-narrow {
+.g-one-quarter {
width: 25%;
}
-.g-wide {
- width: 100%;
+.g-one-third {
+ width: 33%;
}
-form.g-narrow {
- padding: 0;
- width: 270px;
+.g-one-half {
+ width: 50%;
+}
+
+.g-two-thirds {
+ width: 66%;
+}
+
+.g-three-quarters {
+ width: 75%;
+}
+
+.g-whole {
+ width: 100%;
}
/** *******************************************************************
@@ -222,6 +233,10 @@ form li.g-warning {
padding: .3em .8em .3em 1em;
}
+.g-short-form li.g-error {
+ padding: .3em 0 .3em 0;
+}
+
form.g-error input[type="text"],
li.g-error input[type="text"],
form.g-error input[type="password"],
diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php
index cb71e1f1..f32bb834 100644
--- a/modules/server_add/controllers/admin_server_add.php
+++ b/modules/server_add/controllers/admin_server_add.php
@@ -83,9 +83,9 @@ class Admin_Server_Add_Controller extends Admin_Controller {
private function _get_admin_form() {
$form = new Forge("admin/server_add/add_path", "", "post",
- array("id" => "g-server-add-admin-form", "class" => "g-short-form g-wide"));
+ array("id" => "g-server-add-admin-form", "class" => "g-short-form"));
$add_path = $form->group("add_path");
- $add_path->input("path")->label(t("Path"))->rules("required")
+ $add_path->input("path")->label(t("Path"))->rules("required")->id("g-path")
->error_messages("not_readable", t("This directory is not readable by the webserver"))
->error_messages("is_symlink", t("Symbolic links are not allowed"));
$add_path->submit("add")->value(t("Add Path"));
diff --git a/modules/server_add/css/server_add.css b/modules/server_add/css/server_add.css
new file mode 100644
index 00000000..36746ab5
--- /dev/null
+++ b/modules/server_add/css/server_add.css
@@ -0,0 +1,38 @@
+#g-server-add button {
+ margin-bottom: .5em;
+}
+
+#g-server-add-tree {
+ cursor: pointer;
+ padding-left: 4px;
+ width: 95%;
+}
+
+#g-server-add-tree li {
+ padding: 0;
+ float: none;
+}
+
+#g-server-add-tree span.selected {
+ background: #ddd;
+}
+
+#g-server-add-tree {
+ border: 1px solid #ccc;
+ height: 20em;
+ overflow: auto;
+ margin-bottom: .5em;
+ padding: .5em;
+}
+
+#g-server-add ul ul li {
+ padding-left: 1.2em;
+}
+
+#g-server-add-paths li .ui-icon {
+ margin-top: .4em;
+}
+
+#g-server-add-admin-form .textbox {
+ width: 400px;
+}
diff --git a/modules/server_add/helpers/server_add_theme.php b/modules/server_add/helpers/server_add_theme.php
index 9da8969a..e213779c 100644
--- a/modules/server_add/helpers/server_add_theme.php
+++ b/modules/server_add/helpers/server_add_theme.php
@@ -20,6 +20,7 @@
class server_add_theme_Core {
static function head($theme) {
if (identity::active_user()->admin) {
+ $theme->css("server_add.css");
$theme->script("server_add.js");
}
}
@@ -27,6 +28,7 @@ class server_add_theme_Core {
static function admin_head($theme) {
$head = array();
if (strpos(Router::$current_uri, "admin/server_add") !== false) {
+ $theme->css("server_add.css");
$theme->css("jquery.autocomplete.css");
$base = url::site("__ARGS__");
$csrf = access::csrf_token();
diff --git a/modules/server_add/js/admin.js b/modules/server_add/js/admin.js
index edbddf33..9d7bd181 100644
--- a/modules/server_add/js/admin.js
+++ b/modules/server_add/js/admin.js
@@ -3,6 +3,6 @@
*
*/
$("document").ready(function() {
- $("#g-server-add-admin input:text").autocomplete(
+ $("#g-path").autocomplete(
base_url.replace("__ARGS__", "admin/server_add/autocomplete"), {max: 256});
});
diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php
index eae767af..33fd81f3 100644
--- a/modules/server_add/views/admin_server_add.html.php
+++ b/modules/server_add/views/admin_server_add.html.php
@@ -2,21 +2,20 @@
<div class="g-block">
<h1> <?= t("Add From Server Admininstration") ?> </h1>
<div class="g-block-content">
+ <?= $form ?>
<h2><?= t("Authorized Paths") ?></h2>
- <ul<? if (!empty($paths)): ?> style="display: none;"<? endif ?>>
+ <ul id="g-server-add-paths">
+ <? if (empty($paths)): ?>
<li class="g-module-status g-info"><?= t("No Authorized image source paths defined yet") ?></li>
- </ul>
- <ul>
+ <? endif ?>
<? foreach ($paths as $id => $path): ?>
- <li class="ui-icon-left">
- <span class="ui-icon ui-icon-folder-open"></span>
+ <li>
<?= html::clean($path) ?>
<a href="<?= url::site("admin/server_add/remove_path?path=" . urlencode($path) . "&amp;csrf=$csrf") ?>"
- id="icon_<?= $id?>"
- class="g-remove-dir"><span class="ui-icon ui-icon-trash">X</span></a>
+ id="icon_<?= $id ?>"
+ class="g-remove-dir g-button"><span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
</li>
<? endforeach ?>
</ul>
- <?= $form ?>
</div>
</div>
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index 8b96ebd2..4d80521e 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -317,7 +317,6 @@ class Admin_Users_Controller extends Admin_Controller {
static function _get_user_add_form_admin() {
$form = new Forge("admin/users/add_user", "", "post", array("id" => "g-add-user-form"));
- $form->set_attr('class', "g-narrow");
$group = $form->group("add_user")->label(t("Add User"));
$group->input("name")->label(t("Username"))->id("g-username")
->error_messages("in_use", t("There is already a user with that username"));
@@ -375,7 +374,7 @@ class Admin_Users_Controller extends Admin_Controller {
private function _get_group_add_form_admin() {
$form = new Forge("admin/users/add_group", "", "post", array("id" => "g-add-group-form"));
- $form->set_attr('class', "g-narrow");
+ $form->set_attr('class', "g-one-quarter");
$form_group = $form->group("add_group")->label(t("Add Group"));
$form_group->input("name")->label(t("Name"))->id("g-name");
$form_group->inputs["name"]->error_messages(
diff --git a/modules/user/controllers/users.php b/modules/user/controllers/users.php
index dee54f63..28164e9c 100644
--- a/modules/user/controllers/users.php
+++ b/modules/user/controllers/users.php
@@ -68,7 +68,6 @@ class Users_Controller extends Controller {
private function _get_edit_form($user) {
$form = new Forge("users/update/$user->id", "", "post", array("id" => "g-edit-user-form"));
- $form->set_attr("class", "g-narrow");
$group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name)));
$group->input("full_name")->label(t("Full Name"))->id("g-fullname")->value($user->full_name);
self::_add_locale_dropdown($group, $user);
diff --git a/modules/user/css/user.css b/modules/user/css/user.css
new file mode 100644
index 00000000..3b5e7ac2
--- /dev/null
+++ b/modules/user/css/user.css
@@ -0,0 +1,56 @@
+#g-login-form,
+#g-add-user-form
+#g-edit-user-form,
+#g-delete-user-form,
+#g-user-admin {
+ width: 270px;
+}
+
+#g-user-admin-list .admin {
+ color: #55f;
+ font-weight: bold;
+}
+
+li.g-group {
+ float: left;
+ display: block;
+ width: 200px;
+ border: 1px solid gray;
+ padding: 0;
+ margin: 0 1em 1em 0;
+}
+
+li.g-group h4 {
+ background-color: #eee;
+ border-bottom: 1px dashed #ccc;
+ padding: .5em 0 .5em .5em;
+}
+
+li.g-group .g-button {
+ padding: 0;
+}
+
+li.g-group ul, li.g-group div {
+ height: 180px;
+ margin: 1px;
+ overflow: auto;
+ padding-top: .2em;
+}
+
+li.g-group div p {
+ color: gray;
+ text-align: center;
+ padding: 2em .5em 0 .5em
+}
+
+li.g-group .g-user {
+ padding: .2em 0 0 .5em;
+}
+
+li.g-group .g-user .g-button {
+ vertical-align: middle;
+}
+
+li.g-default-group h4, li.g-default-group .g-user {
+ color: gray;
+}
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php
index e7e75d64..47f57d3d 100644
--- a/modules/user/helpers/user.php
+++ b/modules/user/helpers/user.php
@@ -26,7 +26,7 @@
class user_Core {
static function get_login_form($url) {
$form = new Forge($url, "", "post", array("id" => "g-login-form"));
- $form->set_attr('class', "g-narrow");
+ $form->set_attr('class', "g-one-quarter");
$group = $form->group("login")->label(t("Login"));
$group->input("name")->label(t("Username"))->id("g-username")->class(null);
$group->password("password")->label(t("Password"))->id("g-password")->class(null);
diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php
new file mode 100644
index 00000000..191fd15a
--- /dev/null
+++ b/modules/user/helpers/user_theme.php
@@ -0,0 +1,28 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2009 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+class user_theme_Core {
+ static function head($theme) {
+ $theme->css("user.css");
+ }
+
+ static function admin_head($theme) {
+ $theme->css("user.css");
+ }
+} \ No newline at end of file
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css
index a889545b..25302407 100644
--- a/themes/admin_wind/css/screen.css
+++ b/themes/admin_wind/css/screen.css
@@ -373,55 +373,11 @@ tr.g-warning {
margin-right: 1em;
}
-#g-user-admin-list .admin {
- color: #55f;
- font-weight: bold;
-}
-
.g-actions a,
.g-actions span {
margin-right: 3em;
}
-li.g-group {
- float: left;
- display: block;
- width: 200px;
- border: 1px solid gray;
- padding: 0;
- margin: 0 1em 1em 0;
-}
-
-li.g-group h4 {
- background-color: #eee;
- border-bottom: 1px dashed #ccc;
- padding: .5em 0 .5em .5em;
-}
-li.g-group .g-button {
- padding: 0;
-}
-li.g-group ul, li.g-group div {
- height: 180px;
- margin: 1px;
- overflow: auto;
- padding-top: .2em;
-}
-li.g-group div p {
- color: gray;
- text-align: center;
- padding: 2em .5em 0 .5em
-}
-li.g-group .g-user {
- padding: .2em 0 0 .5em;
-}
-li.g-group .g-user .g-button {
- vertical-align: middle;
-}
-
-li.g-default-group h4, li.g-default-group .g-user {
- color: gray;
-}
-
/* Block admin ~~~~~~~~~~~~~~~~~~~~~~~~~ */
.g-admin-blocks-list {
diff --git a/themes/night_wind/css/screen.css b/themes/night_wind/css/screen.css
index dfc94b6d..b95cfc72 100644
--- a/themes/night_wind/css/screen.css
+++ b/themes/night_wind/css/screen.css
@@ -714,39 +714,6 @@ li.g-error select {
background: #999;
}
-/* Server Add */
-
-#g-server-add button {
- margin-bottom: .5em;
-}
-
-#g-server-add-tree {
- cursor: pointer;
- padding-left: 4px;
- width: 95%;
-}
-
-#g-server-add-tree li {
- padding: 0;
- float: none;
-}
-
-#g-server-add-tree span.selected {
- background: #ddd;
-}
-
-#g-server-add-tree {
- border: 1px solid #ccc;
- height: 20em;
- overflow: auto;
- margin-bottom: .5em;
- padding: .5em;
-}
-
-#g-server-add ul ul li {
- padding-left: 1.2em;
-}
-
/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-edit-permissions-form {
diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css
index ef2f1510..84b8b090 100644
--- a/themes/wind/css/screen.css
+++ b/themes/wind/css/screen.css
@@ -513,39 +513,6 @@ td {
background: #999;
}
-/* Server Add */
-
-#g-server-add button {
- margin-bottom: .5em;
-}
-
-#g-server-add-tree {
- cursor: pointer;
- padding-left: 4px;
- width: 95%;
-}
-
-#g-server-add-tree li {
- padding: 0;
- float: none;
-}
-
-#g-server-add-tree span.selected {
- background: #ddd;
-}
-
-#g-server-add-tree {
- border: 1px solid #ccc;
- height: 20em;
- overflow: auto;
- margin-bottom: .5em;
- padding: .5em;
-}
-
-#g-server-add ul ul li {
- padding-left: 1.2em;
-}
-
/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#g-edit-permissions-form {