[Console Plugins][Console Recon Scripts] Fixed deletion macro

This commit is contained in:
fermin831 2018-02-22 16:13:25 +01:00
parent e752e26ee3
commit cef3cb2ae0
3 changed files with 3 additions and 3 deletions

View File

@ -892,7 +892,7 @@ ui_require_javascript_file('pandora_modules');
// Delete macro // Delete macro
var delete_macro_click_event = function (event) { var delete_macro_click_event = function (event) {
delete_macro('table-form-plugin_'); delete_macro_form('table-form-plugin_');
update_preview(); update_preview();
} }
$('div#delete_macro_button>a').click(delete_macro_click_event); $('div#delete_macro_button>a').click(delete_macro_click_event);

View File

@ -203,7 +203,7 @@ if (($create != "") OR ($view != "")) {
if($i <= 2) { if($i <= 2) {
$delete_macro_style = 'display:none;'; $delete_macro_style = 'display:none;';
} }
$datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.__('Delete macro').' <a href="javascript:delete_macro(\'table-form-recon_\');update_preview();">'.html_print_image('images/delete.png',true).'</a></div>'; $datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.__('Delete macro').' <a href="javascript:delete_macro_form(\'table-form-recon_\');update_preview();">'.html_print_image('images/delete.png',true).'</a></div>';
$table->colspan['recon_action'][0] = 2; $table->colspan['recon_action'][0] = 2;
$table->rowstyle['recon_action'] = 'text-align:center'; $table->rowstyle['recon_action'] = 'text-align:center';

View File

@ -497,7 +497,7 @@ function configure_modules_form () {
// Functions to add and remove dynamic fields for macros // Functions to add and remove dynamic fields for macros
function delete_macro(prefix) { function delete_macro_form(prefix) {
var next_number = parseInt($('#next_macro').html()); var next_number = parseInt($('#next_macro').html());
// Is not possible delete first macro // Is not possible delete first macro
if (next_number == 3) { if (next_number == 3) {