dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07435
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2113: Minor fix.
------------------------------------------------------------
revno: 2113
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-09-15 15:50:45 +0700
message:
Minor fix.
modified:
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/advancedReportsForm.vm
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/criteria.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/dataCompleteness.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/lists.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/reportParams.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/criteria.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/dataCompleteness.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/grading.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/lists.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportParams.js
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/advancedReportsForm.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/advancedReportsForm.vm 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/advancedReportsForm.vm 2010-09-15 08:50:45 +0000
@@ -38,8 +38,8 @@
else if(startDateValue > endDateValue) {alert("Starte Date is Greaterthan End Date"); return false;}
else if(orgunitIdValue == null || orgunitIdValue == "") {alert("Please Select OrganisationUnit"); return false;}
- document.reportForm.reportModelTB.value = reportModels.get(document.reportForm.reportList.options[reportListIndex].value);
- document.reportForm.reportFileNameTB.value = reportFileNames.get(document.reportForm.reportList.options[reportListIndex].value);
+ //document.reportForm.reportModelTB.value = reportModels.get(document.reportForm.reportList.options[reportListIndex].value);
+ //document.reportForm.reportFileNameTB.value = reportFileNames.get(document.reportForm.reportList.options[reportListIndex].value);
document.forms['reportForm'].submit();
//return true;
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/criteria.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/criteria.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/criteria.js 2010-09-15 08:50:45 +0000
@@ -5,10 +5,12 @@
function addOption( list, value, text )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = value;
option.text = text;
- list.add( option, null );
+ list.add( option, null ); */
+
+ $("#" + list.name).append("<option value='"+ value +"'>" + text + "</option>");
}
function loadIndicatorGroups()
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/dataCompleteness.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/dataCompleteness.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/dataCompleteness.js 2010-09-15 08:50:45 +0000
@@ -247,9 +247,11 @@
var endDate = periods[i].getElementsByTagName( "endDate" )[0].firstChild.nodeValue;
var periodName = periods[i].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- periodList.add( option, null );
+ periodList.add( option, null ); */
+
+ $("#periodId").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/lists.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/lists.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/lists.js 2010-09-15 08:50:45 +0000
@@ -45,10 +45,12 @@
if ( listContains( selectedDataElements, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = dataElementName;
- availableDataElements.add( option, null );
+ availableDataElements.add( option, null ); */
+
+ $("#availableDataElements").append("<option value='"+ id +"'>" + dataElementName + "</option>");
}
}
}
@@ -94,10 +96,12 @@
var id = dataElements[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var dataElementName = dataElements[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = dataElementName;
- availableDataElements.add( option, null );
+ availableDataElements.add( option, null ); */
+
+ $("#availableDataElements").append("<option value='"+ id +"'>" + dataElementName + "</option>");
}
}
@@ -143,10 +147,13 @@
if ( listContains( selectedIndicators, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = indicatorName;
- availableIndicators.add( option, null );
+ availableIndicators.add( option, null ); */
+
+ $("#availableIndicators").append("<option value='"+ id +"'>" + indicatorName + "</option>");
+
}
}
}
@@ -193,10 +200,12 @@
if ( listContains( selectedOrganisationUnits, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- availableOrganisationUnits.add( option, null );
+ availableOrganisationUnits.add( option, null ); */
+
+ $("#availableOrganisationUnits").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
}
@@ -239,10 +248,12 @@
var id = organisationUnits[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var organisationUnitName = organisationUnits[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- selectedOrganisationUnits.add( option, null );
+ selectedOrganisationUnits.add( option, null ); */
+
+ $("#selectedOrganisationUnits").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
@@ -286,10 +297,12 @@
if ( listContains( selectedOrganisationUnits, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- selectedOrganisationUnits.add( option, null );
+ selectedOrganisationUnits.add( option, null ); */
+
+ $("#selectedOrganisationUnits").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
}
@@ -335,10 +348,12 @@
if ( listContains( selectedPeriods, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- availablePeriods.add( option, null );
+ availablePeriods.add( option, null ); */
+
+ $("#availablePeriods").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
}
@@ -381,9 +396,11 @@
var id = periods[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var periodName = periods[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- selectedPeriods.add( option, null );
+ selectedPeriods.add( option, null ); */
+
+ $("#selectedPeriods").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/reportParams.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/reportParams.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/css/reportParams.js 2010-09-15 08:50:45 +0000
@@ -40,10 +40,12 @@
var id = organisationUnits[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var organisationUnitName = organisationUnits[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- availableOrganisationUnits.add( option, null );
+ availableOrganisationUnits.add( option, null ); */
+
+ $("#parentOrganisationUnitId").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
@@ -84,9 +86,11 @@
var id = organisationUnits[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var organisationUnitName = organisationUnits[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- availableOrganisationUnits.add( option, null );
+ availableOrganisationUnits.add( option, null ); */
+
+ $("#organisationUnitId").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/criteria.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/criteria.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/criteria.js 2010-09-15 08:50:45 +0000
@@ -5,10 +5,12 @@
function addOption( list, value, text )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = value;
option.text = text;
- list.add( option, null );
+ list.add( option, null ); */
+
+ $("#" + list.name).append("<option value='"+ value +"'>" + text + "</option>");
}
function loadIndicatorGroups()
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/dataCompleteness.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/dataCompleteness.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/dataCompleteness.js 2010-09-15 08:50:45 +0000
@@ -264,9 +264,11 @@
var endDate = periods[i].getElementsByTagName( "endDate" )[0].firstChild.nodeValue;
var periodName = periods[i].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- periodList.add( option, null );
+ periodList.add( option, null ); */
+
+ $("#periodId").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js 2010-09-15 08:50:45 +0000
@@ -33,7 +33,7 @@
url :url,
cache :false,
success : function(response) {
- dom = parseXML(response);
+ /* dom = parseXML(response);
$('#periodIds >option').remove();
$(dom).find('period').each(
function() {
@@ -43,13 +43,39 @@
+ $(this).find('name').text()
+ "</option>");
});
- enable("periodIds");
+ enable("periodIds"); */
+
+ getAllPeriodsReceived( response );
+
getDataSets();
}
});
}
}
+
+function getAllPeriodsReceived(xmlObject) {
+
+ var periodList = byId("periodIds");
+
+ clearList(periodList);
+
+ var periods = xmlObject.getElementsByTagName("period");
+ for ( var i = 0; i < periods.length; i++) {
+ var id = periods[i].getElementsByTagName("id")[0].firstChild.nodeValue;
+ var name = periods[i].getElementsByTagName("name")[0].firstChild.nodeValue;;
+
+ /* var option = document.createElement("option");
+ option.value = id;
+ option.text = name;
+ reportsList.add(option, null); */
+
+ $("#periodIds").append("<option value='"+ id +"'>" + name + "</option>");
+ }
+ $("#periodIds").attr('disabled', false);
+}
+
+
function parseXML(xml) {
if (window.ActiveXObject && window.GetObject) {
var dom = new ActiveXObject('Microsoft.XMLDOM');
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/grading.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/grading.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/grading.js 2010-09-15 08:50:45 +0000
@@ -42,11 +42,13 @@
var id = orgUnitGroups[ i ].getElementsByTagName("id")[0].firstChild.nodeValue;
var orgUnitGroupName = orgUnitGroups[ i ].getElementsByTagName("name")[0].firstChild.nodeValue;
- var option = document.createElement("option");
+ /* var option = document.createElement("option");
option.value = id;
option.text = orgUnitGroupName;
option.title = orgUnitGroupName;
- orgUnitGroupList.add(option, null);
+ orgUnitGroupList.add(option, null); */
+
+ $("#orgUnitListCB").append("<option value='"+ id +"' title='" + orgUnitGroupName + "'>" + orgUnitGroupName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/lists.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/lists.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/lists.js 2010-09-15 08:50:45 +0000
@@ -50,10 +50,12 @@
if ( listContains( selectedDataElements, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = dataElementName;
- availableDataElements.add( option, null );
+ availableDataElements.add( option, null ); */
+
+ $("#availableDataElements").append("<option value='"+ id +"'>" + dataElementName + "</option>");
}
}
}
@@ -104,10 +106,12 @@
var id = dataElements[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var dataElementName = dataElements[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = dataElementName;
- availableDataElements.add( option, null );
+ availableDataElements.add( option, null ); */
+
+ $("#availableDataElements").append("<option value='"+ id +"'>" + dataElementName + "</option>");
}
}
@@ -157,10 +161,12 @@
if ( listContains( selectedIndicators, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = indicatorName;
- availableIndicators.add( option, null );
+ availableIndicators.add( option, null ); */
+
+ $("#availableIndicators").append("<option value='"+ id +"'>" + indicatorName + "</option>");
}
}
}
@@ -211,10 +217,12 @@
if ( listContains( selectedOrganisationUnits, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- availableOrganisationUnits.add( option, null );
+ availableOrganisationUnits.add( option, null ); */
+
+ $("#availableOrganisationUnits").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
}
@@ -262,10 +270,12 @@
var id = organisationUnits[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var organisationUnitName = organisationUnits[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- selectedOrganisationUnits.add( option, null );
+ selectedOrganisationUnits.add( option, null ); */
+
+ $("#selectedOrganisationUnits").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
@@ -313,10 +323,12 @@
if ( listContains( selectedOrganisationUnits, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- selectedOrganisationUnits.add( option, null );
+ selectedOrganisationUnits.add( option, null ); */
+
+ $("#selectedOrganisationUnits").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
}
@@ -367,10 +379,12 @@
if ( listContains( selectedPeriods, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- availablePeriods.add( option, null );
+ availablePeriods.add( option, null ); */
+
+ $("#availablePeriods").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
}
@@ -418,9 +432,11 @@
var id = periods[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var periodName = periods[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- selectedPeriods.add( option, null );
+ selectedPeriods.add( option, null ); */
+
+ $("#selectedPeriods").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js 2010-09-15 08:50:45 +0000
@@ -213,10 +213,12 @@
var id = periods[i].getElementsByTagName("id")[0].firstChild.nodeValue;
var periodName = periods[i].getElementsByTagName("periodname")[0].firstChild.nodeValue;
- var option = document.createElement("option");
+ /* var option = document.createElement("option");
option.value = id;
option.text = periodName;
- availablePeriods.add(option, null);
+ availablePeriods.add(option, null); */
+
+ $("#availablePeriods").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}
@@ -266,9 +268,11 @@
orgUnitName.value = ouName;
- var option = document.createElement("option");
+ /* var option = document.createElement("option");
option.value = id;
option.text = name;
- reportsList.add(option, null);
+ reportsList.add(option, null); */
+
+ $("#reportList").append("<option value='"+ id +"'>" + name + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportParams.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportParams.js 2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportParams.js 2010-09-15 08:50:45 +0000
@@ -45,10 +45,12 @@
var id = organisationUnits[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var organisationUnitName = organisationUnits[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- availableOrganisationUnits.add( option, null );
+ availableOrganisationUnits.add( option, null ); */
+
+ $("#parentOrganisationUnitId").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
@@ -94,9 +96,11 @@
var id = organisationUnits[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
var organisationUnitName = organisationUnits[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = organisationUnitName;
- availableOrganisationUnits.add( option, null );
+ availableOrganisationUnits.add( option, null ); */
+
+ $("#organisationUnitId").append("<option value='"+ id +"'>" + organisationUnitName + "</option>");
}
}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js 2010-09-13 10:03:14 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reports.js 2010-09-15 08:50:45 +0000
@@ -154,11 +154,13 @@
var dataElementName = dataElements[ i ].getElementsByTagName("name")[0].firstChild.nodeValue;
if ( listContains(selectedDataElements, id) == false )
{
- var option = document.createElement("option");
+ /* var option = document.createElement("option");
option.value = id;
option.text = dataElementName;
option.title = dataElementName;
- availableDataElements.add(option, null);
+ availableDataElements.add(option, null); */
+
+ $("#availableDataElements").append("<option value='"+ id +"' title='" + dataElementName + "'>" + dataElementName + "</option>");
}
}
}// getDataElementsReceived end
@@ -271,7 +273,7 @@
function getReports( ouId, reportTypeName )
{
var periodTypeList = byId( "periodTypeId" );
- if( periodTypeList == null ){
+ if( periodTypeList == null || periodTypeList.options.length == 0){
return;
}
var periodType = periodTypeList.options[ periodTypeList.selectedIndex ].value;
@@ -321,10 +323,12 @@
orgUnitName.value = ouName;
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = name;
- reportsList.add( option, null );
+ reportsList.add( option, null ); */
+
+ $("#reportList").append("<option value='"+ id +"'>" + name + "</option>");
reportModels.put(id,model);
reportFileNames.put(id,fileName);
@@ -352,10 +356,12 @@
if ( listContains( selectedPeriods, id ) == false )
{
- var option = document.createElement( "option" );
+ /* var option = document.createElement( "option" );
option.value = id;
option.text = periodName;
- availablePeriods.add( option, null );
+ availablePeriods.add( option, null ); */
+
+ $("#availablePeriods").append("<option value='"+ id +"'>" + periodName + "</option>");
}
}