removed old dropDown-functions
This commit is contained in:
parent
e395ff7767
commit
9886cc91be
1 changed files with 0 additions and 80 deletions
|
@ -20,85 +20,6 @@ function getNavigationName () {
|
|||
return this._name;
|
||||
}
|
||||
|
||||
/**
|
||||
* renders single dropdown
|
||||
* input values: current Timestamp
|
||||
*/
|
||||
|
||||
function createDDparam(prefix,ts,dropFormat) {
|
||||
var ddParam = new HopObject();
|
||||
if (dropFormat == "dd") {
|
||||
ddParam.name = prefix + "Date";
|
||||
ddParam.firstOption = "DD";
|
||||
ddParam.currValue = ts ? ts.getDate() : null;
|
||||
ddParam.start = 1;
|
||||
ddParam.end = 31;
|
||||
} else if (dropFormat == "MM") {
|
||||
ddParam.name = prefix + "Month";
|
||||
ddParam.firstOption = "MM";
|
||||
ddParam.currValue = ts ? ts.getMonth() : null;
|
||||
ddParam.start = 1;
|
||||
ddParam.end = 12;
|
||||
ddParam.valueOffset = -1;
|
||||
} else if (dropFormat == "yyyy") {
|
||||
ddParam.name = prefix + "Year";
|
||||
ddParam.firstOption = "YYYY";
|
||||
ddParam.currValue = ts ? ts.getFullYear() : null;
|
||||
ddParam.start = 2000;
|
||||
ddParam.end = 2010;
|
||||
} else if (dropFormat == "HH") {
|
||||
ddParam.name = prefix + "Hours";
|
||||
ddParam.firstOption = "HH";
|
||||
ddParam.currValue = ts ? ts.getHours() : null;
|
||||
ddParam.start = 0;
|
||||
ddParam.end = 23;
|
||||
} else if (dropFormat == "mm") {
|
||||
ddParam.name = prefix + "Minutes";
|
||||
ddParam.firstOption = "mm";
|
||||
ddParam.currValue = ts ? ts.getMinutes() : null;
|
||||
ddParam.start = 0;
|
||||
ddParam.end = 59;
|
||||
} else if (dropFormat == "ss") {
|
||||
ddParam.name = prefix + "Seconds";
|
||||
ddParam.firstOption = "ss";
|
||||
ddParam.currValue = ts ? ts.getSeconds() : null;
|
||||
ddParam.start = 0;
|
||||
ddParam.end = 59;
|
||||
}
|
||||
this.createDDOptions(ddParam);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function creates array for rendering options
|
||||
*/
|
||||
|
||||
function createDDOptions(ddParam) {
|
||||
if (ddParam.firstOption) {
|
||||
ddParam.add(this.createDDOption(ddParam.firstOption,""));
|
||||
}
|
||||
for (var i=ddParam.start;i<=ddParam.end;i++) {
|
||||
var name = (i<10 ? "0" + i : i);
|
||||
var value = (ddParam.valueOffset ? i+ddParam.valueOffset : i);
|
||||
var sel = (ddParam.currValue == value ? true : false);
|
||||
ddParam.add(this.createDDOption(name, value, sel));
|
||||
}
|
||||
this.chooser(ddParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* function creates a single option-object for creation of select-dropdowns
|
||||
*/
|
||||
|
||||
function createDDOption(name,value,sel) {
|
||||
var opt = new HopObject()
|
||||
opt.name = name;
|
||||
opt.value = value;
|
||||
opt.selected = sel;
|
||||
return (opt);
|
||||
}
|
||||
|
||||
/**
|
||||
* creates parameter-object that will be passed to
|
||||
* function that renders the input
|
||||
|
@ -112,4 +33,3 @@ function createInputParam(propName,param) {
|
|||
inputParam.value = this[propName];
|
||||
return (inputParam);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue