diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index dbfa1b6..18f924f 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,36 +1,44 @@ - + + - + + - + + - + + - + + + - + + - - - + + + - + + diff --git a/src/main/webapp/WEB-INF/views/engine/index.jsp b/src/main/webapp/WEB-INF/views/engine/index.jsp index 957e554..4e3bd5f 100644 --- a/src/main/webapp/WEB-INF/views/engine/index.jsp +++ b/src/main/webapp/WEB-INF/views/engine/index.jsp @@ -1744,10 +1744,10 @@ map.on('click', function(evt){ if(feature.userData !== undefined && (feature.userData.type=="Product2" || feature.userData.type=="Product3" || feature.userData.type=="Product2r" || feature.userData.type=="Product3r")) { - if(feature.userData.percent!='') + //if(feature.userData.percent!='') new TChartFRMLocustInfo(feature.userData); - else - alert2(trt('Alert'),trt('No_data')+'!',feature.userData.name); + //else + // alert2(trt('Alert'),trt('No_data')+'!',feature.userData.name); } if(feature.userData !== undefined && (feature.userData.type=="Product4" || feature.userData.type=="Product4r")) diff --git a/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.docx b/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.docx index b28a071..955e4d6 100644 Binary files a/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.docx and b/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.docx differ diff --git a/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.pdf b/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.pdf index a5883d5..0f678bb 100644 Binary files a/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.pdf and b/src/main/webapp/resources/engine/help/ASDC_for_Android_ENG.pdf differ diff --git a/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.docx b/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.docx index efdcde4..bfedb72 100644 Binary files a/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.docx and b/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.docx differ diff --git a/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.pdf b/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.pdf index e0234e8..a91bdfa 100644 Binary files a/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.pdf and b/src/main/webapp/resources/engine/help/ASDC_for_Android_RUS.pdf differ diff --git a/src/main/webapp/resources/engine/help/CCALM_help_ENG.doc b/src/main/webapp/resources/engine/help/CCALM_help_ENG.doc index f451210..271f9d6 100644 Binary files a/src/main/webapp/resources/engine/help/CCALM_help_ENG.doc and b/src/main/webapp/resources/engine/help/CCALM_help_ENG.doc differ diff --git a/src/main/webapp/resources/engine/help/CCALM_help_RUS.docx b/src/main/webapp/resources/engine/help/CCALM_help_RUS.docx index 6dee44f..e477ac4 100644 Binary files a/src/main/webapp/resources/engine/help/CCALM_help_RUS.docx and b/src/main/webapp/resources/engine/help/CCALM_help_RUS.docx differ diff --git a/src/main/webapp/resources/engine/help/index.html b/src/main/webapp/resources/engine/help/index.html index 0988198..2a6dad3 100644 --- a/src/main/webapp/resources/engine/help/index.html +++ b/src/main/webapp/resources/engine/help/index.html @@ -18,8 +18,8 @@

ASDC Guidelines

- ASDC_for_Android_ENG_v2.3.pdf
- ASDC_for_Android_RUS_v2.3.pdf + ASDC_for_Android_ENG_v2.4.3.pdf
+ ASDC_for_Android_RUS_v2.4.3.pdf

CCALM Guidelines

CCALM_help_ENG.pdf
diff --git a/src/main/webapp/resources/engine/index.js b/src/main/webapp/resources/engine/index.js index 3febd67..8a36ecd 100644 --- a/src/main/webapp/resources/engine/index.js +++ b/src/main/webapp/resources/engine/index.js @@ -38,7 +38,7 @@ function showIFrameWindow(title,url) function showConfigWidget() { this.win=new TWin(); - this.win.BuildGUI(10,10); + this.win.BuildGUI(350,140); this.win.setCaption(trt('Settings')); let str=`
@@ -65,7 +65,7 @@ function showConfigWidget()
`; - this.win.setSize("420px","50px"); + this.win.setSize("400px","140px"); this.win.setContent(str); this.win.setCenter(); this.win.shadow=true; @@ -451,12 +451,22 @@ function downloadQGISFile(product) } //Class for making chart from "frmLocustInfo" table -function TChartFRMLocustInfo(userData) +class TChartFRMLocustInfo { - this.updateData = function() + constructor(userData) { + this.name='TChartFRMLocustInfo'; + this.userData = userData; + this.m_win=null; + this.m_arr = new Array() + this.m_uid = getUID(); + + this.callData(); + } + + updateData() { this.m_win.setSize("150px","100px"); - var str=''; + let str=''; str='
\n\
 
\n\ \n\ @@ -473,27 +483,26 @@ function TChartFRMLocustInfo(userData) this.m_win.hideProgressBar(); } - this.addField = function(year,val) + addField(year,val) { this.m_arr[year]=val; } - this.buildTable = function(year,currVal) + buildTable(year,currVal,txt) { - var tbl=document.getElementById("tbl_"+this.m_uid); - var tblb=document.getElementById("tblb_"+this.m_uid); - for(var i = 0; i < tblb.rows.length;) + let tbl=document.getElementById("tbl_"+this.m_uid); + let tblb=document.getElementById("tblb_"+this.m_uid); + for(let i = 0; i < tblb.rows.length;) { tblb.deleteRow(i); } //tbl.innerHTML=''; - - var max=currVal; - var average=0; - var cnt=0; + let max=parseFloat(currVal); + let average=0; + let cnt=0; //Calculating average value - for (var key in this.m_arr) + for (let key in this.m_arr) { if (this.m_arr.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) { @@ -503,22 +512,21 @@ function TChartFRMLocustInfo(userData) cnt++; } } - average=average/cnt; + average=average/cnt; + let pr=100/max; - var pr=100/max; - - for (var key in this.m_arr) + for(let key in this.m_arr) { if (this.m_arr.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) { - var tr; var div; + let tr; let div; tr = document.createElement('tr'); - var td1 = document.createElement('td'); + let td1 = document.createElement('td'); td1.appendChild(document.createTextNode(key)); tr.appendChild(td1); - var td2 = document.createElement('td'); + let td2 = document.createElement('td'); td2.style.cssText='width:100px;height:100%;padding:1px;'; div = document.createElement('td'); div.style.cssText='height:15px; background-color:#9999ff; display:inline-block;'; @@ -526,71 +534,76 @@ function TChartFRMLocustInfo(userData) td2.appendChild(div); tr.appendChild(td2); - var td3 = document.createElement('td'); + let td3 = document.createElement('td'); td3.appendChild(document.createTextNode(this.m_arr[key])); tr.appendChild(td3); - var td4 = document.createElement('td'); + let td4 = document.createElement('td'); td4.appendChild(document.createTextNode((Math.round((this.m_arr[key]/average-1)*1000)/10)+"%")); tr.appendChild(td4); tblb.appendChild(tr); } } - //For last value - var tr; var div; + let tr; let div; tr = document.createElement('tr'); - var td1 = document.createElement('td'); + let td1 = document.createElement('td'); td1.appendChild(document.createTextNode(year)); tr.appendChild(td1); - var td2 = document.createElement('td'); + let td2 = document.createElement('td'); td2.style.cssText='width:100px;height:100%;padding:1px;'; div = document.createElement('td'); div.style.cssText='height:15px; background-color:#9999ff; display:inline-block;'; - div.style.width = Math.round(currVal*pr)+"px"; + div.style.width = Math.round(parseFloat(currVal)*pr)+"px"; td2.appendChild(div); tr.appendChild(td2); - var td3 = document.createElement('td'); - td3.appendChild(document.createTextNode(currVal)); + let td3 = document.createElement('td'); + if(txt!='') + td3.appendChild(document.createTextNode(txt)); + else + td3.appendChild(document.createTextNode(currVal)); tr.appendChild(td3); tblb.appendChild(tr); - var td4 = document.createElement('td'); - td4.appendChild(document.createTextNode((Math.round((currVal/average-1)*1000)/10)+"%")); + let td4 = document.createElement('td'); + td4.appendChild(document.createTextNode((Math.round((parseFloat(currVal)/average-1)*1000)/10)+"%")); tr.appendChild(td4); - var eTit=document.getElementById("tit_"+this.m_uid); + let eTit=document.getElementById("tit_"+this.m_uid); eTit.innerHTML=this.userData.name; + let p=(parseFloat(currVal)/average-1)*100; - var p=(currVal/average-1)*100; - - var eTxt=document.getElementById("txt_"+this.m_uid); + let eTxt=document.getElementById("txt_"+this.m_uid); eTxt.innerHTML=trt('Average')+': '+(Math.round(average * 100) / 100)+' ('+trt('thous_ha')+')
'+trt('Deviation')+': '+(Math.round(p * 10) / 10)+'%'; - - //var crd=ElemCoords(tbl); - - var eLin=document.getElementById("lin_"+this.m_uid); - eLin.style.top = (tbl.offsetTop + (tbl.offsetHeight/(cnt+1)))+"px"; - eLin.style.left = td2.offsetLeft+(average*pr)+"px"; - - eLin.style.height = (tbl.offsetHeight - 2*(tbl.offsetHeight/(cnt+1)))+"px"; + + if(this.m_arr.length<=1){ + let eLin=document.getElementById("lin_"+this.m_uid); + eLin.style.visibility='hidden'; + }else{ + let eLin=document.getElementById("lin_"+this.m_uid); + eLin.style.top = (tbl.offsetTop + (tbl.offsetHeight/(cnt+1)))+"px"; + eLin.style.left = td2.offsetLeft+(average*pr)+"px"; + eLin.style.height = (tbl.offsetHeight - 2*(tbl.offsetHeight/(cnt+1)))+"px"; + } } - this.prepareData = function(obj) - { + prepareData(obj) + { + let find=false; for(let i=0;i0) { let fullText = node.errorMessage; @@ -691,15 +715,7 @@ function TChartFRMLocustInfo(userData) } }else alert("Unknown function! fn=\""+fn+"\""); - }; - - this.name='TChartFRMLocustInfo'; - this.userData = userData; - this.m_win=null; - this.m_arr = new Array() - this.m_uid = getUID(); - - this.callData(); + } } //Customize the visual elements on the access level.
'+trt('Year')+' .2. '+trt('Value')+'