mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
[API] Listen to add/remove buttons
This commit is contained in:
parent
be0029e59a
commit
e4a4704baa
@ -1,9 +1,9 @@
|
||||
<div class="tool-bar btn-bar contents abs">
|
||||
<a class="s-btn labeled">
|
||||
<a class="s-btn labeled example-add">
|
||||
<span class="ui-symbol icon">+</span>
|
||||
<span class="title-label">Add Task</span>
|
||||
</a>
|
||||
<a class="s-btn">
|
||||
<a class="s-btn example-remove">
|
||||
<span class="ui-symbol icon">Z</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -108,7 +108,14 @@ define([
|
||||
}
|
||||
|
||||
TodoToolbarView.prototype.show = function (container) {
|
||||
$(container).append($(toolbarTemplate));
|
||||
var $els = $(toolbarTemplate);
|
||||
var $add = $els.find('a.example-add');
|
||||
var $remove = $els.find('a.example-remove');
|
||||
|
||||
$(container).append($els);
|
||||
|
||||
$add.on('click', window.alert.bind(window, "Add!"));
|
||||
$remove.on('click', window.alert.bind(window, "Remove!"));
|
||||
};
|
||||
|
||||
TodoToolbarView.prototype.destroy = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user