mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Partially added the collapsing feature of the left bar
Added a toggle switch on the left bar sub menus. Added a small icon alongside the submenu name. It currently toggles the submenus correctly and changes the icon orientation. However, the state of the menu isn't kept in memory, therefore changing to another sidebar (from home to admin for instance) doesn't keep the current display settings. By default, all menus are expanded.
This commit is contained in:
parent
eae2e8e339
commit
388fbbab30
8 changed files with 85 additions and 50 deletions
|
@ -6,7 +6,7 @@
|
|||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License v2
|
||||
// as published by the Free Software Foundation.
|
||||
//
|
||||
//
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -19,7 +19,7 @@
|
|||
//
|
||||
$(document).ready(function () {
|
||||
$('.default_hidden').hide();
|
||||
|
||||
|
||||
$("#tabs li").click(function() {
|
||||
$("#tabs li").removeClass('tab_active');
|
||||
$(this).addClass("tab_active");
|
||||
|
@ -65,13 +65,13 @@ function flipField(field) {
|
|||
|
||||
// updateText
|
||||
// Changes the specified elements innards. Used for the catalog mojo fluff.
|
||||
function updateText(field, value) {
|
||||
function updateText(field, value) {
|
||||
$('#'+field).html(value);
|
||||
}
|
||||
|
||||
// toggleVisible
|
||||
// Toggles display type between block and none. Used for ajax loading div.
|
||||
function toggleVisible(element) {
|
||||
function toggleVisible(element) {
|
||||
var target = $('#' + element);
|
||||
if (target.is(':visible')) {
|
||||
target.hide();
|
||||
|
@ -82,27 +82,27 @@ function toggleVisible(element) {
|
|||
|
||||
// delayRun
|
||||
// This function delays the run of another function by X milliseconds
|
||||
function delayRun(element, time, method, page, source) {
|
||||
var function_string = method + '(\'' + page + '\',\'' + source + '\')';
|
||||
var action = function () { eval(function_string); };
|
||||
function delayRun(element, time, method, page, source) {
|
||||
var function_string = method + '(\'' + page + '\',\'' + source + '\')';
|
||||
var action = function () { eval(function_string); };
|
||||
|
||||
if (element.zid) {
|
||||
clearTimeout(element.zid);
|
||||
if (element.zid) {
|
||||
clearTimeout(element.zid);
|
||||
}
|
||||
|
||||
element.zid = setTimeout(action, time);
|
||||
element.zid = setTimeout(action, time);
|
||||
}
|
||||
|
||||
// reloadUtil
|
||||
// Reload our util frame
|
||||
// IE issue fixed by Spocky, we have to use the iframe for Democratic Play &
|
||||
// IE issue fixed by Spocky, we have to use the iframe for Democratic Play &
|
||||
// Localplay, which don't actually prompt for a new file
|
||||
function reloadUtil(target) {
|
||||
function reloadUtil(target) {
|
||||
$('#util_iframe').prop('src', target);
|
||||
}
|
||||
|
||||
// reloadRedirect
|
||||
// Send them elsewhere
|
||||
function reloadRedirect(target) {
|
||||
function reloadRedirect(target) {
|
||||
window.location = target;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue