Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

Commit

Permalink
Fixing incoherences, merging button. Fixes #605, fixes #608
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbernhardt committed Jul 12, 2012
1 parent bae9f59 commit 0c48558
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
11 changes: 5 additions & 6 deletions app/views/organization/DataSets/dataSet.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
<th>Name</th>
<td data-bind="text: name"></td>
</tr>
<tr>
<th>Organization</th>
<td data-bind="text: nodeName"></td>
</tr>
<tr>
<th>Language</th>
<td data-bind="text: information.language"></td>
Expand All @@ -39,10 +43,6 @@
<th>Country</th>
<td data-bind="text: information.country"></td>
</tr>
<tr>
<th>Provider</th>
<td data-bind="text: nodeName"></td>
</tr>
<tr>
<th>Data Provider</th>
<td data-bind="text: information.dataProvider"></td>
Expand Down Expand Up @@ -105,8 +105,7 @@ <h4>Dataset actions</h4>

<div class="btn-toolbar">
<div class="btn-group">
<button class="btn" data-bind="css: { disabled: cannotEdit | (dataSetState() != 'disabled') }, click: function() { enable(spec); }">Enable</button>
<button class="btn" data-bind="css: { disabled: cannotEdit | (dataSetState() != 'enabled') }, click: function() { disable(spec); }">Disable</button>
<button class="btn" data-bind="css: { disabled: cannotEdit | (dataSetState() != 'disabled' && dataSetState() != 'enabled') }, click: function() { (dataSetState() == 'disabled' ? enable(spec) : disable(spec)) }, text: (dataSetState() == 'enabled' ? 'Disable' : 'Enable')"></button>
<button class="btn" data-bind="css: { disabled: cannotEdit | (dataSetState() != 'uploaded' && dataSetState() != 'enabled' && dataSetState() != 'disabled' && dataSetState() != 'error') }, click: function() { process(spec); }">Process</button>
</div>
<div class="btn-group">
Expand Down
16 changes: 1 addition & 15 deletions app/views/organization/DataSets/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</tfoot>
<tbody data-bind="foreach: sets()">
<tr>
<td><a data-bind="attr: { href: '/organizations/' + orgId() + '/dataset/' + spec() }"><i class="icon icon-wrench"></i> <span data-bind="text: spec"></span></a></td>
<td><a data-bind="attr: { href: '/organizations/' + orgId() + '/dataset/' + spec() }"><i class="icon icon-wrench"></i> <span data-bind="text: name"></span></a></td>
<td><span data-bind="text: nodeName"></span></td>
<td>
<a data-bind="text: totalRecords, attr: { href: '/search?query%3Ddelving_spec%3A' + spec() }" class="rCount"></a>
Expand Down Expand Up @@ -184,20 +184,6 @@
}
};

// special popover handling for the record counts
ko.bindingHandlers.popover = {
init: function(element, valueAccessor, allBindingsAccessor, viewModel) {
$(element).popover({
content: "bla"
});
},
update: function (element, valueAccessor, allBindingsAccessor, context) {
$(element).popover({
content: "bla"
});
}
};

ko.applyBindings(viewModel);
});

Expand Down

0 comments on commit 0c48558

Please sign in to comment.