mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
858a8ba4f8
|
@ -330,3 +330,8 @@
|
|||
* Project Home: http://swagger.io
|
||||
* GITHUB: https://github.com/swagger-api/swagger-ui
|
||||
* License: [Apache 2 license](https://github.com/swagger-api/swagger-ui/blob/master/LICENSE)
|
||||
|
||||
#### Noty
|
||||
|
||||
* https://github.com/needim/noty/
|
||||
* [MIT License](https://github.com/needim/noty) under "License"
|
||||
|
|
|
@ -35,14 +35,6 @@ using namespace triagens::aql;
|
|||
using EN = triagens::aql::ExecutionNode;
|
||||
|
||||
bool ConditionFinder::before (ExecutionNode* en) {
|
||||
if (! _variableDefinitions.empty() && en->canThrow()) {
|
||||
// we already found a FILTER and
|
||||
// something that can throw is not safe to optimize
|
||||
_filters.clear();
|
||||
_sorts.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (en->getType()) {
|
||||
case EN::ENUMERATE_LIST:
|
||||
case EN::AGGREGATE:
|
||||
|
@ -151,6 +143,11 @@ bool ConditionFinder::before (ExecutionNode* en) {
|
|||
// this means we can't use the index to restrict the results
|
||||
break;
|
||||
}
|
||||
|
||||
if (condition->root() && condition->root()->canThrow()) {
|
||||
// something that can throw is not safe to optimize
|
||||
break;
|
||||
}
|
||||
|
||||
std::unique_ptr<SortCondition> sortCondition;
|
||||
if (! en->isInInnerLoop()) {
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"frontend/js/lib/jquery.form.min.js",
|
||||
"frontend/js/lib/jquery.uploadfile.min.js",
|
||||
"frontend/js/lib/jquery.textfill.min.js",
|
||||
"frontend/js/lib/jquery.noty.packaged.min.js",
|
||||
"frontend/js/lib/select2.min.js",
|
||||
"frontend/js/lib/jsoneditor-min.js",
|
||||
"frontend/js/lib/strftime-min.js",
|
||||
|
|
|
@ -220,11 +220,11 @@
|
|||
},
|
||||
|
||||
arangoNotification: function (title, content, info) {
|
||||
window.App.notificationList.add({title:title, content: content, info: info});
|
||||
window.App.notificationList.add({title:title, content: content, info: info, type: 'success'});
|
||||
},
|
||||
|
||||
arangoError: function (title, content, info) {
|
||||
window.App.notificationList.add({title:title, content: content, info: info});
|
||||
window.App.notificationList.add({title:title, content: content, info: info, type: 'error'});
|
||||
},
|
||||
|
||||
getRandomToken: function () {
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -5439,6 +5439,32 @@ div.headerBar {
|
|||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(234, 23, 23, 0.6); }
|
||||
.modal-body input[type='file'] {
|
||||
line-height: 17px; }
|
||||
.modal-body tr.spacer {
|
||||
height: 10px; }
|
||||
.modal-body tr.first {
|
||||
background-color: #f5f8f0; }
|
||||
.modal-body tr.first th:first-child {
|
||||
border-top-left-radius: 3px; }
|
||||
.modal-body tr.first th:last-child {
|
||||
border-top-right-radius: 3px; }
|
||||
.modal-body tr.middle {
|
||||
background-color: #f5f8f0;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px; }
|
||||
.modal-body tr.last {
|
||||
background-color: #f5f8f0; }
|
||||
.modal-body tr.last th:first-child {
|
||||
border-bottom-left-radius: 3px; }
|
||||
.modal-body tr.last th:last-child {
|
||||
border-bottom-right-radius: 3px; }
|
||||
.modal-body tr.first th:first-child,
|
||||
.modal-body tr.middle th:first-child,
|
||||
.modal-body tr.last th:first-child {
|
||||
padding-left: 10px; }
|
||||
.modal-body tr.first th:last-child,
|
||||
.modal-body tr.middle th:last-child,
|
||||
.modal-body tr.last th:last-child {
|
||||
padding-right: 10px; }
|
||||
.modal-body th th.actionCell, .modal-body th th.keyCell, .modal-body th .valueCell {
|
||||
text-align: center; }
|
||||
.modal-body th.actionCell {
|
||||
|
@ -5524,7 +5550,8 @@ div.headerBar {
|
|||
.modal {
|
||||
border: 0 !important;
|
||||
border-radius: 3px !important;
|
||||
box-shadow: 0; }
|
||||
box-shadow: 0;
|
||||
width: 580px; }
|
||||
.modal .fade.in {
|
||||
top: 12.1% !important; }
|
||||
.modal table tr:last-child {
|
||||
|
|
Binary file not shown.
|
@ -10416,11 +10416,11 @@ function GraphViewer(svg, width, height, adapterConfig, config) {
|
|||
},
|
||||
|
||||
arangoNotification: function (title, content, info) {
|
||||
window.App.notificationList.add({title:title, content: content, info: info});
|
||||
window.App.notificationList.add({title:title, content: content, info: info, type: 'success'});
|
||||
},
|
||||
|
||||
arangoError: function (title, content, info) {
|
||||
window.App.notificationList.add({title:title, content: content, info: info});
|
||||
window.App.notificationList.add({title:title, content: content, info: info, type: 'error'});
|
||||
},
|
||||
|
||||
getRandomToken: function () {
|
||||
|
@ -22543,6 +22543,8 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
|
||||
var self = this;
|
||||
|
||||
console.log(this.model.get("path"));
|
||||
|
||||
$(this.el).html(this.template.render({
|
||||
app: this.model,
|
||||
db: arangoHelper.currentDatabase(),
|
||||
|
@ -24847,7 +24849,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
"click #confirmDeleteDocument" : "deleteDocument",
|
||||
"click #document-from" : "navigateToDocument",
|
||||
"click #document-to" : "navigateToDocument",
|
||||
"keydown .ace_editor" : "keyPress",
|
||||
"keydown #documentEditor .ace_editor" : "keyPress",
|
||||
"keyup .jsoneditor .search input" : "checkSearchBox"
|
||||
},
|
||||
|
||||
|
@ -25009,7 +25011,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
model = this.editor.get();
|
||||
}
|
||||
catch (e) {
|
||||
this.errorConfirmation();
|
||||
this.errorConfirmation(e);
|
||||
this.disableSaveButton();
|
||||
return;
|
||||
}
|
||||
|
@ -25039,6 +25041,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
},
|
||||
|
||||
successConfirmation: function () {
|
||||
|
||||
arangoHelper.arangoNotification('Document saved.');
|
||||
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#C6FFB0'}, 500);
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#FFFFF'}, 500);
|
||||
|
||||
|
@ -25046,7 +25051,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
$('#documentEditor .ace_content').animate({backgroundColor: '#FFFFF'}, 500);
|
||||
},
|
||||
|
||||
errorConfirmation: function () {
|
||||
errorConfirmation: function (e) {
|
||||
arangoHelper.arangoError("Document editor: ", e);
|
||||
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#FFB0B0'}, 500);
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#FFFFF'}, 500);
|
||||
|
||||
|
@ -27461,23 +27468,31 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
);
|
||||
|
||||
if (graph) {
|
||||
|
||||
$('.modal-body table').css('border-collapse', 'separate');
|
||||
var i;
|
||||
|
||||
$('.modal-body .spacer').remove();
|
||||
for (i = 0; i <= this.counter; i++) {
|
||||
$('#row_fromCollections' + i).hide();
|
||||
$('#row_toCollections' + i).hide();
|
||||
$('#row_fromCollections' + i).show();
|
||||
$('#row_toCollections' + i).show();
|
||||
$('#row_newEdgeDefinitions' + i).addClass('first');
|
||||
$('#row_fromCollections' + i).addClass('middle');
|
||||
$('#row_toCollections' + i).addClass('last');
|
||||
$('#row_toCollections' + i).after('<tr id="spacer'+ i +'" class="spacer"></tr>');
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
showHideDefinition : function(e) {
|
||||
e.stopPropagation();
|
||||
/*e.stopPropagation();
|
||||
var id = $(e.currentTarget).attr("id"), number;
|
||||
if (id.indexOf("row_newEdgeDefinitions") !== -1 ) {
|
||||
number = id.split("row_newEdgeDefinitions")[1];
|
||||
$('#row_fromCollections' + number).toggle();
|
||||
$('#row_toCollections' + number).toggle();
|
||||
}
|
||||
}*/
|
||||
},
|
||||
|
||||
addRemoveDefinition : function(e) {
|
||||
|
@ -27522,6 +27537,17 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
});
|
||||
window.modalView.undelegateEvents();
|
||||
window.modalView.delegateEvents(this.events);
|
||||
|
||||
var i;
|
||||
$('.modal-body .spacer').remove();
|
||||
for (i = 0; i <= this.counter; i++) {
|
||||
$('#row_fromCollections' + i).show();
|
||||
$('#row_toCollections' + i).show();
|
||||
$('#row_newEdgeDefinitions' + i).addClass('first');
|
||||
$('#row_fromCollections' + i).addClass('middle');
|
||||
$('#row_toCollections' + i).addClass('last');
|
||||
$('#row_toCollections' + i).after('<tr id="spacer'+ i +'" class="spacer"></tr>');
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (id.indexOf("remove_newEdgeDefinitions") !== -1 ) {
|
||||
|
@ -27529,6 +27555,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
$('#row_newEdgeDefinitions' + number).remove();
|
||||
$('#row_fromCollections' + number).remove();
|
||||
$('#row_toCollections' + number).remove();
|
||||
$('#spacer' + number).remove();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -28316,7 +28343,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
|
||||
/*jshint browser: true */
|
||||
/*jshint unused: false */
|
||||
/*global Backbone, templateEngine, $, window*/
|
||||
/*global Backbone, templateEngine, $, window, noty */
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
|
@ -28348,6 +28375,8 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
},
|
||||
|
||||
removeAllNotifications: function () {
|
||||
$.noty.clearQueue();
|
||||
$.noty.closeAll();
|
||||
this.collection.reset();
|
||||
$('#notification_menu').hide();
|
||||
},
|
||||
|
@ -28357,7 +28386,53 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
this.collection.get(cid).destroy();
|
||||
},
|
||||
|
||||
renderNotifications: function() {
|
||||
renderNotifications: function(a, b, event) {
|
||||
|
||||
if (event) {
|
||||
if (event.add) {
|
||||
var latestModel = this.collection.at(this.collection.length - 1),
|
||||
message = latestModel.get('title'),
|
||||
time = 3000;
|
||||
|
||||
if (latestModel.get('content')) {
|
||||
message = message + ": " + latestModel.get('content');
|
||||
}
|
||||
|
||||
if (latestModel.get('type') === 'error') {
|
||||
time = false;
|
||||
}
|
||||
else {
|
||||
$.noty.clearQueue();
|
||||
$.noty.closeAll();
|
||||
}
|
||||
|
||||
noty({
|
||||
theme: 'relax',
|
||||
text: message,
|
||||
template:
|
||||
'<div class="noty_message arango_message">' +
|
||||
'<div><i class="fa fa-close"></i></div><span class="noty_text arango_text"></span>' +
|
||||
'<div class="noty_close arango_close"></div></div>',
|
||||
maxVisible: 1,
|
||||
closeWith: ['click'],
|
||||
type: latestModel.get('type'),
|
||||
layout: 'bottom',
|
||||
timeout: time,
|
||||
animation: {
|
||||
open: {height: 'show'},
|
||||
close: {height: 'hide'},
|
||||
easing: 'swing',
|
||||
speed: 200
|
||||
}
|
||||
});
|
||||
|
||||
if (latestModel.get('type') === 'success') {
|
||||
latestModel.destroy();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#stat_hd_counter').text(this.collection.length);
|
||||
if (this.collection.length === 0) {
|
||||
$('#stat_hd').removeClass('fullNotification');
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1986,6 +1986,7 @@ return exports;
|
|||
"ERROR_LEGEND_NOT_IN_WAL_FILE" : { "code" : 26, "message" : "internal error if a legend for a marker does not yet exist in the same WAL file" },
|
||||
"ERROR_FILE_EXISTS" : { "code" : 27, "message" : "file exists" },
|
||||
"ERROR_LOCKED" : { "code" : 28, "message" : "locked" },
|
||||
"ERROR_DEADLOCK" : { "code" : 29, "message" : "deadlock detected" },
|
||||
"ERROR_HTTP_BAD_PARAMETER" : { "code" : 400, "message" : "bad parameter" },
|
||||
"ERROR_HTTP_UNAUTHORIZED" : { "code" : 401, "message" : "unauthorized" },
|
||||
"ERROR_HTTP_FORBIDDEN" : { "code" : 403, "message" : "forbidden" },
|
||||
|
@ -3597,8 +3598,8 @@ var helpArangoCollection = arangosh.createHelpHeadline("ArangoCollection help")
|
|||
' truncate() delete all documents ' + "\n" +
|
||||
' properties() show collection properties ' + "\n" +
|
||||
' drop() delete a collection ' + "\n" +
|
||||
' load() load a collection into memory ' + "\n" +
|
||||
' unload() unload a collection from memory ' + "\n" +
|
||||
' load() load a collection ' + "\n" +
|
||||
' unload() unload a collection ' + "\n" +
|
||||
' rename(<new-name>) renames a collection ' + "\n" +
|
||||
' getIndexes() return defined indexes ' + "\n" +
|
||||
' refresh() refreshes the status and name ' + "\n" +
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
<script src="sharedLibs.js?version=1445617511824"></script>
|
||||
<script src="libs.js?version=1445617511824"></script>
|
||||
<script src="app.js?version=1445617511824"></script>
|
||||
<script src="sharedLibs.js?version=1445958308377"></script>
|
||||
<script src="libs.js?version=1445958308377"></script>
|
||||
<script src="app.js?version=1445958308377"></script>
|
||||
|
|
|
@ -2208,14 +2208,14 @@ if (list.length > 0) {
|
|||
</select></script><script id="notificationItem.ejs" type="text/template"><% notifications.forEach(function(n) { %>
|
||||
<li class="dropdown-item">
|
||||
<div class="notificationItem">
|
||||
<a class="notificationItemTitle"><%=n.get("title")%></a>
|
||||
<div class="notificationItemContent"><%=n.get("content")%></div>
|
||||
|
||||
<% if (n.get("info")) { %>
|
||||
<i title="<%=n.get("info")%>" class="notificationInfoIcon fa fa-info-circle"></i>
|
||||
<% } %>
|
||||
|
||||
<i id="<%=n.cid%>" class="fa fa-times-circle-o"></i>
|
||||
<a class="notificationItemTitle"><%=n.get("title")%></a>
|
||||
<div class="notificationItemContent"><%=n.get("content")%></div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<% }); %></script><script id="notificationView.ejs" type="text/template"><ul class="navlist" id="notificationViewUl">
|
||||
|
@ -2224,7 +2224,7 @@ if (list.length > 0) {
|
|||
<div id="stat_hd" class="notificationButton"><p id="stat_hd_counter">0</p></div>
|
||||
</div>
|
||||
|
||||
<li class="dropdown no-left-margin">
|
||||
<li class="dropdown no-left-margin" style="border: 0">
|
||||
<ul class="user-dropdown-menu fixedDropdown" id="notification_menu">
|
||||
<li class="dropdown-header"><a>Notifications</a></li>
|
||||
<ul class="innerDropdownInnerUL"></ul>
|
||||
|
@ -2612,4 +2612,4 @@ var cutByResolution = function (str) {
|
|||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } %></script></head><body><nav class="navbar"><div class="resizecontainer"><div class="navlogo"><a class="logo" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a></div><div id="progressPlaceholderIcon"></div><div class="statmenu" id="statisticBar"></div><div class="usermenu" id="userBar" style="float:right"></div><div class="notificationmenu" id="notificationBar" style="float:right"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="centralRow resizecontainer"><div id="content" class="centralContent"></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><footer class="footer"><div class="resizecontainer" id="footerBar"></div></footer><script src="sharedLibs.js?version=1445617511824"></script><script src="libs.js?version=1445617511824"></script><script src="app.js?version=1445617511824"></script></body></html>
|
||||
<% } %></script></head><body><nav class="navbar"><div class="resizecontainer"><div class="navlogo"><a class="logo" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a></div><div id="progressPlaceholderIcon"></div><div class="statmenu" id="statisticBar"></div><div class="usermenu" id="userBar" style="float:right"></div><div class="notificationmenu" id="notificationBar" style="float:right"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="centralRow resizecontainer"><div id="content" class="centralContent"></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><footer class="footer"><div class="resizecontainer" id="footerBar"></div></footer><script src="sharedLibs.js?version=1445958308377"></script><script src="libs.js?version=1445958308377"></script><script src="app.js?version=1445958308377"></script></body></html>
|
Binary file not shown.
|
@ -2365,14 +2365,14 @@ if (list.length > 0) {
|
|||
<% notifications.forEach(function(n) { %>
|
||||
<li class="dropdown-item">
|
||||
<div class="notificationItem">
|
||||
<a class="notificationItemTitle"><%=n.get("title")%></a>
|
||||
<div class="notificationItemContent"><%=n.get("content")%></div>
|
||||
|
||||
<% if (n.get("info")) { %>
|
||||
<i title="<%=n.get("info")%>" class="notificationInfoIcon fa fa-info-circle"></i>
|
||||
<% } %>
|
||||
|
||||
<i id="<%=n.cid%>" class="fa fa-times-circle-o"></i>
|
||||
<a class="notificationItemTitle"><%=n.get("title")%></a>
|
||||
<div class="notificationItemContent"><%=n.get("content")%></div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<% }); %>
|
||||
|
@ -2385,7 +2385,7 @@ if (list.length > 0) {
|
|||
<div id="stat_hd" class="notificationButton"><p id="stat_hd_counter">0</p></div>
|
||||
</div>
|
||||
|
||||
<li class="dropdown no-left-margin">
|
||||
<li class="dropdown no-left-margin" style="border: 0">
|
||||
<ul class="user-dropdown-menu fixedDropdown" id="notification_menu">
|
||||
<li class="dropdown-header"><a>Notifications</a></li>
|
||||
<ul class="innerDropdownInnerUL"></ul>
|
||||
|
@ -2859,9 +2859,9 @@ var cutByResolution = function (str) {
|
|||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="sharedLibs.js?version=1445617511824"></script>
|
||||
<script src="libs.js?version=1445617511824"></script>
|
||||
<script src="app.js?version=1445617511824"></script>
|
||||
<script src="sharedLibs.js?version=1445958308377"></script>
|
||||
<script src="libs.js?version=1445958308377"></script>
|
||||
<script src="app.js?version=1445958308377"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -220,11 +220,11 @@
|
|||
},
|
||||
|
||||
arangoNotification: function (title, content, info) {
|
||||
window.App.notificationList.add({title:title, content: content, info: info});
|
||||
window.App.notificationList.add({title:title, content: content, info: info, type: 'success'});
|
||||
},
|
||||
|
||||
arangoError: function (title, content, info) {
|
||||
window.App.notificationList.add({title:title, content: content, info: info});
|
||||
window.App.notificationList.add({title:title, content: content, info: info, type: 'error'});
|
||||
},
|
||||
|
||||
getRandomToken: function () {
|
||||
|
|
1
js/apps/system/_admin/aardvark/APP/frontend/js/lib/jquery.noty.packaged.min.js
vendored
Normal file
1
js/apps/system/_admin/aardvark/APP/frontend/js/lib/jquery.noty.packaged.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -243,8 +243,8 @@ var helpArangoCollection = arangosh.createHelpHeadline("ArangoCollection help")
|
|||
' truncate() delete all documents ' + "\n" +
|
||||
' properties() show collection properties ' + "\n" +
|
||||
' drop() delete a collection ' + "\n" +
|
||||
' load() load a collection into memory ' + "\n" +
|
||||
' unload() unload a collection from memory ' + "\n" +
|
||||
' load() load a collection ' + "\n" +
|
||||
' unload() unload a collection ' + "\n" +
|
||||
' rename(<new-name>) renames a collection ' + "\n" +
|
||||
' getIndexes() return defined indexes ' + "\n" +
|
||||
' refresh() refreshes the status and name ' + "\n" +
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<% notifications.forEach(function(n) { %>
|
||||
<li class="dropdown-item">
|
||||
<div class="notificationItem">
|
||||
<a class="notificationItemTitle"><%=n.get("title")%></a>
|
||||
<div class="notificationItemContent"><%=n.get("content")%></div>
|
||||
|
||||
<% if (n.get("info")) { %>
|
||||
<i title="<%=n.get("info")%>" class="notificationInfoIcon fa fa-info-circle"></i>
|
||||
<% } %>
|
||||
|
||||
<i id="<%=n.cid%>" class="fa fa-times-circle-o"></i>
|
||||
<a class="notificationItemTitle"><%=n.get("title")%></a>
|
||||
<div class="notificationItemContent"><%=n.get("content")%></div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<% }); %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div id="stat_hd" class="notificationButton"><p id="stat_hd_counter">0</p></div>
|
||||
</div>
|
||||
|
||||
<li class="dropdown no-left-margin">
|
||||
<li class="dropdown no-left-margin" style="border: 0">
|
||||
<ul class="user-dropdown-menu fixedDropdown" id="notification_menu">
|
||||
<li class="dropdown-header"><a>Notifications</a></li>
|
||||
<ul class="innerDropdownInnerUL"></ul>
|
||||
|
|
|
@ -188,6 +188,8 @@
|
|||
|
||||
var self = this;
|
||||
|
||||
console.log(this.model.get("path"));
|
||||
|
||||
$(this.el).html(this.template.render({
|
||||
app: this.model,
|
||||
db: arangoHelper.currentDatabase(),
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"click #confirmDeleteDocument" : "deleteDocument",
|
||||
"click #document-from" : "navigateToDocument",
|
||||
"click #document-to" : "navigateToDocument",
|
||||
"keydown .ace_editor" : "keyPress",
|
||||
"keydown #documentEditor .ace_editor" : "keyPress",
|
||||
"keyup .jsoneditor .search input" : "checkSearchBox"
|
||||
},
|
||||
|
||||
|
@ -189,7 +189,7 @@
|
|||
model = this.editor.get();
|
||||
}
|
||||
catch (e) {
|
||||
this.errorConfirmation();
|
||||
this.errorConfirmation(e);
|
||||
this.disableSaveButton();
|
||||
return;
|
||||
}
|
||||
|
@ -219,6 +219,9 @@
|
|||
},
|
||||
|
||||
successConfirmation: function () {
|
||||
|
||||
arangoHelper.arangoNotification('Document saved.');
|
||||
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#C6FFB0'}, 500);
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#FFFFF'}, 500);
|
||||
|
||||
|
@ -226,7 +229,9 @@
|
|||
$('#documentEditor .ace_content').animate({backgroundColor: '#FFFFF'}, 500);
|
||||
},
|
||||
|
||||
errorConfirmation: function () {
|
||||
errorConfirmation: function (e) {
|
||||
arangoHelper.arangoError("Document editor: ", e);
|
||||
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#FFB0B0'}, 500);
|
||||
$('#documentEditor .tree').animate({backgroundColor: '#FFFFF'}, 500);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*jshint browser: true */
|
||||
/*jshint unused: false */
|
||||
/*global Backbone, templateEngine, $, window*/
|
||||
/*global Backbone, templateEngine, $, window, noty */
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
|
@ -32,6 +32,8 @@
|
|||
},
|
||||
|
||||
removeAllNotifications: function () {
|
||||
$.noty.clearQueue();
|
||||
$.noty.closeAll();
|
||||
this.collection.reset();
|
||||
$('#notification_menu').hide();
|
||||
},
|
||||
|
@ -41,7 +43,53 @@
|
|||
this.collection.get(cid).destroy();
|
||||
},
|
||||
|
||||
renderNotifications: function() {
|
||||
renderNotifications: function(a, b, event) {
|
||||
|
||||
if (event) {
|
||||
if (event.add) {
|
||||
var latestModel = this.collection.at(this.collection.length - 1),
|
||||
message = latestModel.get('title'),
|
||||
time = 3000;
|
||||
|
||||
if (latestModel.get('content')) {
|
||||
message = message + ": " + latestModel.get('content');
|
||||
}
|
||||
|
||||
if (latestModel.get('type') === 'error') {
|
||||
time = false;
|
||||
}
|
||||
else {
|
||||
$.noty.clearQueue();
|
||||
$.noty.closeAll();
|
||||
}
|
||||
|
||||
noty({
|
||||
theme: 'relax',
|
||||
text: message,
|
||||
template:
|
||||
'<div class="noty_message arango_message">' +
|
||||
'<div><i class="fa fa-close"></i></div><span class="noty_text arango_text"></span>' +
|
||||
'<div class="noty_close arango_close"></div></div>',
|
||||
maxVisible: 1,
|
||||
closeWith: ['click'],
|
||||
type: latestModel.get('type'),
|
||||
layout: 'bottom',
|
||||
timeout: time,
|
||||
animation: {
|
||||
open: {height: 'show'},
|
||||
close: {height: 'hide'},
|
||||
easing: 'swing',
|
||||
speed: 200
|
||||
}
|
||||
});
|
||||
|
||||
if (latestModel.get('type') === 'success') {
|
||||
latestModel.destroy();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#stat_hd_counter').text(this.collection.length);
|
||||
if (this.collection.length === 0) {
|
||||
$('#stat_hd').removeClass('fullNotification');
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,28 @@
|
|||
#notification_menu {
|
||||
.innerDropdownInnerUL {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#noty_bottom_layout_container {
|
||||
li {
|
||||
border: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.noty_bar {
|
||||
|
||||
.arango_message {
|
||||
font-weight: 500 !important;
|
||||
|
||||
div {
|
||||
float: right;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fixedDropdown {
|
||||
background: $c-white !important;
|
||||
border-color: $c-content-border !important;
|
||||
|
@ -30,12 +55,13 @@
|
|||
|
||||
.notificationItemContent {
|
||||
@extend %pull-left;
|
||||
font-size: .9em;
|
||||
font-weight: 300;
|
||||
margin-left: 15px;
|
||||
max-width: 155px;
|
||||
max-width: 180px;
|
||||
min-height: 15px;
|
||||
white-space: normal;
|
||||
width: 155px;
|
||||
width: 180px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
|
@ -63,13 +89,13 @@
|
|||
}
|
||||
|
||||
i {
|
||||
@extend %pull-left;
|
||||
@extend %pull-right;
|
||||
@extend %clickable;
|
||||
color: $c-semi-transp;
|
||||
font-size: 20px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
right: 4px;
|
||||
top: -9px;
|
||||
right: 2px;
|
||||
|
||||
&:hover {
|
||||
color: $c-black;
|
||||
|
|
|
@ -85,3 +85,5 @@
|
|||
|
||||
// Plugin
|
||||
@import 'uploadfile';
|
||||
|
||||
@import 'animate';
|
||||
|
|
Loading…
Reference in New Issue