allow extra XHR headers to be specified, e.g. authorization bearer tokens etc

This commit is contained in:
bilogic
2022-04-04 23:20:59 +08:00
parent 9dead5737a
commit c3db8d2e18
3 changed files with 21 additions and 5 deletions
+9
View File
@@ -1,6 +1,7 @@
SQL.Designer = function() {
SQL.Designer = this;
this.xhrheaders = {};
this.tables = [];
this.relations = [];
this.title = document.title;
@@ -210,6 +211,14 @@ SQL.Designer.prototype.setOption = function(name, value) {
this.setCookie(obj);
}
SQL.Designer.prototype.getXhrHeaders = function (value) {
return this.xhrheaders;
};
SQL.Designer.prototype.setXhrHeaders = function (value) {
this.xhrheaders = value;
};
SQL.Designer.prototype.raise = function(table) { /* raise a table */
var old = table.getZ();
var max = this.getMaxZ();