From d9e4ad79bbebb3f439df4403c668271c86c19935 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 25 Jun 2009 08:14:34 -0700 Subject: 1) Move the digibug css in the default and admin_default themes 2) Remove most of the marketing cruft on the admin pages 3) Change the name of the admin settings to just Digibug 4) Remove the "switch on mouseover" approach --- themes/default/css/screen.css | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'themes/default') diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index c7918fc0..671b259d 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -4,15 +4,16 @@ * @requires YUI reset, font, grids CSS * * Sheet organization: - * 1) Basic HTML elements - * 2) Reusable classes - * 3) Reusable content blocks - * 4) Page layout containers - * 5) Content blocks in specific layout containers - * 6) Navigation and menus - * 7) Browser hacks - * 8) jQuery and jQuery UI - * 9) Right-to-left language styles + * 1) Basic HTML elements + * 2) Reusable classes + * 3) Reusable content blocks + * 4) Page layout containers + * 5) Content blocks in specific layout containers + * 6) Navigation and menus + * 7) Browser hacks + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + * 10) Digibug Print */ /** ******************************************************************* @@ -1049,4 +1050,8 @@ form .gError, .rtl .gButtonSet li, .rtl .ui-icon-left .ui-icon { float: right; -} \ No newline at end of file +} + +/** ******************************************************************* + * 10) Digibug Print + **********************************************************************/ -- cgit v1.2.3 From 627b5e144caefb7ff48224a4bdc8faae2debdbd7 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 25 Jun 2009 08:53:04 -0700 Subject: This change to the default/css/screen.css file was overlooked --- themes/default/css/screen.css | 3 +++ 1 file changed, 3 insertions(+) (limited to 'themes/default') diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 671b259d..7075494d 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -1055,3 +1055,6 @@ form .gError, /** ******************************************************************* * 10) Digibug Print **********************************************************************/ +.gDigibugPrintButton { + float: left; +} -- cgit v1.2.3 From 1b263c312f621bc3439d0c6b60645c01424174aa Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 25 Jun 2009 18:26:31 -0700 Subject: Replace the crappy temporary print image with one that is more consistent with the theme. Thanks again Ben Dunkle. --- themes/default/images/ico-print.png | Bin 4411 -> 989 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'themes/default') diff --git a/themes/default/images/ico-print.png b/themes/default/images/ico-print.png index 087e6694..b82a8e1e 100644 Binary files a/themes/default/images/ico-print.png and b/themes/default/images/ico-print.png differ -- cgit v1.2.3 From 42a5bd20a550a9edb5ec84625037b9d85889ff63 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 26 Jun 2009 07:51:29 -0700 Subject: 1) Move the generation of script tags to gallery_theme::head and gallery_theme::admin_head. This allows us to potentially manage the scripts like we do in g2 (single file and compressed) 2) Change Theme_View::_call to always call the gallery_theme::$function first. --- modules/gallery/helpers/gallery_theme.php | 20 ++++++++++++++++++++ modules/gallery/libraries/Theme_View.php | 25 +++++++++++++++++++++++-- themes/admin_default/views/admin.html.php | 10 +--------- themes/default/views/page.html.php | 12 ------------ 4 files changed, 44 insertions(+), 23 deletions(-) (limited to 'themes/default') diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index a96c8f5b..24f4129b 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -21,6 +21,18 @@ class gallery_theme_Core { static function head($theme) { $session = Session::instance(); $buf = ""; + $buf .= html::script("lib/jquery.js"); + $buf .= html::script("lib/jquery.form.js"); + $buf .= html::script("lib/jquery-ui.js"); + $buf .= html::script("lib/gallery.common.js"); + $buf .= html::script("lib/gallery.dialog.js"); + $buf .= html::script("lib/gallery.form.js"); + $buf .= html::script("lib/superfish/js/superfish.js"); + if ($theme->page_type == 'photo') { + $buf .= html::script("lib/jquery.scrollTo.js"); + $buf .= html::script("lib/jquery.localscroll.js"); + } + $buf .= html::script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { $buf .= ""; @@ -79,6 +91,14 @@ class gallery_theme_Core { static function admin_head($theme) { $session = Session::instance(); $buf = ""; + $buf .= html::script("lib/jquery.js"); + $buf .= html::script("lib/jquery.form.js"); + $buf .= html::script("lib/jquery-ui.js"); + $buf .= html::script("lib/gallery.common.js"); + $buf .= html::script("lib/gallery.dialog.js"); + $buf .= html::script("lib/superfish/js/superfish.js"); + $buf .= html::script($theme->url("js/jquery.dropshadow.js", false, true)); + $buf .= html::script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { $buf .= ""; diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 7b2ca840..5235fabb 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -68,9 +68,9 @@ class Theme_View_Core extends View { return module::get_var("gallery", "thumb_size", 200) / 200; } - public function url($path, $absolute_url=false) { + public function url($path, $absolute_url=false, $no_root=false) { $arg = "themes/{$this->theme_name}/$path"; - return $absolute_url ? url::abs_file($arg) : url::file($arg); + return $absolute_url ? url::abs_file($arg) : $no_root ? $arg : url::file($arg); } public function item() { @@ -192,7 +192,28 @@ class Theme_View_Core extends View { case "thumb_info": case "thumb_top": $blocks = array(); + if (method_exists("gallery_theme", $function)) { + switch (count($args)) { + case 0: + $blocks[] = gallery_theme::$function($this); + break; + case 1: + $blocks[] = gallery_theme::$function($this, $args[0]); + break; + case 2: + $blocks[] = gallery_theme::$function($this, $args[0], $args[1]); + break; + default: + $blocks[] = call_user_func_array( + array("gallery_theme", $function), + array_merge(array($this), $args)); + } + + } foreach (module::active() as $module) { + if ($module->name == "gallery") { + continue; + } $helper_class = "{$module->name}_theme"; if (method_exists($helper_class, $function)) { $blocks[] = call_user_func_array( diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index b7cfaa40..dfbafe31 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -20,15 +20,7 @@ " media="screen,print,projection" /> - - - - - - - - - admin_head() ?> + admin_head() ?> body_attributes() ?>> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index f6286f95..c74d4097 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -49,18 +49,6 @@ - - - - - - - - page_type == 'photo'): ?> - - - - head() ?> -- cgit v1.2.3 From 84e98e830c4967c277dfcb5bb6d18c0ec3313355 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 26 Jun 2009 08:25:24 -0700 Subject: Move the inclusion of photo and movie specific javascript into gallery_theme --- modules/gallery/helpers/gallery_theme.php | 4 ++++ themes/default/views/movie.html.php | 1 - themes/default/views/photo.html.php | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'themes/default') diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index 24f4129b..0679087e 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -31,6 +31,10 @@ class gallery_theme_Core { if ($theme->page_type == 'photo') { $buf .= html::script("lib/jquery.scrollTo.js"); $buf .= html::script("lib/jquery.localscroll.js"); + $buf .= html::script("lib/gallery.show_full_size.js"); + } + if ($theme->page_type == 'movie') { + $buf .= html::script("lib/flowplayer.js"); } $buf .= html::script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php index e8559697..134e3571 100644 --- a/themes/default/views/movie.html.php +++ b/themes/default/views/movie.html.php @@ -1,5 +1,4 @@ -
photo_top() ?> diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 1c3b81a7..4765a4e3 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -2,7 +2,6 @@ item())): ?> - "; + } +} \ No newline at end of file diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 25818821..8e320f44 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -17,10 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Theme_View_Core extends View { - private $theme_name = null; - private $scripts = array(); - +class Theme_View_Core extends Gallery_View { /** * Attempts to load a view and pre-load view data. * @@ -69,11 +66,6 @@ class Theme_View_Core extends View { return module::get_var("gallery", "thumb_size", 200) / 200; } - public function url($path, $absolute_url=false, $no_root=false) { - $arg = "themes/{$this->theme_name}/$path"; - return $absolute_url ? url::abs_file($arg) : $no_root ? $arg : url::file($arg); - } - public function item() { return $this->item; } @@ -86,10 +78,6 @@ class Theme_View_Core extends View { return $this->page_type; } - public function display($page_name, $view_class="View") { - return new $view_class($page_name); - } - public function site_menu() { $menu = Menu::factory("root"); if ($this->page_type != "login") { @@ -168,49 +156,6 @@ class Theme_View_Core extends View { return message::get(); } - public function script($file) { - $this->scripts[$file] = 1; - } - - /** - * Combine a series of Javascript files into a single one and cache it in the database, then - * return a single "; - } - /** * Handle all theme functions that insert module content. */ @@ -270,8 +215,8 @@ class Theme_View_Core extends View { } } - if ($function == "head" || $function == "admin_head") { - array_unshift($blocks, $this->_combine_script()); + if ($function == "head") { + array_unshift($blocks, $this->combine_script()); } if (Session::instance()->get("debug")) { diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index dfbafe31..2a91a76c 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -20,6 +20,16 @@ " media="screen,print,projection" /> + + script("lib/jquery.js") ?> + script("lib/jquery.form.js") ?> + script("lib/jquery-ui.js") ?> + script("lib/gallery.common.js") ?> + script("lib/gallery.dialog.js") ?> + script("lib/superfish/js/superfish.js") ?> + theme_script("js/jquery.dropshadow.js") ?> + theme_script("js/ui.init.js") ?> + admin_head() ?> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index c74d4097..8b9466ac 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -49,6 +49,24 @@ + script("lib/jquery.js") ?> + script("lib/jquery.form.js") ?> + script("lib/jquery-ui.js") ?> + script("lib/gallery.common.js") ?> + script("lib/gallery.dialog.js") ?> + script("lib/gallery.form.js") ?> + script("lib/superfish/js/superfish.js") ?> + script("lib/jquery.localscroll.js") ?> + theme_script("js/ui.init.js") ?> + + head() they get combined */ ?> + page_type == "photo"): ?> + script("lib/jquery.scrollTo.js") ?> + script("lib/gallery.show_full_size.js") ?> + page_type == "movie"): ?> + script("lib/flowplayer.js") ?> + + head() ?> @@ -57,7 +75,7 @@
site_status() ?>
- display("header.html") ?> +
@@ -70,12 +88,12 @@
page_type != "login"): ?> - display("sidebar.html") ?> +
- display("footer.html") ?> +
page_bottom() ?> -- cgit v1.2.3 From 6e8a8c53e685a6c3f35f1426ab4dd6dcc18578e0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Jun 2009 19:49:48 -0700 Subject: Rename $theme->url() to $theme->theme_url() for consistency wiht $theme->theme_script(). --- modules/comment/views/admin_block_recent_comments.html.php | 2 +- modules/comment/views/admin_comments.html.php | 2 +- modules/comment/views/comment.html.php | 2 +- modules/comment/views/comments.html.php | 2 +- modules/gallery/libraries/Gallery_View.php | 2 +- modules/user/views/admin_users.html.php | 2 +- themes/admin_default/views/admin.html.php | 4 ++-- themes/default/views/header.html.php | 2 +- themes/default/views/page.html.php | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) (limited to 'themes/default') diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index edaa19ae..af4d946e 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -2,7 +2,7 @@
    $comment): ?>
  • "> - " + " class="gAvatar" alt="author_name()) ?>" width="32" diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 86585c65..453cf849 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -106,7 +106,7 @@ "> - " + " class="gAvatar" alt="author_name()) ?>" width="40" diff --git a/modules/comment/views/comment.html.php b/modules/comment/views/comment.html.php index ce52951b..6d2cc592 100644 --- a/modules/comment/views/comment.html.php +++ b/modules/comment/views/comment.html.php @@ -2,7 +2,7 @@
  • - " + " class="gAvatar" alt="author_name()) ?>" width="40" diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index 854f9554..d9405e5f 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -10,7 +10,7 @@

  • - " + " class="gAvatar" alt="author_name()) ?>" width="40" diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index f2298b7d..e21e83d8 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -43,7 +43,7 @@ class Gallery_View_Core extends View { * Provide a url to a resource within the current theme. This allows us to refer to theme * resources without naming the theme itself which makes themes easier to copy. */ - public function url($path, $absolute_url=false) { + public function theme_url($path, $absolute_url=false) { $arg = "themes/{$this->theme_name}/$path"; return $absolute_url ? url::abs_file($arg) : url::file($arg); } diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 542b8b8b..b469f82d 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -66,7 +66,7 @@ $user): ?> user admin ? "admin" : "" ?>"> - " + " title="" alt="name) ?>" width="20" diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 2a91a76c..62f9761f 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -14,10 +14,10 @@ media="screen,projection" /> " media="screen,projection" /> - " + " media="screen,projection" /> diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index e1e52bda..b38cffed 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -4,7 +4,7 @@ "> - " src="url("images/logo.png") ?>" /> + " src="theme_url("images/logo.png") ?>" /> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 8b9466ac..3ae3e155 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -23,17 +23,17 @@ - " type="image/x-icon" /> + " type="image/x-icon" /> " media="screen,print,projection" /> " media="screen" /> " media="screen,print,projection" /> - " + " media="screen,print,projection" /> page_type == 'album'): ?> -- cgit v1.2.3 From 6ec293dfe70665c528d803b78a2bb295633496ec Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 29 Jun 2009 08:24:42 -0700 Subject: *Note* work in progress. Implement the combined css functionality. Local url references and replace with absolute urls instead of relative. --- modules/gallery/controllers/combined.php | 46 +++++++++++++++++++++++++++++ modules/gallery/libraries/Gallery_View.php | 47 ++++++++++++++++++++++++++++-- themes/default/views/page.html.php | 2 +- 3 files changed, 91 insertions(+), 4 deletions(-) (limited to 'themes/default') diff --git a/modules/gallery/controllers/combined.php b/modules/gallery/controllers/combined.php index 510482db..50fe77c4 100644 --- a/modules/gallery/controllers/combined.php +++ b/modules/gallery/controllers/combined.php @@ -58,5 +58,51 @@ class Combined_Controller extends Controller { Kohana::close_buffers(false); print $content; } + + public function css($key) { + if (preg_match('/[^0-9a-f]/', $key)) { + // The key can't contain non-hex, so just terminate early + Kohana::show_404(); + } + + // We don't need to save the session for this request + Session::abort_save(); + + // Our data is immutable, so if they already have a copy then it needs no updating. + if (!empty($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { + header('HTTP/1.0 304 Not Modified'); + return; + } + + $cache = Cache::instance(); + if (strpos($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") !== false ) { + $content = $cache->get("{$key}_gz"); + } + + if (empty($content)) { + $content = $cache->get($key); + } + + if (empty($content)) { + Kohana::show_404(); + } + + if (strpos($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") !== false) { + header("Content-Encoding: gzip"); + header("Cache-Control: public"); + } + + header("Content-Type: text/css; charset=UTF-8"); + header("Expires: Tue, 19 Jan 2038 00:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s T", time())); + + Kohana::close_buffers(false); + print $content; + } + + public function __call($function, $args) { + array_unshift($args, $function); + print ""; + } } diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 7000d3de..1c1dec38 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -113,12 +113,53 @@ class Gallery_View_Core extends View { protected function combine_css() { $links = array(); $key = ""; + static $PATTERN = "#url\(\s*['|\"]{0,1}(.*?)['|\"]{0,1}\s*\)#"; + foreach (array_keys($this->css) as $file) { - $links[] = ""; + $path = DOCROOT . $file; + if (file_exists($path)) { + $stats = stat($path); + $links[] = $path; + // 7 == size, 9 == mtime, see http://php.net/stat + $key = "{$key}$file $stats[7] $stats[9],"; + } else { + Kohana::log("alert", "CSS file missing: " . $file); + } + } + $key = md5($key); + $cache = Cache::instance(); + $contents = $cache->get($key); + $docroot_length = strlen(DOCROOT); + + if (empty($contents)) { + $contents = ""; + foreach ($links as $link) { + $css = file_get_contents($link); + if (preg_match_all($PATTERN, $css, $matches, PREG_SET_ORDER)) { + $search = $replace = array(); + foreach ($matches as $match) { + $relative = substr(realpath(dirname($link) . "/$match[1]"), $docroot_length); + if (!empty($relative)) { + $search[] = $match[1]; + $replace[] = url::abs_file($relative); + } else { + Kohana::log("alert", sprintf("Missing URL reference '%s' in CSS file '%s' ", + $match[1], $link)); + } + } + $css = str_replace($search, $replace, $css); + } + $contents .= $css; + } + $cache->set($key, $contents, array("css"), 30 * 84600); + if (function_exists("gzencode")) { + $cache->set("{$key}_gz", gzencode($contents, 9, FORCE_GZIP), + array("css", "gzip"), 30 * 84600); + } } - return implode("\n", $links); + return ""; } } \ No newline at end of file diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index f6984958..2e68f571 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -25,8 +25,8 @@ " type="image/x-icon" /> css("lib/yui/reset-fonts-grids.css") ?> - css("lib/themeroller/ui.base.css") ?> css("lib/superfish/css/superfish.css") ?> + css("lib/themeroller/ui.base.css") ?> theme_css("css/screen.css") ?> + script("lib/jquery.js") ?> script("lib/jquery.form.js") ?> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 2e68f571..519a0c39 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -29,7 +29,8 @@ css("lib/themeroller/ui.base.css") ?> theme_css("css/screen.css") ?> page_type == 'album'): ?> -- cgit v1.2.3 From fe668abcb3612ec1b769e8b976a0aec856c21426 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Mon, 29 Jun 2009 20:20:15 -0700 Subject: Fix for ticket 481 - Better plural handling for 2 messages with multiple %count variables. --- themes/admin_default/views/pager.html.php | 10 ++++++---- themes/default/views/pager.html.php | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'themes/default') diff --git a/themes/admin_default/views/pager.html.php b/themes/admin_default/views/pager.html.php index 8df1b030..471b4811 100644 --- a/themes/admin_default/views/pager.html.php +++ b/themes/admin_default/views/pager.html.php @@ -2,10 +2,12 @@

      $current_first_item, - "to_number" => $current_last_item, - "total" => $total_items)) ?> + $from_to_msg = t2("Item %from_number of %count", + "Items %from_number - %to_number of %count", + $total_items, + array("from_number" => $current_first_item, + "to_number" => $current_last_item, + "count" => $total_items)) ?>
    • diff --git a/themes/default/views/pager.html.php b/themes/default/views/pager.html.php index 28a39490..7cdc9bb0 100644 --- a/themes/default/views/pager.html.php +++ b/themes/default/views/pager.html.php @@ -2,10 +2,12 @@ - - - + movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?>

      title) ?>

      -- cgit v1.2.3 From 0b34ec4e8b1f97db0dc6807bdb3a5ece8e1b83e4 Mon Sep 17 00:00:00 2001 From: jhilden Date: Tue, 30 Jun 2009 22:22:29 -0400 Subject: UI enhancement: made the 'back to the Gallery' links a little bit easier to discover --- themes/admin_default/css/screen.css | 20 ++++++++++++++++++-- themes/admin_default/views/admin.html.php | 4 ++-- themes/default/css/fix-ie.css | 2 +- themes/default/css/screen.css | 4 ++-- themes/default/views/header.html.php | 4 ++-- 5 files changed, 25 insertions(+), 9 deletions(-) (limited to 'themes/default') diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index f4173d4b..629d0451 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -98,12 +98,28 @@ * 4) Content blocks in specific layout containers *********************************************************************/ -#gHeader #gLogo { +#gHeader #gLogo img { float: left; margin: -22px 10px 0 0; } -.rtl #gHeader #gLogo { +#gHeader #gLogo { + position: relative; + display: block; + text-decoration: none; +} +#gHeader #gLogo span { + display: none; + position: absolute; + top: -20px; + left: 2px; + color: #FF6600; +} +#gHeader #gLogo:hover span { + display: inline; +} + +.rtl #gHeader #gLogo img { float: left; } diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 36deea9e..1be454c3 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -44,10 +44,10 @@
      admin_header_top() ?> - ">" id="gLogo" alt="" /> + diff --git a/themes/default/css/fix-ie.css b/themes/default/css/fix-ie.css index 0b37acd2..3d9604e6 100644 --- a/themes/default/css/fix-ie.css +++ b/themes/default/css/fix-ie.css @@ -10,7 +10,7 @@ zoom: 1; } -#gHeader #gLogo { +#gHeader #gLogo img { margin-top: 5px; margin-bottom: 0; } diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index e37de70e..48ded542 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -422,7 +422,7 @@ form .gError, /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader #gLogo { +#gHeader #gLogo img { float: left; margin: -4px 10px 0 0; } @@ -1046,7 +1046,7 @@ form .gError, .rtl input[type="submit"], .rtl input[type="reset"], .rtl .gShortForm li, -.rtl #gHeader #gLogo, +.rtl #gHeader #gLogo img, .rtl #gContent #gAlbumGrid .gItem, .rtl #gSiteMenu, .rtl .gBreadcrumbs li, diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index b38cffed..51f55b41 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -3,8 +3,8 @@ -"> - " src="theme_url("images/logo.png") ?>" /> + -- cgit v1.2.3 From 0add4ced22662918b6e5c3f0d0447e6e8aad4962 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Wed, 1 Jul 2009 00:35:33 -0600 Subject: Add a bit more contrast to superfish sub-menus. --- themes/default/css/screen.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'themes/default') diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 48ded542..7a41e970 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -13,7 +13,6 @@ * 7) Browser hacks * 8) jQuery and jQuery UI * 9) Right-to-left language styles - * 10) Digibug Print */ /** ******************************************************************* @@ -755,6 +754,16 @@ form .gError, * 7) jQuery and jQuery UI *********************************************************************/ +/* Superfish menu overrides ~~~~~~~~~~~~~~ */ + +.sf-menu li li, .sf-menu li li ul li { + background-color: #bdd2ff; +} + +.sf-menu li:hover { + background-color: #dfe9ff; +} + /* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ .gLoadingLarge { -- cgit v1.2.3 From 9beac1132e7d6ffec2192d5a4e54e14985218d6e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 1 Jul 2009 01:08:00 -0700 Subject: Fix a typo in the Doctype. Fixes ticket #497. --- themes/admin_default/views/admin.html.php | 2 +- themes/default/views/page.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'themes/default') diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 76f59d4a..33e7f58f 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -1,5 +1,5 @@ - diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index a21e9eff..181a2c46 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -1,5 +1,5 @@ - -- cgit v1.2.3 From 54ffea24196e8f5d88cf9d8607455f0f6aab305c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 3 Jul 2009 21:44:10 -0700 Subject: Split the clean method into two clean and purify. clean is a light weight approach using html::specialchars and purify uses HTMLPurifier to intelligently cleanse the output fields. Use purifier for text and title fields where it is likely that a user would enter html to format their data. --- modules/comment/controllers/comments.php | 4 ++-- modules/comment/helpers/comment_rss.php | 2 +- modules/comment/views/admin_block_recent_comments.html.php | 2 +- modules/comment/views/admin_comments.html.php | 4 ++-- modules/comment/views/comment.html.php | 2 +- modules/comment/views/comments.html.php | 2 +- modules/digibug/controllers/digibug.php | 2 +- modules/gallery/controllers/quick.php | 10 +++++----- modules/gallery/helpers/p.php | 4 ++++ modules/gallery/views/permissions_browse.html.php | 2 +- modules/gallery/views/simple_uploader.html.php | 6 +++--- modules/info/views/info_block.html.php | 4 ++-- modules/notification/views/comment_published.html.php | 2 +- modules/notification/views/item_added.html.php | 4 ++-- modules/notification/views/item_deleted.html.php | 2 +- modules/organize/controllers/organize.php | 10 +++++----- modules/organize/views/organize.html.php | 2 +- modules/search/views/search.html.php | 4 ++-- themes/default/views/album.html.php | 4 ++-- themes/default/views/header.html.php | 4 ++-- themes/default/views/movie.html.php | 4 ++-- themes/default/views/photo.html.php | 4 ++-- 22 files changed, 44 insertions(+), 40 deletions(-) (limited to 'themes/default') diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php index 99ecc8e0..2840ba67 100644 --- a/modules/comment/controllers/comments.php +++ b/modules/comment/controllers/comments.php @@ -41,7 +41,7 @@ class Comments_Controller extends REST_Controller { "id" => $comment->id, "author_name" => p::clean($comment->author_name()), "created" => $comment->created, - "text" => p::clean($comment->text)); + "text" => p::purify($comment->text)); } print json_encode($data); break; @@ -128,7 +128,7 @@ class Comments_Controller extends REST_Controller { "id" => $comment->id, "author_name" => p::clean($comment->author_name()), "created" => $comment->created, - "text" => p::clean($comment->text)))); + "text" => p::purify($comment->text)))); } else { $view = new Theme_View("comment.html", "fragment"); $view->comment = $comment; diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php index ef2d176e..746c6161 100644 --- a/modules/comment/helpers/comment_rss.php +++ b/modules/comment/helpers/comment_rss.php @@ -23,7 +23,7 @@ class comment_rss_Core { $feeds["comment/newest"] = t("All new comments"); if ($item) { $feeds["comment/item/$item->id"] = - t("Comments on %title", array("title" => p::clean($item->title))); + t("Comments on %title", array("title" => p::purify($item->title))); } return $feeds; } diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index af4d946e..893c1a63 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -10,7 +10,7 @@ created) ?> %author_name said %comment_text', array("author_name" => p::clean($comment->author_name()), - "comment_text" => text::limit_words(p::clean($comment->text), 50))); ?> + "comment_text" => text::limit_words(p::purify($comment->text), 50))); ?>
    diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 453cf849..489605d5 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -122,7 +122,7 @@ has_thumb()): ?> <?= p::clean($item->title) ?>thumb_width, $item->thumb_height, 75) ?> /> @@ -132,7 +132,7 @@

created) ?>

- text) ?> + text) ?>

@@ -185,7 +185,7 @@ $("#gUploadQueueInfo").text("(completed " + stats.successful_uploads + " of " + (stats.files_queued + stats.successful_uploads + stats.upload_errors + stats.upload_cancelled + stats.queue_errors) + ")"); } - + // Auto start the upload this.startUpload(); } diff --git a/modules/info/views/info_block.html.php b/modules/info/views/info_block.html.php index db621006..ccb564d3 100644 --- a/modules/info/views/info_block.html.php +++ b/modules/info/views/info_block.html.php @@ -2,12 +2,12 @@