diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/DataSetForm.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/DataSetForm.js index a2784c58f12baca1cf857f10e7be48b3ae06767c..29fb07ce432a3ec3d19c20d3174ea124edcc4a1c 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/DataSetForm.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/DataSetForm.js @@ -261,103 +261,6 @@ function DataSetForm(serverFacade, containerId, profile, sample, mode) { $("#metadataContainer").append($wrapper); } -// // -// // Standard Form Fields -// // -// this.getFieldForPropertyType = function(propertyType) { -// var $component = null; -// if (propertyType.dataType === "BOOLEAN") { -// $component = this._getBooleanField(propertyType.code, propertyType.description); -// } else if (propertyType.dataType === "CONTROLLEDVOCABULARY") { -// var vocabulary = null; -// if(isNaN(propertyType.vocabulary)) { -// vocabulary = this.profile.getVocabularyById(propertyType.vocabulary.id); -// if(vocabulary === null) { //This should not happen, but can save the day. -// vocabulary = propertyType.vocabulary; -// vocabulary.terms = propertyType.terms; -// } -// } else { -// vocabulary = this.profile.getVocabularyById(propertyType.vocabulary); -// } -// $component = this._getDropDownFieldForVocabulary(propertyType.code, vocabulary.terms, propertyType.mandatory); -// } else if (propertyType.dataType === "HYPERLINK") { -// $component = this._getInputField("url", propertyType.code, propertyType.description, null, propertyType.mandatory); -// } else if (propertyType.dataType === "INTEGER") { -// $component = this._getInputField("number", propertyType.code, propertyType.description, '1', propertyType.mandatory); -// } else if (propertyType.dataType === "MATERIAL") { -// $component = this._getInputField("text", propertyType.code, propertyType.description, null, propertyType.mandatory); -// } else if (propertyType.dataType === "MULTILINE_VARCHAR") { -// $component = this._getTextBox(propertyType.code, propertyType.description, propertyType.mandatory); -// } else if (propertyType.dataType === "REAL") { -// $component = this._getInputField("number", propertyType.code, propertyType.description, 'any', propertyType.mandatory); -// } else if (propertyType.dataType === "TIMESTAMP") { -// $component = this._getDatePickerField(propertyType.code, propertyType.mandatory); -// } else if (propertyType.dataType === "VARCHAR") { -// $component = this._getInputField("text", propertyType.code, propertyType.description, null, propertyType.mandatory); -// } else if (propertyType.dataType === "XML") { -// $component = this._getTextBox(propertyType.code, propertyType.description, propertyType.mandatory); -// } -// -// return $component; -// } -// -// this._getBooleanField = function(id, alt) { -// return $('<input>', {'type' : 'checkbox', 'id' : id, 'alt' : alt}); -// } -// -// this._getDropDownFieldForVocabulary = function(code, terms, isRequired) { -// var $component = $("<select>"); -// $component.attr('id', code); -// -// if (isRequired) { -// $component.attr('required', ''); -// } -// -// $component.append($("<option>").attr('value', '').attr('selected', '').text('')); -// for(var i = 0; i < terms.length; i++) { -// $component.append($("<option>").attr('value',terms[i].code).text(terms[i].label)); -// } -// -// return $component; -// } -// -// this._getInputField = function(type, id, alt, step, isRequired) { -// var $component = $('<input>', {'type' : type, 'id' : id, 'alt' : alt}); -// if (isRequired) { -// $component.attr('required', ''); -// } -// if (isRequired) { -// $component.attr('step', step); -// } -// return $component; -// } -// -// this._getTextBox = function(id, alt, isRequired) { -// var $component = $('<textarea>', {'id' : id, 'alt' : alt, 'style' : 'height: 80px; width: 450px;'}); -// if (isRequired) { -// $component.attr('required', ''); -// } -// return $component; -// } -// -// this._getDatePickerField = function(id, isRequired) { -// var $component = $('<div>', {'class' : 'well', 'style' : 'width: 250px;'}); -// var $subComponent = $('<div>', {'class' : 'input-append date', 'id' : 'datetimepicker_' + id }); -// var $input = $('<input>', {'type' : 'text', 'id' : id, 'data-format' : 'yyyy-MM-dd HH:mm:ss'}); -// if (isRequired) { -// $input.attr('required', ''); -// } -// var $spanAddOn = $('<span>', {'class' : 'add-on'}) -// .append($('<i>', {'data-date-icon' : 'icon-calendar' , 'data-time-icon' : 'icon-time' })); -// -// $subComponent.append($input); -// $subComponent.append($spanAddOn); -// $subComponent.datetimepicker({ language: 'en' }); -// $component.append($subComponent); -// -// return $component; -// } - // // Form Submit //