nginxsonarrradarrplexorganizrdashboardbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallembycouchpotatonzbget
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.0 KiB
74 lines
2.0 KiB
$.when( $.ready ).then(function() {
|
|
|
|
if($('.message-container').length) {
|
|
setTimeout(
|
|
function()
|
|
{
|
|
$('.message-container').fadeOut();
|
|
}, 3500);
|
|
|
|
|
|
}
|
|
|
|
$( "#sortable" ).sortable({
|
|
stop: function (event, ui) {
|
|
var idsInOrder = $("#sortable").sortable('toArray', {
|
|
attribute: 'data-id'
|
|
});
|
|
$.post(
|
|
'/order',
|
|
{ order:idsInOrder }
|
|
);
|
|
}
|
|
|
|
});
|
|
$("#sortable").sortable("disable");
|
|
|
|
|
|
$('.color-picker').each( function( i, elem ) {
|
|
var hueb = new Huebee( elem, {
|
|
// options
|
|
});
|
|
});
|
|
$('#app').on('click', '#config-button', function(e) {
|
|
e.preventDefault();
|
|
var app = $('#app');
|
|
var active = (app.hasClass('header'));
|
|
app.toggleClass('header');
|
|
if(active) {
|
|
$('.add-item').hide();
|
|
$('#app').removeClass('sidebar');
|
|
$("#sortable").sortable("disable")
|
|
} else {
|
|
$("#sortable").sortable("enable")
|
|
setTimeout(
|
|
function()
|
|
{
|
|
$('.add-item').fadeIn();
|
|
}, 350);
|
|
|
|
}
|
|
}).on('click', '#add-item, #pin-item', function(e) {
|
|
e.preventDefault();
|
|
var app = $('#app');
|
|
var active = (app.hasClass('sidebar'));
|
|
app.toggleClass('sidebar');
|
|
|
|
}).on('click', '.close-sidenav', function(e) {
|
|
e.preventDefault();
|
|
var app = $('#app');
|
|
app.removeClass('sidebar');
|
|
|
|
});
|
|
$('#pinlist').on('click', 'a', function(e) {
|
|
e.preventDefault();
|
|
var current = $(this);
|
|
var id = current.data('id');
|
|
$.get('items/pintoggle/'+id+'/true', function(data) {
|
|
var inner = $(data).filter('#sortable').html();
|
|
$('#sortable').html(inner);
|
|
current.toggleClass('active');
|
|
});
|
|
});
|
|
|
|
});
|