var Qs_Form_Element_MultiFile = { message: new qs.Message({ 'en': { 'delete': 'delete', 'confirmDelete': 'Do you really want to delete this {itemName}?' }, 'uk': { 'delete': 'видалити', 'confirmDelete': 'Ви дійсно хочете видалити цей {itemName}?' }, 'ru': { 'delete': 'удалить', 'confirmDelete': 'Вы действительно хотите удалить этот {itemName}?' } }), options: {}, elementOptions: {}, init: function (id, options) { Qs_Form_Element_MultiFile.setElementOptions(id, options); Qs_Form_Element_MultiFile.updateOptions(id); }, getElementOptions: function (id) { if (typeof Qs_Form_Element_MultiFile.elementOptions[id] == 'undefined') { return null; } return Qs_Form_Element_MultiFile.elementOptions[id]; }, getElementOption: function (id, name) { var options = Qs_Form_Element_MultiFile.getElementOptions(id); if (options) { if (typeof options[name] != 'undefined') { return options[name]; } } return null; }, setElementOption: function (id, name, value) { var options = Qs_Form_Element_MultiFile.getElementOptions(id); if (options) { options[name] = value; } else { Qs_Form_Element_MultiFile.elementOptions[id] = {name: value}; } }, setElementOptions: function (id, options) { Qs_Form_Element_MultiFile.elementOptions[id] = options; }, _renderInput: function(type, name, attribs, options) { var value = ''; var className = ''; if (attribs) { id = attribs.id; className = attribs['class']; } if (!className) { className = type; } html = ''; return html; }, add: function (id) { var itemName = Qs_Form_Element_MultiFile.getElementOption(id, 'itemName'); var name = Qs_Form_Element_MultiFile.getElementOption(id, 'name'); var table = document.getElementById(id); var row = '