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 2014/07/29 17:18:55 UTC

fauxton commit: updated refs/heads/secondary-indexes to afe5e70

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes 0f6071ecb -> afe5e70f6


Always show editor


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

Branch: refs/heads/secondary-indexes
Commit: afe5e70f6669eb2cc6fa035bfb675c28816db3da
Parents: 0f6071e
Author: deathbearbrown <de...@gmail.com>
Authored: Tue Jul 29 11:18:49 2014 -0400
Committer: deathbearbrown <de...@gmail.com>
Committed: Tue Jul 29 11:18:49 2014 -0400

----------------------------------------------------------------------
 app/addons/indexes/views.js | 36 ++++--------------------------------
 1 file changed, 4 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/afe5e70f/app/addons/indexes/views.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js
index 433b054..3e44350 100644
--- a/app/addons/indexes/views.js
+++ b/app/addons/indexes/views.js
@@ -38,7 +38,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
     template: "addons/indexes/templates/index_header"
   });
 
-  Views.NewIndexPlaceholder = FauxtonAPI.View.extend({
+  Views.PreviewScreen = FauxtonAPI.View.extend({
     template: "addons/indexes/templates/preview_screen",
     className: "watermark-logo"
   });
@@ -63,8 +63,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       "click button.preview": "previewView",
       "click #db-views-tabs-nav": 'toggleIndexNav',
       "click .beautify_map":  "beautifyCode",
-      "click .beautify_reduce":  "beautifyCode",
-      "click #query-options-wrapper": 'toggleIndexNav'
+      "click .beautify_reduce":  "beautifyCode"
     },
 
     langTemplates: {
@@ -359,28 +358,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       }, this);
     },
 
-    toggleIndexNav: function (event) {
-      $('#dashboard-content').scrollTop(0); //scroll up
-
-      var $targetId = this.$(event.target).attr('id'),
-          $previousTab = this.$(this.$('li.active a').attr('href')),
-          $targetTab = this.$(this.$(event.target).attr('href'));
-
-      if ($targetTab.attr('id') !== $previousTab.attr('id')) {
-        $previousTab.removeAttr('style');
-      }
-
-      if ($targetId === 'index-nav') {
-        if (this.newView) { return; }
-        var that = this;
-        $('#dashboard-content').scrollTop(0); //scroll up
-        $targetTab.toggle('slow', function(){
-           that.showEditors();
-        });
-      } else {
-        $targetTab.toggle('slow');
-      }
-    },
 
     serialize: function() {
       return {
@@ -477,13 +454,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       }
 
       this.designDocSelector.updateDesignDoc();
-      if (this.newView || this.showIndex) {
-        this.showEditors();
-        this.showIndex = false;
-      } else {
-        this.$('#index').hide();
-        this.$('#index-nav').parent().removeClass('active');
-      }
+      this.showEditors();
+      this.showIndex = false;
 
     },