diff options
author | mistic100 <mistic@piwigo.org> | 2014-06-14 12:18:40 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-06-14 12:18:40 +0000 |
commit | 296ae7021e75f555da9066232faa8da3a1225f4b (patch) | |
tree | 97e8f58c76c00e4e4c7f37b82ebd5681f62d51bd /admin/themes/default/template/admin.tpl | |
parent | 06cc578798c0a2f6f82541071f8ef26a6c323805 (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
Diffstat (limited to 'admin/themes/default/template/admin.tpl')
-rw-r--r-- | admin/themes/default/template/admin.tpl | 119 |
1 files changed, 70 insertions, 49 deletions
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} </span></dt> + + <dl> + <dt><i class="icon-picture"> </i><span>{'Photos'|@translate} </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} </span></dt> + </dl> + <dl> + <dt><i class="icon-sitemap"> </i><span>{'Albums'|@translate} </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} </span></dt> + </dl> + <dl> + <dt><i class="icon-users"> </i><span>{'Users'|@translate} </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} </span></dt> + </dl> + <dl> + <dt><i class="icon-puzzle"> </i><span>{'Plugins'|@translate} </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} </span></dt> + </dl> + <dl> + <dt><i class="icon-wrench"> </i><span>{'Tools'|@translate} </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} </span></dt> + </dl> + <dl> + <dt><i class="icon-cog"> </i><span>{'Configuration'|@translate} </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> |