aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-06-14 12:18:40 +0000
committermistic100 <mistic@piwigo.org>2014-06-14 12:18:40 +0000
commit296ae7021e75f555da9066232faa8da3a1225f4b (patch)
tree97e8f58c76c00e4e4c7f37b82ebd5681f62d51bd
parent06cc578798c0a2f6f82541071f8ef26a6c323805 (diff)
no more use of jquery ui for admin menu accordion
git-svn-id: http://piwigo.org/svn/trunk@28702 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/themes/clear/theme.css16
-rw-r--r--admin/themes/default/template/admin.tpl119
-rw-r--r--admin/themes/roma/theme.css9
3 files changed, 81 insertions, 63 deletions
diff --git a/admin/themes/clear/theme.css b/admin/themes/clear/theme.css
index c481771b1..6021785c4 100644
--- a/admin/themes/clear/theme.css
+++ b/admin/themes/clear/theme.css
@@ -160,27 +160,23 @@ margin-top:4px; padding-bottom:3px; padding-top:3px; top:1px;
.tabsheet a span { font-size:10px; margin-right:2px; padding:0 3px 0 1px; }
.sort { clear: none; }
+
/* menubar is on all admin pages => No specific css file */
#menubar {
padding:0; width:207px; z-index:99; text-align: left;margin-top:7px;
margin-left:0;
}
-#menubar ul.scroll { overflow-y:auto; max-height:500px;
- /* Only IE family supports colored scrollbar */
- scrollbar-face-color: #ddd; scrollbar-shadow-color: #bbb; scrollbar-highlight-color: #fff;
- scrollbar-3dlight-color: #d6d6d6; scrollbar-darkshadow-color: #ccc; scrollbar-track-color: #eee;
- scrollbar-arrow-color: #0cccc; }
-#menubar dd { margin: 0; padding: 0;}
-#menubar dl { width: 200px; border:0; margin: 0; padding: 0; display: block; min-height:35px; border:1px solid #ddd; background-color:#f1f1f1; border-left:none; border-right:1px solid #ddd;}
-#menubar dl.first {border-top:none;border-radius:0 6px 0 0;}
-#menubar dl.first dt {border-radius:0 6px 0 0;}
-#menubar dl.last {border-bottom:1px solid #ddd; border-radius:0 0 6px 0;}
+#menubar ul.scroll { overflow-y:auto; max-height:500px; }
+#menubar dl { width: 200px; min-height:35px; border:0; margin: 0; padding: 0; display: block; border:1px solid #ddd; background-color:#f1f1f1; border-left:none; }
+#menubar dd { margin: 0; padding: 0; }
#menubar dt {
background-color: #ddd; margin: 0; display: block; font-weight:bold;
position:relative; padding: 5px 1px 4px 5px; font-size: 13px; color: #777;
cursor:pointer;
}
+#menubar dl:first-of-type, #menubar dl:first-of-type dt { border-radius:0 6px 0 0; }
+#menubar dl:last-of-type { border-radius:0 0 6px 0; }
#menubar li { margin: 0; padding-left:10px; }
#menubar li A { display:block; }
#menubar li A:hover {color:black; text-decoration:none}
diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl
index 7fc9dc179..67e0832bb 100644
--- a/admin/themes/default/template/admin.tpl
+++ b/admin/themes/default/template/admin.tpl
@@ -1,56 +1,74 @@
-{combine_script id='jquery.ui.accordion' load='header'}{*we load in the header because the accordion is on every admin page and usually all admin pages use the same header combined script but not the same footer script*}
-{footer_script require='jquery.ui.accordion'}
-jQuery(document).ready(function(){ldelim}
- jQuery('#menubar').accordion({ldelim}
- header: "dt.rdion",
- event: "click",
- heightStyle: "content",
- active: {$ACTIVE_MENU}
- });
+{footer_script}
+jQuery.fn.lightAccordion = function(options) {
+ var settings = $.extend({
+ header: 'dt',
+ content: 'dd',
+ active: 0
+ }, options);
+
+ return this.each(function() {
+ var self = jQuery(this);
+
+ var contents = self.find(settings.content),
+ headers = self.find(settings.header);
+
+ contents.not(contents[settings.active]).hide();
+
+ self.on('click', settings.header, function() {
+ var content = jQuery(this).next(settings.content);
+ content.slideDown();
+ contents.not(content).slideUp();
+ });
+ });
+};
+
+$('#menubar').lightAccordion({
+ active: {$ACTIVE_MENU}
});
{/footer_script}
<div id="menubar">
<div id="adminHome"><a href="{$U_ADMIN}">{'Administration Home'|@translate}</a></div>
- <dl class="first">
- <dt class="rdion"><span class="icon-picture"> </span><span>{'Photos'|@translate}&nbsp;</span></dt>
+
+ <dl>
+ <dt><i class="icon-picture"> </i><span>{'Photos'|@translate}&nbsp;</span></dt>
<dd>
<ul>
- <li><a class="icon-plus-circled" href="{$U_ADD_PHOTOS}">{'Add'|@translate}</a></li>
- <li><a class="icon-star" href="{$U_RATING}">{'Rating'|@translate}</a></li>
- <li><a class="icon-tags" href="{$U_TAGS}">{'Tags'|@translate}</a></li>
- <li><a class="icon-clock" href="{$U_RECENT_SET}">{'Recent photos'|@translate}</a></li>
- <li><a class="icon-pencil" href="{$U_BATCH}">{'Batch Manager'|@translate}</a></li>
+ <li><a href="{$U_ADD_PHOTOS}"><i class="icon-plus-circled"></i>{'Add'|@translate}</a></li>
+ <li><a href="{$U_RATING}"><i class="icon-star"></i>{'Rating'|@translate}</a></li>
+ <li><a href="{$U_TAGS}"><i class="icon-tags"></i>{'Tags'|@translate}</a></li>
+ <li><a href="{$U_RECENT_SET}"><i class="icon-clock"></i>{'Recent photos'|@translate}</a></li>
+ <li><a href="{$U_BATCH}"><i class="icon-pencil"></i>{'Batch Manager'|@translate}</a></li>
{if $NB_PHOTOS_IN_CADDIE > 0}
- <li><a class="icon-flag" href="{$U_CADDIE}">{'Caddie'|@translate}<span class="adminMenubarCounter">{$NB_PHOTOS_IN_CADDIE}</span></a></li>
+ <li><a href="{$U_CADDIE}"><i class="icon-flag"></i>{'Caddie'|@translate}<span class="adminMenubarCounter">{$NB_PHOTOS_IN_CADDIE}</span></a></li>
{/if}
</ul>
</dd>
- </dl>
- <dl>
- <dt class="rdion"><span class="icon-sitemap"> </span><span>{'Albums'|@translate}&nbsp;</span></dt>
+ </dl>
+ <dl>
+ <dt><i class="icon-sitemap"> </i><span>{'Albums'|@translate}&nbsp;</span></dt>
<dd>
<ul>
- <li><a class="icon-folder-open" href="{$U_CATEGORIES}">{'Manage'|@translate}</a></li>
- <li><a class="icon-pencil" href="{$U_CAT_OPTIONS}">{'Properties'|@translate}</a></li>
+ <li><a href="{$U_CATEGORIES}"><i class="icon-folder-open"></i>{'Manage'|@translate}</a></li>
+ <li><a href="{$U_CAT_OPTIONS}"><i class="icon-pencil"></i>{'Properties'|@translate}</a></li>
</ul>
</dd>
- </dl>
- <dl>
- <dt class="rdion"><span class="icon-users"> </span><span>{'Users'|@translate}&nbsp;</span></dt>
+ </dl>
+ <dl>
+ <dt><i class="icon-users"> </i><span>{'Users'|@translate}&nbsp;</span></dt>
<dd>
<ul>
- <li><a class="icon-user-add" href="{$U_USERS}">{'Manage'|@translate}</a></li>
- <li><a class="icon-group" href="{$U_GROUPS}">{'Groups'|@translate}</a></li>
- <li><a class="icon-mail-1" href="{$U_NOTIFICATION_BY_MAIL}">{'Notification'|@translate}</a></li>
+ <li><a href="{$U_USERS}"><i class="icon-user-add"></i>{'Manage'|@translate}</a></li>
+ <li><a href="{$U_GROUPS}"><i class="icon-group"></i>{'Groups'|@translate}</a></li>
+ <li><a href="{$U_NOTIFICATION_BY_MAIL}"><i class="icon-mail-1"></i>{'Notification'|@translate}</a></li>
</ul>
</dd>
- </dl>
- <dl>
- <dt class="rdion"><span class="icon-puzzle"> </span><span>{'Plugins'|@translate}&nbsp;</span></dt>
+ </dl>
+ <dl>
+ <dt><i class="icon-puzzle"> </i><span>{'Plugins'|@translate}&nbsp;</span></dt>
<dd>
<ul>
- <li><a class="icon-equalizer" href="{$U_PLUGINS}">{'Manage'|@translate}</a></li>
+ <li><a href="{$U_PLUGINS}"><i class="icon-equalizer"></i>{'Manage'|@translate}</a></li>
</ul>
<div id="pluginsMenuSeparator"></div>
{if !empty($plugin_menu_items)}
@@ -61,33 +79,36 @@ jQuery(document).ready(function(){ldelim}
</ul>
{/if}
</dd>
- </dl>
- <dl>
- <dt class="rdion"><span class="icon-wrench"> </span><span>{'Tools'|@translate}&nbsp;</span></dt>
+ </dl>
+ <dl>
+ <dt><i class="icon-wrench"> </i><span>{'Tools'|@translate}&nbsp;</span></dt>
<dd>
<ul>
{if $ENABLE_SYNCHRONIZATION}
- <li><a class="icon-exchange" href="{$U_CAT_UPDATE}">{'Synchronize'|@translate}</a></li>
- <li><a class="icon-flow-branch" href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></li>
+ <li><a href="{$U_CAT_UPDATE}"><i class="icon-exchange"></i>{'Synchronize'|@translate}</a></li>
+ <li><a href="{$U_SITE_MANAGER}"><i class="icon-flow-branch"></i>{'Site manager'|@translate}</a></li>
{/if}
- <li><a class="icon-signal" href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
- <li><a class="icon-tools" href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
+ <li><a href="{$U_HISTORY_STAT}"><i class="icon-signal"></i>{'History'|@translate}</a></li>
+ <li><a href="{$U_MAINTENANCE}"><i class="icon-tools"></i>{'Maintenance'|@translate}</a></li>
{if isset($U_COMMENTS)}
- <li><a class="icon-chat" href="{$U_COMMENTS}">{'Comments'|@translate}{if $NB_PENDING_COMMENTS > 0}<span class="adminMenubarCounter" title="{'%d waiting for validation'|translate:$NB_PENDING_COMMENTS}">{$NB_PENDING_COMMENTS}</span>{/if}</a></li>
+ <li><a href="{$U_COMMENTS}"><i class="icon-chat"></i>{'Comments'|@translate}
+ {if $NB_PENDING_COMMENTS > 0}
+ <span class="adminMenubarCounter" title="{'%d waiting for validation'|translate:$NB_PENDING_COMMENTS}">{$NB_PENDING_COMMENTS}</span>
+ {/if}</a></li>
{/if}
- <li><a class="icon-arrows-cw" href="{$U_UPDATES}">{'Updates'|@translate}</a></li>
+ <li><a href="{$U_UPDATES}"><i class="icon-arrows-cw"></i>{'Updates'|@translate}</a></li>
</ul>
</dd>
- </dl>
- <dl class="last">
- <dt class="rdion"><span class="icon-cog"> </span><span>{'Configuration'|@translate}&nbsp;</span></dt>
+ </dl>
+ <dl>
+ <dt><i class="icon-cog"> </i><span>{'Configuration'|@translate}&nbsp;</span></dt>
<dd>
<ul>
- <li><a class="icon-cog-alt" href="{$U_CONFIG_GENERAL}">{'Options'|@translate}</a></li>
- <li><a class="icon-menu" href="{$U_CONFIG_MENUBAR}">{'Menu Management'|@translate}</a></li>
- <li><a class="icon-code" href="{$U_CONFIG_EXTENTS}">{'Templates'|@translate}</a></li>
- <li><a class="icon-language" href="{$U_CONFIG_LANGUAGES}">{'Languages'|@translate}</a></li>
- <li><a class="icon-brush" href="{$U_CONFIG_THEMES}">{'Themes'|@translate}</a></li>
+ <li><a href="{$U_CONFIG_GENERAL}"><i class="icon-cog-alt"></i>{'Options'|@translate}</a></li>
+ <li><a href="{$U_CONFIG_MENUBAR}"><i class="icon-menu"></i>{'Menu Management'|@translate}</a></li>
+ <li><a href="{$U_CONFIG_EXTENTS}"><i class="icon-code"></i>{'Templates'|@translate}</a></li>
+ <li><a href="{$U_CONFIG_LANGUAGES}"><i class="icon-language"></i>{'Languages'|@translate}</a></li>
+ <li><a href="{$U_CONFIG_THEMES}"><i class="icon-brush"></i>{'Themes'|@translate}</a></li>
</ul>
</dd>
</dl>
diff --git a/admin/themes/roma/theme.css b/admin/themes/roma/theme.css
index a25965380..f6065f0be 100644
--- a/admin/themes/roma/theme.css
+++ b/admin/themes/roma/theme.css
@@ -136,6 +136,7 @@ margin-top:4px; padding-bottom:3px; padding-top:3px; top:1px;
}
.tabsheet a:hover, .tabsheet li.selected_tab a { color: #F36; }
.tabsheet a span { background-color:#222; font-size:10px; margin-right:2px; padding:0 3px 0 1px; }
+
/* menubar is on all admin pages => No specific css file */
#menubar {
background:transparent url(images/menuBoxBottom_new.png) no-repeat scroll left bottom;
@@ -144,20 +145,20 @@ padding:0; width:207px; z-index:99; text-align: left;
}
#menubar dd {
-background: transparent url(images/menubar-detail.png) repeat-y top left;
+background: #111 url(images/menubar-detail.png) repeat-y top left;
margin: 0; padding: 0 0 10px 0; }
#menubar dl {
background:transparent url(images/menuBoxTop_new.png) no-repeat scroll left top;
width: 207px; border:0; margin: 0; padding: 0; display: block; min-height:35px; }
-#menubar dl.first {
+#menubar dl:first-of-type{
background:transparent url(images/menubar-top.png) no-repeat scroll left 1px; }
-#menubar dl.last { padding: 0 0 24px 0;}
+#menubar dl:last-of-type { padding: 0 0 24px 0;}
#menubar dt {
margin: 0; display: block; background: none; left:10px; font-weight:bold;
position:relative; padding: 5px 1px 4px 5px; top:-8px; font-size: 13px; color: #666; outline:none;
cursor:pointer;
}
-#menubar dt span { background-color: #111; }
+#menubar dt * { background-color: #111; }
#menubar li { margin: 0 0 0 12px; }
#menubar li.external { list-style-image:url(images/external_inactive.png); padding:10px 0px 0pt 10px; }
#menubar li.external:hover { list-style-image:url(images/external_active.png); }