fauxton commit: updated refs/heads/master to 4a40e3f

2015-03-31 Thread garren
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master b671e75a3 - 4a40e3f9e


Remove Secure from Cookie in dev proxy

Remove Secure from the Cookie so that this will work with a CouchDB
instance that is using https and a Secure cookie.


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

Branch: refs/heads/master
Commit: 4a40e3f9e19f6f53de585a0885ac983ccb111f00
Parents: b671e75
Author: Garren Smith garren.sm...@gmail.com
Authored: Tue Mar 31 10:46:14 2015 +0200
Committer: Garren Smith garren.sm...@gmail.com
Committed: Tue Mar 31 11:09:01 2015 +0200

--
 tasks/couchserver.js | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4a40e3f9/tasks/couchserver.js
--
diff --git a/tasks/couchserver.js b/tasks/couchserver.js
index d79e556..63784ec 100644
--- a/tasks/couchserver.js
+++ b/tasks/couchserver.js
@@ -68,7 +68,7 @@ module.exports = function (grunt) {
 // server js from app directory
 filePath = path.join(app_dir, url.replace('/_utils/fauxton/', ''));
   } else if (!!url.match(/ZeroClipboard/)) {
-filePath = ./assets/js/plugins/zeroclipboard/ZeroClipboard.swf
+filePath = ./assets/js/plugins/zeroclipboard/ZeroClipboard.swf;
   } else if (!!url.match(/testrunner/)) {
 var testSetup = grunt.util.spawn({cmd: 'grunt', grunt: true, args: 
['test_inline']}, function (error, result, code) {/* 
log.writeln(String(result));*/ });
 testSetup.stdout.pipe(process.stdout);
@@ -77,7 +77,7 @@ module.exports = function (grunt) {
   } else if (url === '/'  accept[0] !== 'application/json') {
 // serve main index file from here
 filePath = path.join(dist_dir, 'index.html');
-  };
+  }
 
   if (/_utils\/docs/.test(filePath)) {
 filePath = false;
@@ -102,7 +102,8 @@ module.exports = function (grunt) {
   // This sets the Host header in the proxy so that one can use external
   // CouchDB instances and not have the Host set to 'localhost'
   var urlObj = urlLib.parse(req.url);
-  req.headers['host'] = urlObj.host;
+  req.headers.host = urlObj.host;
+
 
   proxy.web(req, res);
 }).listen(port);
@@ -111,6 +112,14 @@ module.exports = function (grunt) {
   // don't explode on cancelled requests
 });
 
+//Remove Secure on the cookie if the proxy is communicating to a CouchDB 
instance
+// via https.
+proxy.on('proxyRes', function (proxyRes, req, res) {
+  if (proxyRes.headers['set-cookie']) {
+proxyRes.headers['set-cookie'][0] = 
proxyRes.headers[set-cookie][0].replace('Secure', '');
+  }
+});
+
 // Fail this task if any errors have been logged
 if (grunt.errors) {
   return false;



fabric commit: updated refs/heads/2643-fix-arity to a7cb8fd

2015-03-31 Thread rnewson
Repository: couchdb-fabric
Updated Branches:
  refs/heads/2643-fix-arity [created] a7cb8fd3e


Call the correct before_doc_update arity

bug introduced in COUCHDB-510

fixes COUCHDB-2630 COUCHDB-2632 COUCHDB-2643


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

Branch: refs/heads/2643-fix-arity
Commit: a7cb8fd3edd4ec21ad0cec4a96a2c496ccc3e7a8
Parents: 985f136
Author: Robert Newson rnew...@apache.org
Authored: Tue Mar 31 14:04:19 2015 +0100
Committer: Robert Newson rnew...@apache.org
Committed: Tue Mar 31 14:04:19 2015 +0100

--
 src/fabric_doc_update.erl | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/a7cb8fd3/src/fabric_doc_update.erl
--
diff --git a/src/fabric_doc_update.erl b/src/fabric_doc_update.erl
index 4febe13..ad7d752 100644
--- a/src/fabric_doc_update.erl
+++ b/src/fabric_doc_update.erl
@@ -21,7 +21,7 @@
 go(_, [], _) -
 {ok, []};
 go(DbName, AllDocs0, Opts) -
-AllDocs1 = before_doc_update(DbName, AllDocs0),
+AllDocs1 = before_doc_update(DbName, AllDocs0, Opts),
 AllDocs = tag_docs(AllDocs1),
 validate_atomic_update(DbName, AllDocs, lists:member(all_or_nothing, 
Opts)),
 Options = lists:delete(all_or_nothing, Opts),
@@ -98,12 +98,13 @@ handle_message({not_found, no_db_file} = X, Worker, Acc0) -
 handle_message({bad_request, Msg}, _, _) -
 throw({bad_request, Msg}).
 
-before_doc_update(DbName, Docs) -
+before_doc_update(DbName, Docs, Opts) -
+Db = fake_db(Opts),
 case {is_replicator_db(DbName), is_users_db(DbName)} of
 {true, _} -
-lists:map(fun couch_replicator_manager:before_doc_update/1, Docs);
+[couch_replicator_manager:before_doc_update(Doc, Db) || Doc - 
Docs];
 {_, true} -
-lists:map(fun couch_users_db:before_doc_update/1, Docs);
+[couch_users_db:before_doc_update(Doc, Db) || Doc - Docs];
 _ -
 Docs
 end.
@@ -120,6 +121,10 @@ is_users_db(DbName) -
 path_ends_with(Path, Suffix) -
 Suffix == lists:last(binary:split(mem3:dbname(Path), /, [global])).
 
+fake_db(Opts) -
+{user_ctx, UserCtx} = lists:keyfind(user_ctx, 1, Opts),
+#db{user_ctx = UserCtx}.
+
 tag_docs([]) -
 [];
 tag_docs([#doc{meta=Meta}=Doc | Rest]) -



fauxton commit: updated refs/heads/master to d7641f1

2015-03-31 Thread robertkowalski
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 4a40e3f9e - d7641f16e


Mango: creation and listing of indexes

Part 1/2 for Mango:

Creation of Mango indexes and listing them. Disabled pagination
and bulk-deletion for now, see:

https://issues.apache.org/jira/browse/COUCHDB-2651
https://issues.apache.org/jira/browse/COUCHDB-2652

Use the direct urls to access the features:

http://localhost:8000/#database/$YOUR_DATABASE/_index
http://localhost:8000/#database/$YOUR_DATABASE/_indexlist

Additionally prepares the app for i18n.

Additionally removes the listing of Mango created indexes which
are not editable from the sidebar

COUCHDB-2627

PR: #343
PR-URL: https://github.com/apache/couchdb-fauxton/pull/343
Reviewed-By: garren smith garren.sm...@gmail.com


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

Branch: refs/heads/master
Commit: d7641f16e7a12faff896136826b43f7affb0a393
Parents: 4a40e3f
Author: Robert Kowalski robertkowal...@apache.org
Authored: Fri Mar 27 14:16:43 2015 +0100
Committer: Robert Kowalski robertkowal...@apache.org
Committed: Tue Mar 31 17:20:15 2015 +0200

--
 Gruntfile.js|   7 +
 app/addons/components/assets/less/docs.less |   6 +
 .../components/react-components.react.jsx   |  43 +++--
 app/addons/components/tests/docSpec.react.jsx   |  19 ++-
 app/addons/documents/base.js|  28 
 app/addons/documents/index-editor/stores.js |   4 +-
 app/addons/documents/index-results/actions.js   |   2 +-
 .../index-results.components.react.jsx  |  16 +-
 app/addons/documents/index-results/stores.js|  29 +++-
 .../tests/index-results.actionsSpec.js  |   8 +
 .../tests/index-results.storesSpec.js   |  20 +--
 app/addons/documents/mango/mango.actions.js |  58 +++
 app/addons/documents/mango/mango.actiontypes.js |  17 ++
 .../documents/mango/mango.components.react.jsx  | 156 +++
 app/addons/documents/mango/mango.stores.js  |  63 
 .../mango/tests/mango.componentsSpec.react.jsx  |  93 +++
 app/addons/documents/resources.js   |  71 +
 app/addons/documents/routes-documents.js|  29 +---
 app/addons/documents/routes-index-editor.js |   4 +-
 app/addons/documents/routes-mango.js| 154 ++
 app/addons/documents/routes.js  |   9 +-
 app/addons/documents/shared-resources.js|   8 +
 app/addons/documents/shared-routes.js   |  22 +++
 app/addons/documents/shared-views.js|   5 +
 app/addons/documents/tests/headerSpec.react.jsx |   2 +-
 .../documents/tests/nightwatch/mangoIndex.js|  48 ++
 .../tests/nightwatch/mangoIndexList.js  |  29 
 app/addons/documents/tests/resourcesSpec.js |  95 ++-
 .../tests/viewIndex.componentsSpec.react.jsx|  87 ++-
 app/addons/documents/views-mango.js |  66 
 app/initialize.js.underscore|   3 +-
 i18n.json.default   |   8 +
 package.json|   1 +
 tasks/fauxton.js|  11 +-
 tasks/helper.js |  11 ++
 .../custom-commands/populateDatabase.js |  30 +++-
 36 files changed, 1164 insertions(+), 98 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d7641f16/Gruntfile.js
--
diff --git a/Gruntfile.js b/Gruntfile.js
index 781d97d..719f23c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -121,6 +121,13 @@ module.exports = function (grunt) {
 };
 
 var settings = helper.readSettingsFile();
+
+var i18n = JSON.stringify(helper.readI18nFile(), null, ' ');
+
+['development', 'release', 'couchapp'].forEach(function (key) {
+  settings.template[key].app.i18n = i18n;
+});
+
 return settings.template || defaultSettings;
   }();
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d7641f16/app/addons/components/assets/less/docs.less
--
diff --git a/app/addons/components/assets/less/docs.less 
b/app/addons/components/assets/less/docs.less
index 97957c2..3f8a8f8 100644
--- a/app/addons/components/assets/less/docs.less
+++ b/app/addons/components/assets/less/docs.less
@@ -76,6 +76,12 @@
   padding-left: 23px; // 7px to the right-border + 16px around
 }
   }
+  .checkbox-dummy {
+width: 20px;
+height: 20px;
+padding-left: 23px;
+margin-right: 

couchdb-mango git commit: Return ddoc id and index name

2015-03-31 Thread tonysun83
Repository: couchdb-mango
Updated Branches:
  refs/heads/2645-return-doc-id 8a1bd3176 - f6d4901bc (forced update)


Return ddoc id and index name

We return the ddoc id and index name for easier deletion
from the dashboard. We don't return the full design doc because
we want to hide that abstraction of dealing with design docs from
the user.

FIXES COUCHDB-2645


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

Branch: refs/heads/2645-return-doc-id
Commit: f6d4901bc5717c17397d8baec27e3501d92c1fdb
Parents: 8930288
Author: Tony Sun tony@cloudant.com
Authored: Wed Mar 25 16:29:31 2015 -0700
Committer: Tony Sun tony@cloudant.com
Committed: Tue Mar 31 08:50:48 2015 -0700

--
 src/mango_httpd.erl | 5 -
 test/mango.py   | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/f6d4901b/src/mango_httpd.erl
--
diff --git a/src/mango_httpd.erl b/src/mango_httpd.erl
index 2588a23..28a1578 100644
--- a/src/mango_httpd.erl
+++ b/src/mango_httpd.erl
@@ -20,6 +20,7 @@
 
 -include_lib(couch/include/couch_db.hrl).
 -include(mango.hrl).
+-include(mango_idx.hrl).
 
 
 handle_req(#httpd{} = Req, Db0) -
@@ -58,6 +59,8 @@ handle_index_req(#httpd{method='POST', path_parts=[_, 
_]}=Req, Db) -
 {ok, Idx0} = mango_idx:new(Db, Opts),
 {ok, Idx} = mango_idx:validate(Idx0),
 {ok, DDoc} = mango_util:load_ddoc(Db, mango_idx:ddoc(Idx)),
+Id = Idx#idx.ddoc,
+Name = Idx#idx.name,
 Status = case mango_idx:add(DDoc, Idx) of
 {ok, DDoc} -
 exists;
@@ -75,7 +78,7 @@ handle_index_req(#httpd{method='POST', path_parts=[_, 
_]}=Req, Db) -
 ?MANGO_ERROR(error_saving_ddoc)
 end
 end,
-   chttpd:send_json(Req, {[{result, Status}]});
+   chttpd:send_json(Req, {[{result, Status}, {id, Id}, {name, Name}]});
 
 handle_index_req(#httpd{method='DELETE',
 path_parts=[A, B, _design, DDocId0, Type, Name]}=Req, Db) -

http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/f6d4901b/test/mango.py
--
diff --git a/test/mango.py b/test/mango.py
index 79545e1..57dfffb 100644
--- a/test/mango.py
+++ b/test/mango.py
@@ -96,6 +96,8 @@ class Database(object):
 body = json.dumps(body)
 r = self.sess.post(self.path(_index), data=body)
 r.raise_for_status()
+assert r.json()[id] is not None
+assert r.json()[name] is not None
 return r.json()[result] == created
 
 def create_text_index(self, analyzer=None, selector=None, idx_type=text,
@@ -176,7 +178,7 @@ class DbPerClass(unittest.TestCase):
 
 @classmethod
 def setUpClass(klass):
-klass.db = Database(127.0.0.1, 5984, random_db_name())
+klass.db = Database(127.0.0.1, 15984, random_db_name())
 klass.db.create(q=1, n=3)
 
 def setUp(self):



couchdb-mango git commit: Return ddoc id and index name

2015-03-31 Thread tonysun83
Repository: couchdb-mango
Updated Branches:
  refs/heads/master 893028883 - f6d4901bc


Return ddoc id and index name

We return the ddoc id and index name for easier deletion
from the dashboard. We don't return the full design doc because
we want to hide that abstraction of dealing with design docs from
the user.

FIXES COUCHDB-2645


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

Branch: refs/heads/master
Commit: f6d4901bc5717c17397d8baec27e3501d92c1fdb
Parents: 8930288
Author: Tony Sun tony@cloudant.com
Authored: Wed Mar 25 16:29:31 2015 -0700
Committer: Tony Sun tony@cloudant.com
Committed: Tue Mar 31 08:50:48 2015 -0700

--
 src/mango_httpd.erl | 5 -
 test/mango.py   | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/f6d4901b/src/mango_httpd.erl
--
diff --git a/src/mango_httpd.erl b/src/mango_httpd.erl
index 2588a23..28a1578 100644
--- a/src/mango_httpd.erl
+++ b/src/mango_httpd.erl
@@ -20,6 +20,7 @@
 
 -include_lib(couch/include/couch_db.hrl).
 -include(mango.hrl).
+-include(mango_idx.hrl).
 
 
 handle_req(#httpd{} = Req, Db0) -
@@ -58,6 +59,8 @@ handle_index_req(#httpd{method='POST', path_parts=[_, 
_]}=Req, Db) -
 {ok, Idx0} = mango_idx:new(Db, Opts),
 {ok, Idx} = mango_idx:validate(Idx0),
 {ok, DDoc} = mango_util:load_ddoc(Db, mango_idx:ddoc(Idx)),
+Id = Idx#idx.ddoc,
+Name = Idx#idx.name,
 Status = case mango_idx:add(DDoc, Idx) of
 {ok, DDoc} -
 exists;
@@ -75,7 +78,7 @@ handle_index_req(#httpd{method='POST', path_parts=[_, 
_]}=Req, Db) -
 ?MANGO_ERROR(error_saving_ddoc)
 end
 end,
-   chttpd:send_json(Req, {[{result, Status}]});
+   chttpd:send_json(Req, {[{result, Status}, {id, Id}, {name, Name}]});
 
 handle_index_req(#httpd{method='DELETE',
 path_parts=[A, B, _design, DDocId0, Type, Name]}=Req, Db) -

http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/f6d4901b/test/mango.py
--
diff --git a/test/mango.py b/test/mango.py
index 79545e1..57dfffb 100644
--- a/test/mango.py
+++ b/test/mango.py
@@ -96,6 +96,8 @@ class Database(object):
 body = json.dumps(body)
 r = self.sess.post(self.path(_index), data=body)
 r.raise_for_status()
+assert r.json()[id] is not None
+assert r.json()[name] is not None
 return r.json()[result] == created
 
 def create_text_index(self, analyzer=None, selector=None, idx_type=text,
@@ -176,7 +178,7 @@ class DbPerClass(unittest.TestCase):
 
 @classmethod
 def setUpClass(klass):
-klass.db = Database(127.0.0.1, 5984, random_db_name())
+klass.db = Database(127.0.0.1, 15984, random_db_name())
 klass.db.create(q=1, n=3)
 
 def setUp(self):



fauxton commit: updated refs/heads/master to 26c9a05

2015-03-31 Thread benkeen
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 5d2fdcc8e - 26c9a05d1


Add API URL option to permissions page

This adds the API URL header link to the permissions page
which opens the /db/_security endpoint and appropriate doc link.

N.B. none of the doc links seem to be working on couch 2.0.
Separate issue.


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

Branch: refs/heads/master
Commit: 26c9a05d1ab4a77f8fdce145d2575b4473010137
Parents: 5d2fdcc
Author: Ben Keen ben.k...@gmail.com
Authored: Mon Mar 23 11:57:04 2015 -0700
Committer: Ben Keen ben.k...@gmail.com
Committed: Tue Mar 31 11:08:55 2015 -0700

--
 app/addons/permissions/resources.js | 4 +++-
 app/addons/permissions/routes.js| 4 
 2 files changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/26c9a05d/app/addons/permissions/resources.js
--
diff --git a/app/addons/permissions/resources.js 
b/app/addons/permissions/resources.js
index 501bd29..de89e12 100644
--- a/app/addons/permissions/resources.js
+++ b/app/addons/permissions/resources.js
@@ -14,7 +14,7 @@ define([
   'app',
   'api'
 ],
-function (app, FauxtonAPI ) {
+function (app, FauxtonAPI) {
   var Permissions = FauxtonAPI.addon();
 
   Permissions.Security = Backbone.Model.extend({
@@ -35,6 +35,8 @@ function (app, FauxtonAPI ) {
   return window.location.origin + '/' + this.database.safeID() + 
'/_security';
 },
 
+documentation: FauxtonAPI.constants.DOC_URLS.DB_PERMISSION,
+
 addItem: function (value, type, section) {
   var sectionValues = this.get(section);
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/26c9a05d/app/addons/permissions/routes.js
--
diff --git a/app/addons/permissions/routes.js b/app/addons/permissions/routes.js
index fc4bc83..9b631df 100644
--- a/app/addons/permissions/routes.js
+++ b/app/addons/permissions/routes.js
@@ -44,6 +44,10 @@ function (app, FauxtonAPI, Databases, Permissions, 
BaseRoute) {
   this.addSidebar('permissions');
 },
 
+apiUrl: function () {
+  return [this.security.url('apiurl'), this.security.documentation];
+},
+
 establish: function () {
   return [
 this.database.fetch(),



fauxton commit: updated refs/heads/master to 5d2fdcc

2015-03-31 Thread benkeen
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master d7641f16e - 5d2fdcc8e


Ace Editor code update

This makes a small change to the Ace Editor component to allow
overriding the default manual JS resizing of the editor. Going
forward we can use flexbox to handle all of that for us, which
will let us drop a lot of the unnecessary JS code to manually
resize the editor based on available space and window resizes,
etc.


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

Branch: refs/heads/master
Commit: 5d2fdcc8e664d459805d12ade402285e7ed91b68
Parents: d7641f1
Author: Ben Keen ben.k...@gmail.com
Authored: Mon Mar 30 09:52:13 2015 -0700
Committer: Ben Keen ben.k...@gmail.com
Committed: Tue Mar 31 11:07:27 2015 -0700

--
 app/addons/fauxton/components.js | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5d2fdcc8/app/addons/fauxton/components.js
--
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index 7d5d766..df2a332 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -588,6 +588,10 @@ function (app, FauxtonAPI, ace, spin, ZeroClipboard) {
   this.commands = options.commands;
   this.theme = options.theme || 'idle_fingers';
   this.couchJSHINT = options.couchJSHINT;
+
+  // going forward we can use flexbox for all editors with a fixed height 
and drop all custom JS to adjust its height
+  this.setHeightWithJS = _.has(options, 'setHeightWithJS') ? 
options.setHeightWithJS : true;
+
   this.edited = false;
 
   // the full-page document editor does some extra work to adjust the 
total height of the editor based
@@ -658,6 +662,9 @@ function (app, FauxtonAPI, ace, spin, ZeroClipboard) {
 },
 
 setHeightToLineCount: function () {
+  if (!this.setHeightWithJS) {
+return;
+  }
   var lines = this.editor.getSession().getDocument().getLength();
 
   if (this.isFullPageEditor) {