summaryrefslogtreecommitdiffstats
path: root/devtools/client/storage/ui.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-03-05 00:35:56 +0100
committerGitHub <noreply@github.com>2018-03-05 00:35:56 +0100
commitde97f5dd8e9dda4f86296cf829a82cd1d5f59467 (patch)
tree7e1a87b496f8b151e6c07b50301b5c1dedfb63db /devtools/client/storage/ui.js
parentb9b17570065273fe3e023a8c8633188379ad6603 (diff)
parentd24b2d8a1d04c4f1770f090c2eb26010d5e97a0d (diff)
downloadUXP-de97f5dd8e9dda4f86296cf829a82cd1d5f59467.tar
UXP-de97f5dd8e9dda4f86296cf829a82cd1d5f59467.tar.gz
UXP-de97f5dd8e9dda4f86296cf829a82cd1d5f59467.tar.lz
UXP-de97f5dd8e9dda4f86296cf829a82cd1d5f59467.tar.xz
UXP-de97f5dd8e9dda4f86296cf829a82cd1d5f59467.zip
Merge pull request #47 from janekptacijarabaci/devtools_storage_refresh_1
Added a button to refresh the Storage Inspector display
Diffstat (limited to 'devtools/client/storage/ui.js')
-rw-r--r--devtools/client/storage/ui.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/devtools/client/storage/ui.js b/devtools/client/storage/ui.js
index ef07a8e88..7745c8da9 100644
--- a/devtools/client/storage/ui.js
+++ b/devtools/client/storage/ui.js
@@ -160,6 +160,7 @@ function StorageUI(front, target, panelWin, toolbox) {
this._tablePopup = this._panelDoc.getElementById("storage-table-popup");
this._tablePopup.addEventListener("popupshowing", this.onTablePopupShowing);
+ this.onRefreshTable = this.onRefreshTable.bind(this);
this.onAddItem = this.onAddItem.bind(this);
this.onRemoveItem = this.onRemoveItem.bind(this);
this.onRemoveAllFrom = this.onRemoveAllFrom.bind(this);
@@ -167,6 +168,9 @@ function StorageUI(front, target, panelWin, toolbox) {
this.onRemoveAllSessionCookies = this.onRemoveAllSessionCookies.bind(this);
this.onRemoveTreeItem = this.onRemoveTreeItem.bind(this);
+ this._refreshButton = this._panelDoc.getElementById("refresh-button");
+ this._refreshButton.addEventListener("command", this.onRefreshTable);
+
this._addButton = this._panelDoc.getElementById("add-button");
this._addButton.addEventListener("command", this.onAddItem);
@@ -229,6 +233,7 @@ StorageUI.prototype = {
this.searchBox = null;
this._treePopup.removeEventListener("popupshowing", this.onTreePopupShowing);
+ this._refreshButton.removeEventListener("command", this.onRefreshTable);
this._addButton.removeEventListener("command", this.onAddItem);
this._tablePopupAddItem.removeEventListener("command", this.onAddItem);
this._treePopupDeleteAll.removeEventListener("command", this.onRemoveAll);
@@ -1121,6 +1126,13 @@ StorageUI.prototype = {
},
/**
+ * Handles refreshing the selected storage
+ */
+ onRefreshTable: function (event) {
+ this.onHostSelect(event, this.tree.selectedItem);
+ },
+
+ /**
* Handles adding an item from the storage
*/
onAddItem: function () {