diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index cc8b8508c..f21d8fb5f 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -736,6 +736,21 @@ $(document).ready( function() { }); }); /* }}} */ + $("body").on("blur", "span.editorigname", function(e) { /* {{{ */ + e.preventDefault(); + $.post(seeddms_webroot+"op/op.Ajax.php", { command: "setoriginalname", contentid: $(this).data('content'), formtoken: $(this).data('formtoken'), name: $(this).text() }) + .done(function( data ) { + noty({ + text: data.message, + type: data.success ? 'success' : 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500 + }); + }); + }); /* }}} */ + $("body").on("keypress", "span.editable", function(e) { /* {{{ */ if(e.which == 13) { $(this).blur(); diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index d39b0ac65..25b47f341 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -784,6 +784,21 @@ $(document).ready( function() { }); }); /* }}} */ + $("body").on("blur", "span.editorigname", function(e) { /* {{{ */ + e.preventDefault(); + $.post(seeddms_webroot+"op/op.Ajax.php", { command: "setoriginalname", contentid: $(this).data('content'), formtoken: $(this).data('formtoken'), name: $(this).text() }) + .done(function( data ) { + noty({ + text: data.message, + type: data.success ? 'success' : 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500 + }); + }); + }); /* }}} */ + $("body").on("keypress", "span.editable", function(e) { /* {{{ */ if(e.which == 13) { $(this).blur();