You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2013/12/26 17:17:56 UTC

[1/2] git commit: updated refs/heads/master to bc37880

Updated Branches:
  refs/heads/master 4ed8a8ad1 -> bc378807a


Autocomplete fix for searching docs


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

Branch: refs/heads/master
Commit: c18c2f116298efd0b0642c7c63599c2e0a45844c
Parents: 4ed8a8a
Author: suelockwood <de...@apache.org>
Authored: Thu Dec 26 10:47:24 2013 -0500
Committer: suelockwood <de...@apache.org>
Committed: Thu Dec 26 10:47:24 2013 -0500

----------------------------------------------------------------------
 src/fauxton/app/templates/databases/list.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c18c2f11/src/fauxton/app/templates/databases/list.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/list.html b/src/fauxton/app/templates/databases/list.html
index 3e73294..31c0977 100644
--- a/src/fauxton/app/templates/databases/list.html
+++ b/src/fauxton/app/templates/databases/list.html
@@ -15,7 +15,7 @@ the License.
 <div class="result-tools" style="">
   <div id="newButton" class="pull-left"></div>
   <form id="jump-to-db" class="navbar-form pull-right input-append database-search">
-    <input type="text" name="search-query" placeholder="Database name"></input>
+    <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name"></input>
     <button class="fonticon-search btn button red " type="submit"></button>
   </form>
 


[2/2] git commit: updated refs/heads/master to bc37880

Posted by de...@apache.org.
Add messaging while waiting for DB to delete.
Remove buttons from the bottom of the editor


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

Branch: refs/heads/master
Commit: bc378807a944f37d3ba45f293f3b4c1f87728a5b
Parents: c18c2f1
Author: suelockwood <de...@apache.org>
Authored: Thu Dec 26 11:17:49 2013 -0500
Committer: suelockwood <de...@apache.org>
Committed: Thu Dec 26 11:17:49 2013 -0500

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js   | 106 ++++++++++++----------
 src/fauxton/app/templates/documents/doc.html |  17 ++--
 2 files changed, 64 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/bc378807/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 96314ad..a0775a1 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -31,52 +31,55 @@ define([
 function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColumns) {
   var Views = {};
 
-  Views.Tabs = FauxtonAPI.View.extend({
-    template: "templates/documents/tabs",
-    initialize: function(options){
-      this.collection = options.collection;
-      this.database = options.database;
-      this.active_id = options.active_id;
-    },
-
-    events: {
-      "click #delete-database": "delete_database"
-    },
-
-    serialize: function () {
-      return {
-        // TODO make this not hard coded here
-        changes_url: '#' + this.database.url('changes'),
-        db_url: '#' + this.database.url('index') + '?limit=' + Databases.DocLimit,
-      };
-    },
-
-    beforeRender: function(manage) {
-      this.insertView("#search", new Views.SearchBox({
-        collection: this.collection,
-        database: this.database.id
-      }));
-    },
-
-    afterRender: function () {
-      if (this.active_id) {
-        this.$('.active').removeClass('active');
-        this.$('#'+this.active_id).addClass('active');
-      }
-    },
-
-    delete_database: function (event) {
-      event.preventDefault();
-
-      var result = confirm("Are you sure you want to delete this database?");
-
-      if (!result) { return; }
-
-      return this.database.destroy().done(function () {
-        app.router.navigate('#/_all_dbs', {trigger: true});
-      });
-    }
-  });
+  // Views.Tabs = FauxtonAPI.View.extend({
+  //   template: "templates/documents/tabs",
+  //   initialize: function(options){
+  //     this.collection = options.collection;
+  //     this.database = options.database;
+  //     this.active_id = options.active_id;
+  //   },
+
+  //   events: {
+  //     "click #delete-database": "delete_database"
+  //   },
+
+  //   serialize: function () {
+  //     return {
+  //       // TODO make this not hard coded here
+  //       changes_url: '#' + this.database.url('changes'),
+  //       db_url: '#' + this.database.url('index') + '?limit=' + Databases.DocLimit,
+  //     };
+  //   },
+
+  //   beforeRender: function(manage) {
+  //     this.insertView("#search", new Views.SearchBox({
+  //       collection: this.collection,
+  //       database: this.database.id
+  //     }));
+  //   },
+
+  //   afterRender: function () {
+  //     if (this.active_id) {
+  //       this.$('.active').removeClass('active');
+  //       this.$('#'+this.active_id).addClass('active');
+  //     }
+  //   },
+
+  //   delete_database: function (event) {
+  //     event.preventDefault();
+
+  //     var result = confirm("Are you sure you want to delete this database?");
+
+  //     if (!result) { return; }
+  //     FauxtonAPI.addNotification({
+  //       msg: "Deleting your database...",
+  //       type: "error"
+  //     });
+  //     return this.database.destroy().done(function () {
+  //       app.router.navigate('#/_all_dbs', {trigger: true});
+  //     });
+  //   }
+  // });
 
   Views.SearchBox = FauxtonAPI.View.extend({
     template: "templates/documents/search",
@@ -1661,16 +1664,23 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
       if (!result) { return; }
       var databaseName = this.database.id;
+      FauxtonAPI.addNotification({
+        msg: "Deleting your database...",
+        type: "error",
+        clear: true
+      });
 
       this.database.destroy().then(function () {
         FauxtonAPI.navigate('#/_all_dbs');
         FauxtonAPI.addNotification({
-          msg: 'The database ' + databaseName + ' has been deleted.'
+          msg: 'The database ' + databaseName + ' has been deleted.',
+          clear: true
         });
       }).fail(function (rsp, error, msg) {
         FauxtonAPI.addNotification({
           msg: 'Could not delete the database, reason ' + msg + '.',
-          type: 'error'
+          type: 'error',
+          clear: true
         });
       });
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bc378807/src/fauxton/app/templates/documents/doc.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/doc.html b/src/fauxton/app/templates/documents/doc.html
index 82f2733..10bbf8b 100644
--- a/src/fauxton/app/templates/documents/doc.html
+++ b/src/fauxton/app/templates/documents/doc.html
@@ -17,14 +17,14 @@ the License.
    
 <div class="row doc-editor-buttons"> 
   <div class="span3">
-    <button class="save-doc button green btn-large save fonticon-circle-check" type="button">Save</button>
-    <button class="button cancel-button gray btn-large">Back to _all_docs</button>
+    <button class="save-doc button green btn-medium save fonticon-circle-check" type="button">Save</button>
+    <button class="button cancel-button gray btn-medium">Back to _all_docs</button>
   </div>
 
   <div class="span7">
     <% if (attachments) { %>
     <div class="btn-group">
-      <a class="button gray btn-large dropdown-toggle btn" data-bypass="true" data-toggle="dropdown" href="#">
+      <a class="button gray btn-medium dropdown-toggle btn" data-bypass="true" data-toggle="dropdown" href="#">
         View Attachments
         <span class="caret"></span>
       </a>
@@ -39,11 +39,11 @@ the License.
       </ul>
     </div>
     <% } %> 
-    <button class="button gray btn-large  upload"><i class="icon-circle-arrow-up"></i> Upload Attachment</button>
-    <button class="button gray btn-large  duplicate"><i class="icon-repeat"></i> Duplicate document</button>
+    <button class="button gray btn-medium  upload"><i class="icon-circle-arrow-up"></i> Upload Attachment</button>
+    <button class="button gray btn-medium duplicate"><i class="icon-repeat"></i> Duplicate document</button>
   </div>
 
-  <button class="button red btn-large delete"><i class="icon-trash"></i></button>
+  <button class="button red btn-medium delete"><i class="icon-trash"></i></button>
   </ul>
 
 <div id="upload-modal"> </div>
@@ -51,10 +51,5 @@ the License.
 </div>
 
   <div id="editor-container" class="doc-code"><%- JSON.stringify(doc.attributes, null, "  ") %></div>
-  <br />
-  <p>
-       <button class="save-doc button green btn-large save fonticon-circle-check" type="button">Save</button>
-       <button class="button gray btn-large cancel-button outlineGray fonticon-circle-x" type="button">Cancel</button>
-  </p>
 
 </div>