Skip to content

Commit

Permalink
check if dates are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasa committed Apr 22, 2015
1 parent 547c245 commit 7ceb019
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions WebContent/jsp/showtheme.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@
var sTypes = Ext.get('types' ).dom.value;
var sColors = Ext.get('colors' ).dom.value;
var sRanges = Ext.get('ranges' ).dom.value;
var sFromDate = Ext.get('fromDateId').dom.value;
var sToDate = Ext.get('toDateId' ).dom.value;
var sFromDate;
var sToDate;
var sBaseLayer= map.baseLayer.id;
Expand All @@ -303,9 +303,16 @@
url = url.concat("&ranges=").concat(sRanges);
url = url.concat("&colors=").concat(sColors);
url = url.concat("&baselayer=").concat(sBaseLayer);
url = url.concat("&fromDate=").concat(sFromDate);
url = url.concat("&toDate=").concat(sToDate);
if( Ext.get('fromDateId') != null && Ext.get('toDateId') != null ) {
sFromDate = Ext.get('fromDateId').dom.value;
sToDate = Ext.get('toDateId' ).dom.value;
url = url.concat("&fromDate=").concat(sFromDate);
url = url.concat("&toDate=").concat(sToDate);
}
showShareWin( url );
}
Expand Down

0 comments on commit 7ceb019

Please sign in to comment.