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 16B20E8C1 for ; Mon, 11 Feb 2013 11:12:28 +0000 (UTC) Received: (qmail 53476 invoked by uid 500); 11 Feb 2013 11:12:27 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 53343 invoked by uid 500); 11 Feb 2013 11:12:26 -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 48462 invoked by uid 99); 11 Feb 2013 11:12:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2013 11:12:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 50A693C76E; Mon, 11 Feb 2013 11:12:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jan@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [11/50] [abbrv] git commit: Declare all variables in newDatabase at top of function Message-Id: <20130211111215.50A693C76E@tyr.zones.apache.org> Date: Mon, 11 Feb 2013 11:12:15 +0000 (UTC) Declare all variables in newDatabase at top of function Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c2163349 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c2163349 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c2163349 Branch: refs/heads/fauxton Commit: c2163349bdcd0454f8d0d1b2dccf4509eaff2bf0 Parents: c585708 Author: Mike Wallace Authored: Mon Jan 21 13:15:30 2013 +0000 Committer: Mike Wallace Committed: Mon Jan 21 13:15:30 2013 +0000 ---------------------------------------------------------------------- src/fauxton/app/modules/databases/views.js | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2163349/src/fauxton/app/modules/databases/views.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js index b069b85..fb4f608 100644 --- a/src/fauxton/app/modules/databases/views.js +++ b/src/fauxton/app/modules/databases/views.js @@ -99,6 +99,7 @@ function(app, FauxtonAPI) { newDatabase: function() { var notification; + var db; // TODO: use a modal here instead of the prompt var name = prompt('Name of database', 'newdatabase'); if (name === null) { @@ -111,7 +112,7 @@ function(app, FauxtonAPI) { }); return; } - var db = new this.collection.model({ + db = new this.collection.model({ id: encodeURIComponent(name), name: name });