mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
B #~: fix error redirect delete services (#1215)
Signed-off-by: Jorge Lobo <jlobo@opennebula.io> (cherry picked from commit 5d9d3ec9c8ca7be3293ed1a15e218b92d1acf1f6)
This commit is contained in:
parent
ae7163c640
commit
a77ce0cb82
@ -19,16 +19,16 @@ define(function(require) {
|
||||
DEPENDENCIES
|
||||
*/
|
||||
|
||||
var BaseDialog = require('utils/dialogs/dialog');
|
||||
var TemplateHTML = require('hbs!./generic-confirm/html');
|
||||
var Sunstone = require('sunstone');
|
||||
var Locale = require('utils/locale');
|
||||
var BaseDialog = require("utils/dialogs/dialog");
|
||||
var TemplateHTML = require("hbs!./generic-confirm/html");
|
||||
var Sunstone = require("sunstone");
|
||||
var Locale = require("utils/locale");
|
||||
|
||||
/*
|
||||
CONSTANTS
|
||||
*/
|
||||
|
||||
var DIALOG_ID = require('./generic-confirm/dialogId');
|
||||
var DIALOG_ID = require("./generic-confirm/dialogId");
|
||||
|
||||
/*
|
||||
CONSTRUCTOR
|
||||
@ -86,14 +86,14 @@ define(function(require) {
|
||||
|
||||
$(context).keypress(function (e) {
|
||||
if (e.which == 13 || e.keyCode == 13) {
|
||||
$('#' + DIALOG_ID + 'Form', context).submit();
|
||||
$("#" + DIALOG_ID + "Form", context).submit();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
$('#' + DIALOG_ID + 'Form', context).submit(function(e) {
|
||||
$("#" + DIALOG_ID + "Form", context).submit(function(e) {
|
||||
// With more than one button, skip
|
||||
if (that.params.buttons != undefined && that.params.buttons.length > 1){
|
||||
e.preventDefault();
|
||||
@ -109,10 +109,10 @@ define(function(require) {
|
||||
return false;
|
||||
});
|
||||
|
||||
$(context).on("click", ".custom_submit", function(){
|
||||
$(context).on("click", ".custom_submit", function(e){
|
||||
e.preventDefault();
|
||||
var index = $(this).attr("submit");
|
||||
that.params.submit[index]();
|
||||
|
||||
Sunstone.getDialog(DIALOG_ID).hide();
|
||||
return false;
|
||||
});
|
||||
@ -137,7 +137,7 @@ define(function(require) {
|
||||
var html = "";
|
||||
|
||||
$.each(this.params.buttons, function(i, text){
|
||||
html += '<button class="custom_submit radius button right" submit="'+i+'">'+text+'</button>';
|
||||
html += "<button class=\"custom_submit radius button right\" submit=\""+i+"\">"+text+"</button>";
|
||||
});
|
||||
|
||||
$(".form_buttons", context).html(html);
|
||||
|
Loading…
x
Reference in New Issue
Block a user