summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2013-08-22 12:43:04 +0200
committerGarren Smith <garren.smith@gmail.com>2013-08-22 12:43:04 +0200
commitb65f11ff93223571175d6a9b39e9d55cc9d1bdec (patch)
tree76a82a1bed94c047e0144457fe04a92b14fa9812
parentff83a905962a9899c6136a73cc42894f135011bb (diff)
downloadcouchdb-b65f11ff93223571175d6a9b39e9d55cc9d1bdec.tar.gz
Fauxton: add in error messages for view query
-rw-r--r--src/fauxton/app/modules/documents/views.js8
-rw-r--r--src/fauxton/app/templates/documents/view_editor.html1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 9e1279f7e..d43f06c88 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
});
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index b58420832..9aaa503f3 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">