Commit 5fb7255f authored by cnoirot's avatar cnoirot
Browse files
parents 7a30c5a8 026f30b7
......@@ -166,7 +166,6 @@
<script src="js/jquery.fileupload.js"></script>
<script src="js/jquery.fileupload-process.js"></script>
<script src="js/jquery.fileupload-validate.js"></script>
<script src="js/ZeroClipboard.min.js"></script>
<script src='js/cytoscape-2.3.7.js' type='text/javascript'></script>
<script src='js/cytoscape.js-panzoom.js' type='text/javascript'></script>
<script src='js/dagre.js' type='text/javascript'></script>
......
......@@ -122,9 +122,7 @@
<p>To use jflow, add the the following files to your WEB site: </p>
<ul>
<li><a target="_blank" href="../src/css/jflow.min.css">jflow.min.css</a></li>
<li><a target="_blank" href="../src/js/jflow.min.js">jflow.min.js</a> (to enable spreadsheet copy/paste, the file
<a href="../src/js/ZeroClipboard.swf" download="ZeroClipboard.swf">ZeroClipboard.swf</a>, should be placed in the same
directory as the jflow.min.js file)</li>
<li><a target="_blank" href="../src/js/jflow.min.js">jflow.min.js</a></li>
</ul>
<p>Jflow provides different plugins to allow the developper to build easily his own WEB application.
......
......@@ -342,12 +342,23 @@
var __check_required = function() {
var condition_raised = _check_condition_raised(conditions_params, which);
var param_name = param_input.selector.substr(1);
if (condition_raised) {
param_input.rules("add", {"required": true});
if (param_name.indexOf("___") == -1) {
param_input.rules("add", {"required": true});
}
else {
handsontables[param_name.split("___")[0]].allRequired[param_name] = true;
}
}
else {
param_input.rules("remove", "required");
param_input.valid();
if (param_name.indexOf("___") == -1) {
param_input.rules("remove", "required");
param_input.valid();
}
else {
handsontables[param_name.split("___")[0]].allRequired[param_name] = false;
}
}
}
......
......@@ -221,6 +221,8 @@ jQuery.validator.addMethod("mparam", function(value, element, params) {
return true;
});
var handsontables = {};
// handle bootstrap datepicker with handsontable
(function (Handsontable) {
var BootstrapDateEditor = Handsontable.editors.TextEditor.prototype.extend();
......@@ -653,6 +655,7 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
'<div class="blockG" id="rotateG_07"></div>',
'<div class="blockG" id="rotateG_08"></div>',
'</div></div> <div class="col-md-8">Please wait until module is being loaded!</div></div></div>'].join('\n');
$this.$element.off();
$this.$element.html(waiting_animation);
$.ajax({
url: this.options.serverURL + '/get_available_workflows?callback=?',
......@@ -785,8 +788,6 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
$("#workflow_form").validate({ rules: rules });
var params = JflowWfformRules.check_parameters_rules($this.workflow.parameters, $this);
// handle inputfile
$("a[class^=inputfile_]").click(function(){
$("#"+$(this).attr("class")).html($(this).html());
......@@ -858,7 +859,7 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
$("#"+tid).trigger("change");
}
});
setClickServerBrowser(params);
setClickServerBrowser(params_per_name);
$(".selectMultipleFiles").click(function() {
var p_cols = $(this).attr("paired_columns");
......@@ -942,6 +943,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
allActions = {},
allRequired = {},
allHelps = {};
handsontables[param_name] = $.extend($(this), {
allRequired: allRequired
});
allHelps[param_name] = params_per_name[param_name].help;
for (var i in params_per_name[param_name].sub_parameters) {
dataSchema[params_per_name[param_name].sub_parameters[i].name] = null;
......@@ -1045,7 +1049,6 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
dataSchema: dataSchema,
colHeaders: colHeaders,
minSpareRows: 1,
contextMenuCopyPaste: true,
stretchH: 'all',
columns: columns,
contextMenu: ['row_above', 'row_below', '---------', 'remove_row', '---------', 'undo', 'redo'],
......@@ -1184,6 +1187,8 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
if ($this.options.displayResetButton) {
$("#wfform_reset_btn").click(function() { $this.reset(); })
}
var params = JflowWfformRules.check_parameters_rules($this.workflow.parameters, $this);
}
});
}
......
......@@ -147,7 +147,7 @@ def parse_string_list(string_list):
This is the same as :func:`parse_object_list` except it converts all
objects to strings.
"""
return ("\"" + str(o) + "\"" for o in parse_object_list(string_list))
return (str(o) for o in parse_object_list(string_list))
# Iterable utilities
......
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