-
Notifications
You must be signed in to change notification settings - Fork 967
/
workflow-view-data.js.map
1 lines (1 loc) · 8.88 KB
/
workflow-view-data.js.map
1
{"version":3,"sources":["mvc/workflow/workflow-view-data.js"],"names":["window","workflow_globals","DataInputView","Backbone","View","extend","className","initialize","options","input","this","nodeView","$el","attr","name","html","label","position","terminalElement","left","top","display","$","el","outerWidth","DataOutputView","output","node","extensions","indexOf","join","isInput","calloutView","OutputCalloutView","hoverImage","css","append","detach","redrawWorkflowOutput","resetImage","tagName","view","isWorkflowOutput","outputName","removeWorkflowOutput","click","Galaxy","root","addWorkflowOutput","workflow","has_changes","canvas_manager","draw_overview","tooltip","margin","right","show"],"mappings":"6FACAA,OAAOC,iBAAmBD,OAAOC,qBAEjC,IAAIC,EAAgBC,SAASC,KAAKC,QAC9BC,UAAW,kCAJfC,WAAA,SAAAC,GACAR,KAAOC,MAAAA,EAAPQ,MAOQC,KAAKC,SAAWH,EAAQG,SAL5BT,KAAAA,gBAAgBC,EAAcE,gBAQ1BK,KAAKE,IAAIC,KAAK,OAAQH,KAAKD,MAAMK,MAAMC,KAAKL,KAAKD,MAAMO,OAJvDR,EAAKC,aACLC,KAAKC,IAAAA,KACLM,SAAKC,WAOGC,MAAO,IALfC,KAASP,IAODQ,QAAS,SAJbC,EAAA,QAAKV,OAAQF,KAAAa,IACTN,KAAAA,SAAAA,eADSP,KAAAE,IAAAY,cAETL,KAAAA,IAAAA,KACAC,SAAM,GACNC,KAAAA,GAJSD,IAAb,GAMAE,QAAA,KAEAZ,KAAAE,IAAKA,aAAQa,EAAbtB,SAAAC,KAAAC,QAMAC,UAAA,mBAEPC,WAAA,SAAAC,GA3BLE,KAAAgB,OAAAlB,EAAAkB,OAmCQhB,KAAKQ,gBAAkBV,EAAQU,gBALnCO,KAAAA,SAAAA,EAAiBtB,SAQb,IAAIuB,EAAShB,KAAKgB,OALtBnB,EAAYmB,EAAAZ,KACRa,EAAKD,KAALf,SAAcH,KAYVQ,GAHAU,EAAOE,WAAWC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BAAkBL,GA6BvCF,EACOC,EAAAA,OAEP7B,KAGD,MACHiC,OAEIA,KAEP,2CAGO9C,OAAAC,iBAAWgD,SAAAC,aAAA,EACLrC,OACVZ,iBACckD,eAAAC,oBAhCbC,SAsCTnD,MAAeA,IACfuB,MApCgB,6EAGZf,KAAKE,IAAIuB,KACLf,IAAK,MACLkC,OAAQ,mBACRC,MAAO,IAEX7C,KAAKE,IAAI4C,OACT9C,KAAK6B,cAGTA,WAAY,WACH7B,KAAKiB,KAAKe,iBAAiBhC,KAAKgB,OAAOZ,MAMxCJ,KAAKY,EAAE,OAAOT,KACV,MACAiC,OAAOC,KAAO,0CAPlBrC,KAAKY,EAAE,OAAOT,KACV,MACAiC,OAAOC,KAAO,mDAU1Bb,WAAY,WACRxB,KAAKY,EAAE,OAAOT,KACV,MACAiC,OAAOC,KAAO,+DAMtB7C,cAAeA,EACfuB,eAAgBA","file":"../../../scripts/mvc/workflow/workflow-view-data.js","sourcesContent":["// TODO; tie into Galaxy state?\nwindow.workflow_globals = window.workflow_globals || {};\n\nvar DataInputView = Backbone.View.extend({\n className: \"form-row dataRow input-data-row\",\n\n initialize: function(options) {\n this.input = options.input;\n this.nodeView = options.nodeView;\n this.terminalElement = options.terminalElement;\n\n this.$el.attr(\"name\", this.input.name).html(this.input.label);\n\n if (!options.skipResize) {\n this.$el.css({\n position: \"absolute\",\n left: -1000,\n top: -1000,\n display: \"none\"\n });\n $(\"body\").append(this.el);\n this.nodeView.updateMaxWidth(this.$el.outerWidth());\n this.$el.css({\n position: \"\",\n left: \"\",\n top: \"\",\n display: \"\"\n });\n this.$el.remove();\n }\n }\n});\n\nvar DataOutputView = Backbone.View.extend({\n className: \"form-row dataRow\",\n\n initialize: function(options) {\n this.output = options.output;\n this.terminalElement = options.terminalElement;\n this.nodeView = options.nodeView;\n\n var output = this.output;\n var label = output.name;\n var node = this.nodeView.node;\n\n var isInput =\n output.extensions.indexOf(\"input\") >= 0 ||\n output.extensions.indexOf(\"input_collection\") >= 0;\n if (!isInput) {\n label = label + \" (\" + output.extensions.join(\", \") + \")\";\n }\n this.$el.html(label);\n this.calloutView = null;\n if ([\"tool\", \"subworkflow\"].indexOf(node.type) >= 0) {\n var calloutView = new OutputCalloutView({\n label: label,\n output: output,\n node: node\n });\n this.calloutView = calloutView;\n this.$el.append(calloutView.el);\n this.$el.hover(\n function() {\n calloutView.hoverImage();\n },\n function() {\n calloutView.resetImage();\n }\n );\n }\n this.$el.css({\n position: \"absolute\",\n left: -1000,\n top: -1000,\n display: \"none\"\n });\n $(\"body\").append(this.el);\n this.nodeView.updateMaxWidth(this.$el.outerWidth() + 17);\n this.$el\n .css({\n position: \"\",\n left: \"\",\n top: \"\",\n display: \"\"\n })\n .detach();\n },\n redrawWorkflowOutput: function() {\n if (this.calloutView) {\n this.calloutView.resetImage();\n }\n }\n});\n\nvar OutputCalloutView = Backbone.View.extend({\n tagName: \"div\",\n\n initialize: function(options) {\n this.label = options.label;\n this.node = options.node;\n this.output = options.output;\n\n var view = this;\n var node = this.node;\n this.$el\n .attr(\"class\", \"callout \" + this.label)\n .css({ display: \"none\" })\n .append(\n $(\"<div class='buttons'></div>\").append(\n $(\"<img/>\")\n .attr(\n \"src\",\n Galaxy.root +\n \"static/images/fugue/asterisk-small-outline.png\"\n )\n .click(function() {\n var outputName = view.output.name;\n if (node.isWorkflowOutput(outputName)) {\n node.removeWorkflowOutput(outputName);\n view\n .$(\"img\")\n .attr(\n \"src\",\n Galaxy.root +\n \"static/images/fugue/asterisk-small-outline.png\"\n );\n } else {\n node.addWorkflowOutput(outputName);\n view\n .$(\"img\")\n .attr(\n \"src\",\n Galaxy.root +\n \"static/images/fugue/asterisk-small.png\"\n );\n }\n window.workflow_globals.workflow.has_changes = true;\n window.workflow_globals.canvas_manager.draw_overview();\n })\n )\n )\n .tooltip({\n delay: 500,\n title:\n \"Mark dataset as a workflow output. All unmarked datasets will be hidden.\"\n });\n\n this.$el.css({\n top: \"50%\",\n margin: \"-8px 0px 0px 0px\",\n right: 8\n });\n this.$el.show();\n this.resetImage();\n },\n\n resetImage: function() {\n if (!this.node.isWorkflowOutput(this.output.name)) {\n this.$(\"img\").attr(\n \"src\",\n Galaxy.root + \"static/images/fugue/asterisk-small-outline.png\"\n );\n } else {\n this.$(\"img\").attr(\n \"src\",\n Galaxy.root + \"static/images/fugue/asterisk-small.png\"\n );\n }\n },\n\n hoverImage: function() {\n this.$(\"img\").attr(\n \"src\",\n Galaxy.root + \"static/images/fugue/asterisk-small-yellow.png\"\n );\n }\n});\n\nexport default {\n DataInputView: DataInputView,\n DataOutputView: DataOutputView\n};\n"]}