Mercurial > dive4elements > gnv-client
changeset 28:d93ea867406b
CodeCleanup in Imported Javascriptfile
gnv/trunk@130 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 24 Sep 2009 12:43:46 +0000 |
parents | 573655a161d7 |
children | bba8fd97e549 |
files | gnv/Changelog gnv/src/main/webapp/scripts/gnviewer.js |
diffstat | 2 files changed, 5 insertions(+), 68 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/Changelog Thu Sep 24 12:38:08 2009 +0000 +++ b/gnv/Changelog Thu Sep 24 12:43:46 2009 +0000 @@ -1,3 +1,7 @@ +2009-09-24 Tim Englich <tim.englich@intevation.de> + * src/main/webapp/scripts/gnviewer.js Edited: + Removed unused Methods from File. + 2009-09-24 Tim Englich <tim.englich@intevation.de> * src/main/webapp/WEB-INF/jsp/mainlayout.jsp Edited:
--- a/gnv/src/main/webapp/scripts/gnviewer.js Thu Sep 24 12:38:08 2009 +0000 +++ b/gnv/src/main/webapp/scripts/gnviewer.js Thu Sep 24 12:43:46 2009 +0000 @@ -1,14 +1,3 @@ -function showSpatialSelection(theObj) { - var theIdValue = theObj.value; - - var theDivElems = document.getElementById('spatialselection').getElementsByTagName("DIV"); - - for (var i = 0; i < theDivElems.length; i++) { - theDivElems[i].style.display = "none"; - } - document.getElementById(theIdValue).style.display = "block"; - -} function displayOverlay() { adjustOverlaySize(); showDiv("overlay"); @@ -22,63 +11,7 @@ lOverlay.style.height = lHeight + 'px'; } -function displayDiv(pName) { - var el = document.getElementById(pName); - el.style.display = (el.style.display == "none" || el.style.display == "") ? "block" : "none"; -} function showDiv(pName) { var el = document.getElementById(pName); el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible"; -} - -function hideDiv(pName) { - var el = document.getElementById(pName); - el.style.visibility = "hidden"; -} - -function sendAjaxForm(pFormId, pTarget, pIdOfResponseDiv) { - new Ajax.Updater(pIdOfResponseDiv, pTarget, { method:'post', - parameters: $(pFormId).serialize(true), - onSuccess: function(transport) { - //var response = transport.responseText || "no response text"; - //alert("Success! \n\n" + response); - }, - onFailure: function() { //alert('Something went wrong...') - } - } - ); -} -function resetOptionsForm(pForm) { - //alert("resetOptionsForm"+!pForm.overrideSize[0].checked+" "+pForm.overridenWidth.value); - // Levels abgeklemmt sendDiagramOptions(pForm.action, !pForm.overrideSize[0].checked, pForm.overridenWidth.value, pForm.useUpperDataLevel.checked, pForm.useLowerDataLevel.checked, pForm.upperLevel.value, pForm.lowerLevel.value) - sendDiagramOptions(pForm.action, false, 500); - } - -function sendOptionsForm(pForm) { - //alert("sendOptionsForm"+!pForm.overrideSize[0].checked+" "+pForm.overridenWidth.value); - // Levels abgeklemmt sendDiagramOptions(pForm.action, !pForm.overrideSize[0].checked, pForm.overridenWidth.value, pForm.useUpperDataLevel.checked, pForm.useLowerDataLevel.checked, pForm.upperLevel.value, pForm.lowerLevel.value) - sendDiagramOptions(pForm.action, !pForm.overrideSize[0].checked, pForm.overridenWidth.value); - } - - -//function sendDiagramOptions(pActionTarget, pOverrideSize, pOverridenWidth, pUseUpperLevel, pUseLowerLevel, pUpper, pLower) { -// new Ajax.Updater('diagramOptionsContent', pActionTarget, {method: 'post', -// parameters: { -// overrideSize: pOverrideSize, -// useUpperDataLevel: pUseUpperLevel, -// useLowerDataLevel: pUseLowerLevel, -// overridenWidth: pOverridenWidth, -// upperLevel: pUpper, -// lowerLevel: pLower, -// cmd : 'setOptions' -// }}); -//} -function sendDiagramOptions(pActionTarget, pOverrideSize, pOverridenWidth) { - //alert("sendDiagramOptions"+pOverrideSize+" "+pOverridenWidth); - new Ajax.Updater('diagramOptionsContent', pActionTarget, {method: 'post', - parameters: { - overrideSize: pOverrideSize, - overridenWidth: pOverridenWidth, - cmd : 'setOptions' - }}); -} +} \ No newline at end of file