Check that bookmark save succeeded
If not, enable the old "Save new bookmarks" button. Also * add icons for buttons * simplify invert URL handling.
This commit is contained in:
parent
1a08892868
commit
b8964c8017
@ -1,12 +1,5 @@
|
|||||||
var handle = 0;
|
var handle = 0;
|
||||||
|
|
||||||
function escapestring(str)
|
|
||||||
{
|
|
||||||
str = JSON.stringify(String(str));
|
|
||||||
str = str.substring(1, str.length - 1);
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
function update()
|
function update()
|
||||||
{
|
{
|
||||||
$.get('progress.jim', {
|
$.get('progress.jim', {
|
||||||
@ -27,7 +20,8 @@ $('[type="checkbox"]').iphoneStyle({
|
|||||||
|
|
||||||
$('#progressbar').reportprogress(0);
|
$('#progressbar').reportprogress(0);
|
||||||
|
|
||||||
$('#back').button().click(function() {
|
$('#back').button({icons: {primary: "ui-icon-arrowreturnthick-1-w"}})
|
||||||
|
.on('click', function() {
|
||||||
window.location = '/go/browse?dir=' + $('#params').attr('dir');
|
window.location = '/go/browse?dir=' + $('#params').attr('dir');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -44,10 +38,17 @@ $('#save').button({icons: {primary: "ui-icon-disk"}})
|
|||||||
.slideUp('slow');
|
.slideUp('slow');
|
||||||
$('#originalbookmarks')
|
$('#originalbookmarks')
|
||||||
.html($('#newbookmarks').clone());
|
.html($('#newbookmarks').clone());
|
||||||
|
$('#esttime').hide();
|
||||||
|
if ($('#results').html().indexOf(' successful') < 0) {
|
||||||
|
$('#saveit').hide();
|
||||||
|
$('#saveitlabel').hide();
|
||||||
|
$('#save').show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#cropit').button().click(function() {
|
$('#cropit').button({icons: {primary: "ui-icon-scissors"}})
|
||||||
|
.on('click', function() {
|
||||||
$('#cropdiv').hide('slow');
|
$('#cropdiv').hide('slow');
|
||||||
$('#progressdiv').show('slow');
|
$('#progressdiv').show('slow');
|
||||||
$('#back').hide();
|
$('#back').hide();
|
||||||
@ -73,9 +74,9 @@ $('#cropit').button().click(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#invert').button().on('click', function() {
|
$('#invert').button({icons: {primary: "ui-icon-shuffle"}})
|
||||||
window.location = 'crop.jim?file=' +
|
.on('click', function() {
|
||||||
escapestring($('#params').attr('file')) +
|
window.location = window.location.href.replace(/&invert=[01]/,'') +
|
||||||
'&invert=' + ($(this).attr('invert') == '1' ? '0' : '1');
|
'&invert=' + ($(this).attr('invert') == '1' ? '0' : '1');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user