Commit 471da14e authored by Penom Nom's avatar Penom Nom

Maj jflow and fix editable popup on click

parent b131768c
......@@ -202,7 +202,11 @@ class JFlowServer (object):
action = "MiltipleAppendAction"
else:
action = param.action
hash_param = {"help": param.help,
try:
cparam_help = param.global_help
except:
cparam_help = param.help
hash_param = {"help": cparam_help,
"required": param.required,
"default": param.default,
"choices": param.choices,
......@@ -233,7 +237,7 @@ class JFlowServer (object):
"type": sub_param.get_type(),
"name": param.name + JFlowServer.MULTIPLE_TYPE_SPLITER + sub_param.flag,
"display_name": sub_param.display_name,
"group": param.group})
"group": sub_param.group})
if hash_param["sub_parameters"][-1]["type"] == "date":
hash_param["sub_parameters"][-1]["format"] = self.jflow_config_reader.get_date_format()
if hash_param["sub_parameters"][-1]["format"] == '%d/%m/%Y':
......@@ -262,6 +266,20 @@ class JFlowServer (object):
def run_workflow(self, **kwargs):
try:
kwargs_modified = {}
# handle MultiParameterList
multi_sub_params = {}
for key in kwargs.keys():
parts = key.split(JFlowServer.MULTIPLE_TYPE_SPLITER)
if len(parts) == 3:
if not kwargs_modified.has_key(parts[0]):
kwargs_modified[parts[0]] = []
multi_sub_params[parts[0]] = {}
if multi_sub_params[parts[0]].has_key(parts[2]):
multi_sub_params[parts[0]][parts[2]].append((parts[1], kwargs[key].encode('utf8')))
else:
multi_sub_params[parts[0]][parts[2]] = [(parts[1], kwargs[key].encode('utf8'))]
for key in kwargs.keys():
parts = key.split(JFlowServer.MULTIPLE_TYPE_SPLITER)
# split append values
......@@ -277,9 +295,13 @@ class JFlowServer (object):
kwargs_modified[parts[0]].append((parts[1], new_values))
else:
kwargs_modified[parts[0]] = [(parts[1], new_values)]
# if this is a MultiParameterList
# TODO: du cote interface faire qq chose du genre: key.sub_key.1 ... donc si len == 3
# l'objectif etant d'avoir une structure de type: [[(sub_key1: val), (sub_key2: val)], [(sub_key1: val2), (sub_key2: val2)]]
# handle MultiParameterList
for param in multi_sub_params:
kwargs_modified[param] = []
for sub_param in multi_sub_params[param]:
kwargs_modified[param].append(multi_sub_params[param][sub_param])
workflow = self.wfmanager.run_workflow(kwargs_modified["workflow_class"], kwargs_modified)
return { "status" : 0, "content" : self.jsonify_workflow_status(workflow, True) }
except Exception as err:
......
......@@ -132,7 +132,7 @@ class NG6Workflow (BasicNG6Workflow):
self.add_parameter("sample_id", "The uniq identifier of the sample", add_to = "input_sample")
self.add_parameter("sample_name", "A descriptive name for the sample", add_to = "input_sample")
self.add_parameter("sample_description", "A brief description of the sample", add_to = "input_sample")
self.add_parameter("type", "Read orientation and type", choices = Sample.AVAILABLE_TYPES, add_to = "input_sample")
self.add_parameter("type", "Read orientation and type", choices = Sample.AVAILABLE_TYPES, default='se', add_to = "input_sample")
self.add_parameter("insert_size", "Insert size for paired end reads", type = int, add_to = "input_sample")
self.add_parameter("species", "Species related to this sample", add_to = "input_sample")
self.add_parameter_list("metadata", "Add metadata to the sample", type=samplemetadata ,add_to = "input_sample")
......
......@@ -77,8 +77,10 @@ class tx_nG6_pi1 extends tslib_pibase {
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/bootstrap3-wysihtml5.all.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/cytoscape.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/cytoscape-2.3.7.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/cytoscape.js-panzoom.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/dagre.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/ZeroClipboard.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/typeahead.bundle.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/handsontable.full.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jflow-activewf.js"></script>
......
......@@ -67,8 +67,10 @@ class tx_nG6_pi6 extends tslib_pibase {
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/bootstrap.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/cytoscape.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/cytoscape-2.3.7.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/cytoscape.js-panzoom.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/dagre.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/ZeroClipboard.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/typeahead.bundle.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/handsontable.full.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jflow-activewf.js"></script>
......
......@@ -185,6 +185,11 @@ animation-delay:1.3s;
transform:rotate(-135deg);
}
.handsontable .htDimmed{
color:#777;
background-color:#F7F7F9;
}
@-moz-keyframes fadeG{
0%{
background-color:#000000}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -221,22 +221,6 @@
$this.$element.find("#wfstatus_error_location").text( data.errors["location"] );
$this.$element.find("#wfstatus_error_panel").show();
}
var layoptions = {
name: 'breadthfejofijefirst',
fit: true, // whether to fit the viewport to the graph
directed: true, // whether the tree is directed downwards (or edges can point in any direction if false)
padding: 30, // padding on fit
circle: false, // put depths in concentric circles if true, put depths top down if false
boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }
avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space
roots: undefined, // the roots of the trees
maximalAdjustments: 0, // how many times to try to position the nodes in a maximal way (i.e. no backtracking)
animate: false, // whether to transition the node positions
animationDuration: 500, // duration of animation in ms if enabled
ready: undefined, // callback on layoutready
stop: undefined // callback on layoutstop*/
};
$('#cytoscape_panel').cytoscape({
style: cytoscape.stylesheet()
......@@ -284,19 +268,23 @@
edges: edges
},
layout: {
name: 'breadthfirst',
fit: true, // whether to fit the viewport to the graph
directed: true, // whether the tree is directed downwards (or edges can point in any direction if false)
padding: 30, // padding on fit
circle: false, // put depths in concentric circles if true, put depths top down if false
boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }
avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space
roots: undefined, // the roots of the trees
maximalAdjustments: 0, // how many times to try to position the nodes in a maximal way (i.e. no backtracking)
name: 'dagre',
// dagre algo options, uses default value on undefined
nodeSep: undefined, // the separation between adjacent nodes in the same rank
edgeSep: undefined, // the separation between adjacent edges in the same rank
rankSep: undefined, // the separation between adjacent nodes in the same rank
rankDir: 'LR', // 'TB' for top to bottom flow, 'LR' for left to right
minLen: function( edge ){ return 1; }, // number of ranks to keep between the source and target of the edge
// general layout options
fit: true, // whether to fit to viewport
padding: 30, // fit padding
animate: false, // whether to transition the node positions
animationDuration: 500, // duration of animation in ms if enabled
ready: undefined, // callback on layoutready
stop: undefined // callback on layoutstop
boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }
ready: function(){}, // on layoutready
stop: function(){} // on layoutstop
},
ready: function(){
window.cy = this;
......
This diff is collapsed.
......@@ -1407,15 +1407,15 @@ function showEditableFromTD(e) {
}
function initEditableFields() {
$('span.editable > a').click(function() {
$('td.editable').unbind('click', showEditableFromTD);
});
$('span.editable').editable({
toggle: 'manual',
display: function(value) {
if ($(this).html().indexOf('<a') == 0) {
var newlink = $($(this).html()).html(value);
$(this).html(newlink);
$(this).find('a').click(function() {
$('td.editable').unbind('click', showEditableFromTD);
});
} else {
$(this).html(value);
}
......
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