Skip to content

Commit

Permalink
commit for issue #37 , #41
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolazzara committed Jan 30, 2014
1 parent e264fda commit e0ae15a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 141 deletions.
4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="stylesheet" href="components/bootstrap/docs/assets/css/bootstrap.css">
<link rel="stylesheet" href="components/bootstrap/docs/assets/css/docs.css">
<link rel="stylesheet" href="components/bootstrap-datepicker/css/datepicker.css"/>
<link rel="stylesheet" href="components/ng-grid/ng-grid.min.css"/>
<!--<link rel="stylesheet" href="components/ng-grid/ng-grid.min.css"/>-->
<link rel="stylesheet" href="components/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css"/>
<link rel="stylesheet" href="styles/main.css">

Expand Down Expand Up @@ -83,7 +83,7 @@
<script src="components/bootstrap/docs/assets/js/bootstrap.js"></script>
<script src="components/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="components/angular-local-storage/angular-local-storage.min.js"></script>
<script type="text/javascript" src="components/ng-grid/ng-grid-2.0.7.min.js"></script>
<!--<script type="text/javascript" src="components/ng-grid/ng-grid-2.0.7.min.js"></script>-->
<script type="text/javascript" src="components/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="components/codemirror/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="components/codemirror/mode/sql/sql.js"></script>
Expand Down
134 changes: 0 additions & 134 deletions app/index.html.orig

This file was deleted.

3 changes: 1 addition & 2 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ var deps = ['header.controller',
'LocalStorageModule',
'filters',
'rendering',
'schema.controller',
'ngGrid'];
'schema.controller'];


var App = angular.module('OrientDBStudioApp', deps);
Expand Down
8 changes: 6 additions & 2 deletions app/scripts/controllers/function-controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var schemaModule = angular.module('function.controller', ['database.services']);
schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', 'FunctionApi', 'DocumentApi', '$modal', '$q', '$route', 'Spinner', function ($scope, $routeParams, $location, Database, CommandApi, FunctionApi, DocumentApi, $modal, $q, $route, Spinner) {
schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', 'FunctionApi', 'DocumentApi', '$modal', '$q', '$route', 'Spinner', 'Notification', function ($scope, $routeParams, $location, Database, CommandApi, FunctionApi, DocumentApi, $modal, $q, $route, Spinner, Notification) {

$scope.database = Database;
$scope.listClasses = $scope.database.listClasses();
Expand Down Expand Up @@ -100,7 +100,7 @@ schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$locat
}
$scope.
executeFunction = function () {

$scope.resultExecute = '';

if ($scope.functionToExecute != undefined) {
var functionNamee = $scope.nameFunction;
Expand Down Expand Up @@ -178,13 +178,17 @@ schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$locat
if ($scope.isNewFunction == true) {
DocumentApi.createDocument($scope.database.getName(), $scope.functionToExecute['@rid'], $scope.functionToExecute, function (data) {
$scope.getListFunction();
var message = 'Function saved successfully. Server respond ' + JSON.stringify(data);
Notification.push({content: message });
}
);

}
else {
DocumentApi.updateDocument($scope.database.getName(), $scope.functionToExecute['@rid'], $scope.functionToExecute, function (data) {
$scope.getListFunction();
var message = 'Function saved successfully. Server respond ' + JSON.stringify(data);
Notification.push({content: message });
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/services/database-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ database.factory('FunctionApi', function ($http, $resource, Notification) {
var records = data.result ? data.result.length : "";
if (verbose) {
var noti = "Query executed in " + time + " sec. Returned " + records + " record(s)";
// Notification.push({content: noti});
Notification.push({content: noti});
}
callback(data);
}).error(function (data) {
Expand Down

0 comments on commit e0ae15a

Please sign in to comment.