storage system refactored

This commit is contained in:
Ondrej Zara
2015-06-15 12:02:57 +02:00
parent dcea4c24e5
commit 35b4c67a4a
34 changed files with 539 additions and 597 deletions
+22
View File
@@ -0,0 +1,22 @@
SQL.Storage.Clipboard = function(owner) {
SQL.Storage.call(this, owner);
this._dom.option.innerHTML = _("storage.clipboard");
this._buildButton("clientsave", "_save");
this._buildButton("clientload", "_load");
}
SQL.Storage.Clipboard.prototype = Object.create(SQL.Storage.prototype);
SQL.Storage.Clipboard.prototype._save = function() {
this.owner.getArea().value = this.owner.owner.toXML();
}
SQL.Storage.Clipboard.prototype._load = function() {
var xml = this.owner.getArea().value;
if (!xml) {
alert(_("empty"));
return;
}
this.owner.fromXMLText(xml);
}