Set default button in oc-dialogs

This commit is contained in:
Thomas Tanghus 2013-06-03 03:31:33 +02:00
parent 5f1cbc6a1a
commit 46d4886709
1 changed files with 6 additions and 3 deletions

View File

@ -115,7 +115,8 @@ var OCdialogs = {
}; };
var buttonlist = [{ var buttonlist = [{
text: t('core', 'Choose'), text: t('core', 'Choose'),
click: functionToCall click: functionToCall,
defaultButton: true
}, },
{ {
text: t('core', 'Cancel'), text: t('core', 'Cancel'),
@ -164,7 +165,8 @@ var OCdialogs = {
click: function(){ click: function(){
if (callback !== undefined) { callback(true) }; if (callback !== undefined) { callback(true) };
$(dialog_id).ocdialog('close'); $(dialog_id).ocdialog('close');
} },
defaultButton: true
}, },
{ {
text: t('core', 'No'), text: t('core', 'No'),
@ -181,7 +183,8 @@ var OCdialogs = {
}; };
buttonlist[0] = { buttonlist[0] = {
text: t('core', 'Ok'), text: t('core', 'Ok'),
click: functionToCall click: functionToCall,
defaultButton: true
}; };
break; break;
}; };