summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Parry <github@chad.parry.org>2011-04-30 21:32:33 -0600
committerChad Parry <github@chad.parry.org>2011-04-30 21:32:33 -0600
commit3a6b7438660520a725fb79a2cd360b7302aff7a9 (patch)
tree4cbe52a2fb4e720d63c7d225b9bc242c4cf6eac9
parentb875368167658fd7992812504674afeb61c64831 (diff)
parent97400b78153620262120868b37545170416413c9 (diff)
Merge branch 'master' into rawphoto-squash
-rw-r--r--.build_number2
-rw-r--r--modules/g2_import/controllers/admin_g2_import.php8
-rw-r--r--modules/g2_import/helpers/g2_import.php265
-rw-r--r--themes/admin_wind/css/screen-rtl.css193
-rw-r--r--themes/wind/css/screen-rtl.css189
5 files changed, 340 insertions, 317 deletions
diff --git a/.build_number b/.build_number
index 0c372cdc..1bdd507d 100644
--- a/.build_number
+++ b/.build_number
@@ -3,4 +3,4 @@
; process. You don't need to edit it. In fact..
;
; DO NOT EDIT THIS FILE BY HAND!
-build_number=145
+build_number=147
diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php
index 5c4995c9..1a705bea 100644
--- a/modules/g2_import/controllers/admin_g2_import.php
+++ b/modules/g2_import/controllers/admin_g2_import.php
@@ -78,12 +78,12 @@ class Admin_g2_import_Controller extends Admin_Controller {
$embed_path = "$embed_path/embed.php";
}
- if (g2_import::is_valid_embed_path($embed_path)) {
+ if (($g2_init_error = g2_import::is_valid_embed_path($embed_path)) == "ok") {
message::success(t("Gallery 2 path saved"));
module::set_var("g2_import", "embed_path", $embed_path);
url::redirect("admin/g2_import");
} else {
- $form->configure_g2_import->embed_path->add_error("invalid", 1);
+ $form->configure_g2_import->embed_path->add_error($g2_init_error, 1);
}
}
@@ -120,6 +120,10 @@ class Admin_g2_import_Controller extends Admin_Controller {
->value($embed_path);
$group->embed_path->error_messages(
"invalid", t("The path you entered is not a Gallery 2 installation."));
+ $group->embed_path->error_messages(
+ "broken", t("Your Gallery 2 install isn't working properly. Please verify it!"));
+ $group->embed_path->error_messages(
+ "missing", t("The path you entered does not exist."));
$group->submit("")->value($embed_path ? t("Change") : t("Continue"));
return $form;
}
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 22a054ac..3606c7ef 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -31,7 +31,7 @@ class g2_import_Core {
}
static function is_initialized() {
- return g2_import::$init;
+ return g2_import::$init == "ok";
}
static function init() {
@@ -52,146 +52,163 @@ class g2_import_Core {
if (file_exists($mod_path)) {
dir::unlink($mod_path);
}
- return file_exists($embed_path) && g2_import::init_embed($embed_path);
+ return g2_import::init_embed($embed_path);
}
/**
* Initialize the embedded Gallery 2 instance. Call this before any other Gallery 2 calls.
+ *
+ * Return values:
+ * "ok" - the Gallery 2 install is fine
+ * "missing" - the embed path does not exist
+ * "invalid" - the install path is not a valid Gallery 2 code base
+ * "broken" - the embed path is correct, but the Gallery 2 install is broken
*/
static function init_embed($embed_path) {
if (!is_file($embed_path)) {
- return false;
+ return "missing";
}
- // Gallery 2 defines a class called Gallery. So does Gallery 3. They don't get along. So do
- // a total hack here and copy over a few critical files (embed.php, main.php, bootstrap.inc
- // and Gallery.class) and munge them so that we can rename the Gallery class to be
- // G2_Gallery. Is this retarded? Why yes it is.
- //
- // Store the munged files in a directory that's the md5 hash of the embed path so that
- // multiple import sources don't interfere with each other.
-
- $mod_path = VARPATH . "modules/g2_import/" . md5($embed_path);
- if (!file_exists($mod_path) || !file_exists("$mod_path/embed.php")) {
- @dir::unlink($mod_path);
- mkdir($mod_path);
-
- $config_dir = dirname($embed_path);
- if (filesize($embed_path) > 200) {
- // Regular install
- $base_dir = $config_dir;
- } else {
- // Multisite install. Line 2 of embed.php will be something like:
- // require('/usr/home/bharat/public_html/gallery2/embed.php');
- $lines = file($embed_path);
- preg_match("#require\('(.*)/embed.php'\);#", $lines[2], $matches);
- $base_dir = $matches[1];
+ try {
+ // Gallery 2 defines a class called Gallery. So does Gallery 3. They don't get along. So do
+ // a total hack here and copy over a few critical files (embed.php, main.php, bootstrap.inc
+ // and Gallery.class) and munge them so that we can rename the Gallery class to be
+ // G2_Gallery. Is this retarded? Why yes it is.
+ //
+ // Store the munged files in a directory that's the md5 hash of the embed path so that
+ // multiple import sources don't interfere with each other.
+
+ $mod_path = VARPATH . "modules/g2_import/" . md5($embed_path);
+ if (!file_exists($mod_path) || !file_exists("$mod_path/embed.php")) {
+ @dir::unlink($mod_path);
+ mkdir($mod_path);
+
+ $config_dir = dirname($embed_path);
+ if (filesize($embed_path) > 200) {
+ // Regular install
+ $base_dir = $config_dir;
+ } else {
+ // Multisite install. Line 2 of embed.php will be something like:
+ // require('/usr/home/bharat/public_html/gallery2/embed.php');
+ $lines = file($embed_path);
+ preg_match("#require\('(.*)/embed.php'\);#", $lines[2], $matches);
+ $base_dir = $matches[1];
+ }
+
+ file_put_contents(
+ "$mod_path/embed.php",
+ str_replace(
+ array(
+ "require_once(dirname(__FILE__) . '/modules/core/classes/GalleryDataCache.class');",
+ "require(dirname(__FILE__) . '/modules/core/classes/GalleryEmbed.class');"),
+ array(
+ "require_once('$base_dir/modules/core/classes/GalleryDataCache.class');",
+ "require('$base_dir/modules/core/classes/GalleryEmbed.class');"),
+ array_merge(
+ array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
+ file("$base_dir/embed.php"))));
+
+ file_put_contents(
+ "$mod_path/main.php",
+ str_replace(
+ array(
+ "include(dirname(__FILE__) . '/bootstrap.inc');",
+ "require_once(dirname(__FILE__) . '/init.inc');"),
+ array(
+ "include(dirname(__FILE__) . '/bootstrap.inc');",
+ "require_once('$base_dir/init.inc');"),
+ array_merge(
+ array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
+ file("$base_dir/main.php"))));
+
+ file_put_contents(
+ "$mod_path/bootstrap.inc",
+ str_replace(
+ array(
+ "require_once(dirname(__FILE__) . '/modules/core/classes/Gallery.class');",
+ "require_once(dirname(__FILE__) . '/modules/core/classes/GalleryDataCache.class');",
+ "define('GALLERY_CONFIG_DIR', dirname(__FILE__));",
+ "\$gallery =& new Gallery();",
+ "\$GLOBALS['gallery'] =& new Gallery();",
+ "\$gallery = new Gallery();"),
+ array(
+ "require_once(dirname(__FILE__) . '/Gallery.class');",
+ "require_once('$base_dir/modules/core/classes/GalleryDataCache.class');",
+ "define('GALLERY_CONFIG_DIR', '$config_dir');",
+ "\$gallery =& new G2_Gallery();",
+ "\$GLOBALS['gallery'] =& new G2_Gallery();",
+ "\$gallery = new G2_Gallery();"),
+ array_merge(
+ array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
+ file("$base_dir/bootstrap.inc"))));
+
+ file_put_contents(
+ "$mod_path/Gallery.class",
+ str_replace(
+ array("class Gallery",
+ "function Gallery"),
+ array("class G2_Gallery",
+ "function G2_Gallery"),
+ array_merge(
+ array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
+ file("$base_dir/modules/core/classes/Gallery.class"))));
+ } else {
+ // Ok, this is a good one. If you're running a bytecode accelerator and you move your
+ // Gallery install, these files sometimes get cached with the wrong path and then fail to
+ // load properly.
+ // Documented in https://sourceforge.net/apps/trac/gallery/ticket/1253
+ touch("$mod_path/embed.php");
+ touch("$mod_path/main.php");
+ touch("$mod_path/bootstrap.inc");
+ touch("$mod_path/Gallery.class.inc");
+ }
+
+ require("$mod_path/embed.php");
+ if (!class_exists("GalleryEmbed")) {
+ return "invalid";
}
- file_put_contents(
- "$mod_path/embed.php",
- str_replace(
- array(
- "require_once(dirname(__FILE__) . '/modules/core/classes/GalleryDataCache.class');",
- "require(dirname(__FILE__) . '/modules/core/classes/GalleryEmbed.class');"),
- array(
- "require_once('$base_dir/modules/core/classes/GalleryDataCache.class');",
- "require('$base_dir/modules/core/classes/GalleryEmbed.class');"),
- array_merge(array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
- file("$base_dir/embed.php"))));
-
- file_put_contents(
- "$mod_path/main.php",
- str_replace(
- array(
- "include(dirname(__FILE__) . '/bootstrap.inc');",
- "require_once(dirname(__FILE__) . '/init.inc');"),
- array(
- "include(dirname(__FILE__) . '/bootstrap.inc');",
- "require_once('$base_dir/init.inc');"),
- array_merge(array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
- file("$base_dir/main.php"))));
-
- file_put_contents(
- "$mod_path/bootstrap.inc",
- str_replace(
- array("require_once(dirname(__FILE__) . '/modules/core/classes/Gallery.class');",
- "require_once(dirname(__FILE__) . '/modules/core/classes/GalleryDataCache.class');",
- "define('GALLERY_CONFIG_DIR', dirname(__FILE__));",
- "\$gallery =& new Gallery();",
- "\$GLOBALS['gallery'] =& new Gallery();",
- "\$gallery = new Gallery();"),
- array("require_once(dirname(__FILE__) . '/Gallery.class');",
- "require_once('$base_dir/modules/core/classes/GalleryDataCache.class');",
- "define('GALLERY_CONFIG_DIR', '$config_dir');",
- "\$gallery =& new G2_Gallery();",
- "\$GLOBALS['gallery'] =& new G2_Gallery();",
- "\$gallery = new G2_Gallery();"),
- array_merge(array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
- file("$base_dir/bootstrap.inc"))));
-
- file_put_contents(
- "$mod_path/Gallery.class",
- str_replace(
- array("class Gallery",
- "function Gallery"),
- array("class G2_Gallery",
- "function G2_Gallery"),
- array_merge(array("<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n"),
- file("$base_dir/modules/core/classes/Gallery.class"))));
- } else {
- // Ok, this is a good one. If you're running a bytecode accelerator and you move your
- // Gallery install, these files sometimes get cached with the wrong path and then fail to
- // load properly.
- // Documented in https://sourceforge.net/apps/trac/gallery/ticket/1253
- touch("$mod_path/embed.php");
- touch("$mod_path/main.php");
- touch("$mod_path/bootstrap.inc");
- touch("$mod_path/Gallery.class.inc");
- }
-
- require("$mod_path/embed.php");
- if (!class_exists("GalleryEmbed")) {
- return false;
- }
-
- $ret = GalleryEmbed::init();
- if ($ret) {
- Kohana_Log::add("error", "Gallery 2 call failed with: " . $ret->getAsText());
- return false;
- }
-
- $admin_group_id = g2(GalleryCoreApi::getPluginParameter("module", "core", "id.adminGroup"));
- $admins = g2(GalleryCoreApi::fetchUsersForGroup($admin_group_id, 1));
- $admin_id = current(array_flip($admins));
- $admin = g2(GalleryCoreApi::loadEntitiesById($admin_id));
- $GLOBALS["gallery"]->setActiveUser($admin);
+ $ret = GalleryEmbed::init();
+ if ($ret) {
+ Kohana_Log::add("error", "Gallery 2 call failed with: " . $ret->getAsText());
+ return "broken";
+ }
- // Make sure we have an embed location so that embedded url generation comes out ok. Without
- // this, the Gallery2 ModRewrite code won't try to do url generation.
- $g2_embed_location =
- g2(GalleryCoreApi::getPluginParameter("module", "rewrite", "modrewrite.embeddedLocation"));
+ $admin_group_id = g2(GalleryCoreApi::getPluginParameter("module", "core", "id.adminGroup"));
+ $admins = g2(GalleryCoreApi::fetchUsersForGroup($admin_group_id, 1));
+ $admin_id = current(array_flip($admins));
+ $admin = g2(GalleryCoreApi::loadEntitiesById($admin_id));
+ $GLOBALS["gallery"]->setActiveUser($admin);
- if (empty($g2_embed_location)) {
+ // Make sure we have an embed location so that embedded url generation comes out ok. Without
+ // this, the Gallery2 ModRewrite code won't try to do url generation.
$g2_embed_location =
- g2(GalleryCoreApi::getPluginParameter("module", "rewrite", "modrewrite.galleryLocation"));
- g2(GalleryCoreApi::setPluginParameter(
- "module", "rewrite", "modrewrite.embeddedLocation", $g2_embed_location));
- g2($gallery->getStorage()->checkPoint());
- }
+ g2(GalleryCoreApi::getPluginParameter("module", "rewrite", "modrewrite.embeddedLocation"));
+
+ if (empty($g2_embed_location)) {
+ $g2_embed_location =
+ g2(GalleryCoreApi::getPluginParameter("module", "rewrite", "modrewrite.galleryLocation"));
+ g2(GalleryCoreApi::setPluginParameter("module", "rewrite", "modrewrite.embeddedLocation",
+ $g2_embed_location));
+ g2($gallery->getStorage()->checkPoint());
+ }
- if ($g2_embed_location) {
- self::$g2_base_url = $g2_embed_location;
- } else {
- self::$g2_base_url = $GLOBALS["gallery"]->getUrlGenerator()->generateUrl(
- array(),
- array("forceSessionId" => false,
- "htmlEntities" => false,
- "urlEncode" => false,
- "useAuthToken" => false));
+ if ($g2_embed_location) {
+ self::$g2_base_url = $g2_embed_location;
+ } else {
+ self::$g2_base_url = $GLOBALS["gallery"]->getUrlGenerator()->generateUrl(
+ array(),
+ array("forceSessionId" => false,
+ "htmlEntities" => false,
+ "urlEncode" => false,
+ "useAuthToken" => false));
+ }
+ } catch (ErrorException $e) {
+ Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString());
+ return "broken";
}
- return true;
+ return "ok";
}
/**
diff --git a/themes/admin_wind/css/screen-rtl.css b/themes/admin_wind/css/screen-rtl.css
index 5cc1b4aa..0809c1b5 100644
--- a/themes/admin_wind/css/screen-rtl.css
+++ b/themes/admin_wind/css/screen-rtl.css
@@ -6,20 +6,20 @@
direction: rtl;
}
-.rtl #g-header,
-.rtl #g-content,
-.rtl #g-sidebar,
-.rtl #g-footer,
-.rtl caption,
-.rtl th,
-.rtl #g-dialog,
-.rtl .g-context-menu li a,
-.rtl .g-message-box li,
-.rtl #g-site-status li {
+#g-header,
+#g-content,
+#g-sidebar,
+#g-footer,
+caption,
+th,
+#g-dialog,
+.g-context-menu li a,
+.g-message-box li,
+#g-site-status li {
text-align: right;
}
-.rtl .g-text-right {
+.g-text-right {
text-align: left;
}
@@ -27,90 +27,91 @@
.g-text li,
.g-text li {
+ margin-left: 0;
margin-right: 1em;
}
/* Messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .g-error,
-.rtl .g-info,
-.rtl .g-success,
-.rtl .g-warning,
-.rtl #g-add-photos-status .g-success,
-.rtl #g-add-photos-status .g-error {
+.g-error,
+.g-info,
+.g-success,
+.g-warning,
+#g-add-photos-status .g-success,
+#g-add-photos-status .g-error {
background-position: center right;
padding-right: 30px !important;
}
-.rtl form li.g-error,
-.rtl form li.g-info,
-.rtl form li.g-success,
-.rtl form li.g-warning {
+form li.g-error,
+form li.g-info,
+form li.g-success,
+form li.g-warning {
padding-right: 0 !important;
}
-.rtl .g-left,
-.rtl .g-inline li,
-.rtl #g-content #g-album-grid .g-item,
-.rtl .sf-menu li,
-.rtl .g-breadcrumbs li,
-.rtl .g-paginator li,
-.rtl .g-buttonset li,
-.rtl .ui-icon-left .ui-icon,
-.rtl .g-short-form li,
-.rtl form ul ul li,
-.rtl input[type="submit"],
-.rtl input[type="reset"],
-.rtl input.checkbox,
-.rtl input[type=checkbox],
-.rtl input.radio,
-.rtl input[type=radio] {
+.g-left,
+.g-inline li,
+#g-content #g-album-grid .g-item,
+.sf-menu li,
+.g-breadcrumbs li,
+.g-paginator li,
+.g-buttonset li,
+.ui-icon-left .ui-icon,
+.g-short-form li,
+form ul ul li,
+input[type="submit"],
+input[type="reset"],
+input.checkbox,
+input[type=checkbox],
+input.radio,
+input[type=radio] {
float: right;
}
-.rtl .g-right,
-.rtl .ui-icon-right .ui-icon {
+.g-right,
+.ui-icon-right .ui-icon {
float: left;
}
-.rtl .g-inline li {
+.g-inline li {
margin-right: 1em;
}
-.rtl .g-inline li.g-first {
+.g-inline li.g-first {
margin-right: 0;
}
-.rtl .g-breadcrumbs li {
+.g-breadcrumbs li {
background: transparent url('../images/ico-separator-rtl.gif') no-repeat scroll right center;
padding: 1em 18px 1em 8px;
}
-.rtl .g-breadcrumbs .g-first {
+.g-breadcrumbs .g-first {
background: none;
padding-right: 0;
}
-.rtl input.checkbox {
+input.checkbox {
margin-left: .4em;
}
-.rtl #g-add-comment {
+#g-add-comment {
right: inherit;
left: 0;
}
-.rtl .ui-icon-left .ui-icon {
+.ui-icon-left .ui-icon {
margin-left: .2em;
}
-.rtl .ui-icon-right .ui-icon {
+.ui-icon-right .ui-icon {
margin-right: .2em;
}
/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .g-buttonset .ui-corner-tl {
+.g-buttonset .ui-corner-tl {
-moz-border-radius-topleft: 0;
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
@@ -119,7 +120,7 @@
border-top-right-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-tr {
+.g-buttonset .ui-corner-tr {
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
border-top-right-radius: 0;
@@ -128,7 +129,7 @@
border-top-left-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-bl {
+.g-buttonset .ui-corner-bl {
-moz-border-radius-bottomleft: 0;
-webkit-border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
@@ -137,7 +138,7 @@
border-bottom-right-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-br {
+.g-buttonset .ui-corner-br {
-moz-border-radius-bottomright: 0;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
@@ -146,8 +147,8 @@
border-bottom-left-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-right,
-.rtl .ui-progressbar .ui-corner-right {
+.g-buttonset .ui-corner-right,
+.ui-progressbar .ui-corner-right {
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
border-top-right-radius: 0;
@@ -162,8 +163,8 @@
border-bottom-left-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-left,
-.rtl .ui-progressbar .ui-corner-left {
+.g-buttonset .ui-corner-left,
+.ui-progressbar .ui-corner-left {
-moz-border-radius-topleft: 0;
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
@@ -180,69 +181,69 @@
/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .sf-menu a {
+.sf-menu a {
border-left: none;
border-right:1px solid #fff;
}
-.rtl .sf-menu a.sf-with-ul {
+.sf-menu a.sf-with-ul {
padding-left: 2.25em;
padding-right: 1em;
}
-.rtl .sf-sub-indicator {
+.sf-sub-indicator {
left: .75em !important;
right: auto;
background: url('../../../lib/superfish/images/arrows-ffffff-rtl.png') no-repeat -10px -100px;
}
-.rtl a > .sf-sub-indicator {
+a > .sf-sub-indicator {
top: .8em;
background-position: -10px -100px;
}
-.rtl a:focus > .sf-sub-indicator,
-.rtl a:hover > .sf-sub-indicator,
-.rtl a:active > .sf-sub-indicator,
-.rtl li:hover > a > .sf-sub-indicator,
-.rtl li.sfHover > a > .sf-sub-indicator {
+a:focus > .sf-sub-indicator,
+a:hover > .sf-sub-indicator,
+a:active > .sf-sub-indicator,
+li:hover > a > .sf-sub-indicator,
+li.sfHover > a > .sf-sub-indicator {
background-position: 0 -100px;
}
-.rtl .sf-menu ul .sf-sub-indicator {
+.sf-menu ul .sf-sub-indicator {
background-position: 0 0;
}
-.rtl .sf-menu ul a > .sf-sub-indicator {
+.sf-menu ul a > .sf-sub-indicator {
background-position: -10px 0;
}
-.rtl .sf-menu ul a:focus > .sf-sub-indicator,
-.rtl .sf-menu ul a:hover > .sf-sub-indicator,
-.rtl .sf-menu ul a:active > .sf-sub-indicator,
-.rtl .sf-menu ul li:hover > a > .sf-sub-indicator,
-.rtl .sf-menu ul li.sfHover > a > .sf-sub-indicator {
+.sf-menu ul a:focus > .sf-sub-indicator,
+.sf-menu ul a:hover > .sf-sub-indicator,
+.sf-menu ul a:active > .sf-sub-indicator,
+.sf-menu ul li:hover > a > .sf-sub-indicator,
+.sf-menu ul li.sfHover > a > .sf-sub-indicator {
background-position: 0 0;
}
-.rtl .sf-menu li:hover ul,
-.rtl .sf-menu li.sfHover ul {
+.sf-menu li:hover ul,
+.sf-menu li.sfHover ul {
right: 0;
left: auto;
}
-.rtl ul.sf-menu li li:hover ul,
-.rtl ul.sf-menu li li.sfHover ul {
+ul.sf-menu li li:hover ul,
+ul.sf-menu li li.sfHover ul {
right: 12em;
left: auto;
}
-.rtl ul.sf-menu li li li:hover ul,
-.rtl ul.sf-menu li li li.sfHover ul {
+ul.sf-menu li li li:hover ul,
+ul.sf-menu li li li.sfHover ul {
right: 12em;
left: auto;
}
-.rtl .sf-shadow ul {
+.sf-shadow ul {
background: url('../../../lib/superfish/images/shadow.png') no-repeat bottom left;
padding: 0 0 9px 8px;
border-top-right-radius: 0;
@@ -261,57 +262,57 @@
/* RTL ThemeRoller ~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .ui-dialog .ui-dialog-titlebar {
+.ui-dialog .ui-dialog-titlebar {
padding: 0.5em 1em 0.3em 0.3em;
}
-.rtl .ui-dialog .ui-dialog-title {
+.ui-dialog .ui-dialog-title {
float: right;
}
-.rtl .ui-dialog .ui-dialog-titlebar-close {
+.ui-dialog .ui-dialog-titlebar-close {
left: 0.3em;
right: auto;
}
-.rtl #g-content #g-album-grid .g-item,
-.rtl #g-site-theme,
-.rtl #g-admin-theme,
-.rtl .g-selected img,
-.rtl .g-available .g-block img,
-.rtl #g-content #g-photo-stream .g-item,
-.rtl li.g-group,
-.rtl #g-server-add-admin {
+#g-content #g-album-grid .g-item,
+#g-site-theme,
+#g-admin-theme,
+.g-selected img,
+.g-available .g-block img,
+#g-content #g-photo-stream .g-item,
+li.g-group,
+#g-server-add-admin {
float: right;
}
-.rtl #g-admin-graphics .g-available .g-block {
+#g-admin-graphics .g-available .g-block {
float: right;
margin-left: 1em;
margin-right: 0em;
}
-.rtl #g-site-admin-menu {
+#g-site-admin-menu {
left: auto;
right: 150px;
}
-.rtl #g-header #g-login-menu {
+#g-header #g-login-menu {
float: left;
}
-.rtl #g-header #g-login-menu li {
+#g-header #g-login-menu li {
margin-left: 0;
padding-left: 0;
padding-right: 1.2em;
}
-.rtl #g-sidebar .g-block-content {
+#g-sidebar .g-block-content {
padding-left: 0em;
padding-right: 1em;
}
-.rtl .g-selected img,
-.rtl .g-available .g-block img {
+.g-selected img,
+.g-available .g-block img {
margin: 0 0 1em 1em;
}
diff --git a/themes/wind/css/screen-rtl.css b/themes/wind/css/screen-rtl.css
index a4b4d48c..914a19dd 100644
--- a/themes/wind/css/screen-rtl.css
+++ b/themes/wind/css/screen-rtl.css
@@ -6,20 +6,20 @@
direction: rtl;
}
-.rtl #g-header,
-.rtl #g-content,
-.rtl #g-sidebar,
-.rtl #g-footer,
-.rtl caption,
-.rtl th,
-.rtl #g-dialog,
-.rtl .g-context-menu li a,
-.rtl .g-message-box li,
-.rtl #g-site-status li {
+#g-header,
+#g-content,
+#g-sidebar,
+#g-footer,
+caption,
+th,
+#g-dialog,
+.g-context-menu li a,
+.g-message-box li,
+#g-site-status li {
text-align: right;
}
-.rtl .g-text-right {
+.g-text-right {
text-align: left;
}
@@ -27,90 +27,91 @@
.g-text li,
.g-text li {
+ margin-left: 0;
margin-right: 1em;
}
/* Messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .g-error,
-.rtl .g-info,
-.rtl .g-success,
-.rtl .g-warning,
-.rtl #g-add-photos-status .g-success,
-.rtl #g-add-photos-status .g-error {
+.g-error,
+.g-info,
+.g-success,
+.g-warning,
+#g-add-photos-status .g-success,
+#g-add-photos-status .g-error {
background-position: center right;
padding-right: 30px !important;
}
-.rtl form li.g-error,
-.rtl form li.g-info,
-.rtl form li.g-success,
-.rtl form li.g-warning {
+form li.g-error,
+form li.g-info,
+form li.g-success,
+form li.g-warning {
padding-right: 0 !important;
}
-.rtl .g-left,
-.rtl .g-inline li,
-.rtl #g-content #g-album-grid .g-item,
-.rtl .sf-menu li,
-.rtl .g-breadcrumbs li,
-.rtl .g-paginator li,
-.rtl .g-buttonset li,
-.rtl .ui-icon-left .ui-icon,
-.rtl .g-short-form li,
-.rtl form ul ul li,
-.rtl input[type="submit"],
-.rtl input[type="reset"],
-.rtl input.checkbox,
-.rtl input[type=checkbox],
-.rtl input.radio,
-.rtl input[type=radio] {
+.g-left,
+.g-inline li,
+#g-content #g-album-grid .g-item,
+.sf-menu li,
+.g-breadcrumbs li,
+.g-paginator li,
+.g-buttonset li,
+.ui-icon-left .ui-icon,
+.g-short-form li,
+form ul ul li,
+input[type="submit"],
+input[type="reset"],
+input.checkbox,
+input[type=checkbox],
+input.radio,
+input[type=radio] {
float: right;
}
-.rtl .g-right,
-.rtl .ui-icon-right .ui-icon {
+.g-right,
+.ui-icon-right .ui-icon {
float: left;
}
-.rtl .g-inline li {
+.g-inline li {
margin-right: 1em;
}
-.rtl .g-inline li.g-first {
+.g-inline li.g-first {
margin-right: 0;
}
-.rtl .g-breadcrumbs li {
+.g-breadcrumbs li {
background: transparent url('../images/ico-separator-rtl.gif') no-repeat scroll right center;
padding: 1em 18px 1em 8px;
}
-.rtl .g-breadcrumbs .g-first {
+.g-breadcrumbs .g-first {
background: none;
padding-right: 0;
}
-.rtl input.checkbox {
+input.checkbox {
margin-left: .4em;
}
-.rtl #g-add-comment {
+#g-add-comment {
right: inherit;
left: 0;
}
-.rtl .ui-icon-left .ui-icon {
+.ui-icon-left .ui-icon {
margin-left: .2em;
}
-.rtl .ui-icon-right .ui-icon {
+.ui-icon-right .ui-icon {
margin-right: .2em;
}
/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .g-buttonset .ui-corner-tl {
+.g-buttonset .ui-corner-tl {
-moz-border-radius-topleft: 0;
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
@@ -119,7 +120,7 @@
border-top-right-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-tr {
+.g-buttonset .ui-corner-tr {
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
border-top-right-radius: 0;
@@ -128,7 +129,7 @@
border-top-left-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-bl {
+.g-buttonset .ui-corner-bl {
-moz-border-radius-bottomleft: 0;
-webkit-border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
@@ -137,7 +138,7 @@
border-bottom-right-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-br {
+.g-buttonset .ui-corner-br {
-moz-border-radius-bottomright: 0;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
@@ -146,8 +147,8 @@
border-bottom-left-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-right,
-.rtl .ui-progressbar .ui-corner-right {
+.g-buttonset .ui-corner-right,
+.ui-progressbar .ui-corner-right {
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
border-top-right-radius: 0;
@@ -162,8 +163,8 @@
border-bottom-left-radius: 5px !important;
}
-.rtl .g-buttonset .ui-corner-left,
-.rtl .ui-progressbar .ui-corner-left {
+.g-buttonset .ui-corner-left,
+.ui-progressbar .ui-corner-left {
-moz-border-radius-topleft: 0;
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
@@ -180,69 +181,69 @@
/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .sf-menu a {
+.sf-menu a {
border-left: none;
border-right:1px solid #fff;
}
-.rtl .sf-menu a.sf-with-ul {
+.sf-menu a.sf-with-ul {
padding-left: 2.25em;
padding-right: 1em;
}
-.rtl .sf-sub-indicator {
+.sf-sub-indicator {
left: .75em !important;
right: auto;
background: url('../../../lib/superfish/images/arrows-ffffff-rtl.png') no-repeat -10px -100px;
}
-.rtl a > .sf-sub-indicator {
+a > .sf-sub-indicator {
top: .8em;
background-position: -10px -100px;
}
-.rtl a:focus > .sf-sub-indicator,
-.rtl a:hover > .sf-sub-indicator,
-.rtl a:active > .sf-sub-indicator,
-.rtl li:hover > a > .sf-sub-indicator,
-.rtl li.sfHover > a > .sf-sub-indicator {
+a:focus > .sf-sub-indicator,
+a:hover > .sf-sub-indicator,
+a:active > .sf-sub-indicator,
+li:hover > a > .sf-sub-indicator,
+li.sfHover > a > .sf-sub-indicator {
background-position: 0 -100px;
}
-.rtl .sf-menu ul .sf-sub-indicator {
+.sf-menu ul .sf-sub-indicator {
background-position: 0 0;
}
-.rtl .sf-menu ul a > .sf-sub-indicator {
+.sf-menu ul a > .sf-sub-indicator {
background-position: -10px 0;
}
-.rtl .sf-menu ul a:focus > .sf-sub-indicator,
-.rtl .sf-menu ul a:hover > .sf-sub-indicator,
-.rtl .sf-menu ul a:active > .sf-sub-indicator,
-.rtl .sf-menu ul li:hover > a > .sf-sub-indicator,
-.rtl .sf-menu ul li.sfHover > a > .sf-sub-indicator {
+.sf-menu ul a:focus > .sf-sub-indicator,
+.sf-menu ul a:hover > .sf-sub-indicator,
+.sf-menu ul a:active > .sf-sub-indicator,
+.sf-menu ul li:hover > a > .sf-sub-indicator,
+.sf-menu ul li.sfHover > a > .sf-sub-indicator {
background-position: 0 0;
}
-.rtl .sf-menu li:hover ul,
-.rtl .sf-menu li.sfHover ul {
+.sf-menu li:hover ul,
+.sf-menu li.sfHover ul {
right: 0;
left: auto;
}
-.rtl ul.sf-menu li li:hover ul,
-.rtl ul.sf-menu li li.sfHover ul {
+ul.sf-menu li li:hover ul,
+ul.sf-menu li li.sfHover ul {
right: 12em;
left: auto;
}
-.rtl ul.sf-menu li li li:hover ul,
-.rtl ul.sf-menu li li li.sfHover ul {
+ul.sf-menu li li li:hover ul,
+ul.sf-menu li li li.sfHover ul {
right: 12em;
left: auto;
}
-.rtl .sf-shadow ul {
+.sf-shadow ul {
background: url('../../../lib/superfish/images/shadow.png') no-repeat bottom left;
padding: 0 0 9px 8px;
border-top-right-radius: 0;
@@ -261,15 +262,15 @@
/* RTL ThemeRoller ~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .ui-dialog .ui-dialog-titlebar {
+.ui-dialog .ui-dialog-titlebar {
padding: 0.5em 1em 0.3em 0.3em;
}
-.rtl .ui-dialog .ui-dialog-title {
+.ui-dialog .ui-dialog-title {
float: right;
}
-.rtl .ui-dialog .ui-dialog-titlebar-close {
+.ui-dialog .ui-dialog-titlebar-close {
left: 0.3em;
right: auto;
}
@@ -277,57 +278,57 @@
/* RTL paginator ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-.rtl .g-paginator .g-info {
+.g-paginator .g-info {
width: 35%;
}
-.rtl .g-paginator .g-text-right {
+.g-paginator .g-text-right {
margin-left: 0;
}
-.rtl .g-paginator .ui-icon-seek-end {
+.g-paginator .ui-icon-seek-end {
background-position: -80px -160px;
}
-.rtl .g-paginator .ui-icon-seek-next {
+.g-paginator .ui-icon-seek-next {
background-position: -48px -160px;
}
-.rtl .g-paginator .ui-icon-seek-prev {
+.g-paginator .ui-icon-seek-prev {
background-position: -32px -160px;
}
-.rtl .g-paginator .ui-icon-seek-first {
+.g-paginator .ui-icon-seek-first {
background-position: -64px -160px;
}
-.rtl #g-header #g-login-menu,
-.rtl #g-header #g-quick-search-form {
+#g-header #g-login-menu,
+#g-header #g-quick-search-form {
clear: left;
float: left;
}
-.rtl #g-header #g-login-menu li {
+#g-header #g-login-menu li {
margin-left: 0;
padding-left: 0;
padding-right: 1.2em;
}
-.rtl #g-site-menu {
+#g-site-menu {
left: auto;
right: 150px;
}
-.rtl #g-view-menu #g-slideshow-link {
+#g-view-menu #g-slideshow-link {
background-image: url('../images/ico-view-slideshow-rtl.png');
}
-.rtl #g-sidebar .g-block-content {
+#g-sidebar .g-block-content {
padding-right: 1em;
padding-left: 0;
}
-.rtl #g-footer #g-credits li {
+#g-footer #g-credits li {
padding-left: 1.2em !important;
padding-right: 0;
}