@@ -1243,9 +1243,9 @@ namespace OS {
const model = this.data.model;
for (const key in model) {
html += `\
-
-
-
+
+
+
`.format(model[key], key);
height += 60;
}
@@ -1291,18 +1291,18 @@ namespace OS {
MultiInputDialog.scheme = `\
-
+
-
+
{1}
-
-
-
+
+
+
-
+
-
+
`;
}
diff --git a/src/core/core.ts b/src/core/core.ts
index a62c62e..293e26b 100644
--- a/src/core/core.ts
+++ b/src/core/core.ts
@@ -1211,7 +1211,7 @@ namespace OS {
const o = $("
")
.attr("type", "file")
.css("display", "none");
- o.change(function() {
+ o.on("change",function() {
API.loading(q, p);
const formd = new FormData();
formd.append("path", d);
@@ -1236,7 +1236,7 @@ namespace OS {
return o.remove();
});
});
- return o.click();
+ return o.trigger("click");
});
}
diff --git a/src/core/gui.ts b/src/core/gui.ts
index f9310a1..381a7ad 100644
--- a/src/core/gui.ts
+++ b/src/core/gui.ts
@@ -120,7 +120,6 @@ namespace OS {
parent: Element | string
): void {
const scheme = $.parseHTML(html);
-
if (app.scheme) {
$(app.scheme).remove();
}
@@ -945,9 +944,9 @@ namespace OS {
$("#systooltip")[0].uify(undefined);
$("#contextmenu")[0].uify(undefined);
- $("#workspace").contextmenu((e) => bindContextMenu(e));
+ $("#workspace").on("contextmenu",(e) => bindContextMenu(e));
// tooltip
- $(document).mouseover(function (e) {
+ $(document).on("mouseover", function (e) {
const el: any = $(e.target).closest("[tooltip]");
if (!(el.length > 0)) {
return;
@@ -1088,7 +1087,7 @@ namespace OS {
export function login(): void {
const scheme = $.parseHTML(schemes.login);
$("#wrapper").append(scheme);
- $("#btlogin").click(async function () {
+ $("#btlogin").on("click", async function () {
const data: API.UserLoginType = {
username: $("#txtuser").val() as string,
password: $("#txtpass").val() as string,
@@ -1103,14 +1102,14 @@ namespace OS {
return $("#login_error").html("Login: server error");
}
});
- $("#txtpass").keyup(function (e) {
+ $("#txtpass").on("keyup", function (e) {
if (e.which === 13) {
- return $("#btlogin").click();
+ return $("#btlogin").trigger("click");
}
});
$("#txtuser").keyup(function (e) {
if (e.which === 13) {
- return $("#btlogin").click();
+ return $("#btlogin").trigger("click");
}
});
}
@@ -1223,8 +1222,8 @@ namespace OS {
schemes.login = `\
\
diff --git a/src/core/tags/ButtonTag.ts b/src/core/tags/ButtonTag.ts
index ad98df5..762a16b 100644
--- a/src/core/tags/ButtonTag.ts
+++ b/src/core/tags/ButtonTag.ts
@@ -133,7 +133,7 @@ namespace OS {
* @memberof ButtonTag
*/
protected mount() {
- $(this.refs.button).click((e) => {
+ $(this.refs.button).on("click", (e) => {
if (this.toggle) {
this.selected = !this.selected;
}
diff --git a/src/core/tags/CalendarTag.ts b/src/core/tags/CalendarTag.ts
index 5596f93..9fcf5f9 100644
--- a/src/core/tags/CalendarTag.ts
+++ b/src/core/tags/CalendarTag.ts
@@ -113,8 +113,8 @@ namespace OS {
* @memberof CalendarTag
*/
protected mount(): void {
- $(this.refs.prev).click((e) => this.prevmonth());
- $(this.refs.next).click((e) => this.nextmonth());
+ $(this.refs.prev).on("click",(e) => this.prevmonth());
+ $(this.refs.next).on("click",(e) => this.nextmonth());
const grid = this.refs.grid as GridViewTag;
grid.header = [
{ text: "__(Sun)" },
diff --git a/src/core/tags/ColorPickerTag.ts b/src/core/tags/ColorPickerTag.ts
index 0fd7fae..e5332f5 100644
--- a/src/core/tags/ColorPickerTag.ts
+++ b/src/core/tags/ColorPickerTag.ts
@@ -259,15 +259,15 @@ namespace OS {
);
};
- $(this.refs.palette).mouseenter((e) => {
+ $(this.refs.palette).on("mouseenter",(e) => {
return $(this.refs.palette).on(
"mousemove",
mouse_move_h
);
});
- $(this.refs.palette).mouseout((e) => {
- $(this.refs.palette).unbind("mousemove", mouse_move_h);
+ $(this.refs.palette).on("mouseout", (e) => {
+ $(this.refs.palette).off("mousemove", mouse_move_h);
if (this.selectedColor) {
return $(this.refs.colorval).css(
"background-color",
diff --git a/src/core/tags/FloatListTag.ts b/src/core/tags/FloatListTag.ts
index 9b40258..de0d727 100644
--- a/src/core/tags/FloatListTag.ts
+++ b/src/core/tags/FloatListTag.ts
@@ -184,8 +184,8 @@ namespace OS {
};
var mouse_up = function (e: JQuery.MouseEventBase) {
- $(window).unbind("mousemove", mouse_move);
- return $(window).unbind("mouseup", mouse_up);
+ $(window).off("mousemove", mouse_move);
+ return $(window).off("mouseup", mouse_up);
};
$(window).on("mousemove", mouse_move);
return $(window).on("mouseup", mouse_up);
diff --git a/src/core/tags/GridViewTag.ts b/src/core/tags/GridViewTag.ts
index 2549994..6403b96 100644
--- a/src/core/tags/GridViewTag.ts
+++ b/src/core/tags/GridViewTag.ts
@@ -237,11 +237,11 @@ namespace OS {
): void => {};
this.selected = false;
$(this).css("display", "block");
- $(this).click((e) => {
+ $(this).on("click",(e) => {
let evt = { id: this.aid, data: this };
return this.cellselect(evt, false);
});
- $(this).dblclick((e) => {
+ $(this).on("dblclick", (e) => {
let evt = { id: this.aid, data: this };
return this.cellselect(evt, true);
});
diff --git a/src/core/tags/ListViewTag.ts b/src/core/tags/ListViewTag.ts
index ca611f2..8625864 100644
--- a/src/core/tags/ListViewTag.ts
+++ b/src/core/tags/ListViewTag.ts
@@ -173,18 +173,18 @@ namespace OS {
*/
protected mount(): void {
$(this.refs.item).attr("dataref", "afx-list-item");
- $(this.refs.item).contextmenu((e) => {
+ $(this.refs.item).on("contextmenu", (e) => {
this._onctxmenu({ id: this.aid, data: this });
});
- $(this.refs.item).click((e) => {
+ $(this.refs.item).on("click",(e) => {
this._onclick({ id: this.aid, data: this });
});
- $(this.refs.item).dblclick((e) => {
+ $(this.refs.item).on("dblclick",(e) => {
this._ondbclick({ id: this.aid, data: this });
});
- $(this.refs.btcl).click((e) => {
+ $(this.refs.btcl).on("click",(e) => {
this._onclose({ id: this.aid, data: this });
e.preventDefault();
e.stopPropagation();
@@ -788,7 +788,7 @@ namespace OS {
* @returns {ListViewItemTag} the added list item element
* @memberof ListViewTag
*/
- unshift(item: GenericObject
) {
+ unshift(item: GenericObject): ListViewItemTag {
return this.push(item, true);
}
diff --git a/src/core/tags/MenuTag.ts b/src/core/tags/MenuTag.ts
index bb9e9d5..dfcc818 100644
--- a/src/core/tags/MenuTag.ts
+++ b/src/core/tags/MenuTag.ts
@@ -191,7 +191,7 @@ namespace OS {
// ensure that the data is in sync
this._data.nodes = v;
if (this.is_root()) {
- $(this.refs.container).mouseleave((e) => {
+ $(this.refs.container).on("mouseleave",(e) => {
return $(this.refs.submenu).attr("style", "");
});
}
@@ -209,7 +209,7 @@ namespace OS {
* @memberof MenuEntryTag
*/
protected mount(): void {
- $(this.refs.entry).click((e) => this.select(e));
+ $(this.refs.entry).on("click",(e) => this.select(e));
}
/**
@@ -730,7 +730,7 @@ namespace OS {
if (!this.context) {
return;
}
- $(this.refs.wrapper).mouseleave((e) => {
+ $(this.refs.wrapper).on("mouseleave",(e) => {
if (!this.is_root()) {
return;
}
diff --git a/src/core/tags/NSpinnerTag.ts b/src/core/tags/NSpinnerTag.ts
index c4d06cf..65acc4e 100644
--- a/src/core/tags/NSpinnerTag.ts
+++ b/src/core/tags/NSpinnerTag.ts
@@ -81,11 +81,11 @@ namespace OS {
*/
protected mount(): void {
$(this.refs.holder).attr("type", "text");
- $(this.refs.incr).click((e) => {
+ $(this.refs.incr).on("click",(e) => {
this.value = this.value + this.step;
});
- $(this.refs.decr).click((e) => {
+ $(this.refs.decr).on("click",(e) => {
this.value = this.value - this.step;
});
@@ -93,7 +93,7 @@ namespace OS {
this.observable.on("resize", () => this.calibrate());
$(this.refs.holder).on("keyup", (e) => {
- if (e.keyCode === 13) {
+ if (e.which === 13) {
let val = parseInt(
(this.refs.holder as HTMLInputElement).value
);
diff --git a/src/core/tags/ResizerTag.ts b/src/core/tags/ResizerTag.ts
index 685ae91..5a63ae1 100644
--- a/src/core/tags/ResizerTag.ts
+++ b/src/core/tags/ResizerTag.ts
@@ -104,7 +104,7 @@ namespace OS {
set dir(v: string) {
let att: string;
$(this).attr("dir", v);
- $(this).unbind("mousedown", null);
+ $(this).off("mousedown", null);
if (v === "hz") {
$(this).css("cursor", "col-resize");
$(this).addClass("horizontal");
@@ -222,10 +222,10 @@ namespace OS {
});
return $(window).on("mouseup", function (evt) {
- $(window).unbind("mousemove", null);
- $(window).unbind("mouseup", null);
+ $(window).off("mousemove", null);
+ $(window).off("mouseup", null);
- return $(window).unbind("mouseup", null);
+ return $(window).off("mouseup", null);
});
});
}
diff --git a/src/core/tags/SliderTag.ts b/src/core/tags/SliderTag.ts
index 70a3b40..ebc3354 100644
--- a/src/core/tags/SliderTag.ts
+++ b/src/core/tags/SliderTag.ts
@@ -110,15 +110,15 @@ namespace OS {
this.attsw(v, "enable");
if (v) {
$(this)
- .mouseover(() => {
+ .on("mouseover",() => {
return $(this.refs.point).show();
})
- .mouseout(() => {
+ .on("mouseout",() => {
return $(this.refs.point).hide();
});
} else {
$(this.refs.point).hide();
- $(this).unbind("mouseover").unbind("mouseout");
+ $(this).off("mouseover").off("mouseout");
}
}
get enable(): boolean {
@@ -168,7 +168,7 @@ namespace OS {
this.observable.on("resize", (e) => {
return this.calibrate();
});
- $(this.refs.container).click((e) => {
+ $(this.refs.container).on("click",(e) => {
const offset = $(this.refs.container).offset();
const left = e.clientX - offset.left;
const maxw = $(this.refs.container).width();
@@ -241,8 +241,8 @@ namespace OS {
id: this.aid,
data: this.value,
});
- $(window).unbind("mousemove", null);
- return $(window).unbind("mouseup", null);
+ $(window).off("mousemove", null);
+ return $(window).off("mouseup", null);
});
});
}
diff --git a/src/core/tags/SwitchTag.ts b/src/core/tags/SwitchTag.ts
index 04bcd46..c5695d4 100644
--- a/src/core/tags/SwitchTag.ts
+++ b/src/core/tags/SwitchTag.ts
@@ -66,7 +66,7 @@ namespace OS {
* @memberof SwitchTag
*/
protected mount(): void {
- $(this.refs.switch).click((e) => {
+ $(this.refs.switch).on("click",(e) => {
return this.makechange(e);
});
}
diff --git a/src/core/tags/SystemPanelTag.ts b/src/core/tags/SystemPanelTag.ts
index 3f54b01..6090576 100644
--- a/src/core/tags/SystemPanelTag.ts
+++ b/src/core/tags/SystemPanelTag.ts
@@ -292,10 +292,10 @@ namespace OS {
this.calibrate();
$(document).on("click", this._cb);
(this.refs.search as HTMLInputElement).value = "";
- $(this.refs.search).focus();
+ $(this.refs.search).trigger("focus");
} else {
$(this.refs.overlay).hide();
- $(document).unbind("click", this._cb);
+ $(document).off("click", this._cb);
}
}
@@ -325,7 +325,7 @@ namespace OS {
) {
return this.toggle(false);
} else {
- return $(this.refs.search).focus();
+ return $(this.refs.search).trigger("focus");
}
};
$(this.refs.appmenu).css("z-index", 1000000);
@@ -358,11 +358,11 @@ namespace OS {
return this.toggle(true);
};
- $(this.refs.search).keyup((e) => {
+ $(this.refs.search).on("keyup",(e) => {
return this.search(e);
});
- $(this.refs.applist).click((e) => {
+ $(this.refs.applist).on("click",(e) => {
return this.open();
});
Ant.OS.GUI.bindKey("CTRL- ", (e) => {
diff --git a/src/core/tags/TreeViewTag.ts b/src/core/tags/TreeViewTag.ts
index 7b4a5f6..4d3adce 100644
--- a/src/core/tags/TreeViewTag.ts
+++ b/src/core/tags/TreeViewTag.ts
@@ -377,10 +377,10 @@ namespace OS {
.css("margin", 0)
.css("white-space", "nowrap");
$(this.refs.itemholder).css("display", "inline-block");
- $(this.refs.wrapper).click((e) => {
+ $(this.refs.wrapper).on("click",(e) => {
this.selected = true;
});
- $(this.refs.wrapper).dblclick((e) => {
+ $(this.refs.wrapper).on("dblclick", (e) => {
this._evt.data.dblclick = true;
this.selected = true;
});
@@ -389,7 +389,7 @@ namespace OS {
.css("display", "inline-block")
.css("width", "15px")
.addClass("afx-tree-view-item")
- .click((e) => {
+ .on("click",(e) => {
this.open = !this.open;
e.preventDefault();
return e.stopPropagation();
diff --git a/src/core/tags/WindowTag.ts b/src/core/tags/WindowTag.ts
index ee86136..c4c9a87 100644
--- a/src/core/tags/WindowTag.ts
+++ b/src/core/tags/WindowTag.ts
@@ -241,17 +241,17 @@ namespace OS {
*/
protected mount(): void {
this.contextmenuHandle = function (e) {};
- $(this.refs["minbt"]).click((e) => {
+ $(this.refs["minbt"]).on("click",(e) => {
return this.observable.trigger("hide", {
id: this.aid,
});
});
- $(this.refs["maxbt"]).click((e) => {
+ $(this.refs["maxbt"]).on("click",(e) => {
return this.toggle_window();
});
- $(this.refs["closebt"]).click((e) => {
+ $(this.refs["closebt"]).on("click",(e) => {
return this.observable.trigger("exit", {
id: this.aid,
});
@@ -272,7 +272,7 @@ namespace OS {
});
});
- $(this.refs["dragger"]).dblclick((e) => {
+ $(this.refs["dragger"]).on("dblclick",(e) => {
return this.toggle_window();
});
@@ -381,8 +381,8 @@ namespace OS {
.css("left", `${left}px`);
});
return $(window).on("mouseup", function (e) {
- $(window).unbind("mousemove", null);
- return $(window).unbind("mouseup", null);
+ $(window).off("mousemove", null);
+ return $(window).off("mouseup", null);
});
});
}
@@ -420,8 +420,8 @@ namespace OS {
});
$(window).on("mouseup", function (e) {
- $(window).unbind("mousemove", null);
- return $(window).unbind("mouseup", null);
+ $(window).off("mousemove", null);
+ return $(window).off("mouseup", null);
});
});
}
diff --git a/src/index.html b/src/index.html
index c1c479c..716d417 100644
--- a/src/index.html
+++ b/src/index.html
@@ -25,10 +25,10 @@
-
+
-
+