Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 543AE117B5 for ; Tue, 22 Jul 2014 07:32:08 +0000 (UTC) Received: (qmail 29821 invoked by uid 500); 22 Jul 2014 07:32:03 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 29733 invoked by uid 500); 22 Jul 2014 07:32:03 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 28036 invoked by uid 99); 22 Jul 2014 07:32:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2014 07:32:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7AA069AE94F; Tue, 22 Jul 2014 07:32:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: garren@apache.org To: commits@couchdb.apache.org Date: Tue, 22 Jul 2014 07:32:45 -0000 Message-Id: In-Reply-To: <0f519c14a89641fb8a4b5588bbe481a7@git.apache.org> References: <0f519c14a89641fb8a4b5588bbe481a7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [46/51] [abbrv] fauxton commit: updated refs/heads/Update-Sidebar to c713f63 Add accordian to sections Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/4f65da99 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/4f65da99 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/4f65da99 Branch: refs/heads/Update-Sidebar Commit: 4f65da99d488aac632f428ed28257637439a56f5 Parents: 0636139 Author: Garren Smith Authored: Tue Jun 3 16:44:18 2014 +0200 Committer: Garren Smith Committed: Tue Jul 22 09:28:59 2014 +0200 ---------------------------------------------------------------------- app/addons/documents/assets/less/documents.less | 16 +++++++++++ app/addons/documents/sidebarviews.js | 30 +++++++------------- .../documents/templates/design_doc_menu.html | 1 - .../documents/templates/index_menu_item.html | 20 +++++++++---- 4 files changed, 41 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4f65da99/app/addons/documents/assets/less/documents.less ---------------------------------------------------------------------- diff --git a/app/addons/documents/assets/less/documents.less b/app/addons/documents/assets/less/documents.less index cdcb3ed..b9dad2e 100644 --- a/app/addons/documents/assets/less/documents.less +++ b/app/addons/documents/assets/less/documents.less @@ -250,6 +250,7 @@ button.beautify { } > ul.accordion-body{ > li { + cursor: pointer; a{ padding-left: 36px; } @@ -263,6 +264,21 @@ button.beautify { font-size: 20px; } } + + li { + > a.down .fonticon-play { + .rotate(90deg); + } + + &:hover { + .fonticon-play { + color: white; + + } + } + + } + } } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4f65da99/app/addons/documents/sidebarviews.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/sidebarviews.js b/app/addons/documents/sidebarviews.js index 88233f6..d800154 100644 --- a/app/addons/documents/sidebarviews.js +++ b/app/addons/documents/sidebarviews.js @@ -129,31 +129,22 @@ function(app, FauxtonAPI, Components, Documents, Databases) { className: "nav nav-list", template: "addons/documents/templates/design_doc_menu", events: { - "click button": "no", "click .js-collapse-toggle": "toggleArrow" }, - initialize: function(){ - }, toggleArrow: function(e){ this.$(e.currentTarget).toggleClass("down"); }, - no: function(event){ - event.preventDefault(); - alert("no"); - }, buildIndexList: function(collection, selector, ddocType){ var design = this.model.id.replace(/^_design\//,""); - _.each(_.keys(collection[selector]), function(key){ - this.insertView(".accordion-body", new Views.IndexItem({ - selector: selector, - ddoc: design, - index: key, - ddocType: ddocType, - database: this.model.collection.database.id - })); - }, this); + this.insertView(".accordion-body", new Views.IndexItem({ + selector: selector, + ddoc: design, + collection: collection[selector], + ddocType: ddocType, + database: this.model.collection.database.id + })); }, serialize: function(){ @@ -217,7 +208,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) { Views.IndexItem = FauxtonAPI.View.extend({ template: "addons/documents/templates/index_menu_item", - tagName: "li", + tagName: 'li', initialize: function(options){ this.index = options.index; @@ -231,11 +222,12 @@ function(app, FauxtonAPI, Components, Documents, Databases) { serialize: function() { return { icon: this.ddocType, - type: this.ddocType, + ddocType: this.ddocType, index: this.index, ddoc: this.ddoc, database: this.database, - selected: this.selected + selected: this.selected, + collection: this.collection }; }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4f65da99/app/addons/documents/templates/design_doc_menu.html ---------------------------------------------------------------------- diff --git a/app/addons/documents/templates/design_doc_menu.html b/app/addons/documents/templates/design_doc_menu.html index beb0c85..e471103 100644 --- a/app/addons/documents/templates/design_doc_menu.html +++ b/app/addons/documents/templates/design_doc_menu.html @@ -23,7 +23,6 @@ the License.
  • -
    Design Doc Metadata
    http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4f65da99/app/addons/documents/templates/index_menu_item.html ---------------------------------------------------------------------- diff --git a/app/addons/documents/templates/index_menu_item.html b/app/addons/documents/templates/index_menu_item.html index 04995f3..42dc2db 100644 --- a/app/addons/documents/templates/index_menu_item.html +++ b/app/addons/documents/templates/index_menu_item.html @@ -11,10 +11,18 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> + +
    + + <%- ddocType %> +
    + - - <% if (icon) { %> - - <% } %> - <%- index %> -