You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2013/08/22 12:44:40 UTC

[7/7] git commit: updated refs/heads/master to b65f11f

Fauxton: add in error messages for view query


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

Branch: refs/heads/master
Commit: b65f11ff93223571175d6a9b39e9d55cc9d1bdec
Parents: ff83a90
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Aug 22 12:43:04 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Aug 22 12:43:04 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js           | 8 +++-----
 src/fauxton/app/templates/documents/view_editor.html | 1 +
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b65f11ff/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 9e1279f..d43f06c 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -919,18 +919,16 @@ function(app, FauxtonAPI, Documents, pouchdb, Codemirror, JSHint, resizeColumns)
           // TODO: Where to add this error?
           // bootstrap wants the error on a control-group div, but we're not using that
           //$('form.view-query-update input[name='+param+'], form.view-query-update select[name='+param+']').addClass('error');
-
           return FauxtonAPI.addNotification({
             msg: "JSON Parse Error on field: "+param.name,
             type: "error",
-            selector: ".view.show .all-docs-list.errors-container"
+            selector: ".advanced-options .errors-container"
           });
         });
-
         FauxtonAPI.addNotification({
           msg: "Make sure that strings are properly quoted and any other values are valid JSON structures",
           type: "warning",
-          selector: ".view.show .all-docs-list.errors-container"
+          selector: ".advanced-options .errors-container"
         });
 
         return false;
@@ -994,7 +992,7 @@ function(app, FauxtonAPI, Documents, pouchdb, Codemirror, JSHint, resizeColumns)
       FauxtonAPI.addNotification({
         msg: "<strong>Warning!</strong> Preview executes the Map/Reduce functions in your browser, and may behave differently from CouchDB.",
         type: "warning",
-        selector: ".advanced-options",
+        selector: ".advanced-options .errors-container",
         fade: true
       });
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b65f11ff/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index b584208..9aaa503 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -107,6 +107,7 @@ the License.
     </div>
     <div class="tab-pane" id="query">
       <div class="advanced-options well">
+        <div class="errors-container"></div>
         <form class="view-query-update custom-inputs">
           <div class="controls-group">
             <div class="row-fluid">