You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2014/05/07 19:06:25 UTC
couchdb commit: updated refs/heads/master to 2fe69e7
Repository: couchdb
Updated Branches:
refs/heads/master cf90e098d -> 2fe69e704
Fauxton: fix sorting for tasks on click
there is no node property, but a target, source or database
depending on the task
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2fe69e70
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2fe69e70
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2fe69e70
Branch: refs/heads/master
Commit: 2fe69e704bf3520334082a03fcf07434eda44ea0
Parents: cf90e09
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Fri Apr 25 23:53:56 2014 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Wed May 7 19:06:04 2014 +0200
----------------------------------------------------------------------
src/fauxton/app/addons/activetasks/resources.js | 16 ++++++++++++++--
.../app/addons/activetasks/templates/table.html | 2 +-
2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/2fe69e70/src/fauxton/app/addons/activetasks/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/resources.js b/src/fauxton/app/addons/activetasks/resources.js
index 3ac0898..3c5a513 100644
--- a/src/fauxton/app/addons/activetasks/resources.js
+++ b/src/fauxton/app/addons/activetasks/resources.js
@@ -23,7 +23,7 @@ function (app, backbone, Fauxton) {
app.taskSortBy = 'type';
Active.Task = Backbone.Model.extend({
- initialize: function() {
+ initialize: function() {
this.set({"id": this.get('pid')});
}
});
@@ -109,7 +109,19 @@ function (app, backbone, Fauxton) {
this.sort();
},
comparator: function(item) {
- return item.get(app.taskSortBy);
+ var value = app.taskSortBy,
+ values;
+
+ if (value.indexOf(',') !== -1) {
+ values = value.split(',');
+ _.each(values, function (val) {
+ if (item.get(val)) {
+ value = val;
+ }
+ });
+ }
+
+ return item.get(value);
}
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/2fe69e70/src/fauxton/app/addons/activetasks/templates/table.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/templates/table.html b/src/fauxton/app/addons/activetasks/templates/table.html
index 885cb47..77d2a42 100644
--- a/src/fauxton/app/addons/activetasks/templates/table.html
+++ b/src/fauxton/app/addons/activetasks/templates/table.html
@@ -37,7 +37,7 @@ the License.
<thead>
<tr>
<th data-type="type">Type</th>
- <th data-type="node">Object</th>
+ <th data-type="source,target,database">Object</th>
<th data-type="started_on">Started on</th>
<th data-type="updated_on">Last updated on</th>
<th data-type="pid">PID</th>