mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-05 12:38:42 +00:00
Form view draft
This commit is contained in:
parent
2b3b74813e
commit
1a9ecd30c7
|
|
@ -1,14 +1,37 @@
|
||||||
(function (jsOMS, undefined) {
|
(function (jsOMS, undefined) {
|
||||||
jsOMS.FormView = function (node) {
|
"use strict";
|
||||||
if (node) {
|
|
||||||
this.setNode(node);
|
jsOMS.FormView = function (element) {
|
||||||
}
|
this.id = element.getAttribute('id');
|
||||||
|
this.formElement = element;
|
||||||
|
|
||||||
|
this.inputElement = {};
|
||||||
|
this.textarea = {};
|
||||||
|
this.button = {};
|
||||||
|
this.select = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
jsOMS.FormView.prototype.setNode = function () {
|
jsOMS.FormView.prototype.bind = function()
|
||||||
};
|
{
|
||||||
|
this.bindInput();
|
||||||
|
this.bindTextarea();
|
||||||
|
this.bindButton();
|
||||||
|
this.bindSelect();
|
||||||
|
}
|
||||||
|
|
||||||
jsOMS.FormView.prototype.submit = function () {
|
jsOMS.FormView.prototype.bindInput = function()
|
||||||
|
{
|
||||||
|
var self = this;
|
||||||
|
|
||||||
};
|
let inputs = this.formElement.getElementsByTagName('input');
|
||||||
|
|
||||||
|
Object.keys(inputs).forEach(function (key, element) {
|
||||||
|
self.inputElement[element.getAttribute('id')] = {
|
||||||
|
id: element.getAttribute('id'),
|
||||||
|
type: element.getAttribute('type')
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
jsOMS.FormView.prototype.bind
|
||||||
}(window.jsOMS = window.jsOMS || {}));
|
}(window.jsOMS = window.jsOMS || {}));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user