[Console Plugins][Console Recon Scripts] Fixed deletion macro
This commit is contained in:
parent
e752e26ee3
commit
cef3cb2ae0
|
@ -892,7 +892,7 @@ ui_require_javascript_file('pandora_modules');
|
|||
|
||||
// Delete macro
|
||||
var delete_macro_click_event = function (event) {
|
||||
delete_macro('table-form-plugin_');
|
||||
delete_macro_form('table-form-plugin_');
|
||||
update_preview();
|
||||
}
|
||||
$('div#delete_macro_button>a').click(delete_macro_click_event);
|
||||
|
|
|
@ -203,7 +203,7 @@ if (($create != "") OR ($view != "")) {
|
|||
if($i <= 2) {
|
||||
$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->rowstyle['recon_action'] = 'text-align:center';
|
||||
|
|
|
@ -497,7 +497,7 @@ function configure_modules_form () {
|
|||
|
||||
|
||||
// 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());
|
||||
// Is not possible delete first macro
|
||||
if (next_number == 3) {
|
||||
|
|
Loading…
Reference in New Issue