Form view draft

This commit is contained in:
Dennis Eichhorn 2016-03-19 12:22:42 +01:00
parent 2b3b74813e
commit 1a9ecd30c7

View File

@ -1,14 +1,37 @@
(function (jsOMS, undefined) {
jsOMS.FormView = function (node) {
if (node) {
this.setNode(node);
}
"use strict";
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 || {}));