pagination = parseInt(this.params['splat'][0]);
current_app = 'browse';
$('#breadcrump').removeClass('hide').empty().append("<li><a uri=\"\" onclick=\"set_filter('')\">root</a></li>");
- $('#filter').removeClass('hide');
+ add_filter();
$('#salamisandwich').removeClass('hide').find("tr:gt(0)").remove();
$('#dirble_panel').addClass('hide');
socket.send('MPD_API_GET_BROWSE,'+pagination+','+(browsepath ? browsepath : "/"));
else
if ($.cookie("notification") === "true")
$('#btnnotify').addClass("active")
-
- add_filter();
});
function webSocketConnect() {
case 'directory':
var clazz = 'dir';
if (filter !== "") {
- var first = obj.data[item].dir[0];
+ var first = basename(obj.data[item].dir)[0];
if (filter === "num" && isNaN(first)) {
clazz += ' hide';
} else if (filter >= "A" && filter <= "Z" && first.toUpperCase() !== filter) {
}
function add_filter () {
+ $('#filter').empty();
$('#filter').append(' <a onclick="set_filter(\'\')" href="#/browse/'+pagination+'/'+browsepath+'">All</a>');
$('#filter').append(' <a id="fnum" onclick="set_filter(\'num\')" href="#/browse/'+pagination+'/'+browsepath+'">#</a>');
}
$('#filter').append(' <a id="fplist" onclick="set_filter(\'plist\')" href="#/browse/'+pagination+'/'+browsepath+'" class="glyphicon glyphicon-list"></a>');
+ $('#f' + filter).addClass('active');
+ $('#filter').removeClass('hide');
}