Skip to content
Snippets Groups Projects
Commit 37b25d60 authored by juanf's avatar juanf
Browse files

SSDM-504: Remove unused code.

SVN: 31744
parent 64e36548
No related branches found
No related tags found
No related merge requests found
......@@ -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
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment