mirror of https://gitee.com/bigwinds/arangodb
removed old/unnecessary notifications
This commit is contained in:
parent
a2e1425b87
commit
1e964b18d0
Binary file not shown.
Before Width: | Height: | Size: 982 B |
|
@ -101,11 +101,11 @@
|
|||
return returnVal;
|
||||
},
|
||||
|
||||
arangoNotification: function (content, title) {
|
||||
arangoNotification: function (title, content) {
|
||||
window.App.notificationList.add({title:title, content: content});
|
||||
},
|
||||
|
||||
arangoError: function (content, title) {
|
||||
arangoError: function (title, content) {
|
||||
window.App.notificationList.add({title:title, content: content});
|
||||
},
|
||||
|
||||
|
|
|
@ -139,12 +139,11 @@
|
|||
}
|
||||
|
||||
if (changeResult !== true) {
|
||||
arangoHelper.arangoNotification("Collection error: " + changeResult);
|
||||
arangoHelper.arangoNotification("Collection error", changeResult);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (changeResult === true) {
|
||||
arangoHelper.arangoNotification("Saved collection properties");
|
||||
window.arangoCollectionsStore.fetch({
|
||||
success: function () {
|
||||
window.collectionsView.render();
|
||||
|
|
|
@ -126,7 +126,6 @@
|
|||
submitRemoveDatabase: function(e) {
|
||||
var toDelete = this.collection.where({name: this.dbToDelete});
|
||||
toDelete[0].destroy({wait: true, url:"/_api/database/"+this.dbToDelete});
|
||||
arangoHelper.arangoNotification("Database " + this.dbToDelete + " deleted.");
|
||||
this.dbToDelete = '';
|
||||
$('#deleteDatabaseModal').modal('hide');
|
||||
this.updateDatabases();
|
||||
|
|
|
@ -64,13 +64,13 @@
|
|||
var focused = $('textarea').val();
|
||||
|
||||
if (!focused.trim()) {
|
||||
arangoHelper.arangoNotification("Empty field");
|
||||
//Heiko Form-Validator empty field
|
||||
returnval = false;
|
||||
}
|
||||
|
||||
var checkWhiteSpaces = focused.replace(/ /g,'');
|
||||
if (checkWhiteSpaces !== focused) {
|
||||
arangoHelper.arangoNotification("No whitespaces allowed");
|
||||
//Heiko Form-Validator whitespaces
|
||||
returnval = false;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
returnval = true;
|
||||
}
|
||||
else {
|
||||
arangoHelper.arangoNotification("Key already exists!");
|
||||
//Heiko Form-Validator duplicate key exists
|
||||
returnval = false;
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,6 @@
|
|||
if (this.type === 'document') {
|
||||
result = window.arangoDocumentStore.saveDocument(this.colid, this.docid, model);
|
||||
if (result === true) {
|
||||
arangoHelper.arangoNotification('Document saved');
|
||||
$('.addAttribute').removeClass('disabledBtn');
|
||||
$('td').removeClass('validateError');
|
||||
self.scrollToFocused();
|
||||
|
@ -210,7 +209,6 @@
|
|||
else if (this.type === 'edge') {
|
||||
result = window.arangoDocumentStore.saveEdge(this.colid, this.docid, model);
|
||||
if (result === true) {
|
||||
arangoHelper.arangoNotification('Edge saved');
|
||||
$('.addAttribute').removeClass('disabledBtn');
|
||||
$('td').removeClass('validateError');
|
||||
self.scrollToFocused();
|
||||
|
@ -531,26 +529,6 @@
|
|||
//broken
|
||||
validate: function (settings, td) {
|
||||
var returnval = true;
|
||||
/*
|
||||
if ($(td).hasClass('keyRow') === true) {
|
||||
var toCheck = $('textarea').val();
|
||||
var data = $('#documentTableID').dataTable().fnGetData();
|
||||
|
||||
if (toCheck === '') {
|
||||
$(td).addClass('validateError');
|
||||
arangoHelper.arangoNotification("Key is empty!");
|
||||
returnval = false;
|
||||
return returnval;
|
||||
}
|
||||
|
||||
$.each(data, function(key, val) {
|
||||
if (val[0] === toCheck) {
|
||||
$(td).addClass('validateError');
|
||||
arangoHelper.arangoNotification("Key already exists!");
|
||||
returnval = false;
|
||||
}
|
||||
});
|
||||
}*/
|
||||
return returnval;
|
||||
},
|
||||
getTypedValue: function (value) {
|
||||
|
@ -588,9 +566,7 @@
|
|||
value = String(value);
|
||||
|
||||
if (value !== '' && (value.substr(0, 1) !== '"' || value.substr(-1) !== '"')) {
|
||||
arangoHelper.arangoNotification(
|
||||
'You have entered an invalid string value. Please review and adjust it.'
|
||||
);
|
||||
//Heiko: Form-Validator - invalid string value
|
||||
throw "error";
|
||||
}
|
||||
|
||||
|
@ -598,9 +574,7 @@
|
|||
value = JSON.parse(value);
|
||||
}
|
||||
catch (e) {
|
||||
arangoHelper.arangoNotification(
|
||||
'You have entered an invalid string value. Please review and adjust it.'
|
||||
);
|
||||
//Heiko: Form-Validator - invalid string value
|
||||
throw e;
|
||||
}
|
||||
return value;
|
||||
|
|
|
@ -145,14 +145,14 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (data.errors === 0) {
|
||||
arangoHelper.arangoNotification("Upload successful. " +
|
||||
data.created + " document(s) imported.");
|
||||
/*if (data.errors === 0) {
|
||||
//Heiko: Display information
|
||||
//"Upload successful. " + data.created + " document(s) imported.");
|
||||
}
|
||||
else if (data.errors !== 0) {
|
||||
arangoHelper.arangoError("Upload failed." +
|
||||
data.errors + "error(s).");
|
||||
}
|
||||
//Heiko: Display information
|
||||
//arangoHelper.arangoError("Upload failed." + data.errors + "error(s).");
|
||||
}*/
|
||||
self.hideSpinner();
|
||||
self.hideImportModal();
|
||||
self.resetView();
|
||||
|
@ -361,11 +361,11 @@
|
|||
var from = $('#new-document-from').val();
|
||||
var to = $('#new-document-to').val();
|
||||
if (from === '') {
|
||||
arangoHelper.arangoNotification('From paramater is missing');
|
||||
//Heiko: Form-Validator - from is missing
|
||||
return;
|
||||
}
|
||||
if (to === '') {
|
||||
arangoHelper.arangoNotification('To parameter is missing');
|
||||
//Heiko: Form-Validator - to is missing
|
||||
return;
|
||||
}
|
||||
var result = window.arangoDocumentStore.createTypeEdge(collid, from, to);
|
||||
|
@ -757,10 +757,10 @@
|
|||
else {
|
||||
if (result.responseText) {
|
||||
var message = JSON.parse(result.responseText);
|
||||
arangoHelper.arangoNotification(message.errorMessage);
|
||||
arangoHelper.arangoNotification("Document error", message.errorMessage);
|
||||
}
|
||||
else {
|
||||
arangoHelper.arangoNotification("Could not create index.");
|
||||
arangoHelper.arangoNotification("Document error", "Could not create index.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
self.isOffline = false;
|
||||
if (!self.firstLogin) {
|
||||
window.setTimeout(function(){
|
||||
arangoHelper.arangoNotification("Server connected");
|
||||
//Heiko: notification for connected server
|
||||
}, 1000);
|
||||
} else {
|
||||
self.firstLogin = false;
|
||||
|
@ -48,7 +48,7 @@
|
|||
},
|
||||
error: function (data) {
|
||||
self.isOffline = true;
|
||||
arangoHelper.arangoError("Server is offline");
|
||||
arangoHelper.arangoError("Server", "Server is offline");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
var password = $('#loginPassword').val();
|
||||
|
||||
if (username === '' || password === '') {
|
||||
arangoHelper.arangoNotification("Please fill out required fields");
|
||||
//Heiko: Form-Validator - please fill out all req. fields
|
||||
return;
|
||||
}
|
||||
var callback = this.collection.login(username, password);
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
},
|
||||
editAQL: function () {
|
||||
if (this.customQueries.length === 0) {
|
||||
arangoHelper.arangoNotification("No custom queries available");
|
||||
//Heiko: display information that no custom queries are available
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,6 @@
|
|||
this.customQueries = tempArray;
|
||||
localStorage.setItem("customQueries", JSON.stringify(this.customQueries));
|
||||
$('#edit-aql-queries').modal('hide');
|
||||
arangoHelper.arangoNotification("Query deleted");
|
||||
this.renderSelectboxes();
|
||||
},
|
||||
saveAQL: function (e) {
|
||||
|
@ -280,7 +279,7 @@
|
|||
}
|
||||
|
||||
if (queryName.trim() === '') {
|
||||
arangoHelper.arangoNotification("Illegal query name");
|
||||
//Heiko: Form-Validator - illegal query name
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -303,7 +302,7 @@
|
|||
});
|
||||
|
||||
if (quit === true) {
|
||||
arangoHelper.arangoNotification("Name already taken!");
|
||||
//Heiko: Form-Validator - name already taken
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -318,7 +317,6 @@
|
|||
$('#edit-aql-queries').modal('hide');
|
||||
|
||||
localStorage.setItem("customQueries", JSON.stringify(this.customQueries));
|
||||
arangoHelper.arangoNotification("Query saved");
|
||||
this.renderSelectboxes();
|
||||
},
|
||||
updateEditSelect: function () {
|
||||
|
@ -339,7 +337,7 @@
|
|||
self.queries = data;
|
||||
},
|
||||
error: function (data) {
|
||||
arangoHelper.arangoNotification("Error while loading system templates");
|
||||
arangoHelper.arangoNotification("Query", "Error while loading system templates");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#stat_hd {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-top: 7px;
|
||||
margin-top: 5px;
|
||||
background-color: #333232;
|
||||
border-radius: 3px;
|
||||
border: 2px solid #8AA051;
|
||||
|
|
|
@ -294,7 +294,7 @@ li.tile {
|
|||
#stat_hd {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-top: 7px;
|
||||
margin-top: 5px;
|
||||
background-color: #333232;
|
||||
border-radius: 3px;
|
||||
border: 2px solid #8AA051; }
|
||||
|
|
Loading…
Reference in New Issue