diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 | 
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 | 
| commit | 7f5030ac208c30a7dc576a57cd9e665022ccbde5 (patch) | |
| tree | 6b23e78aa8cc2dd363def46e083217e3c9b52f1b /themes/default | |
| parent | 923732ca4dca6db218f6252a7133cd72f98fa086 (diff) | |
| parent | 85b0f580291e375a2c5ec21b8210e59023ee24c2 (diff) | |
Merge commit 'upstream/master'
Diffstat (limited to 'themes/default')
| -rw-r--r-- | themes/default/css/fix-ie.css | 2 | ||||
| -rw-r--r-- | themes/default/css/screen.css | 95 | ||||
| -rw-r--r--[-rwxr-xr-x] | themes/default/images/ico-error.png | bin | 701 -> 701 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | themes/default/images/ico-help.png | bin | 786 -> 786 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | themes/default/images/ico-info.png | bin | 778 -> 778 bytes | |||
| -rw-r--r-- | themes/default/images/ico-print.png | bin | 4411 -> 989 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | themes/default/images/ico-success.png | bin | 537 -> 537 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | themes/default/images/ico-warning.png | bin | 666 -> 666 bytes | |||
| -rw-r--r-- | themes/default/js/ui.init.js | 27 | ||||
| -rw-r--r-- | themes/default/theme.info | 6 | ||||
| -rw-r--r-- | themes/default/views/album.html.php | 5 | ||||
| -rw-r--r-- | themes/default/views/dynamic.html.php | 4 | ||||
| -rw-r--r-- | themes/default/views/header.html.php | 8 | ||||
| -rw-r--r-- | themes/default/views/movie.html.php | 23 | ||||
| -rw-r--r-- | themes/default/views/page.html.php | 56 | ||||
| -rw-r--r-- | themes/default/views/pager.html.php | 10 | ||||
| -rw-r--r-- | themes/default/views/photo.html.php | 5 | 
17 files changed, 149 insertions, 92 deletions
| 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 c7918fc0..88631e81 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -4,15 +4,15 @@   * @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   */  /** ******************************************************************* @@ -56,6 +56,10 @@ h2 {    font-size: 1.2em;  } +#gSidebar .gBlock li { +  margin-bottom: .6em; +} +  h3 {    font-size: 1.2em;  } @@ -417,7 +421,7 @@ form .gError,  /* Header  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader #gLogo { +#gHeader #gLogo img {    float: left;    margin: -4px 10px 0 0;  } @@ -455,7 +459,8 @@ form .gError,    font-size: .7em;    height: 240px;    overflow: hidden; -  padding: 14px 8px; +  padding: 15px 8px 30px 8px; +  position: relative;    text-align: center;    width: 213px;  } @@ -483,7 +488,7 @@ form .gError,  }  #gContent #gPhoto { - +  position: relative;  }  #gContent #gItem .gFullSizeLink img { @@ -577,6 +582,31 @@ form .gError,    margin-bottom: 0;  } +/* Thumb Menu  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gContent .gThumbMenu { +  bottom: 0; +  left: 0; +  position: absolute; +  width: 100%; +} + +#gContent .gThumbMenu li { +  border-left: none; +  border-right: none; +  border-bottom: none; +} + +#gContent .gThumbMenu li li { +  padding: .3em; +} + +#gContent .gThumbMenu a:hover { +  text-decoration: none; +} + +/* View Menu  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +  #gViewMenu {    margin-bottom: 1em;  } @@ -750,6 +780,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 { @@ -865,24 +905,26 @@ form .gError,  /* Server Add */ -.gCheckboxTree input { -  display: inline; +#gServerAdd button { +  float: left; +  margin-bottom: .5em;  } -.gCheckboxTree li { -  padding: 0; -  float: none; +#gServerAddTree { +  cursor: pointer; +  padding-left: 4px;  } -.gCheckboxTree .ui-icon { -  cursor: pointer; +#gServerAddTree li { +  padding: 0; +  float: none;  } -.gFile { -  padding-left: 2.5em; +#gServerAddTree span.selected { +  background: #ddd;  } -#gServerAdd #gServerAddTree { +#gServerAddTree {    border: 1px solid #ccc;    height: 25em;    overflow: auto; @@ -895,10 +937,6 @@ form .gError,    padding-left: 1.2em;  } -#gServerAdd ul li .gFile { -  padding-left: 2.5em; -} -  #gServerAdd .gBreadcrumbs {    font-size: 1em;    padding: 0; @@ -1041,7 +1079,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, @@ -1049,4 +1087,5 @@ form .gError,  .rtl .gButtonSet li,  .rtl .ui-icon-left .ui-icon {    float: right; -}
\ No newline at end of file +} + diff --git a/themes/default/images/ico-error.png b/themes/default/images/ico-error.pngBinary files differ index c37bd062..c37bd062 100755..100644 --- a/themes/default/images/ico-error.png +++ b/themes/default/images/ico-error.png diff --git a/themes/default/images/ico-help.png b/themes/default/images/ico-help.pngBinary files differ index 5c870176..5c870176 100755..100644 --- a/themes/default/images/ico-help.png +++ b/themes/default/images/ico-help.png diff --git a/themes/default/images/ico-info.png b/themes/default/images/ico-info.pngBinary files differ index 12cd1aef..12cd1aef 100755..100644 --- a/themes/default/images/ico-info.png +++ b/themes/default/images/ico-info.png diff --git a/themes/default/images/ico-print.png b/themes/default/images/ico-print.pngBinary files differ index 087e6694..b82a8e1e 100644 --- a/themes/default/images/ico-print.png +++ b/themes/default/images/ico-print.png diff --git a/themes/default/images/ico-success.png b/themes/default/images/ico-success.pngBinary files differ index a9925a06..a9925a06 100755..100644 --- a/themes/default/images/ico-success.png +++ b/themes/default/images/ico-success.png diff --git a/themes/default/images/ico-warning.png b/themes/default/images/ico-warning.pngBinary files differ index 628cf2da..628cf2da 100755..100644 --- a/themes/default/images/ico-warning.png +++ b/themes/default/images/ico-warning.png diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js index 9d9d3079..92a42ded 100644 --- a/themes/default/js/ui.init.js +++ b/themes/default/js/ui.init.js @@ -13,6 +13,9 @@ var shortForms = new Array(  $(document).ready(function() { +  // Remove .gMenu from thumb menu's before initializing Superfish +  // @todo gallery_menu should only apply gMenu to top-level menus, submenus should be gSubMenu-N +    // Initialize Superfish menus    $("ul.gMenu").addClass("sf-menu");    $('ul.sf-menu').superfish({ @@ -91,6 +94,30 @@ $(document).ready(function() {      }    ); +  // Initialize thumbnail menus +  // @todo Toggle between north and south caret's on hover +  if ($("#gContent .gThumbMenu").length) { +    $("#gContent .gThumbMenu li").addClass("ui-state-default"); +    $("#gContent .gThumbMenu li a") +      .not('[class]') +      .addClass("gButtonLink ui-icon ui-icon-caret-l-n") +      .css({ +        height: "10px", +        margin: "0", +        padding: "0 0 3px 0" +      }); + +    $(".gThumbMenu ul").hide(); +    $(".gThumbMenu").hover( +      function() { +        $(this).find("ul").slideDown("fast"); +      }, +      function() { +	      $(this).find("ul").slideUp("slow"); +      } +    ); +  } +  });  /** diff --git a/themes/default/theme.info b/themes/default/theme.info index 71e8a740..5f19d0d7 100644 --- a/themes/default/theme.info +++ b/themes/default/theme.info @@ -1,6 +1,6 @@ -name = Gallery Default -description = A crisp and distinctive theme that uses large fonts and icons for easy navigation and an enjoyable browsing experience. +name = "Gallery Default" +description = "A crisp and distinctive theme that uses large fonts and icons for easy navigation and an enjoyable browsing experience."  version = 1 -author = Gallery Team +author = "Gallery Team"  site = 1  admin = 0 diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index 7e6913df..65ea3381 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -2,8 +2,8 @@  <? // @todo Set hover on AlbumGrid list items for guest users ?>  <div id="gInfo">    <?= $theme->album_top() ?> -  <h1><?= p::clean($item->title) ?></h1> -  <div class="gDescription"><?= p::clean($item->description) ?></div> +  <h1><?= p::purify($item->title) ?></h1> +  <div class="gDescription"><?= nl2br(p::purify($item->description)) ?></div>  </div>  <ul id="gAlbumGrid"> @@ -19,6 +19,7 @@        <?= $child->thumb_img(array("class" => "gThumbnail")) ?>      </a>      <?= $theme->thumb_bottom($child) ?> +    <?= $theme->thumb_menu($child) ?>      <h2><span></span><a href="<?= $child->url() ?>"><?= p::clean($child->title) ?></a></h2>      <ul class="gMetadata">        <?= $theme->thumb_info($child) ?> diff --git a/themes/default/views/dynamic.html.php b/themes/default/views/dynamic.html.php index 12b5192c..2d122e69 100644 --- a/themes/default/views/dynamic.html.php +++ b/themes/default/views/dynamic.html.php @@ -3,7 +3,7 @@    <div id="gAlbumHeaderButtons">      <?= $theme->dynamic_top() ?>    </div> -  <h1><?= p::clean($tag->name) ?></h1> +  <h1><?= p::clean($title) ?></h1>  </div>  <ul id="gAlbumGrid"> @@ -16,7 +16,7 @@             width="<?= $child->thumb_width ?>"             height="<?= $child->thumb_height ?>" />      </a> -    <h2><?= p::clean($child->title) ?></h2> +    <h2><?= p::purify($child->title) ?></h2>      <?= $theme->thumb_bottom($child) ?>      <ul class="gMetadata">        <?= $theme->thumb_info($child) ?> diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index e1e52bda..5428d9fd 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -3,8 +3,8 @@  <? if ($header_text = module::get_var("gallery", "header_text")): ?>  <?= $header_text ?>  <? else: ?> -<a href="<?= url::site("albums/1") ?>"> -  <img width="107" height="48" id="gLogo" alt="<?= t("Gallery: Your photos on your web site") ?>" src="<?= $theme->url("images/logo.png") ?>" /> +<a id="gLogo" href="<?= url::site("albums/1") ?>" title="<?= t("go back to the Gallery home") ?>"> +  <img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site") ?>" src="<?= $theme->theme_url("images/logo.png") ?>" />  </a>  <? endif ?> @@ -19,10 +19,10 @@    <? foreach ($parents as $parent): ?>    <li>      <a href="<?= url::site("albums/{$parent->id}?show=$item->id") ?>"> -      <?= p::clean($parent->title) ?> +      <?= p::purify($parent->title) ?>      </a>    </li>    <? endforeach ?> -  <li class="active"><?= p::clean($item->title) ?></li> +  <li class="active"><?= p::purify($item->title) ?></li>  </ul>  <? endif ?> diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php index e8559697..66c80ded 100644 --- a/themes/default/views/movie.html.php +++ b/themes/default/views/movie.html.php @@ -1,5 +1,4 @@  <?php defined("SYSPATH") or die("No direct script access.") ?> -<script src="<?= url::file("lib/flowplayer.js") ?>" type="text/javascript"></script>  <div id="gItem">    <?= $theme->photo_top() ?> @@ -13,27 +12,11 @@      <? endif ?>    </ul> -  <a id="gMovieId-<?= $item->id ?>" -     href="<?= $item->file_url(true) ?>" -     style="display: block; width: <?= $item->width ?>px; height: <?= $item->height ?>px"> -  </a> -  <script> -    flowplayer("gMovieId-<?= $item->id ?>", "<?= url::abs_file("lib/flowplayer.swf") ?>", { -      plugins: { -        h264streaming: { -          url: "<?= url::abs_file("lib/flowplayer.h264streaming.swf") ?>" -        }, -        controls: { -          autoHide: 'always', -          hideDelay: 2000 -        } -      } -    }) -  </script> +  <?= $item->movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?>    <div id="gInfo"> -    <h1><?= p::clean($item->title) ?></h1> -    <div><?= p::clean($item->description) ?></div> +    <h1><?= p::purify($item->title) ?></h1> +       <div><?= nl2br(p::purify($item->description)) ?></div>    </div>    <script type="text/javascript"> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index f6286f95..181a2c46 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -1,5 +1,5 @@  <?php defined("SYSPATH") or die("No direct script access.") ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tranisitional//EN" +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">    <head> @@ -23,17 +23,13 @@          <? endif ?>        <? endif ?>      </title> -    <link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" /> -    <link rel="stylesheet" type="text/css" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>" -          media="screen,print,projection" /> -    <link rel="stylesheet" type="text/css" href="<?= url::file("lib/superfish/css/superfish.css") ?>" -          media="screen" /> -    <link rel="stylesheet" type="text/css" href="<?= url::file("lib/themeroller/ui.base.css") ?>" -          media="screen,print,projection" /> -    <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/screen.css") ?>" -          media="screen,print,projection" /> +    <link rel="shortcut icon" href="<?= $theme->theme_url("images/favicon.ico") ?>" type="image/x-icon" /> +    <?= $theme->css("lib/yui/reset-fonts-grids.css") ?> +    <?= $theme->css("lib/superfish/css/superfish.css") ?> +    <?= $theme->css("lib/themeroller/ui.base.css") ?> +    <?= $theme->theme_css("css/screen.css") ?>      <!--[if lt IE 8]> -    <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>" +    <link rel="stylesheet" type="text/css" href="<?= $theme->theme_url("css/fix-ie.css") ?>"            media="screen,print,projection" />      <![endif]-->      <? if ($theme->page_type == 'album'): ?> @@ -49,18 +45,28 @@      </style>        <? endif ?>      <? endif ?> -    <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/gallery.common.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/gallery.form.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script> -    <? if ($theme->page_type == 'photo'): ?> -    <script src="<?= url::file("lib/jquery.scrollTo.js") ?>" type="text/javascript"></script> -    <script src="<?= url::file("lib/jquery.localscroll.js") ?>" type="text/javascript"></script> +    <?= $theme->script("lib/jquery.js") ?> +    <?= $theme->script("lib/jquery.form.js") ?> +    <?= $theme->script("lib/jquery-ui.js") ?> +    <?= $theme->script("lib/gallery.common.js") ?> +    <? /* MSG_CANCEL is required by gallery.dialog.js */ ?> +    <script type="text/javascript"> +    var MSG_CANCEL = "<?= t('Cancel') ?>"; +    </script> +    <?= $theme->script("lib/gallery.dialog.js") ?> +    <?= $theme->script("lib/gallery.form.js") ?> +    <?= $theme->script("lib/superfish/js/superfish.js") ?> +    <?= $theme->script("lib/jquery.localscroll.js") ?> +    <?= $theme->theme_script("js/ui.init.js") ?> + +    <? /* These are page specific, but if we put them before $theme->head() they get combined */ ?> +    <? if ($theme->page_type == "photo"): ?> +    <?= $theme->script("lib/jquery.scrollTo.js") ?> +    <?= $theme->script("lib/gallery.show_full_size.js") ?> +    <? elseif ($theme->page_type == "movie"): ?> +    <?= $theme->script("lib/flowplayer.js") ?>      <? endif ?> -    <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script> +      <?= $theme->head() ?>    </head> @@ -69,7 +75,7 @@      <div id="doc4" class="yui-t5 gView">        <?= $theme->site_status() ?>        <div id="gHeader"> -        <?= $theme->display("header.html") ?> +        <?= new View("header.html") ?>        </div>        <div id="bd">          <div id="yui-main"> @@ -82,12 +88,12 @@          </div>          <div id="gSidebar" class="yui-b">            <? if ($theme->page_type != "login"): ?> -          <?= $theme->display("sidebar.html") ?> +          <?= new View("sidebar.html") ?>            <? endif ?>          </div>        </div>        <div id="gFooter"> -        <?= $theme->display("footer.html") ?> +        <?= new View("footer.html") ?>        </div>      </div>      <?= $theme->page_bottom() ?> 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 @@  <? // See http://docs.kohanaphp.com/libraries/pagination ?>  <ul class="gPager">    <? /* @todo This message isn't easily localizable */ -     $from_to_msg = t("Photos %from_number - %to_number of %total", -                      array("from_number" => $current_first_item, -                            "to_number" => $current_last_item, -                            "total" => $total_items)) ?> +     $from_to_msg = t2("Photo %from_number of %count", +                       "Photos %from_number - %to_number of %count", +                       $total_items, +                       array("from_number" => $current_first_item, +                             "to_number" => $current_last_item, +                             "count" => $total_items)) ?>    <li>    <? if ($first_page): ?>      <a href="<?= str_replace('{page}', 1, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 1c3b81a7..bf4d9da3 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -2,7 +2,6 @@  <? if (access::can("view_full", $theme->item())): ?>  <!-- Use javascript to show the full size as an overlay on the current page --> -<script src="<?= url::file("lib/gallery.show_full_size.js") ?>" type="text/javascript"></script>  <script>    $(document).ready(function() {      $(".gFullSizeLink").click(function() { @@ -51,8 +50,8 @@    </div>    <div id="gInfo"> -    <h1><?= p::clean($item->title) ?></h1> -    <div><?= p::clean($item->description) ?></div> +    <h1><?= p::purify($item->title) ?></h1> +    <div><?= nl2br(p::purify($item->description)) ?></div>    </div>    <script type="text/javascript"> | 
