Commit f9dd6dfe authored by ThorbenQuast's avatar ThorbenQuast
Browse files

set menu entries in command line if the appropriate extension (job submission)

is registered
parent b2852a9a
......@@ -21,16 +21,10 @@
</span>
<!-- The submit button -->
<span class="input-group-btn">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Submission menu">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Job menu">
<i class="glyphicon glyphicon-list"></i>
</button>
<ul id="menu" class="dropdown-menu" role="menu">
<li>
<a id="submit"><i class="glyphicon glyphicon-time"></i> Submit </a>
</li>
<li>
<a id="quick-submit"><i class="glyphicon glyphicon-road"></i> Quick-submit </a>
</li>
</ul>
</span>
<input type="text" class="form-control" id="command-line" placeholder="Commandline" value="" data-toggle="tooltip" data-placement="bottom" style="height:35px" title="Execution command relative to the filepath. %file is a variable holding the filename.">
......
......@@ -47,16 +47,29 @@ var CommandLine = Emitter.extend({
self.setDefault();
self.renderHistory();
});
this.setMenuFunctionality(); //sets up the buttons in the submit menu
},
this.setMenuEntries(); //sets up the buttons in the submit menu
},
setMenuEntries: function() {
var node;
if (vispa.extensions.extensions.jobmanagement) {
//the menu entries should only be added
node = $("<li/>").append(
$("<a />").append(
$("<i/>").addClass("glyphicon glyphicon-time"))
.click(function() {
console.log("submit from editor not implemented yet");
}).append(" Submit"));
this.menuNode.append(node);
node = $("<li/>").append($("<a />").append(
$("<i/>").addClass("glyphicon glyphicon-road"))
.click(function() {
console.log("quick-submit from editor not implemented yet");
}).append(" Quick-submit"));
this.menuNode.append(node);
setMenuFunctionality: function() {
this.menuNode.find("#submit").click(function() {
console.log("submit from editor not implemented yet");
});
this.menuNode.find("#quick-submit").click(function() {
console.log("quick-submit from editor not implemented yet");
});
}
},
getCookie: function(callback) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment