From 0bedf48ba2e06fba2ee63878482082db54c5acca Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 18:29:38 +0100 Subject: [PATCH 01/18] safari css fix --- frontend/css/logsView.css | 9 +++------ frontend/js/templates/collectionsItemView.ejs | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/css/logsView.css b/frontend/css/logsView.css index 1c2cf18125..195b9168fb 100644 --- a/frontend/css/logsView.css +++ b/frontend/css/logsView.css @@ -35,12 +35,8 @@ -.odd { - background-color: /*#D3DDB8 !important*/; -} - -.even { - background-color: /*rgba(255, 255, 255, 0.8) !important*/; +.sorting_1 { + background-color: #FBFBFB !important; } /*.odd .sorting_1 { @@ -135,6 +131,7 @@ background-color: none !important; } #logTableID .firstcol, #infoTableID .firstcol, #debugTableID .firstcol, #critTableID .firstcol, #warnTableID .firstcol { + background-color: #F4F4F4 !important; background-image: -moz-linear-gradient(center top , #F4F4F4, #E4E4E4); border-top:1px solid #c1bdba; border-bottom:1px solid #c1bdba; diff --git a/frontend/js/templates/collectionsItemView.ejs b/frontend/js/templates/collectionsItemView.ejs index a30195f177..b1d607f0b9 100644 --- a/frontend/js/templates/collectionsItemView.ejs +++ b/frontend/js/templates/collectionsItemView.ejs @@ -4,7 +4,7 @@ - +
<%= attributes.status %>
From 2799d9e510b2942cf90ee62747673775d451149c Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 18:32:03 +0100 Subject: [PATCH 02/18] badge update --- frontend/js/templates/collectionsItemView.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/templates/collectionsItemView.ejs b/frontend/js/templates/collectionsItemView.ejs index b1d607f0b9..c4651b6dc8 100644 --- a/frontend/js/templates/collectionsItemView.ejs +++ b/frontend/js/templates/collectionsItemView.ejs @@ -7,7 +7,7 @@
-
<%= attributes.status %>
+
<%= attributes.status %>
<%= attributes.name %>
From 77766f95d4dffbd58754656348b62be58eefe128 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 18:38:38 +0100 Subject: [PATCH 03/18] popup bug fixed --- frontend/js/templates/collectionsItemView.ejs | 2 +- frontend/js/views/collectionView.js | 2 +- frontend/js/views/collectionsView.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/js/templates/collectionsItemView.ejs b/frontend/js/templates/collectionsItemView.ejs index c4651b6dc8..eb23c4ae60 100644 --- a/frontend/js/templates/collectionsItemView.ejs +++ b/frontend/js/templates/collectionsItemView.ejs @@ -1,7 +1,7 @@
diff --git a/frontend/js/views/collectionView.js b/frontend/js/views/collectionView.js index 402a71124b..61796bbc7d 100644 --- a/frontend/js/views/collectionView.js +++ b/frontend/js/views/collectionView.js @@ -22,7 +22,7 @@ var collectionView = Backbone.View.extend({ "click #unload-modified-collection" : "unloadCollection" }, hidden: function () { - window.location.hash = "#"; + window.location.hash = "#collection/"; }, fillModal: function() { this.myCollection = window.arangoCollectionsStore.get(this.options.colId).attributes; diff --git a/frontend/js/views/collectionsView.js b/frontend/js/views/collectionsView.js index 074e7801a6..bcddcfd7e9 100644 --- a/frontend/js/views/collectionsView.js +++ b/frontend/js/views/collectionsView.js @@ -19,7 +19,8 @@ var collectionsView = Backbone.View.extend({ $('.thumbnails', this.el).append('
  • Add Collection
  • '); $('#searchInput').val(searchOptions.searchPhrase); - $('#searchInput').focus(); + // to discuss + //$('#searchInput').focus(); var val = $('#searchInput').val(); $('#searchInput').val(''); $('#searchInput').val(val); From 4d688d980b268bdf29dfb1a9e6855f7bc5d07dba Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 19:07:58 +0100 Subject: [PATCH 04/18] fixes --- frontend/css/collectionsItemView.css | 4 ++-- frontend/css/collectionsView.css | 7 +++++++ frontend/css/layout.css | 8 ++++++++ frontend/css/modal.css | 6 ++++++ frontend/js/templates/collectionView.ejs | 13 ++++++++----- frontend/js/templates/newCollectionView.ejs | 5 ++--- frontend/js/views/collectionView.js | 7 +++++-- frontend/js/views/collectionsView.js | 3 +-- frontend/js/views/newCollectionView.js | 2 +- 9 files changed, 40 insertions(+), 15 deletions(-) diff --git a/frontend/css/collectionsItemView.css b/frontend/css/collectionsItemView.css index 75f8d82b6a..b7764ff49f 100644 --- a/frontend/css/collectionsItemView.css +++ b/frontend/css/collectionsItemView.css @@ -44,7 +44,7 @@ box-shadow: 0 0 0 !important; } -.icon-info-sign { - margin-top: 0px; +.icon-edit { + margin-top: 5px; margin-right: 5px; } diff --git a/frontend/css/collectionsView.css b/frontend/css/collectionsView.css index 39f2d4896f..f38b9187da 100644 --- a/frontend/css/collectionsView.css +++ b/frontend/css/collectionsView.css @@ -1,3 +1,5 @@ + + #newCollection { margin-left: 22px; margin-top: 2px; @@ -47,6 +49,10 @@ padding-top: 5px; } +.btn-group { + border-radius: 2px 2px 2px 2px !important; +} + .searchInput { background-color: #FFFFFF; border: 1px solid #c0c0c0; @@ -60,6 +66,7 @@ padding: 2px; vertical-align: middle; width:280px; + border-radius: 2px 2px 2px 2px !important; } #searchSubmit { diff --git a/frontend/css/layout.css b/frontend/css/layout.css index dba829bb34..725ccaea9d 100644 --- a/frontend/css/layout.css +++ b/frontend/css/layout.css @@ -1,3 +1,11 @@ +select { + border-radius: 2px 2px 2px 2px !important; +} + +input { + border-radius: 2px 2px 2px 2px !important; +} + .arangoBtn { background: none repeat scroll 0 0 #FFFFFF; color: #333232; diff --git a/frontend/css/modal.css b/frontend/css/modal.css index d5cc647a1b..d87c430ca8 100644 --- a/frontend/css/modal.css +++ b/frontend/css/modal.css @@ -31,3 +31,9 @@ .modal-body select { width: 314px; } + +.modal-text { + font-weight: normal; + padding-top: 3px; + padding-bottom: 3px; +} diff --git a/frontend/js/templates/collectionView.ejs b/frontend/js/templates/collectionView.ejs index 3bb54ba8d5..56aaaea82a 100644 --- a/frontend/js/templates/collectionView.ejs +++ b/frontend/js/templates/collectionView.ejs @@ -8,10 +8,12 @@ Name: + Size (MB): + Sync: @@ -21,33 +23,34 @@ + ID: -
    + diff --git a/frontend/js/views/collectionView.js b/frontend/js/views/collectionView.js index 61796bbc7d..fca9d144fd 100644 --- a/frontend/js/views/collectionView.js +++ b/frontend/js/views/collectionView.js @@ -11,6 +11,9 @@ var collectionView = Backbone.View.extend({ $('#change-collection').on('hidden', function () { }); this.fillModal(); + $('.modalTooltips').tooltip({ + placement: "left" + }); return this; }, @@ -32,12 +35,12 @@ var collectionView = Backbone.View.extend({ $('#change-collection-status').text(this.myCollection.status); if (this.myCollection.status == 'unloaded') { - $('#colFooter').append(''); + $('#colFooter').append(''); $('#collectionSizeBox').hide(); $('#collectionSyncBox').hide(); } else if (this.myCollection.status == 'loaded') { - $('#colFooter').append(''); + $('#colFooter').append(''); var data = window.arangoCollectionsStore.getProperties(this.options.colId, true); this.fillLoadedModal(data); } diff --git a/frontend/js/views/collectionsView.js b/frontend/js/views/collectionsView.js index bcddcfd7e9..074e7801a6 100644 --- a/frontend/js/views/collectionsView.js +++ b/frontend/js/views/collectionsView.js @@ -19,8 +19,7 @@ var collectionsView = Backbone.View.extend({ $('.thumbnails', this.el).append('
  • Add Collection
  • '); $('#searchInput').val(searchOptions.searchPhrase); - // to discuss - //$('#searchInput').focus(); + $('#searchInput').focus(); var val = $('#searchInput').val(); $('#searchInput').val(''); $('#searchInput').val(val); diff --git a/frontend/js/views/newCollectionView.js b/frontend/js/views/newCollectionView.js index 01323c542f..bd4f92bb4a 100644 --- a/frontend/js/views/newCollectionView.js +++ b/frontend/js/views/newCollectionView.js @@ -15,7 +15,7 @@ var newCollectionView = Backbone.View.extend({ $('#edgeFrom').hide(); $('#edgeTo').hide(); $('.modalTooltips').tooltip({ - placement: "right" + placement: "left" }); return this; From 93f07ce981a5792eba9544d4a9ce1abb3571085b Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 19:10:43 +0100 Subject: [PATCH 05/18] reload after collection deletion --- frontend/js/views/collectionView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/js/views/collectionView.js b/frontend/js/views/collectionView.js index fca9d144fd..5df594e733 100644 --- a/frontend/js/views/collectionView.js +++ b/frontend/js/views/collectionView.js @@ -105,6 +105,7 @@ var collectionView = Backbone.View.extend({ var returnval = window.arangoCollectionsStore.deleteCollection(collName); if (returnval === true) { self.hideModal(); + window.location.hash="#"; } else { self.hideModal(); From 7cca035ac74cc88c79b81d5cbc307cd21bd749d6 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 19:25:41 +0100 Subject: [PATCH 06/18] navi css --- frontend/css/navigationView.css | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/css/navigationView.css b/frontend/css/navigationView.css index f9db259624..884357f6cd 100644 --- a/frontend/css/navigationView.css +++ b/frontend/css/navigationView.css @@ -13,12 +13,21 @@ color: white !important; box-shadow: 0 0px 0px rgba(0, 0, 0, 0.0) inset !important; } +.navbar .nav > li > a:focus { + background-color: #333232 !important; +} -.navbar .nav > li > a:focus, .navbar .nav > li > a:hover { - background-color: #8AA051; +.navbar .nav > li > a:hover { + background-color: #8AA051 !important; color: white !important } +.dropdown-toggle, .dropdown-toggle:hover, .dropdown:hover, .dropdown:active { + background-color: rgba(0, 0, 0, 0) !important; + color: white !important; + margin-bottom: -8px !important; +} + body, input, textarea, .page-title span, .pingback a.url { font-family: "Helvetica",sans-serif; font-weight: 300; @@ -45,4 +54,4 @@ body, input, textarea, .page-title span, .pingback a.url { border: 0; background-color: #333232 !important; } -*/ \ No newline at end of file +*/ From 3c562deb5bc2c7444e9afc855d9a84ed95518e90 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 20:26:00 +0100 Subject: [PATCH 07/18] css --- frontend/css/dashboardView.css | 54 ++++++++++++++++++++++--- frontend/css/documentsView.css | 4 +- frontend/css/logsView.css | 2 +- frontend/css/navigationView.css | 10 +---- frontend/js/templates/dashboardView.ejs | 4 +- frontend/js/views/dashboardView.js | 2 +- 6 files changed, 57 insertions(+), 19 deletions(-) diff --git a/frontend/css/dashboardView.css b/frontend/css/dashboardView.css index 43cbccac28..c6bd5990f5 100644 --- a/frontend/css/dashboardView.css +++ b/frontend/css/dashboardView.css @@ -7,9 +7,8 @@ } .dashboardBox { - min-height: 200px; + min-height: 230px; width: 940px; - border: 1px solid black; padding-top: 10px; margin-bottom: 20px; background-color: rgba(0, 0, 0, 0.05); @@ -21,11 +20,56 @@ } .leftBox { - width: 30%; + width: 300px; float: left; + padding-left: 20px; + padding-top: 15px; +} + +.leftBox th { + padding-left: 5px; + float:left; + width: 100px; + text-align: left; + font-weight: normal !important; +} + +.leftBox table { + border-collapse:separate; + border-spacing:0 5px; +} + +.leftBox table tr { + background-image: -moz-linear-gradient(top, #f3efec, #ebe7e3); + background-image: -ms-linear-gradient(top, #f3efec, #ebe7e3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3efec), to(#ebe7e3)); + background-image: -webkit-linear-gradient(top, #f3efec, #ebe7e3); + background-image: -o-linear-gradient(top, #f3efec, #ebe7e3); + background-image: linear-gradient(top, #f3efec, #ebe7e3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3efec', endColorstr='#ebe7e3', GradientType=0); + border:1px solid #c1bdba; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } .rightBox { - width: 70%; - float: left; + padding-bottom: 0; + float: right; + height: 160px !important; + max-height: 220px !important; + width: 598px; + border:1px solid #c1bdba; + background-color: red; + margin-top: 20px; + margin-right: 20px; + background-image: -moz-linear-gradient(top, #f3efec, #ebe7e3); + background-image: -ms-linear-gradient(top, #f3efec, #ebe7e3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3efec), to(#ebe7e3)); + background-image: -webkit-linear-gradient(top, #f3efec, #ebe7e3); + background-image: -o-linear-gradient(top, #f3efec, #ebe7e3); + background-image: linear-gradient(top, #f3efec, #ebe7e3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3efec', endColorstr='#ebe7e3', GradientType=0); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } diff --git a/frontend/css/documentsView.css b/frontend/css/documentsView.css index 6a1d833b92..c3bf266d63 100644 --- a/frontend/css/documentsView.css +++ b/frontend/css/documentsView.css @@ -52,8 +52,8 @@ table.dataTable td { margin-left: 20px !important; width: 900px; !important; table-layout:fixed !important; - border-collapse:separate; - border-spacing:0 5px; + border-collapse:separate; + border-spacing:0 5px; } table.dataTable thead th { diff --git a/frontend/css/logsView.css b/frontend/css/logsView.css index 195b9168fb..66e68cf1b4 100644 --- a/frontend/css/logsView.css +++ b/frontend/css/logsView.css @@ -35,7 +35,7 @@ -.sorting_1 { +#logContent .sorting_1 { background-color: #FBFBFB !important; } diff --git a/frontend/css/navigationView.css b/frontend/css/navigationView.css index 884357f6cd..9639440a5c 100644 --- a/frontend/css/navigationView.css +++ b/frontend/css/navigationView.css @@ -22,7 +22,7 @@ color: white !important } -.dropdown-toggle, .dropdown-toggle:hover, .dropdown:hover, .dropdown:active { +.arango-nav .dropdown-toggle, .arango-nav .dropdown-toggle:hover, .arango-nav .dropdown:hover, .arango-nav .dropdown:active { background-color: rgba(0, 0, 0, 0) !important; color: white !important; margin-bottom: -8px !important; @@ -47,11 +47,3 @@ body, input, textarea, .page-title span, .pingback a.url { height: 34px; padding: 0 !important; } - -/*.dropdown-toggle:hover, .dropdown-toggle:focus { - color: white !important; - height:16px !important; - border: 0; - background-color: #333232 !important; -} -*/ diff --git a/frontend/js/templates/dashboardView.ejs b/frontend/js/templates/dashboardView.ejs index 5d1802477b..232a90d215 100644 --- a/frontend/js/templates/dashboardView.ejs +++ b/frontend/js/templates/dashboardView.ejs @@ -2,7 +2,9 @@
    Collections
    -
    +
    + +
    diff --git a/frontend/js/views/dashboardView.js b/frontend/js/views/dashboardView.js index 40ba098da5..8380e074e5 100644 --- a/frontend/js/views/dashboardView.js +++ b/frontend/js/views/dashboardView.js @@ -34,7 +34,7 @@ var dashboardView = Backbone.View.extend({ d3.select("#dashboardCollectionsGraph svg") .datum(self.formatCollectionsStats()) .transition().duration(1200) - .call(chart); + .call(chart) return chart; }); From 9423ae6e7662727fb7adf8f92bbf9f4dab61e873 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 20:46:23 +0100 Subject: [PATCH 08/18] fixed double document creation bug --- frontend/js/templates/documentsView.ejs | 4 ++-- frontend/js/views/documentsView.js | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/js/templates/documentsView.ejs b/frontend/js/templates/documentsView.ejs index 3ac33a9008..8b48e70601 100644 --- a/frontend/js/templates/documentsView.ejs +++ b/frontend/js/templates/documentsView.ejs @@ -43,7 +43,7 @@

    Theres no way back…

    diff --git a/frontend/js/views/documentsView.js b/frontend/js/views/documentsView.js index 472aaaf6eb..46deed4343 100644 --- a/frontend/js/views/documentsView.js +++ b/frontend/js/views/documentsView.js @@ -20,8 +20,6 @@ var documentsView = Backbone.View.extend({ "click #documentsTableID tr" : "clicked", "click #deleteDoc" : "remove", - "click #plusIconDoc" : "addDocument", - "click #documentAddBtn" : "addDocument", "click #documents_first" : "firstDocuments", "click #documents_last" : "lastDocuments", "click #documents_prev" : "prevDocuments", From 893971170da18b65b9c00e7b09c821a51388e394 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 26 Feb 2013 21:49:38 +0100 Subject: [PATCH 09/18] optimized usability in document view --- frontend/js/views/documentView.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/js/views/documentView.js b/frontend/js/views/documentView.js index d1d9e7a4c2..707aa7dcf1 100644 --- a/frontend/js/views/documentView.js +++ b/frontend/js/views/documentView.js @@ -81,7 +81,6 @@ var documentView = Backbone.View.extend({ ]); this.makeEditable(); - this.updateLocalDocumentStorage(); $(this.table).dataTable().fnClearTable(); this.drawTable(); }, @@ -145,8 +144,12 @@ var documentView = Backbone.View.extend({ var result = {}; for (row in data) { - var row_data = data[row]; - result[row_data[0]] = JSON.parse(row_data[2]); + console.log(data); + //Exclude "add-collection" row + if (row !== '0') { + var row_data = data[row]; + result[row_data[0]] = JSON.parse(row_data[2]); + } } window.arangoDocumentStore.updateLocalDocument(result); this.saveDocument(); @@ -175,6 +178,7 @@ var documentView = Backbone.View.extend({ if (aPos[1] == 0) { documentEditTable.fnUpdate(value, aPos[0], aPos[1]); self.updateLocalDocumentStorage(); + console.log("hit 1"); return value; } if (aPos[1] == 1) { @@ -188,6 +192,7 @@ var documentView = Backbone.View.extend({ // change update hidden row documentEditTable.fnUpdate(JSON.stringify(test), aPos[0], aPos[1] + 1); self.updateLocalDocumentStorage(); + console.log("hit 2"); // return visible row return self.value2html(test); } From 4601e2195f9f0892cf05e2b621e5660602ab361c Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 27 Feb 2013 09:36:08 +0100 Subject: [PATCH 10/18] css logsview fix --- frontend/css/logsView.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/css/logsView.css b/frontend/css/logsView.css index 66e68cf1b4..da18451e40 100644 --- a/frontend/css/logsView.css +++ b/frontend/css/logsView.css @@ -1,7 +1,5 @@ #logContent { - margin-left: 20px; margin-top: 0; - margin-right: 20px; border: 20px solid rgba(0, 0, 0, 0.00); background-color: rgba(0, 0, 0, 0.05); min-height: 330px !important; @@ -119,7 +117,7 @@ background-color: none !important; #logNav { padding-left: 20px; margin-left: -20px; - width: 880px; + width: 920px; padding-bottom: -10px; margin-bottom: 0; background-color: #686766; From a06ee810b70b28a6dcf313e3ed0811b207508046 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 27 Feb 2013 10:27:07 +0100 Subject: [PATCH 11/18] changed document view css + functions --- frontend/css/documentView.css | 13 +++++ frontend/js/templates/documentView.ejs | 5 +- frontend/js/views/documentView.js | 66 ++++++++++++++++---------- 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/frontend/css/documentView.css b/frontend/css/documentView.css index f24e2cabcf..316cbcb05b 100644 --- a/frontend/css/documentView.css +++ b/frontend/css/documentView.css @@ -24,6 +24,7 @@ #deleteRow { border: medium none; + margin-top: -4px; padding-left: 10px; background-color: transparent; } @@ -46,6 +47,18 @@ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } +#documentTableID thead { + text-align: left; +} + +#documentTableID .icon-edit { + margin-top: 0; +} + +#documentTableID .icon-edit:hover { + cursor: pointer; +} + #documentTableID.dataTable thead tr { background-image: -moz-linear-gradient(top, #f3efec, #ebe7e3); background-image: -ms-linear-gradient(top, #f3efec, #ebe7e3); diff --git a/frontend/js/templates/documentView.ejs b/frontend/js/templates/documentView.ejs index 05d49c7864..d690258097 100644 --- a/frontend/js/templates/documentView.ejs +++ b/frontend/js/templates/documentView.ejs @@ -18,10 +18,11 @@ Key +   Value type - - +   +   diff --git a/frontend/js/views/documentView.js b/frontend/js/views/documentView.js index 707aa7dcf1..787f265f42 100644 --- a/frontend/js/views/documentView.js +++ b/frontend/js/views/documentView.js @@ -10,7 +10,9 @@ var documentView = Backbone.View.extend({ "click #saveDocument" : "saveDocument", "click #addDocumentLine" : "addLine", "click #deleteRow" : "deleteLine", - "click #sourceView" : "sourceView" + "click #sourceView" : "sourceView", + "click #editFirstRow" : "editFirst", + "click #editSecondRow" : "editSecond" }, template: new EJS({url: '/_admin/html/js/templates/documentView.ejs'}), @@ -20,6 +22,16 @@ var documentView = Backbone.View.extend({ this.breadcrumb(); return this; }, + editFirst: function (e) { + var element = e.currentTarget; + var prevElement = $(element).parent().prev(); + $(prevElement).click(); + }, + editSecond: function (e) { + var element = e.currentTarget; + var prevElement = $(element).parent().prev(); + $(prevElement).click(); + }, sourceView: function () { window.location.hash = window.location.hash + "/source"; }, @@ -45,12 +57,14 @@ var documentView = Backbone.View.extend({ '
    ', '
    ', '
    ', + '
    ', '
    ' ]); $.each(window.arangoDocumentStore.models[0].attributes, function(key, value) { if (arangoHelper.isSystemAttribute(key)) { $(self.table).dataTable().fnAddData([ key, + '', self.value2html(value, true), JSON.stringify(value), "", @@ -58,12 +72,14 @@ var documentView = Backbone.View.extend({ ]); } else { - $(self.table).dataTable().fnAddData([ - key, - self.value2html(value), - JSON.stringify(value), - '', - '' + $(self.table).dataTable().fnAddData( + [ + key, + '', + self.value2html(value), + JSON.stringify(value), + '', + '' ]); } }); @@ -72,17 +88,20 @@ var documentView = Backbone.View.extend({ }, addLine: function () { - $(this.table).dataTable().fnAddData([ - "key"+arangoHelper.getRandomToken(), - this.value2html("editme"), - JSON.stringify("editme"), - '', - '' - ]); + $(this.table).dataTable().fnAddData( + [ + "key"+arangoHelper.getRandomToken(), + '', + this.value2html("editme"), + JSON.stringify("editme"), + '', + '' + ] + ); this.makeEditable(); - $(this.table).dataTable().fnClearTable(); - this.drawTable(); +// $(this.table).dataTable().fnClearTable(); +// this.drawTable(); }, deleteLine: function (a) { @@ -102,10 +121,11 @@ var documentView = Backbone.View.extend({ "bDeferRender": true, "iDisplayLength": -1, "aoColumns": [ - {"sClass":"writeable", "bSortable": false, "sWidth":"400px" }, + {"sClass":"writeable", "bSortable": false, "sWidth":"200px" }, + {"sClass":"read_only leftCell", "bSortable": false, "sWidth": "20px"}, {"sClass":"writeable rightCell", "bSortable": false}, {"bVisible": false }, - {"sClass":"read_only leftCell", "bSortable": false, "sWidth": "30px"}, + {"sClass":"read_only leftCell", "bSortable": false, "sWidth": "20px"}, {"sClass":"read_only leftCell", "bSortable": false, "sWidth": "30px"} ], "oLanguage": {"sEmptyTable": "No documents"} @@ -144,11 +164,10 @@ var documentView = Backbone.View.extend({ var result = {}; for (row in data) { - console.log(data); //Exclude "add-collection" row if (row !== '0') { var row_data = data[row]; - result[row_data[0]] = JSON.parse(row_data[2]); + result[row_data[0]] = JSON.parse(row_data[3]); } } window.arangoDocumentStore.updateLocalDocument(result); @@ -174,14 +193,12 @@ var documentView = Backbone.View.extend({ }); $('.writeable', documentEditTable.fnGetNodes()).editable(function(value, settings) { var aPos = documentEditTable.fnGetPosition(this); - console.log(aPos); if (aPos[1] == 0) { documentEditTable.fnUpdate(value, aPos[0], aPos[1]); self.updateLocalDocumentStorage(); - console.log("hit 1"); return value; } - if (aPos[1] == 1) { + if (aPos[1] == 2) { var oldContent = JSON.parse(documentEditTable.fnGetData(aPos[0], aPos[1] + 1)); var test = self.getTypedValue(value); if (String(value) == String(oldContent)) { @@ -192,7 +209,6 @@ var documentView = Backbone.View.extend({ // change update hidden row documentEditTable.fnUpdate(JSON.stringify(test), aPos[0], aPos[1] + 1); self.updateLocalDocumentStorage(); - console.log("hit 2"); // return visible row return self.value2html(test); } @@ -204,7 +220,7 @@ var documentView = Backbone.View.extend({ if (aPos[1] == 0) { return value; } - if (aPos[1] == 1) { + if (aPos[1] == 2) { var oldContent = documentEditTable.fnGetData(aPos[0], aPos[1] + 1); if (typeof(oldContent) == 'object') { //grep hidden row and paste in visible row From ccb676c788de0a150d174b5988832a34079d64d4 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 27 Feb 2013 10:32:28 +0100 Subject: [PATCH 12/18] fixed popup --- frontend/js/views/newCollectionView.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/frontend/js/views/newCollectionView.js b/frontend/js/views/newCollectionView.js index bd4f92bb4a..8456bd0002 100644 --- a/frontend/js/views/newCollectionView.js +++ b/frontend/js/views/newCollectionView.js @@ -23,23 +23,10 @@ var newCollectionView = Backbone.View.extend({ events: { "click #save-new-collection" : "saveNewCollection", - "click #new-collection-type" : "displayEdge" }, hidden: function () { - window.location.hash = "#"; - }, - - displayEdge: function () { - var collType = $('#new-collection-type').val(); - if (collType == 3) { - $('#edgeFrom').show(); - $('#edgeTo').show(); - } - else { - $('#edgeFrom').hide(); - $('#edgeTo').hide(); - } + window.location.hash = "#collection/"; }, saveNewCollection: function() { From e2dc6790e7a4804d1c4b8a73ac88250a0713d8b0 Mon Sep 17 00:00:00 2001 From: a-brandt Date: Wed, 27 Feb 2013 10:36:31 +0100 Subject: [PATCH 13/18] added message "system version" --- m4/external.icu | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/external.icu b/m4/external.icu index 54a7fe9899..e072a41128 100644 --- a/m4/external.icu +++ b/m4/external.icu @@ -60,6 +60,7 @@ dnl ---------------------------------------------------------------------------- LIB_INFO="$LIB_INFO|." if test "x$tr_ICU" = xyes; then + LIB_INFO="$LIB_INFO|ICU: system version" LIB_INFO="$LIB_INFO|ICU VERSION: ${TRI_ICU_VERSION}" LIB_INFO="$LIB_INFO|ICU_CPPFLAGS: ${ICU_CPPFLAGS}" From 937694d210ddce8bad9ef23b026d0e764c595083 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 27 Feb 2013 10:51:06 +0100 Subject: [PATCH 14/18] added docview sorting --- frontend/js/views/documentView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/js/views/documentView.js b/frontend/js/views/documentView.js index 787f265f42..ce57cdfbe4 100644 --- a/frontend/js/views/documentView.js +++ b/frontend/js/views/documentView.js @@ -53,7 +53,7 @@ var documentView = Backbone.View.extend({ drawTable: function () { var self = this; $(self.table).dataTable().fnAddData([ - ' Neu hinzufügen', + ' Add data', '
    ', '
    ', '
    ', @@ -84,13 +84,14 @@ var documentView = Backbone.View.extend({ } }); this.makeEditable(); + $(this.table).dataTable().fnSort([ [0,'asc'] ]); }, addLine: function () { $(this.table).dataTable().fnAddData( [ - "key"+arangoHelper.getRandomToken(), + "zkey"+arangoHelper.getRandomToken(), '', this.value2html("editme"), JSON.stringify("editme"), From dc9a917752df96065a8cf5ca14d511e1e8128415 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 27 Feb 2013 10:57:10 +0100 Subject: [PATCH 15/18] sourceview design changes --- frontend/css/documentSourceView.css | 9 ++++++++- frontend/js/templates/documentSourceView.ejs | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/css/documentSourceView.css b/frontend/css/documentSourceView.css index 1b22f24729..3fe3765d04 100644 --- a/frontend/css/documentSourceView.css +++ b/frontend/css/documentSourceView.css @@ -1,3 +1,11 @@ +#sourceFooter { + margin-top: 0; + background: none; + margin-bottom: 0; + padding-right: 0; + padding-bottom: 0; +} + #sourceEditor { height: 400px; width: 900px; @@ -26,5 +34,4 @@ } .sourceBox { - padding-bottom:20px; } diff --git a/frontend/js/templates/documentSourceView.ejs b/frontend/js/templates/documentSourceView.ejs index 5c1a91f6e4..7379b8de43 100644 --- a/frontend/js/templates/documentSourceView.ejs +++ b/frontend/js/templates/documentSourceView.ejs @@ -14,9 +14,9 @@
    -
    - Save -
    +
    + +
    From 6ec4d566d17e2513de3dab54da98dd4ff29d89ec Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 27 Feb 2013 11:54:46 +0100 Subject: [PATCH 16/18] popup fix collections view --- frontend/js/views/collectionsView.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/js/views/collectionsView.js b/frontend/js/views/collectionsView.js index 074e7801a6..f4ec598a97 100644 --- a/frontend/js/views/collectionsView.js +++ b/frontend/js/views/collectionsView.js @@ -29,7 +29,7 @@ var collectionsView = Backbone.View.extend({ }, events: { "click .icon-info-sign" : "details", - "blur #searchInput" : "restrictToSearchPhrase", + //"blur #searchInput" : "restrictToSearchPhrase", "keypress #searchInput" : "restrictToSearchPhraseKey", "change #searchInput" : "restrictToSearchPhrase", "click #searchSubmit" : "restrictToSearchPhrase", @@ -40,7 +40,7 @@ var collectionsView = Backbone.View.extend({ checkSystem: function () { var searchOptions = this.collection.searchOptions; var oldValue = searchOptions.includeSystem; - + searchOptions.includeSystem = ($('#checkSystem').is(":checked") === true); if (oldValue != searchOptions.includeSystem) { @@ -60,9 +60,9 @@ var collectionsView = Backbone.View.extend({ checkUnloaded: function () { var searchOptions = this.collection.searchOptions; var oldValue = searchOptions.includeUnloaded; - + searchOptions.includeUnloaded = ($('#checkUnloaded').is(":checked") === true); - + if (oldValue != searchOptions.includeUnloaded) { this.render(); } From e1502f5b81cb89ab990651fb29b51d8291a1d87c Mon Sep 17 00:00:00 2001 From: a-brandt Date: Wed, 27 Feb 2013 13:14:56 +0100 Subject: [PATCH 17/18] added CFLAGS and CXXFLAGS --- 3rdParty/Makefile.all-in-one-v8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdParty/Makefile.all-in-one-v8 b/3rdParty/Makefile.all-in-one-v8 index d858d4ea86..b08dee6108 100644 --- a/3rdParty/Makefile.all-in-one-v8 +++ b/3rdParty/Makefile.all-in-one-v8 @@ -19,7 +19,7 @@ BUILT_SOURCES += @V8_LIBS@ @echo "--------------------------------------------------------------------------------" @echo - cd @top_srcdir@/3rdParty/V8 && $(MAKE) library=static strictaliasing=off snapshot=off werror=no @V8_TARGET@ + cd @top_srcdir@/3rdParty/V8 && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) library=static strictaliasing=off snapshot=off werror=no @V8_TARGET@ touch @srcdir@/.v8-build-@TRI_BITS@ From 16586c6ee1c4e08f489d8e230c2f43a7c603e725 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Wed, 27 Feb 2013 14:16:40 +0100 Subject: [PATCH 18/18] make AQL REVERSE() work on strings, too --- CHANGELOG | 2 ++ Documentation/UserManual/Aql.md | 2 ++ arangod/Ahuacatl/ahuacatl-functions.c | 3 ++- js/server/modules/org/arangodb/ahuacatl.js | 6 +++++- js/server/tests/ahuacatl-functions.js | 1 - 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a505dc46ad..b15d42c290 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ v1.3 (XXXX-XX-XX) ----------------- +* make AQL REVERSE() function work on strings, too + * disabled DOT generation in `make doxygen`. this speeds up docs generation * renamed startup option `--dispatcher.report-intervall` to `--dispatcher.report-interval` diff --git a/Documentation/UserManual/Aql.md b/Documentation/UserManual/Aql.md index 0485195b42..ac9faf8a7e 100644 --- a/Documentation/UserManual/Aql.md +++ b/Documentation/UserManual/Aql.md @@ -881,6 +881,8 @@ For string processing, AQL offers the following functions: starting at @FA{offset} and with a maximum length of @FA{length} characters. Offsets start at position 0. +- @FN{REVERSE(@FA{value})}: returns the reverse of the string @FA{value}. + - @FN{CONTAINS(@FA{text}, @FA{search}, @FA{return-index})}: checks whether the string @FA{search} is contained in the string @FA{text}. By default, this function returns `true` if @FA{search} is contained in @FA{text}, and `false` otherwise. By diff --git a/arangod/Ahuacatl/ahuacatl-functions.c b/arangod/Ahuacatl/ahuacatl-functions.c index 2885f69408..f0cc66595f 100644 --- a/arangod/Ahuacatl/ahuacatl-functions.c +++ b/arangod/Ahuacatl/ahuacatl-functions.c @@ -614,7 +614,8 @@ TRI_associative_pointer_t* TRI_InitialiseFunctionsAql (void) { REGISTER_FUNCTION("MAX", "MAX", true, true, "l", NULL); REGISTER_FUNCTION("SUM", "SUM", true, true, "l", NULL); REGISTER_FUNCTION("UNIQUE", "UNIQUE", true, false, "l", NULL); - REGISTER_FUNCTION("REVERSE", "REVERSE", true, false, "l", NULL); + // note: REVERSE() can be applied on strings, too + REGISTER_FUNCTION("REVERSE", "REVERSE", true, false, "ls", NULL); REGISTER_FUNCTION("FIRST", "FIRST", true, false, "l", NULL); REGISTER_FUNCTION("LAST", "LAST", true, false, "l", NULL); diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index ffe1ac884c..44182f595f 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -2018,10 +2018,14 @@ function LAST (value) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief reverse the elements in a list +/// @brief reverse the elements in a list or in a string //////////////////////////////////////////////////////////////////////////////// function REVERSE (value) { + if (TYPEWEIGHT(value) === TYPEWEIGHT_STRING) { + return value.split("").reverse().join(""); + } + LIST(value); return value.reverse(); diff --git a/js/server/tests/ahuacatl-functions.js b/js/server/tests/ahuacatl-functions.js index 7cff572fea..ae9df1988b 100644 --- a/js/server/tests/ahuacatl-functions.js +++ b/js/server/tests/ahuacatl-functions.js @@ -425,7 +425,6 @@ function ahuacatlFunctionsTestSuite () { assertEqual(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, getErrorCode(function() { QUERY("RETURN REVERSE(null)"); } )); assertEqual(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, getErrorCode(function() { QUERY("RETURN REVERSE(true)"); } )); assertEqual(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, getErrorCode(function() { QUERY("RETURN REVERSE(4)"); } )); - assertEqual(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, getErrorCode(function() { QUERY("RETURN REVERSE(\"yes\")"); } )); assertEqual(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, getErrorCode(function() { QUERY("RETURN REVERSE({ })"); } )); },