diff --git a/Geoweaver.war b/Geoweaver.war new file mode 100644 index 000000000..964fd8b79 Binary files /dev/null and b/Geoweaver.war differ diff --git a/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.js b/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.js index 8ba3a8461..b007fd2af 100644 --- a/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.js +++ b/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.js @@ -18,7 +18,7 @@ edu = { sponsor: "ESIPLab incubator project", - version: "0.7.8", + version: "0.7.9", author: "Ziheng Sun", diff --git a/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.process.js b/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.process.js index 583a4056b..91b9aa9d8 100644 --- a/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.process.js +++ b/WebContent/geoweaver/js/edu.gmu.csiss.geoweaver.process.js @@ -16,6 +16,8 @@ edu.gmu.csiss.geoweaver.process = { envlist: {}, + cmid: null, //the id used to differentiate the dialogs + builtin_processes: [ {"operation":"ShowResultMap", "params":[{"name":"resultfile", "min_occurs": 1, "max_occurs": 1}]}, //multiple occurs are something for later @@ -84,7 +86,7 @@ edu.gmu.csiss.geoweaver.process = { var valid = false; - if($("#processname").val()){ + if($("#processname-"+edu.gmu.csiss.geoweaver.process.cmid).val()){ // &&this.editor.getValue()){ @@ -96,56 +98,33 @@ edu.gmu.csiss.geoweaver.process = { }, - showShell: function(code){ + showShell: function(code, cmid){ - $("#codearea").append(''); + $("#codearea-"+edu.gmu.csiss.geoweaver.process.cmid).append(''); //initiate the code editor - edu.gmu.csiss.geoweaver.process.editor = CodeMirror.fromTextArea(document.getElementById("codeeditor"), { + edu.gmu.csiss.geoweaver.process.editor = CodeMirror.fromTextArea(document.getElementById("codeeditor-" + cmid), { + + lineNumbers: true, - lineNumbers: true, - - lineWrapping: true, - - extraKeys: { - - "Ctrl-S": function(instance) { - - edu.gmu.csiss.geoweaver.process.update(edu.gmu.csiss.geoweaver.process.current_pid); - - } - } - - }); + lineWrapping: true, + + extraKeys: { + + "Ctrl-S": function(instance) { + + edu.gmu.csiss.geoweaver.process.update(edu.gmu.csiss.geoweaver.process.current_pid, cmid); + + } + } + + }); $(".CodeMirror").css('font-size',"10pt"); edu.gmu.csiss.geoweaver.process.editor.setSize(null, 360); -// var cmds = CodeMirror.commands; -// -// cmds.saveCode = function(cm){ -// -// console.log("save code is triggered"); -//// edu.gmu.csiss.geoweaver.process.update(edu.gmu.csiss.geoweaver.process.current_id); -// -// } -// -// var keyMap = CodeMirror.keyMap; -// -// keyMap.macSublime = { -// "Cmd-S": "saveCode", -// }; -// -// CodeMirror.normalizeKeyMap(keyMap.macSublime); -// -// keyMap.pcSublime = { -// "Ctrl-S": "saveCode", -// }; -// -// CodeMirror.normalizeKeyMap(keyMap.pcSublime); - if(code!=null){ edu.gmu.csiss.geoweaver.process.editor.setValue(edu.gmu.csiss.geoweaver.process.unescape(code)); @@ -222,28 +201,30 @@ edu.gmu.csiss.geoweaver.process = { }, - showPython: function(code){ - - $("#codearea").append(''); - - //initiate the code editor - - edu.gmu.csiss.geoweaver.process.editor = CodeMirror.fromTextArea(document.getElementById("codeeditor"), { - - lineNumbers: true, - - lineWrapping: true, - - extraKeys: { - - "Ctrl-S": function(instance) { - - edu.gmu.csiss.geoweaver.process.update(edu.gmu.csiss.geoweaver.process.current_pid); - - } - } - - }); + showPython: function(code, cmid){ + +// var cmid = Math.floor(Math.random() * 100); + + $("#codearea-"+cmid).append(''); + + //initiate the code editor + + edu.gmu.csiss.geoweaver.process.editor = CodeMirror.fromTextArea(document.getElementById("codeeditor-" + cmid), { + + lineNumbers: true, + + lineWrapping: true, + + extraKeys: { + + "Ctrl-S": function(instance) { + + edu.gmu.csiss.geoweaver.process.update(edu.gmu.csiss.geoweaver.process.current_pid, cmid); + + } + } + + }); $(".CodeMirror").css('font-size',"10pt"); @@ -261,7 +242,7 @@ edu.gmu.csiss.geoweaver.process = { }, - showJupyter: function(code){ + showJupyter: function(code, cmid){ var cont = '