@ -1,185 +1,3 @@
//////////////////////
// HTML static pieces
var HTML _navBar = `
< div class = "container-fluid" >
< button class = "navbar-toggler" type = "button" data - bs - toggle = "collapse" data - bs - target = "#navbarTogglerDemo01" aria - controls = "navbarTogglerDemo01" aria - expanded = "false" aria - label = "Toggle navigation" >
< span class = "navbar-toggler-icon" > < / s p a n >
< / b u t t o n >
< div class = "collapse navbar-collapse" id = "navbarTogglerDemo01" >
< a class = "navbar-brand" href = "`+homePagageUrl+`" >
< img src = "imgs/infravis.jpg" alt = "" width = "30" height = "24" class = "d-inline-block align-text-top" >
TräHus
< / a >
< ul class = "navbar-nav me-auto mb-2 mb-lg-0" >
< li class = "nav-item" >
< a class = "nav-link active" aria - current = "page" href = "`+homePagageUrl+`" > Home < / a >
< / l i >
< / u l >
< ul class = "navbar-nav me-auto mb-2 mb-lg-0" >
< li class = "nav-item" >
< a class = "nav-link" href = "http://infravis.se" target = "_infravis_se_site" aria - current = "page" > Powered by Infravis < / a >
< / l i >
< / u l >
< / d i v >
< / d i v >
` ;
// LIST OF SENSOR NAME and Families.
// Get unique list of families
//var listSensors = ["Internal.Temp_SC1.celsius","Internal.Count_SC1.count","MP1_1.Temp_MP1_1_Pos1.celsius","MP1_1.RF_MP1_1_Pos1.percentRH","MP1_1.Temp_MP1_1_Pos2.celsius","MP1_1.RF_MP1_1_Pos2.percentRH","MP1_1.Temp_MP1_1_Pos3.celsius","MP1_1.RF_MP1_1_Pos3.percentRH","MP1_1.Temp_MP1_1_Pos4.celsius","MP1_1.RF_MP1_1_Pos4.percentRH","MP1_1.Temp_MP1_1_Pos5.celsius","MP1_1.RF_MP1_1_Pos5.percentRH","MP1_1.Temp_MP1_1_Pos6.celsius","MP1_1.RF_MP1_1_Pos6.percentRH","MP1_2.Temp_MP1_2_Pos1.celsius","MP1_2.RF_MP1_2_Pos1.percentRH","MP1_2.Temp_MP1_2_Pos2.celsius","MP1_2.RF_MP1_2_Pos2.percentRH","MP1_2.Temp_MP1_2_Pos3.celsius","MP1_2.RF_MP1_2_Pos3.percentRH","MP1_2.Temp_MP1_2_Pos4.celsius","MP1_2.RF_MP1_2_Pos4.percentRH","MP1_2.Temp_MP1_2_Pos5.celsius","MP1_2.RF_MP1_2_Pos5.percentRH","MP1_2.Temp_MP1_2_Pos6.celsius","MP1_2.RF_MP1_2_Pos6.percentRH","MP1_3.RelDisp_MP1_4.percent","MP1_3.AbsDisp_MP1_4.mm","MP1_3.RelDisp_MP2_X.percent","MP1_3.AbsDisp_MP2_X.mm","MP1_3.RelDisp_MP2_Y.percent","MP1_3.AbsDisp_MP2_Y.mm","MP1_5.Temp_MP1_5_Pos1.celsius","MP1_5.RF_MP1_5_Pos1.percentRH","MP1_5.MC_MP1_5_Pos1.percentEMC","MP1_5.Resist_MP1_5_Pos1.Mohm","MP1_5.Temp_MP1_5_Pos2.celsius","MP1_5.RF_MP1_5_Pos2.percentRH","MP1_5.MC_MP1_5_Pos2.percentEMC","MP1_5.Resist_MP1_5_Pos2.Mohm","MP1_5.Temp_MP1_5_Pos3.celsius","MP1_5.RF_MP1_5_Pos3.percentRH","MP1_5.MC_MP1_5_Pos3.percentEMC","MP1_5.Resist_MP1_5_Pos3.Mohm","MP1_5.TempCond_MP1_5.celsius","MP1_5.RFCond_MP1_5.percentRH"];
var listSensors = [ "MP1_1.Temp_MP1_1_Pos1.celsius" , "MP1_1.RF_MP1_1_Pos1.percentRH" , "MP1_1.Temp_MP1_1_Pos2.celsius" , "MP1_1.RF_MP1_1_Pos2.percentRH" , "MP1_1.Temp_MP1_1_Pos3.celsius" , "MP1_1.RF_MP1_1_Pos3.percentRH" , "MP1_1.Temp_MP1_1_Pos4.celsius" , "MP1_1.RF_MP1_1_Pos4.percentRH" , "MP1_1.Temp_MP1_1_Pos5.celsius" , "MP1_1.RF_MP1_1_Pos5.percentRH" , "MP1_1.Temp_MP1_1_Pos6.celsius" , "MP1_1.RF_MP1_1_Pos6.percentRH" , "MP1_2.Temp_MP1_2_Pos1.celsius" , "MP1_2.RF_MP1_2_Pos1.percentRH" , "MP1_2.Temp_MP1_2_Pos2.celsius" , "MP1_2.RF_MP1_2_Pos2.percentRH" , "MP1_2.Temp_MP1_2_Pos3.celsius" , "MP1_2.RF_MP1_2_Pos3.percentRH" , "MP1_2.Temp_MP1_2_Pos4.celsius" , "MP1_2.RF_MP1_2_Pos4.percentRH" , "MP1_2.Temp_MP1_2_Pos5.celsius" , "MP1_2.RF_MP1_2_Pos5.percentRH" , "MP1_2.Temp_MP1_2_Pos6.celsius" , "MP1_2.RF_MP1_2_Pos6.percentRH" , "MP1_3.RelDisp_MP1_4.percent" , "MP1_3.AbsDisp_MP1_4.mm" , "MP1_3.RelDisp_MP2_X.percent" , "MP1_3.AbsDisp_MP2_X.mm" , "MP1_3.RelDisp_MP2_Y.percent" , "MP1_3.AbsDisp_MP2_Y.mm" , "MP1_5.Temp_MP1_5_Pos1.celsius" , "MP1_5.RF_MP1_5_Pos1.percentRH" , "MP1_5.MC_MP1_5_Pos1.percentEMC" , "MP1_5.Resist_MP1_5_Pos1.Mohm" , "MP1_5.Temp_MP1_5_Pos2.celsius" , "MP1_5.RF_MP1_5_Pos2.percentRH" , "MP1_5.MC_MP1_5_Pos2.percentEMC" , "MP1_5.Resist_MP1_5_Pos2.Mohm" , "MP1_5.Temp_MP1_5_Pos3.celsius" , "MP1_5.RF_MP1_5_Pos3.percentRH" , "MP1_5.MC_MP1_5_Pos3.percentEMC" , "MP1_5.Resist_MP1_5_Pos3.Mohm" , "MP1_5.TempCond_MP1_5.celsius" , "MP1_5.RFCond_MP1_5.percentRH" , "Internal.Temp_SC4" , "Internal.Count_SC4" , "Temp_MP4_1_Pos1" , "MP4_1.RF_MP4_1_Pos1" , "MP4_1.Temp_MP4_1_Pos2" , "MP4_1.RF_MP4_1_Pos2" , "MP4_1.Temp_MP4_1_Pos3" , "MP4_1.RF_MP4_1_Pos3" , "MP4_1.Temp_MP4_1_Pos4" , "MP4_1.RF_MP4_1_Pos4" , "MP4_1.Temp_MP4_1_Pos5" , "MP4_1.RF_MP4_1_Pos5" , "MP4_1.Temp_MP4_1_Pos6" , "MP4_1.RF_MP4_1_Pos6" , "MP4_1.AirPres_MP4_1" , "Temp_MP4_2_Pos1" , "MP4_2.RF_MP4_2_Pos1" , "MP4_2.Temp_MP4_2_Pos2" , "MP4_2.RF_MP4_2_Pos2" , "MP4_2.Temp_MP4_2_Pos3" , "MP4_2.RF_MP4_2_Pos3" , "MP4_2.Temp_MP4_2_Pos4" , "MP4_2.RF_MP4_2_Pos4" , "MP4_2.Temp_MP4_2_Pos5" , "MP4_2.RF_MP4_2_Pos5" , "MP4_2.Temp_MP4_2_Pos6" , "MP4_2.RF_MP4_2_Pos6" , "AvgWind_Weather" , "WEATHER.MomWind_Weather" , "WEATHER.Temp_Weather" , "WEATHER.DirWind_Weather" , "WEATHER.RF_Weather" , "WEATHER.RainDay_Weather" , "WEATHER.RainRate_Weather" , "WEATHER.AirPres_Weather" , "AvgWind_Weather" , "Internal.Temp_SC1.celsius" , "Internal.Count_SC1.celsius" , "WEATHER.MomWind_Weather" , "WEATHER.Temp_Weather" , "WEATHER.DirWind_Weather" , "WEATHER.RF_Weather" , "WEATHER.RainDay_Weather" , "WEATHER.RainRate_Weather" , "WEATHER.AirPres_Weather" ] ;
var listParametersRepeated = [ ] ;
// Get families anmes and sensors select optionssensors
var listSensorsOptions = "" ;
var listFamiliesRepeated = [ ] ;
for ( var i = 0 ; i < listSensors . length ; i ++ ) {
listFamiliesRepeated . push ( listSensors [ i ] . split ( "." ) [ 0 ] ) ;
listParametersRepeated . push ( listSensors [ i ] . split ( "." ) [ 2 ] ) ;
listSensorsOptions += ` <option value=" ${ listSensors [ i ] . split ( "." ) [ 1 ] } "> ${ listSensors [ i ] . split ( "." ) [ 1 ] } </option> ` ;
}
var listFamiliesRepeated2 = new Set ( listFamiliesRepeated ) ;
var listFamilies = Array . from ( listFamiliesRepeated2 ) ;
var listFamiliesOptions = "" ;
// Get fammily select options
for ( var i = 0 ; i < listFamilies . length ; i ++ ) {
listFamiliesOptions += ` <option value=" ${ listFamilies [ i ] } "> ${ listFamilies [ i ] } </option> ` ;
}
var listParametersRepeated2 = new Set ( listParametersRepeated ) ;
var listParameters = Array . from ( listParametersRepeated2 ) ;
var listParametersOptions = "" ;
// Get parameters select options
for ( var i = 0 ; i < listParameters . length ; i ++ ) {
listParametersOptions += ` <option value=" ${ listParameters [ i ] } "> ${ listParameters [ i ] } </option> ` ;
}
///////////////////////////////////////////
// Div diagrams buttons: remove, popup:
// Function to remove the div
function removeDiv ( button ) {
const div = button . parentElement ;
div . remove ( ) ;
}
// Function to open a new window with the div content
function openPopup ( button ) {
const divContent = button . parentElement . innerHTML ;
const newWindow = window . open ( '' , '' , 'width=600,height=400' ) ;
newWindow . document . write ( '<html><head><title>Popup Window</title></head><body>' ) ;
newWindow . document . write ( '<div>' + divContent + '</div>' ) ;
newWindow . document . write ( '</body></html>' ) ;
newWindow . document . close ( ) ;
}
function openPopupXX ( button ) {
const divContent = button . parentElement . innerHTML ;
// Open a new window
const newWindow = window . open ( '' , '' , 'width=600,height=400' ) ;
// Write the basic HTML structure to the new window
newWindow . document . write ( '<html><head><title>Popup Window</title></head><body>' ) ;
// Copy the content of the main page's head to the new window's head
const mainPageHead = document . head ;
const newWindowHead = newWindow . document . head ;
for ( let i = 0 ; i < mainPageHead . children . length ; i ++ ) {
const element = mainPageHead . children [ i ] ;
if ( element . tagName === 'LINK' || element . tagName === 'STYLE' || element . tagName === 'SCRIPT' ) {
// Copy link, style, and script elements
newWindowHead . appendChild ( element . cloneNode ( true ) ) ;
}
}
// Write the content of the DIV to the new window's body
newWindow . document . write ( '<div>' + divContent + '</div>' ) ;
// Close the HTML structure
newWindow . document . write ( '</body></html>' ) ;
// Close the new window document
newWindow . document . close ( ) ;
}
// Open popup only for Hotizon in <canvas>
function openPopupCanvas ( button ) {
function exportCanvasToNewWindow ( dataURLs , textContents , titles , initialTitle ) {
// Open a new window
const newWindow = window . open ( '' , '' , 'width=800,height=400' ) ;
// Write the basic HTML structure to the new window
newWindow . document . write ( '<html><head><title>Canvas Export</title></head><body>' ) ;
// Create an <h2> element for the initialTitle and prepend it to the container
const initialH2 = newWindow . document . createElement ( 'h2' ) ;
initialH2 . textContent = initialTitle ;
newWindow . document . body . appendChild ( initialH2 ) ;
// Create a container div for canvas, text, and titles
const containerDiv = newWindow . document . createElement ( 'div' ) ;
containerDiv . style . display = 'flex' ;
containerDiv . style . flexWrap = 'wrap' ; // Allow elements to wrap to the next line
// Loop through each canvas, text, and title
for ( let i = 0 ; i < dataURLs . length ; i ++ ) {
// Create a div for each canvas, text, and title
const div = newWindow . document . createElement ( 'div' ) ;
div . style . marginRight = '20px' ; // Add spacing between elements
// Create an image element with the captured canvas content
const canvasImage = new Image ( ) ;
canvasImage . src = dataURLs [ i ] ;
div . appendChild ( canvasImage ) ;
// Create a <p> element for the text content
const textElement = newWindow . document . createElement ( 'p' ) ;
textElement . textContent = textContents [ i ] ;
div . appendChild ( textElement ) ;
// Create a <span> element for the title content
const titleElement = newWindow . document . createElement ( 'span' ) ;
titleElement . className = 'title' ;
titleElement . textContent = titles [ i ] ;
div . appendChild ( titleElement ) ;
// Append the div to the container
containerDiv . appendChild ( div ) ;
}
// Append the container div to the new window
newWindow . document . body . appendChild ( containerDiv ) ;
// Close the HTML structure
newWindow . document . write ( '</body></html>' ) ;
newWindow . document . close ( ) ;
}
// Get all the canvas, text, and title elements inside the div with id "col-right"
const colRightDiv = document . getElementById ( 'col-right' ) ;
const canvasElements = colRightDiv . querySelectorAll ( 'canvas' ) ;
const textElements = colRightDiv . querySelectorAll ( 'p' ) ;
const titleElements = colRightDiv . querySelectorAll ( '.title' ) ;
// Extract data URLs from canvas elements
const dataURLs = Array . from ( canvasElements ) . map ( ( canvas ) => canvas . toDataURL ( ) ) ;
// Extract text content from <p> elements
const textContents = Array . from ( textElements ) . map ( ( p ) => p . textContent ) ;
// Extract title content from <span class="title"> elements
const titles = Array . from ( titleElements ) . map ( ( span ) => span . textContent ) ;
// Define the initialTitle
const initialTitle = "Trä hus data flexiboard , powered by infravis.se" ; // Replace with your desired title
// Call the function to export all canvas, text, and title content to a new window
exportCanvasToNewWindow ( dataURLs , textContents , titles , initialTitle ) ;
}
/////////////////////////////////////////////
// Check if house var is selected: if not then go back to home.html
@ -218,11 +36,110 @@ document.getElementById("h1_title").innerHTML = h1_title;
document . getElementById ( "subtitle" ) . innerHTML = subtitle ;
/////////////////////////////////
// Get and apply the range of time for the data.
//////////////////////////////////
// LIST OF SENSOR NAME and Families.
// Get the list of sensors, amnd the range_years_month from config/datamap.js
var projectName = myParam ;
var listSensors = null ;
var range _year _month ;
for ( var i = 0 ; i < PROJECTS . items . length ; i ++ ) {
if ( PROJECTS . items [ i ] . xname === projectName ) {
range _year _month = PROJECTS . items [ i ] . range _years _month ;
listSensors = PROJECTS . items [ i ] . families [ 0 ] . listOfSensors ;
break ;
}
}
// Arrange the range_years_month
var first _year = parseInt ( range _year _month [ 0 ] . split ( "-" ) [ 0 ] , 10 ) ;
var first _year _month = range _year _month [ 0 ] ;
var last _year = parseInt ( range _year _month [ 1 ] . split ( "-" ) [ 0 ] , 10 ) ;
var last _year _month = range _year _month [ 1 ] ;
// Creta select option according to time range:
listYearOptions = "" ;
for ( var i = last _year ; i >= first _year ; i -- ) {
listYearOptions += ` <option value=" ${ i } "> ${ i } </option> ` ;
}
// Get unique list of families
var listParametersRepeated = [ ] ;
// Get families anmes and sensors select optionssensors
var listSensorsOptions = "" ;
var listFamiliesRepeated = [ ] ;
for ( var i = 0 ; i < listSensors . length ; i ++ ) {
listFamiliesRepeated . push ( listSensors [ i ] . split ( "." ) [ 0 ] ) ;
listParametersRepeated . push ( listSensors [ i ] . split ( "." ) [ 2 ] ) ;
listSensorsOptions += ` <option value=" ${ listSensors [ i ] . split ( "." ) [ 1 ] } "> ${ listSensors [ i ] . split ( "." ) [ 1 ] } </option> ` ;
}
var listFamiliesRepeated2 = new Set ( listFamiliesRepeated ) ;
var listFamilies = Array . from ( listFamiliesRepeated2 ) ;
var listFamiliesOptions = "" ;
// Get fammily select options
for ( var i = 0 ; i < listFamilies . length ; i ++ ) {
listFamiliesOptions += ` <option value=" ${ listFamilies [ i ] } "> ${ listFamilies [ i ] } </option> ` ;
}
var listParametersRepeated2 = new Set ( listParametersRepeated ) ;
var listParameters = Array . from ( listParametersRepeated2 ) ;
var listParametersOptions = "" ;
// Get parameters select options
for ( var i = 0 ; i < listParameters . length ; i ++ ) {
listParametersOptions += ` <option value=" ${ listParameters [ i ] } "> ${ listParameters [ i ] } </option> ` ;
}
/////////////////////////////////
// ADDING HTML dynamic pieces
// Adding HTML navbar
var HTML _navBar = `
< div class = "container-fluid" >
< button class = "navbar-toggler" type = "button" data - bs - toggle = "collapse" data - bs - target = "#navbarTogglerDemo01" aria - controls = "navbarTogglerDemo01" aria - expanded = "false" aria - label = "Toggle navigation" >
< span class = "navbar-toggler-icon" > < / s p a n >
< / b u t t o n >
< div class = "collapse navbar-collapse" id = "navbarTogglerDemo01" >
< a class = "navbar-brand" href = "`+homePagageUrl+`" >
< img src = "imgs/infravis.jpg" alt = "" width = "30" height = "24" class = "d-inline-block align-text-top" >
TräHus
< / a >
< ul class = "navbar-nav me-auto mb-2 mb-lg-0" >
< li class = "nav-item" >
< a class = "nav-link active" aria - current = "page" href = "`+homePagageUrl+`" > Home < / a >
< / l i >
< / u l >
< ul class = "navbar-nav me-auto mb-2 mb-lg-0" >
< li class = "nav-item" >
< a class = "nav-link" href = "http://infravis.se" target = "_infravis_se_site" aria - current = "page" > Powered by Infravis < / a >
< / l i >
< / u l >
< / d i v >
< / d i v >
` ;
document . getElementById ( "navbar" ) . innerHTML = HTML _navBar ;
// AddingSELECT OPTIONS for:
// Time range:
document . getElementById ( "PYYear" ) . innerHTML = listYearOptions
document . getElementById ( "GYYear" ) . innerHTML = listYearOptions
document . getElementById ( "HYYear" ) . innerHTML = listYearOptions
// time range of data
document . getElementById ( "PYYear" ) . innerHTML = listYearOptions ;
document . getElementById ( "GYYear" ) . innerHTML = listYearOptions ;
document . getElementById ( "HYYear" ) . innerHTML = listYearOptions ;
// Families:
document . getElementById ( "PYFamSensor" ) . innerHTML = listFamiliesOptions ;
document . getElementById ( "PMFamSensor" ) . innerHTML = listFamiliesOptions ;
@ -1075,6 +992,132 @@ function getApiUrls() {
///////////////////////////////////////////
// Div diagrams buttons: remove, popup:
// Function to remove the div
function removeDiv ( button ) {
const div = button . parentElement ;
div . remove ( ) ;
}
// Function to open a new window with the div content
function openPopup ( button ) {
const divContent = button . parentElement . innerHTML ;
const newWindow = window . open ( '' , '' , 'width=600,height=400' ) ;
newWindow . document . write ( '<html><head><title>Popup Window</title></head><body>' ) ;
newWindow . document . write ( '<div>' + divContent + '</div>' ) ;
newWindow . document . write ( '</body></html>' ) ;
newWindow . document . close ( ) ;
}
function openPopupXX ( button ) {
const divContent = button . parentElement . innerHTML ;
// Open a new window
const newWindow = window . open ( '' , '' , 'width=600,height=400' ) ;
// Write the basic HTML structure to the new window
newWindow . document . write ( '<html><head><title>Popup Window</title></head><body>' ) ;
// Copy the content of the main page's head to the new window's head
const mainPageHead = document . head ;
const newWindowHead = newWindow . document . head ;
for ( let i = 0 ; i < mainPageHead . children . length ; i ++ ) {
const element = mainPageHead . children [ i ] ;
if ( element . tagName === 'LINK' || element . tagName === 'STYLE' || element . tagName === 'SCRIPT' ) {
// Copy link, style, and script elements
newWindowHead . appendChild ( element . cloneNode ( true ) ) ;
}
}
// Write the content of the DIV to the new window's body
newWindow . document . write ( '<div>' + divContent + '</div>' ) ;
// Close the HTML structure
newWindow . document . write ( '</body></html>' ) ;
// Close the new window document
newWindow . document . close ( ) ;
}
// Open popup only for Hotizon in <canvas>
function openPopupCanvas ( button ) {
function exportCanvasToNewWindow ( dataURLs , textContents , titles , initialTitle ) {
// Open a new window
const newWindow = window . open ( '' , '' , 'width=800,height=400' ) ;
// Write the basic HTML structure to the new window
newWindow . document . write ( '<html><head><title>Canvas Export</title></head><body>' ) ;
// Create an <h2> element for the initialTitle and prepend it to the container
const initialH2 = newWindow . document . createElement ( 'h2' ) ;
initialH2 . textContent = initialTitle ;
newWindow . document . body . appendChild ( initialH2 ) ;
// Create a container div for canvas, text, and titles
const containerDiv = newWindow . document . createElement ( 'div' ) ;
containerDiv . style . display = 'flex' ;
containerDiv . style . flexWrap = 'wrap' ; // Allow elements to wrap to the next line
// Loop through each canvas, text, and title
for ( let i = 0 ; i < dataURLs . length ; i ++ ) {
// Create a div for each canvas, text, and title
const div = newWindow . document . createElement ( 'div' ) ;
div . style . marginRight = '20px' ; // Add spacing between elements
// Create an image element with the captured canvas content
const canvasImage = new Image ( ) ;
canvasImage . src = dataURLs [ i ] ;
div . appendChild ( canvasImage ) ;
// Create a <p> element for the text content
const textElement = newWindow . document . createElement ( 'p' ) ;
textElement . textContent = textContents [ i ] ;
div . appendChild ( textElement ) ;
// Create a <span> element for the title content
const titleElement = newWindow . document . createElement ( 'span' ) ;
titleElement . className = 'title' ;
titleElement . textContent = titles [ i ] ;
div . appendChild ( titleElement ) ;
// Append the div to the container
containerDiv . appendChild ( div ) ;
}
// Append the container div to the new window
newWindow . document . body . appendChild ( containerDiv ) ;
// Close the HTML structure
newWindow . document . write ( '</body></html>' ) ;
newWindow . document . close ( ) ;
}
// Get all the canvas, text, and title elements inside the div with id "col-right"
const colRightDiv = document . getElementById ( 'col-right' ) ;
const canvasElements = colRightDiv . querySelectorAll ( 'canvas' ) ;
const textElements = colRightDiv . querySelectorAll ( 'p' ) ;
const titleElements = colRightDiv . querySelectorAll ( '.title' ) ;
// Extract data URLs from canvas elements
const dataURLs = Array . from ( canvasElements ) . map ( ( canvas ) => canvas . toDataURL ( ) ) ;
// Extract text content from <p> elements
const textContents = Array . from ( textElements ) . map ( ( p ) => p . textContent ) ;
// Extract title content from <span class="title"> elements
const titles = Array . from ( titleElements ) . map ( ( span ) => span . textContent ) ;
// Define the initialTitle
const initialTitle = "Trä hus data flexiboard , powered by infravis.se" ; // Replace with your desired title
// Call the function to export all canvas, text, and title content to a new window
exportCanvasToNewWindow ( dataURLs , textContents , titles , initialTitle ) ;
}
///////////////////////////////
@ -1293,12 +1336,18 @@ $(document).ready(function() {
////////////////////////////////////////////////////////////////
//// DATE/TIME DIALOGS FOR DIAGRAM GENERATOR
// Range dates formatted:
var first _date = first _year _month . split ( "-" )
var myStartDate _MM _YYYY = first _date [ 1 ] + "/" + first _date [ 0 ] ;
var last _date = last _year _month . split ( "-" )
var myEndDate _MM _YYYY = last _date [ 1 ] + "/" + last _date [ 0 ] ;
// Used in Parallel-yearly, Parallel-monthly
$ ( '#SelectYearMonth, #SelectYearMonth1, #grid-SelectYearMonth, #horizon-SelectYearMonth' ) . datepicker ( {
format : "mm/yyyy" ,
weekStart : 1 ,
startDate : "07/2018" ,
endDate : "08/2023" ,
startDate : myStartDate _MM _YYYY ,
endDate : myEndDate _MM _YYYY ,
startView : 1 ,
minViewMode : 1 ,
maxViewMode : 2 ,
@ -1311,8 +1360,8 @@ $(document).ready(function() {
$ ( '#SelectYearMonthDay, #SelectYearMonthDay1' ) . datepicker ( {
format : "dd/mm/yyyy" ,
weekStart : 1 ,
startDate : "01/07/2018 " ,
endDate : "31/08/2023 " ,
startDate : "01/" + myStartDate _MM _YYYY ,
endDate : "31/" + myEndDate _MM _YYYY ,
maxViewMode : 2 ,
clearBtn : true ,
orientation : "bottom auto" ,
@ -1323,8 +1372,8 @@ $('#SelectYearMonthDay, #SelectYearMonthDay1').datepicker({
$ ( '#SelectYearMonthWeek, #horizonSelectYearMonthWeek, #parallelSelectYearMonthWeek' ) . datepicker ( {
format : "dd/mm/yyyy" ,
weekStart : 1 ,
startDate : "01/07/2018 " ,
endDate : "31/08/2023 " ,
startDate : "01/" + myStartDate _MM _YYYY ,
endDate : "31/" + myEndDate _MM _YYYY ,
maxViewMode : 2 ,
clearBtn : true ,
orientation : "bottom auto" ,