Skip to content
This repository has been archived by the owner on Feb 15, 2018. It is now read-only.

Commit

Permalink
add close button to panel
Browse files Browse the repository at this point in the history
  • Loading branch information
ttaubert committed May 9, 2015
1 parent d39dc9f commit 05d97af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions chrome/content/panel.xul
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<spacer flex="1" />
<button id="disable" label="Disable" accesskey="d" disabled="true"/>
<button id="enable" label="Enable" accesskey="n" hidden="true"/>
<button id="close" label="Close" accesskey="c"/>
</hbox>
</vbox>

Expand Down
5 changes: 5 additions & 0 deletions data/panel-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let buttons = (function () {

let edit = document.getElementById("edit");
let reset = document.getElementById("reset");
let close = document.getElementById("close");
let enable = document.getElementById("enable");
let disable = document.getElementById("disable");

Expand Down Expand Up @@ -36,6 +37,10 @@ let buttons = (function () {
}
}

close.addEventListener("command", function () {
self.port.emit("hide");
});

edit.addEventListener("command", function () {
tree.editSelectedRow();
});
Expand Down

0 comments on commit 05d97af

Please sign in to comment.