Skip to content

Commit

Permalink
fixed bug #78
Browse files Browse the repository at this point in the history
  • Loading branch information
maggiolo00 authored and maggiolo00 committed May 26, 2014
1 parent de4c49b commit 824f290
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ module.exports = function (grunt) {
'../plugin.json',
// 'components/**/*',
'img/{,*/}*.{gif,webp,png,jpg}',
'styles/{,*/}*.{png}',
'font/*',
'data/**/*'
]
Expand Down
Binary file modified app/img/orient_db.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/scripts/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var API = '/api/';
//var API = '/';

var STUDIO_VERSION = "1.7-SNAPSHOT";
var STUDIO_VERSION = "1.7";
17 changes: 10 additions & 7 deletions app/scripts/controllers/database-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,26 +126,29 @@ dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location',
};

$scope.query = function () {

var queryBuffer = "" + $scope.queryText;
queryBuffer = queryBuffer.trim();
queryBuffer = queryBuffer.replace(/\n/g, " ");
Spinner.start(function () {
CommandApi.interrupt(Database.getName(), $scope.queryText).then(function () {
CommandApi.interrupt(Database.getName(), queryBuffer).then(function () {
Spinner.stop();
});
});

$scope.queryText = $scope.queryText.trim();
$scope.queryText = $scope.queryText.replace(/\n/g, " ");
if ($scope.queryText.startsWith('g.')) {

if (queryBuffer.startsWith('g.')) {
$scope.language = 'gremlin';
}
if ($scope.queryText.startsWith('#')) {
$location.path('/database/' + $routeParams.database + '/browse/edit/' + $scope.queryText.replace('#', ''));
if (queryBuffer.startsWith('#')) {
$location.path('/database/' + $routeParams.database + '/browse/edit/' + queryBuffer.replace('#', ''));
}

var conttype;
if ($scope.selectedContentType == 'CSV')
conttype = 'text/csv';

CommandApi.queryText({database: $routeParams.database, contentType: conttype, language: $scope.language, text: $scope.queryText, limit: $scope.limit, shallow: $scope.shallow, verbose: false}, function (data) {
CommandApi.queryText({database: $routeParams.database, contentType: conttype, language: $scope.language, text: queryBuffer, limit: $scope.limit, shallow: $scope.shallow, verbose: false}, function (data) {

if (data.result) {

Expand Down
Binary file added app/styles/select2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/styles/select2x2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 824f290

Please sign in to comment.