diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2011-09-13 07:01:10 +0400 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2011-09-13 07:01:10 +0400 |
commit | e3bcd9f7cff628841ee158ffeb01b6df9990c900 (patch) | |
tree | fc2b85ef9cc682f329f63960982fdf6157943393 /js/gis_data_editor.js | |
parent | c3bb40cbce8a3e055fdd0ec98f9468f5d859ee00 (diff) |
JS files for gis_data_editor loaded dynamically
Diffstat (limited to 'js/gis_data_editor.js')
-rw-r--r-- | js/gis_data_editor.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 6fb3d7bb68..22b20f83d2 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -5,6 +5,8 @@ * */ +var gisEditorLoaded = false; + /** * Closes the GIS data editor and perform necessary clean up work. */ @@ -87,6 +89,16 @@ function initGISEditorVisualization() { * @param token token */ function openGISEditor(value, field, type, input_name, token) { + + if (!gisEditorLoaded) { + loadJavascript([ 'js/jquery/jquery.svg.js', + 'js/jquery/jquery.mousewheel.js', + 'js/jquery/jquery.event.drag-2.0.min.js', + 'js/tbl_gis_visualization.js', 'js/openlayers/OpenLayers.js' ]); + + gisEditorLoaded = true; + } + // Center the popup var windowWidth = document.documentElement.clientWidth; var windowHeight = document.documentElement.clientHeight; |