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 0C9F810A20 for ; Tue, 28 Jan 2014 16:49:48 +0000 (UTC) Received: (qmail 94466 invoked by uid 500); 28 Jan 2014 16:49:47 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 94428 invoked by uid 500); 28 Jan 2014 16:49:46 -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 94421 invoked by uid 99); 28 Jan 2014 16:49:46 -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, 28 Jan 2014 16:49:46 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7878090A1D5; Tue, 28 Jan 2014 16:49:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: deathbear@apache.org To: commits@couchdb.apache.org Message-Id: <4f0f40b110f8422f8beef6fba867466f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: couchdb commit: updated refs/heads/master to 6d171cb Date: Tue, 28 Jan 2014 16:49:46 +0000 (UTC) Updated Branches: refs/heads/master bcb6e04af -> 6d171cbec Fix for beautify to work with require.js Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6d171cbe Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6d171cbe Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6d171cbe Branch: refs/heads/master Commit: 6d171cbecc3338f11d72c5aa3218d791d6e2363a Parents: bcb6e04 Author: suelockwood Authored: Tue Jan 28 10:39:05 2014 -0500 Committer: suelockwood Committed: Tue Jan 28 11:31:37 2014 -0500 ---------------------------------------------------------------------- .../addons/documents/templates/view_editor.html | 4 ++-- src/fauxton/app/addons/documents/views.js | 4 ++-- src/fauxton/assets/js/plugins/beautify.js | 17 ++++------------- 3 files changed, 8 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/6d171cbe/src/fauxton/app/addons/documents/templates/view_editor.html ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/documents/templates/view_editor.html b/src/fauxton/app/addons/documents/templates/view_editor.html index bf31ba2..d02971e 100644 --- a/src/fauxton/app/addons/documents/templates/view_editor.html +++ b/src/fauxton/app/addons/documents/templates/view_editor.html @@ -41,7 +41,7 @@ the License.
<%= langTemplates.map %>
<% } else { %>
<%- ddoc.get('views')[viewName].map %>
- + <% } %> @@ -64,7 +64,7 @@ the License.
<%= langTemplates.reduce %>
<% } else { %>
<%- ddoc.get('views')[viewName].reduce %>
- + <% } %> http://git-wip-us.apache.org/repos/asf/couchdb/blob/6d171cbe/src/fauxton/app/addons/documents/views.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js index e2f5578..9516355 100644 --- a/src/fauxton/app/addons/documents/views.js +++ b/src/fauxton/app/addons/documents/views.js @@ -1630,7 +1630,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum this.reduceEditor.render(); if (this.reduceEditor.getLines() === 1){ - this.$('.beautify_reduce').removeClass("hidden"); + this.$('.beautify_reduce').removeClass("hide"); $('.beautify-tooltip').tooltip(); } }, @@ -1709,7 +1709,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum this.reduceEditor && this.reduceEditor.editSaved(); if (this.mapEditor.getLines() === 1){ - this.$('.beautify_map').removeClass("hidden"); + this.$('.beautify_map').removeClass("hide"); $('.beautify-tooltip').tooltip(); } }, http://git-wip-us.apache.org/repos/asf/couchdb/blob/6d171cbe/src/fauxton/assets/js/plugins/beautify.js ---------------------------------------------------------------------- diff --git a/src/fauxton/assets/js/plugins/beautify.js b/src/fauxton/assets/js/plugins/beautify.js index e934fe3..07b6617 100644 --- a/src/fauxton/assets/js/plugins/beautify.js +++ b/src/fauxton/assets/js/plugins/beautify.js @@ -1611,19 +1611,10 @@ } - if (typeof define === "function") { - // Add support for require.js - if (typeof define.amd === "undefined") { - define(function(require, exports, module) { - exports.js_beautify = js_beautify; - }); - } else { - // if is AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) - define([], function() { - return js_beautify; - }); - } - + if (typeof define === "function" && define.amd) { + define([], function() { + return js_beautify; + }); } else if (typeof exports !== "undefined") { // Add support for CommonJS. Just put this file somewhere on your require.paths // and you will be able to `var js_beautify = require("beautify").js_beautify`.