remove jquery deletion
jquery deletion was deleting the wrong image if there were multiple delete buttons on one page (eg, on the report image page); also it stands out awkwardly being the only bit of jquery UI on the site. Moving to jquery UI across the site might happen later, but for now I just want to get a release out...
This commit is contained in:
parent
6f4f4f3235
commit
537ae6de18
@ -142,7 +142,6 @@ class ImageIO extends Extension {
|
||||
if(function_exists("exif_read_data")) {
|
||||
$config->set_default_bool('image_show_meta', false);
|
||||
}
|
||||
$config->set_default_bool('image_jquery_confirm', true);
|
||||
$config->set_default_string('image_ilink', '');
|
||||
$config->set_default_string('image_tlink', '');
|
||||
$config->set_default_string('image_tip', '$tags // $size // $filesize');
|
||||
@ -252,7 +251,6 @@ class ImageIO extends Extension {
|
||||
if(function_exists("exif_read_data")) {
|
||||
$sb->add_bool_option("image_show_meta", "<br>Show metadata: ");
|
||||
}
|
||||
$sb->add_bool_option("image_jquery_confirm", "<br>Confirm Delete with jQuery: ");
|
||||
|
||||
$expires = array();
|
||||
$expires['1 Minute'] = 60;
|
||||
|
@ -9,21 +9,12 @@ class ImageIOTheme {
|
||||
public function get_deleter_html(/*int*/ $image_id) {
|
||||
global $config;
|
||||
|
||||
if($config->get_bool("image_jquery_confirm")) {
|
||||
$html = "
|
||||
".make_form(make_link("image_admin/delete"),'POST',false,'delete_image')."
|
||||
<input type='hidden' name='image_id' value='$image_id' />
|
||||
<input type='submit' value='Delete' id='delete_image_submit' />
|
||||
</form>
|
||||
";
|
||||
} else {
|
||||
$html = "
|
||||
".make_form(make_link("image_admin/delete"))."
|
||||
<input type='hidden' name='image_id' value='$image_id' />
|
||||
<input type='submit' value='Delete' onclick='return confirm(\"Delete the image?\");' />
|
||||
</form>
|
||||
";
|
||||
}
|
||||
$html = "
|
||||
".make_form(make_link("image_admin/delete"))."
|
||||
<input type='hidden' name='image_id' value='$image_id' />
|
||||
<input type='submit' value='Delete' onclick='return confirm(\"Delete the image?\");' />
|
||||
</form>
|
||||
";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
@ -1,31 +1,6 @@
|
||||
|
||||
// Adding jQuery ui stuff
|
||||
$(document).ready(function() {
|
||||
|
||||
var $confirm = $('<div id="dialog-confirm"></div>')
|
||||
.html('<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>This image will be permanently deleted and cannot be recovered. Are you sure?</p>')
|
||||
.dialog({
|
||||
resizable: false,
|
||||
height:220,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
title: 'Delete Image?',
|
||||
buttons: {
|
||||
"Delete Image": function() {
|
||||
$( this ).dialog( "close" );
|
||||
$('form#delete_image').submit();
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('form#delete_image #delete_image_submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$confirm.dialog('open');
|
||||
});
|
||||
|
||||
$("time").timeago();
|
||||
|
||||
$('.autocomplete_tags').autocomplete(base_href + '/api/internal/tag_list/complete', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user