]> source.dussan.org Git - nextcloud-server.git/commitdiff
Set default button in oc-dialogs
authorThomas Tanghus <thomas@tanghus.net>
Mon, 3 Jun 2013 01:31:33 +0000 (03:31 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 3 Jun 2013 01:31:33 +0000 (03:31 +0200)
core/js/oc-dialogs.js

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