From ed812735cf05adf5d51fa4451d2cd1381ec4ebc7 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 24 Nov 2015 21:27:06 +0100 Subject: [PATCH] allow specifying default dialog button rather than always focusing rightmost button use: default_button: "label" to explicitly request a button be the default. --- notebook/static/base/js/dialog.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/notebook/static/base/js/dialog.js b/notebook/static/base/js/dialog.js index 14212bfa5..769817410 100644 --- a/notebook/static/base/js/dialog.js +++ b/notebook/static/base/js/dialog.js @@ -75,6 +75,8 @@ define(function(require) { var footer = $("
").addClass("modal-footer"); + var default_button; + for (var label in options.buttons) { var btn_opts = options.buttons[label]; var button = $("