aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-01-11 05:03:04 +0000
committerrvelices <rv-github@modusoptimus.com>2012-01-11 05:03:04 +0000
commitcf8155ddd6760f9f9df9f81ef8cff214b563352b (patch)
tree69791f4590a06f42136f54042770279ca2f489a4 /themes/default
parente349749d423b042afe7ce6f8dc006544d9e6710a (diff)
feature 2550 - replace Sort order label and select on index page with a css sprite icon
git-svn-id: http://piwigo.org/svn/trunk@12873 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/iconset.css1
-rw-r--r--themes/default/s26/outline_005e89.pngbin1920 -> 1952 bytes
-rw-r--r--themes/default/s26/outline_808060.pngbin1920 -> 1952 bytes
-rw-r--r--themes/default/s26/outline_808080.pngbin2429 -> 2477 bytes
-rw-r--r--themes/default/s26/outline_ff3363.pngbin1920 -> 1952 bytes
-rw-r--r--themes/default/s26/outline_ff7700.pngbin1920 -> 1952 bytes
-rw-r--r--themes/default/s26/outline_ffff80.pngbin1920 -> 1952 bytes
-rw-r--r--themes/default/s26/outline_ffffff.pngbin2116 -> 2169 bytes
-rw-r--r--themes/default/template/index.tpl35
-rw-r--r--themes/default/theme.css4
10 files changed, 32 insertions, 8 deletions
diff --git a/themes/default/iconset.css b/themes/default/iconset.css
index ab53b9fd1..976f2ce0f 100644
--- a/themes/default/iconset.css
+++ b/themes/default/iconset.css
@@ -36,6 +36,7 @@
.pwg-icon-close {background-position: 0 -52px}
.pwg-icon-category-edit {background-position: -26px -52px}
+.pwg-icon-sort {background-position: -52px -52px}
.pwg-icon-category-view-normal {background-position: -156px -52px}
.pwg-icon-category-view-flat {background-position: -182px -52px}
diff --git a/themes/default/s26/outline_005e89.png b/themes/default/s26/outline_005e89.png
index 1097a5242..0e411a152 100644
--- a/themes/default/s26/outline_005e89.png
+++ b/themes/default/s26/outline_005e89.png
Binary files differ
diff --git a/themes/default/s26/outline_808060.png b/themes/default/s26/outline_808060.png
index 4cfb932fe..01d1f18df 100644
--- a/themes/default/s26/outline_808060.png
+++ b/themes/default/s26/outline_808060.png
Binary files differ
diff --git a/themes/default/s26/outline_808080.png b/themes/default/s26/outline_808080.png
index 4cac9ecbb..d51b3b44c 100644
--- a/themes/default/s26/outline_808080.png
+++ b/themes/default/s26/outline_808080.png
Binary files differ
diff --git a/themes/default/s26/outline_ff3363.png b/themes/default/s26/outline_ff3363.png
index 5db5cce9a..9a5aef891 100644
--- a/themes/default/s26/outline_ff3363.png
+++ b/themes/default/s26/outline_ff3363.png
Binary files differ
diff --git a/themes/default/s26/outline_ff7700.png b/themes/default/s26/outline_ff7700.png
index 4e07b085f..45caa0dc3 100644
--- a/themes/default/s26/outline_ff7700.png
+++ b/themes/default/s26/outline_ff7700.png
Binary files differ
diff --git a/themes/default/s26/outline_ffff80.png b/themes/default/s26/outline_ffff80.png
index 209a3dd52..0f54e2e46 100644
--- a/themes/default/s26/outline_ffff80.png
+++ b/themes/default/s26/outline_ffff80.png
Binary files differ
diff --git a/themes/default/s26/outline_ffffff.png b/themes/default/s26/outline_ffffff.png
index d27b992fa..338aa82b5 100644
--- a/themes/default/s26/outline_ffffff.png
+++ b/themes/default/s26/outline_ffffff.png
Binary files differ
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl
index 815dcbd8e..5af08ba6d 100644
--- a/themes/default/template/index.tpl
+++ b/themes/default/template/index.tpl
@@ -4,13 +4,36 @@
<div class="titrePage">
<ul class="categoryActions">
{if !empty($image_orders)}
- <li>{'Sort order'|@translate}: {strip}
- <select onchange="document.location = this.options[this.selectedIndex].value;">
- {foreach from=$image_orders item=image_order}
- <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}>{$image_order.DISPLAY}</option>
+ <li>{strip}<a href="javascript:toggleSortOrderBox()" id="sortOrderLink" title="{'Sort order'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+ <span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
+ </a>
+ <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()">
+ {'Sort order'|@translate}:
+ {foreach from=$image_orders item=image_order}<br>
+ {if $image_order.SELECTED}
+ <span>{$image_order.DISPLAY}</span>
+ {else}
+ <a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a>
+ {/if}
{/foreach}
- </select>
-{/strip}</li>
+ </div>
+ {footer_script}{literal}
+function toggleSortOrderBox()
+{
+ var elt = document.getElementById("sortOrderBox"),
+ ePos = document.getElementById("sortOrderLink");
+ if (elt.style.display==="none")
+ {
+ elt.style.position = "absolute";
+ elt.style.left = (ePos.offsetLeft) + "px";
+ elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
+ elt.style.display="";
+ }
+ else
+ elt.style.display="none";
+}
+ {/literal}{/footer_script}
+ {/strip}</li>
{/if}
{if isset($favorite)}
<li><a href="{$favorite.U_FAVORITE}" title="{'delete all photos from your favorites'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
diff --git a/themes/default/theme.css b/themes/default/theme.css
index dfdb2f40e..d3d6e9475 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -345,8 +345,8 @@ TD.calDayHead {
top: 100px;
}
-#derivativeSwitchBox {
- padding: 0.5em;
+#derivativeSwitchBox, #sortOrderBox {
+ padding: 0.5em 1em;
border-radius: 4px;
z-index: 100;
}