Commit d7bae0e4 authored by bweinstein@apple.com's avatar bweinstein@apple.com

Part of <http://webkit.org/b/30483>.

Web Inspector: Always show the Local and Session Storage Views.
        
Reviewed by Timothy Hatcher.

Even if the length of the DOM Storage entry array is 0, still
generate the Datagrid because users can add things storage items
through the UI, so we should allow them to even if there isn't
anything there currently.

* English.lproj/localizedStrings.js: Removed "This Storage is Empty".
* inspector/front-end/DOMStorageItemsView.js:
(WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 65678229
2009-10-29 Brian Weinstein <bweinstein@apple.com>
Reviewed by Timothy Hatcher.
Part of <http://webkit.org/b/30483>.
Web Inspector: Always show the Local and Session Storage Views.
Even if the length of the DOM Storage entry array is 0, still
generate the Datagrid because users can add things storage items
through the UI, so we should allow them to even if there isn't
anything there currently.
* English.lproj/localizedStrings.js: Removed "This Storage is Empty".
* inspector/front-end/DOMStorageItemsView.js:
(WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
2009-10-29 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Bvar localizedStrings = new Object;
......
......@@ -65,22 +65,12 @@ WebInspector.DOMStorageItemsView.prototype = {
this.domStorage.getEntries(callback);
},
_showDOMStorageEntries: function(entries)
_showDOMStorageEntries: function(entries)
{
if (entries.length > 0) {
this._dataGrid = this._dataGridForDOMStorageEntries(entries);
this.element.appendChild(this._dataGrid.element);
this._dataGrid.updateWidths();
this.deleteButton.visible = true;
} else {
var emptyMsgElement = document.createElement("div");
emptyMsgElement.className = "storage-table-empty";
if (this.domStorage)
emptyMsgElement.textContent = WebInspector.UIString("This storage is empty.");
this.element.appendChild(emptyMsgElement);
this._dataGrid = null;
this.deleteButton.visible = false;
}
this._dataGrid = this._dataGridForDOMStorageEntries(entries);
this.element.appendChild(this._dataGrid.element);
this._dataGrid.updateWidths();
this.deleteButton.visible = true;
},
resize: function()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment