File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 14511451 }
14521452 } ,
14531453 action : function ( args ) {
1454+ var queryParams = "deleteTemplate&id=" + args . context . templates [ 0 ] . id ;
1455+ if ( ! args . context . templates [ 0 ] . crossZones ) {
1456+ queryParams += "&zoneid=" + args . context . zones [ 0 ] . zoneid ;
1457+ }
14541458 $ . ajax ( {
1455- url : createURL ( "deleteTemplate&id=" + args . context . templates [ 0 ] . id + "&zoneid=" + args . context . zones [ 0 ] . zoneid ) ,
1459+ url : createURL ( queryParams ) ,
14561460 dataType : "json" ,
14571461 async : true ,
14581462 success : function ( json ) {
25362540 }
25372541 } ,
25382542 action : function ( args ) {
2539- var array1 = [ ] ;
2540- if ( args . context . zones [ 0 ] . zoneid != null )
2541- array1 . push ( "&zoneid=" + args . context . zones [ 0 ] . zoneid ) ;
2542-
2543+ var queryParams = "deleteIso&id=" + args . context . isos [ 0 ] . id ;
2544+ if ( ! args . context . isos [ 0 ] . crossZones ) {
2545+ queryParams += "&zoneid=" + args . context . zones [ 0 ] . zoneid ;
2546+ }
25432547 $ . ajax ( {
2544- url : createURL ( "deleteIso&id=" + args . context . isos [ 0 ] . id + "&zoneid=" + args . context . zones [ 0 ] . zoneid ) ,
2548+ url : createURL ( queryParams ) ,
25452549 dataType : "json" ,
25462550 async : true ,
25472551 success : function ( json ) {
You can’t perform that action at this time.
0 commit comments