couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to 0c2645a
Date Mon, 31 Aug 2015 15:34:25 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master d138e0197 -> 0c2645aed


Remove reference to $.clearForm

There's an error that appears after uploading a file. This is due
to the removal of a jQuery form lib. This PR removes the reference
to the unfound function and clears the form manually.


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

Branch: refs/heads/master
Commit: 0c2645aedaf8dccf05242278267dbae42b812466
Parents: d138e01
Author: Ben Keen <ben.keen@gmail.com>
Authored: Fri Aug 28 09:57:34 2015 -0700
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Mon Aug 31 08:35:38 2015 -0700

----------------------------------------------------------------------
 app/addons/documents/tests/nightwatch/uploadAttachment.js | 1 +
 app/addons/documents/views-doceditor.js                   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c2645ae/app/addons/documents/tests/nightwatch/uploadAttachment.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/uploadAttachment.js b/app/addons/documents/tests/nightwatch/uploadAttachment.js
index 40378a5..b0a5532 100644
--- a/app/addons/documents/tests/nightwatch/uploadAttachment.js
+++ b/app/addons/documents/tests/nightwatch/uploadAttachment.js
@@ -28,6 +28,7 @@ module.exports = {
       .setValue('input#_attachments', require('path').resolve(__dirname + '/uploadAttachment.js'))
       .clickWhenVisible('#upload-btn')
       .waitForElementVisible('#global-notification-id', waitTime, false)
+      .assert.attributeEquals('#_rev', 'value', '')
       .getText('#global-notification-id', function (result) {
         var data = result.value;
         this.verify.ok(data, 'Document saved successfully.');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c2645ae/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index b8d07b0..42c3d31 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -73,7 +73,8 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
       FauxtonAPI.triggerRouteEvent('reRenderDoc');
       //slight delay to make this transistion a little more fluid and less jumpy
       setTimeout(function () {
-        $form.clearForm();
+        this.$('#_attachments').val('');
+        this.$('#_rev').val('');
         hideModal();
         $('.modal-backdrop').remove();
       }, 1000);


Mime
View raw message