From 87c0e8d1a8ce0dd28ab47b271ec27fb041eddc42 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Fri, 18 Oct 2013 19:11:22 +0200 Subject: [PATCH 1/2] design --- .../frontend/css/collectionsItemView.css | 2 +- .../aardvark/frontend/css/collectionsView.css | 20 +++++------- .../aardvark/frontend/css/dashboardView.css | 32 +++++++++---------- .../frontend/css/documentSourceView.css | 2 +- .../aardvark/frontend/css/documentView.css | 4 +++ .../aardvark/frontend/css/documentsView.css | 7 ++-- .../system/aardvark/frontend/css/layout.css | 2 +- .../system/aardvark/frontend/css/modal.css | 31 ++++++++++++++++-- .../aardvark/frontend/css/queryView.css | 28 ++++++++++++---- .../js/collections/arangoDocuments.js | 30 ++++++++++++++--- .../js/templates/newCollectionView.ejs | 8 ++--- .../frontend/js/templates/queryView.ejs | 31 ++++++++++-------- .../frontend/js/views/dashboardView.js | 6 ++-- .../aardvark/frontend/js/views/queryView.js | 3 +- 14 files changed, 135 insertions(+), 71 deletions(-) diff --git a/js/apps/system/aardvark/frontend/css/collectionsItemView.css b/js/apps/system/aardvark/frontend/css/collectionsItemView.css index cb07fd63bd..4340e5147c 100644 --- a/js/apps/system/aardvark/frontend/css/collectionsItemView.css +++ b/js/apps/system/aardvark/frontend/css/collectionsItemView.css @@ -50,7 +50,7 @@ } .span3 .glyphicon-edit { margin-top: 4px !important; - font-size: 20.5px; + font-size: 19.5px; } .span3 .ICON{ diff --git a/js/apps/system/aardvark/frontend/css/collectionsView.css b/js/apps/system/aardvark/frontend/css/collectionsView.css index a721bfaec7..a336cec284 100644 --- a/js/apps/system/aardvark/frontend/css/collectionsView.css +++ b/js/apps/system/aardvark/frontend/css/collectionsView.css @@ -63,17 +63,17 @@ .searchInput { background-color: #FFFFFF; - border: 1px solid #c0c0c0; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; + border: 0 !important; + box-shadow: 0 !important; color: #555555; display: inline-block; font-size: 12px; - height: 18px; + height: 18px !important; line-height: 18px; - margin-top: 3px; + margin-top: 5px; padding: 2px; vertical-align: middle; - width:212px !important; + width:214px !important; border-radius: 0px 0px 0px 0px !important; } @@ -217,7 +217,7 @@ border-top: 0; } #collectionsDropdown2, #dashboardDropdownOut, #foxxDropdownOut { - background-color: rgba(0, 0, 0, 0.15); + background-color: white; position:relative; display:none; margin-left: 5px; @@ -229,10 +229,6 @@ border-top: 0; position: relative; min-height: 125px; width: auto; - border-left: 1px solid #686766; - border-bottom: 1px solid #686766; - border-right: 1px solid #686766; - border-top: none; box-shadow: 0 !important; } @@ -248,13 +244,13 @@ border-top: 0; } #collectionsDropdown ul, #dashboardDropdown ul, #foxxDropdown ul{ - border-left: 1px solid white; + border-left: 1px solid black; } #collectionsDropdown ul:last-of-type, #dashboardDropdown ul:last-of-type, #foxxDropdown ul:last-of-type { - border-left: 1px solid white; + border-left: 1px solid black; } #collectionsDropdown ul:first-of-type, diff --git a/js/apps/system/aardvark/frontend/css/dashboardView.css b/js/apps/system/aardvark/frontend/css/dashboardView.css index 9dfb34107a..70a60e1225 100644 --- a/js/apps/system/aardvark/frontend/css/dashboardView.css +++ b/js/apps/system/aardvark/frontend/css/dashboardView.css @@ -109,10 +109,11 @@ } .statGroups .statChart { - margin-left: -55px !important; - margin-top: -50px !important; float:left; - (;margin-top: -37px !important;) +} + +.svgClass .nv-linesWrap { + margin-left: -20px !important; } .nv-axislabel { @@ -129,9 +130,6 @@ } .svgClass { - margin-top: 23px !important; - padding-top: 0 !important; - /*height: 140px;*/ height: 155px; width: 300px; } @@ -146,7 +144,7 @@ li:hover i, li.hover i, li:hover h6, li.hover h6 { - opacity: 0.7 !important; + opacity: 0.8 !important; -webkit-transition-property: background color; -webkit-transition-duration: 1s; -webkit-transition-timing-function: linear; @@ -170,7 +168,7 @@ li:hover h6, li.hover h6 { } .boxHeader h6 { - opacity: 0.25; + opacity: 0.8; padding-top: 0 !important; color: black; margin-left: 5px; @@ -431,7 +429,6 @@ li:hover h6, li.hover h6 { padding-top: 5px; width: auto; min-height: 150px; - margin-bottom: 8px; margin-right: 10px; margin-top: -1px; border-top: 1px solid #888; @@ -473,7 +470,6 @@ li:hover h6, li.hover h6 { } #shortcutDiv { - padding-top: 10px; font-size: 12px; font-weight: 200; } @@ -512,8 +508,8 @@ li:hover h6, li.hover h6 { } #dashboardDropdown { - background-color: rgba(0,0,0,0.1) !important; min-height: 260px !important; + background-color: white; } #dashboardDropdown ul { @@ -563,7 +559,7 @@ li:hover h6, li.hover h6 { } @media screen and (-webkit-min-device-pixel-ratio:0) { - .svgClass{margin-top: 35px !important;} + .svgClass{margin-top: 10px !important;} .statSingleClient{margin-top: 10.5px !important;} #detailReplication{margin-top: 1.5px !important;} } @@ -586,8 +582,8 @@ li:hover h6, li.hover h6 { border-radius: 50%; box-shadow: margin-top: 1px; - 0 0 20px #111 inset, - 0 0 10px lime; + 0 0 10px #111 inset, + 0 0 5px lime; animation: 13s green infinite; } @@ -601,6 +597,10 @@ li:hover h6, li.hover h6 { border-radius: 50%; animation: 13s red infinite; box-shadow: - 0 0 20px #111 inset, - 0 0 10px red; + 0 0 10px #111 inset, + 0 0 5px red; +} + +#dashboardDropdown > ul > li > a > .radio { + padding-left: 0 !important; } diff --git a/js/apps/system/aardvark/frontend/css/documentSourceView.css b/js/apps/system/aardvark/frontend/css/documentSourceView.css index 8dfec2ce8c..264108717d 100644 --- a/js/apps/system/aardvark/frontend/css/documentSourceView.css +++ b/js/apps/system/aardvark/frontend/css/documentSourceView.css @@ -29,7 +29,7 @@ #sourceDiv { margin-top: 0px; padding-left: 5px; - padding-top: 10px; + padding-top: 13px; padding-right: 5px; padding-bottom: 5px; min-height: 400px; diff --git a/js/apps/system/aardvark/frontend/css/documentView.css b/js/apps/system/aardvark/frontend/css/documentView.css index 91f71eb2b3..ebce9010e0 100644 --- a/js/apps/system/aardvark/frontend/css/documentView.css +++ b/js/apps/system/aardvark/frontend/css/documentView.css @@ -38,6 +38,10 @@ .arangoTab a { color: black !important; cursor: pointer; + padding-left: 15px !important; + padding-right: 15px !important; + padding-top: 2px !important; + padding-bottom: 2px !important; } .arangoTab > li { diff --git a/js/apps/system/aardvark/frontend/css/documentsView.css b/js/apps/system/aardvark/frontend/css/documentsView.css index ebf963ef9e..930afa001c 100644 --- a/js/apps/system/aardvark/frontend/css/documentsView.css +++ b/js/apps/system/aardvark/frontend/css/documentsView.css @@ -78,21 +78,18 @@ table.dataTable thead th { } .arangoDropdown { - background-color: rgba(0, 0, 0, 0.15); + background-color: rgba(0,0,0,0.15); margin-bottom: -10px; } #filterHeader, #importHeader, .arangoDropdownIn { - background-color: rgba(0, 0, 0, 0.15); + background-color: white; padding-top: 10px; padding-left: 10px; padding-right: 10px; padding-bottom: 5px; margin-left: 5px; margin-right: 5px; - border-left: 1px solid #686766; - border-right: 1px solid #686766; - border-bottom: 1px solid #686766; position:relative; } diff --git a/js/apps/system/aardvark/frontend/css/layout.css b/js/apps/system/aardvark/frontend/css/layout.css index 445af0cd08..cec33807d8 100644 --- a/js/apps/system/aardvark/frontend/css/layout.css +++ b/js/apps/system/aardvark/frontend/css/layout.css @@ -66,7 +66,7 @@ textarea, .alert { border: none; color:#FFFFFF; margin-left:10px; - padding: 8px 16px; + padding: 5px 16px; font-weight: 300 !important; font-size: 14px; } diff --git a/js/apps/system/aardvark/frontend/css/modal.css b/js/apps/system/aardvark/frontend/css/modal.css index 480a999ff6..31b9994c3a 100644 --- a/js/apps/system/aardvark/frontend/css/modal.css +++ b/js/apps/system/aardvark/frontend/css/modal.css @@ -193,8 +193,9 @@ .modal-body .glyphicon-info-sign { color: #736B68; font-size: 18px; - margin-left: 5px; - margin-top: 2px; + right: 12px; + position: absolute; + margin-top: -10px; } .modal-body .glyphicon-info-sign:hover { @@ -248,3 +249,29 @@ #add-collection .accordion { margin-top: 10px; } + +#add-collection .collectionThSec { + width: 380px !important; +} + +#add-collection input { + width: 380px !important; + margin-left: 45px; +} + +#add-collection select { + width: 394px !important; + margin-left: 45px; +} + +#add-collection .accordion-toggle { + width: 457px !important; +} + +#change-collection input { + width: 384px !important; +} + +#change-collection select { + width: 398px !important; +} diff --git a/js/apps/system/aardvark/frontend/css/queryView.css b/js/apps/system/aardvark/frontend/css/queryView.css index 4641aa4dc0..9d471ba862 100644 --- a/js/apps/system/aardvark/frontend/css/queryView.css +++ b/js/apps/system/aardvark/frontend/css/queryView.css @@ -21,7 +21,7 @@ #editorToolbar { width: auto; - margin-top: 20px !important; + margin-top: 5px; margin-left: 0px; margin-right: 0px; border-top: 1px solid #A0A0A0; @@ -52,7 +52,7 @@ #outputToolbar { position: relative; - margin-top: 5px; + margin-top: 30px !important; margin-left: 0; margin-right: 0; width: auto; @@ -112,12 +112,17 @@ height: 200px; min-height: 100px; border: 1px solid #A0A0A0; - margin-bottom: 10px; + margin-bottom: 5px; +} + +#wideButtonDiv { + width: 100%; + height: 20px; + margin-bottom: 15px; } #submitQueryButton { float: right; - margin-top: 0px; } .querynavbar { @@ -138,6 +143,7 @@ height: 200px; margin-right: 0px; margin-left: 0px; + margin-bottom: 10px; min-height: 100px; overflow-y: hidden; border: 1px solid #c0c0c0; @@ -198,10 +204,10 @@ resize: vertical !important; } -#queryOutput .ace_gutter-cell { +/*#queryOutput .ace_gutter-cell { color: white; background-color: #686766 !important; -} +}*/ .ace_print-margin { visibility: hidden !important; @@ -215,3 +221,13 @@ #commentText, #redoText, #undoText, #clearInput, #clearOutput { margin-top: 1px; } + +#shortcutDiv { + float: left; + width: auto; + margin-top: -5px; +} + +#queryDiv > * { + border: 0 !important; +} diff --git a/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js b/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js index 2838554e9f..508cf0f638 100644 --- a/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js +++ b/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js @@ -67,14 +67,34 @@ window.arangoDocuments = Backbone.Collection.extend({ this.offset = (this.currentPage - 1) * this.documentsPerPage; + var myQueryVal; + var sortParameter = '_key'; + var sortCount = 10000; + + if (this.documentsCount <= sortCount) { + //sorted + myQueryVal = "FOR x in @@collection SORT x._key LIMIT @offset, @count RETURN x"; + } + else { + //not sorted + myQueryVal = "FOR x in @@collection LIMIT @offset, @count RETURN x"; + } + + var myQuery = { + query: myQueryVal, + bindVars: { + "@collection": this.collectionID, + "offset": this.offset, + "count": this.documentsPerPage + } + }; + $.ajax({ cache: false, - type: 'PUT', + type: 'POST', async: false, - url: '/_api/simple/all/', - data: - '{"collection":"' + this.collectionID + '","skip":'+ - this.offset + ',"limit":' + String(this.documentsPerPage) + '}', + url: '/_api/cursor', + data: JSON.stringify(myQuery), contentType: "application/json", success: function(data) { self.clearDocuments(); diff --git a/js/apps/system/aardvark/frontend/js/templates/newCollectionView.ejs b/js/apps/system/aardvark/frontend/js/templates/newCollectionView.ejs index 8f91740bab..7cb6ea8519 100644 --- a/js/apps/system/aardvark/frontend/js/templates/newCollectionView.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/newCollectionView.ejs @@ -9,11 +9,11 @@ - + -
Name:
Type: + - + -
Journal size:
Sync: + @@ -26,9 +17,21 @@
- -
Submit: CTRL/CMD + Return ; Undo: CTRL/CMD + Z ; Redo: CTRL/CMD + SHIFT + Z ; - Toggle Comments: CTRL/CMD + SHIFT + C
+
+
+ Submit: CTRL/CMD + Return ; Undo: CTRL/CMD + Z ; Redo: CTRL/CMD + SHIFT + Z ; + Toggle Comments: CTRL/CMD + SHIFT + C +
+ +
+
+
Result
+ + +
+
+
+ + + diff --git a/js/apps/system/aardvark/frontend/js/templates/queryView.ejs b/js/apps/system/aardvark/frontend/js/templates/queryView.ejs index 7eb62c4c38..314d7d9d02 100644 --- a/js/apps/system/aardvark/frontend/js/templates/queryView.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/queryView.ejs @@ -1,17 +1,19 @@ +
Result
-
Result
diff --git a/js/apps/system/aardvark/frontend/js/views/dashboardView.js b/js/apps/system/aardvark/frontend/js/views/dashboardView.js index be48a48620..141edef8f0 100644 --- a/js/apps/system/aardvark/frontend/js/views/dashboardView.js +++ b/js/apps/system/aardvark/frontend/js/views/dashboardView.js @@ -76,7 +76,12 @@ var dashboardView = Backbone.View.extend({ template: new EJS({url: 'js/templates/dashboardView.ejs'}), toggleEvent: function () { - $('#dashboardDropdownOut').slideToggle(220); + if ($('#detailReplication').is(':visible')) { + $('#replicationDropdownOut').slideToggle(220); + } + else { + $('#dashboardDropdownOut').slideToggle(220); + } }, getReplicationStatus: function () { @@ -281,7 +286,7 @@ var dashboardView = Backbone.View.extend({ }); } - this.options.description.models[0].attributes.figures.push(figure); + this.options.description.models[0].attributes.figures.unshift(figure); }, checkInterval: function (a) { @@ -382,6 +387,12 @@ var dashboardView = Backbone.View.extend({ $('#detailGraph').show(); $('.statGroups').show(); } + + if ($('#dashboardDropdownOut').is(':visible') || $('#replicationDropdownOut').is(':visible')) { + console.log("togled"); + $('#replicationDropdownOut').toggle(); + $('#dashboardDropdownOut').toggle(); + } }, showGroup: function (a) { diff --git a/js/apps/system/aardvark/frontend/js/views/queryView.js b/js/apps/system/aardvark/frontend/js/views/queryView.js index f967546f49..f855d438b1 100644 --- a/js/apps/system/aardvark/frontend/js/views/queryView.js +++ b/js/apps/system/aardvark/frontend/js/views/queryView.js @@ -385,7 +385,7 @@ var queryView = Backbone.View.extend({ else { selector = '#querySelect'; $(selector).empty(); - $(selector).append(''); + $(selector).append(''); $(selector).append(''); $.each(this.queries, function (k, v) {