Permalink
Browse files

The saveload button now loads the schema xml instead

  • Loading branch information...
1 parent 456177f commit 3653b52509550a8dbf725aea9fc929a203602baf Tom ten Thij committed Jan 22, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 public/schema_browser/javascripts/wwwsqldesigner.js
@@ -1273,19 +1273,30 @@ SQL.IO.prototype.init = function(owner) {
this.listresponse = this.bind(this.listresponse);
this.importresponse = this.bind(this.importresponse);
- OZ.Event.add(this.dom.saveload, "click", this.bind(this.click));
+ // OZ.Event.add(this.dom.saveload, "click", this.bind(this.click));
OZ.Event.add(this.dom.clientsave, "click", this.bind(this.clientsave));
OZ.Event.add(this.dom.clientload, "click", this.bind(this.clientload));
OZ.Event.add(this.dom.clientsql, "click", this.bind(this.clientsql));
OZ.Event.add(this.dom.quicksave, "click", this.bind(this.quicksave));
OZ.Event.add(this.dom.serversave, "click", this.bind(this.serversave));
OZ.Event.add(this.dom.serverload, "click", this.bind(this.serverload));
OZ.Event.add(this.dom.serverlist, "click", this.bind(this.serverlist));
- OZ.Event.add(this.dom.serverimport, "click", this.bind(this.serverimport));
+ // OZ.Event.add(this.dom.serverimport, "click", this.bind(this.serverimport));
+ OZ.Event.add(this.dom.saveload, "click", this.bind(this.schema_browser_load));
OZ.Event.add(document, "keydown", this.bind(this.press));
this.build();
}
+SQL.IO.prototype.schema_browser_load = function() {
+ context = this;
+ var name = "Schema browser"
+ context._name = name;
+ var url = context.owner.getOption("schemabrowserpath");
+ context.owner.window.showThrobber();
+ context.name = name;
+ OZ.Request(url, context.loadresponse, {xml:true});
+}
+
SQL.IO.prototype.build = function() {
OZ.DOM.clear(this.dom.backend);

0 comments on commit 3653b52

Please sign in to comment.