FAQ
Repository: couchdb-fauxton
Updated Branches:
   refs/heads/master c7fa6fad7 -> 4462944c7


Add auto focus to Delete DB modal

This ticket:
- Updates ModalView to default to focus on the first visible text field
by default.
- Updates the error message when the user fails to type in the database
name correctly.

Closes COUCHDB-2508


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/4462944c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/4462944c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/4462944c

Branch: refs/heads/master
Commit: 4462944c7dbd80c27ec585bbb8da5cc52b4d3b5c
Parents: c7fa6fa
Author: Benjamin Keen <ben.keen@gmail.com>
Authored: Fri Dec 12 13:37:46 2014 -0800
Committer: Benjamin Keen <ben.keen@gmail.com>
Committed: Tue Dec 16 10:06:26 2014 -0800

----------------------------------------------------------------------
  app/addons/documents/views.js | 2 +-
  app/addons/fauxton/components.js | 7 +++++++
  2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4462944c/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index dc47feb..f1bf56a 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -149,7 +149,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)

        var enteredName = $('#db_name').val();
        if (this.database.id != enteredName) {
- this.set_error_msg(enteredName + " does not match database id - are you sure you want to delete " + this.database.id + "?");
+ this.set_error_msg(enteredName + " does not match the database name.");
          return;
        }


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4462944c/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index ccb4168..38eaeaa 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -553,6 +553,13 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
        _.bindAll(this);
      },

+ afterRender: function () {
+ var that = this;
+ this.$('.modal').on('shown', function () {
+ that.$('input:text:visible:first').focus();
+ });
+ },
+
      showModal: function () {
        if (this._showModal){ this._showModal();}
        this.clear_error_msg();

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriescouchdb
postedDec 16, '14 at 6:06p
activeDec 16, '14 at 6:06p
posts1
users1
websitecouchdb.apache.org
irc#couchdb

1 user in discussion

Benkeen: 1 post

People

Translate

site design / logo © 2021 Grokbase