mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-10 22:58:40 +00:00
Fix module bugs
This commit is contained in:
parent
89acb321f9
commit
df25053ba0
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { Request } from '../../Message/Request/Request.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form manager class.
|
* Form manager class.
|
||||||
*
|
*
|
||||||
|
|
@ -26,7 +28,7 @@ export class Input {
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
static unbind = function (input)
|
static unbind(input)
|
||||||
{
|
{
|
||||||
this.app.inputManager.getKeyboardManager().unbind(input);
|
this.app.inputManager.getKeyboardManager().unbind(input);
|
||||||
/** global: changeBind */
|
/** global: changeBind */
|
||||||
|
|
@ -42,7 +44,7 @@ export class Input {
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
static bindElement = function (input)
|
static bindElement(input)
|
||||||
{
|
{
|
||||||
if (typeof input === 'undefined') {
|
if (typeof input === 'undefined') {
|
||||||
throw 'Input element required'
|
throw 'Input element required'
|
||||||
|
|
@ -109,7 +111,7 @@ export class Input {
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
static addRemoteDatalistOptions = function (input, datalist)
|
static addRemoteDatalistOptions(input, datalist)
|
||||||
{
|
{
|
||||||
this.clearDatalistOptions(datalist);
|
this.clearDatalistOptions(datalist);
|
||||||
|
|
||||||
|
|
@ -160,7 +162,7 @@ export class Input {
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
static clearDatalistOptions = function (datalist)
|
static clearDatalistOptions(datalist)
|
||||||
{
|
{
|
||||||
const length = datalist.options.length;
|
const length = datalist.options.length;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { Input } from '../UI/Component/Input.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form view.
|
* Form view.
|
||||||
*
|
*
|
||||||
|
|
@ -267,7 +269,7 @@ export class FormView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const id = jsOMS.Views.FormView.getElementId(elements[i]);
|
const id = FormView.getElementId(elements[i]);
|
||||||
if (id === null) {
|
if (id === null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -401,7 +403,7 @@ export class FormView {
|
||||||
for (let i = 0; i < length; ++i) {
|
for (let i = 0; i < length; ++i) {
|
||||||
switch (elements[i].tagName) {
|
switch (elements[i].tagName) {
|
||||||
case 'input':
|
case 'input':
|
||||||
jsOMS.UI.Input.bind(elements[i]);
|
Input.bind(elements[i]);
|
||||||
break;
|
break;
|
||||||
case 'select':
|
case 'select':
|
||||||
this.bindSelect(elements[i]);
|
this.bindSelect(elements[i]);
|
||||||
|
|
@ -433,7 +435,7 @@ export class FormView {
|
||||||
for (let i = 0; i < length; ++i) {
|
for (let i = 0; i < length; ++i) {
|
||||||
switch (elements[i].tagName) {
|
switch (elements[i].tagName) {
|
||||||
case 'input':
|
case 'input':
|
||||||
jsOMS.UI.Input.unbind(elements[i]);
|
Input.unbind(elements[i]);
|
||||||
break;
|
break;
|
||||||
case 'select':
|
case 'select':
|
||||||
this.bindSelect(elements[i]);
|
this.bindSelect(elements[i]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user