Fix some small bugs with Dashboard navigation links
This commit is contained in:
parent
7d8c6dc90d
commit
ef892bb565
|
@ -18,7 +18,7 @@ $pages = array(
|
||||||
array(
|
array(
|
||||||
'label' => "<i class='icon-calendar icon-white'></i>"._('Calendar'),
|
'label' => "<i class='icon-calendar icon-white'></i>"._('Calendar'),
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'Schedule',
|
'controller' => 'schedule',
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
'resource' => 'schedule'
|
'resource' => 'schedule'
|
||||||
),
|
),
|
||||||
|
@ -48,13 +48,13 @@ $pages = array(
|
||||||
'resource' => 'preference',
|
'resource' => 'preference',
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'Preference',
|
'controller' => 'preference',
|
||||||
'title' => 'Settings',
|
'title' => 'Settings',
|
||||||
'pages' => array(
|
'pages' => array(
|
||||||
array(
|
array(
|
||||||
'label' => _('General'),
|
'label' => _('General'),
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'Preference'
|
'controller' => 'preference'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => _('My Profile'),
|
'label' => _('My Profile'),
|
||||||
|
@ -72,7 +72,7 @@ $pages = array(
|
||||||
array(
|
array(
|
||||||
'label' => _('Streams'),
|
'label' => _('Streams'),
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'Preference',
|
'controller' => 'preference',
|
||||||
'action' => 'stream-setting'
|
'action' => 'stream-setting'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -121,6 +121,7 @@ AIRTIME = (function(AIRTIME) {
|
||||||
$(".media_type_selector:first").addClass("highlight");
|
$(".media_type_selector:first").addClass("highlight");
|
||||||
var selected;
|
var selected;
|
||||||
if (location.hash === "") {
|
if (location.hash === "") {
|
||||||
|
location.hash = "tracks";
|
||||||
selected = $("a[href$='#tracks']");
|
selected = $("a[href$='#tracks']");
|
||||||
} else {
|
} else {
|
||||||
selected = $("a[href$='"+location.hash+"']");
|
selected = $("a[href$='"+location.hash+"']");
|
||||||
|
@ -137,10 +138,9 @@ AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
$(window).on('hashchange', function() {
|
$(window).on('hashchange', function() {
|
||||||
var selected = $("a[href$='"+location.hash+"']");
|
var selected = $("a[href$='"+location.hash+"']");
|
||||||
// If we click Dashboard from one of the media views, do nothing
|
var dashboardLink = $(".media_type_selector:first");
|
||||||
if (!location.hash) {
|
|
||||||
return;
|
dashboardLink.find("a").attr("href", selected.attr("href"));
|
||||||
}
|
|
||||||
AIRTIME.library.selectNone();
|
AIRTIME.library.selectNone();
|
||||||
$(".media_type_selector").each(function () {
|
$(".media_type_selector").each(function () {
|
||||||
$(this).removeClass("selected");
|
$(this).removeClass("selected");
|
||||||
|
@ -149,7 +149,7 @@ AIRTIME = (function(AIRTIME) {
|
||||||
oTable.fnDraw();
|
oTable.fnDraw();
|
||||||
$("#library_filter").text(selected.text());
|
$("#library_filter").text(selected.text());
|
||||||
// Highlight the dashboard link
|
// Highlight the dashboard link
|
||||||
$(".media_type_selector:first").addClass("highlight");
|
dashboardLink.addClass("highlight");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue