|
|
@ -44,13 +44,13 @@ $.when( $.ready ).then(function() { |
|
|
|
|
|
|
|
reader.onload = function(e) { |
|
|
|
$('#appimage img').attr('src', e.target.result); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
reader.readAsDataURL(input.files[0]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$("#upload").change(function() { |
|
|
|
$('#upload').change(function() { |
|
|
|
readURL(this); |
|
|
|
}); |
|
|
|
/*$(".droppable").droppable({ |
|
|
@ -70,9 +70,9 @@ $.when( $.ready ).then(function() { |
|
|
|
} |
|
|
|
});*/ |
|
|
|
|
|
|
|
$( "#sortable" ).sortable({ |
|
|
|
$( '#sortable' ).sortable({ |
|
|
|
stop: function (event, ui) { |
|
|
|
var idsInOrder = $("#sortable").sortable('toArray', { |
|
|
|
var idsInOrder = $('#sortable').sortable('toArray', { |
|
|
|
attribute: 'data-id' |
|
|
|
}); |
|
|
|
$.post( |
|
|
@ -82,7 +82,7 @@ $.when( $.ready ).then(function() { |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
$("#sortable").sortable("disable"); |
|
|
|
$('#sortable').sortable('disable'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -95,12 +95,10 @@ $.when( $.ready ).then(function() { |
|
|
|
$('.add-item').hide(); |
|
|
|
$('.item-edit').hide(); |
|
|
|
$('#app').removeClass('sidebar'); |
|
|
|
$("#sortable").sortable("disable") |
|
|
|
$('#sortable').sortable('disable'); |
|
|
|
} else { |
|
|
|
$("#sortable").sortable("enable") |
|
|
|
setTimeout( |
|
|
|
function() |
|
|
|
{ |
|
|
|
$('#sortable').sortable('enable'); |
|
|
|
setTimeout(function() { |
|
|
|
$('.add-item').fadeIn(); |
|
|
|
$('.item-edit').fadeIn(); |
|
|
|
}, 350); |
|
|
@ -121,24 +119,21 @@ $.when( $.ready ).then(function() { |
|
|
|
e.preventDefault(); |
|
|
|
var apiurl = $('#create input[name=url]').val(); |
|
|
|
|
|
|
|
|
|
|
|
var override_url = $('#override_url'); |
|
|
|
if(override_url.length && override_url.val() != '') { |
|
|
|
var override_url = $('#create input[name="config[override_url]"').val(); |
|
|
|
if(override_url.length && override_url != '') { |
|
|
|
apiurl = override_url; |
|
|
|
} |
|
|
|
|
|
|
|
var data = {}; |
|
|
|
data['url'] = apiurl; |
|
|
|
$('input.config-item').each(function(index){ |
|
|
|
var config = $(this).data('config'); |
|
|
|
data[config] = $(this).val(); |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
$.post( |
|
|
|
'/test_config', |
|
|
|
{ data }, function(data) { |
|
|
|
$.post('/test_config', { data }, function(data) { |
|
|
|
alert(data); |
|
|
|
} |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
$('#pinlist').on('click', 'a', function(e) { |
|
|
|