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