提交 bd7e1725 编写于 作者: S Sercan

switch-view bug fixed,

上级 52ae6079
......@@ -21,7 +21,7 @@
<li><a href="#">SQL Queries</a>
</li>
</ul>
<a id="btnSwitchView" class="dropdown-toggle" data-toggle="dropdown" href="#"
<a id="btnSwitchView" href="#"
title="Switch Result View">
<i class="fa fa-exchange"></i>
</a>
......
......@@ -49,6 +49,11 @@ Template.browseDB.events({
});
executeQuery = function () {
// hide results
$('#divJsonEditor').hide();
$('#divAceEditor').hide();
// loading button
var l = $('#btnExecuteQuery').ladda();
l.ladda('start');
......
......@@ -30,7 +30,7 @@ Meteor.methods({
query = query.substring(0, query.length - 1);
}
if (query.indexOf('find(') != -1) {
if (query.indexOf('find(') != -1 && query.indexOf('count(') == -1) {
db.eval('function(){ return ' + query + '.toArray(); }', function (err, result) {
done(err, result);
db.close();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册