diff --git a/views/bootstrap/class.WorkflowGraph.php b/views/bootstrap/class.WorkflowGraph.php index 9dd04aead..99f63c930 100644 --- a/views/bootstrap/class.WorkflowGraph.php +++ b/views/bootstrap/class.WorkflowGraph.php @@ -48,7 +48,7 @@ var cy = cytoscape({ 'height': 40, 'width': 40, 'text-valign': 'top', - 'text-halign': 'right', + 'text-halign': 'center', // 'color': '#fff', 'background-color': '#11479e', // 'text-outline-color': '#11479e', @@ -61,7 +61,7 @@ var cy = cytoscape({ { selector: 'node.action', style: { - 'shape': 'rectangle', + 'shape': 'roundrectangle', 'height': 30, 'width': 30, 'background-color': '#91479e', @@ -81,6 +81,8 @@ var cy = cytoscape({ selector: 'node.released', style: { 'background-color': '#00b000', + 'text-valign': 'bottom', + 'text-margin-y': '3px', // 'text-outline-color': '#00b000' } }, @@ -89,6 +91,8 @@ var cy = cytoscape({ selector: 'node.rejected', style: { 'background-color': '#b00000', + 'text-valign': 'bottom', + 'text-margin-y': '3px', // 'text-outline-color': '#b00000' } }, @@ -112,6 +116,20 @@ var cy = cytoscape({ cy.on('free', 'node', function(evt) { $('#png').attr('src', cy.png({'full': true})); }); + +cy.on('tap', 'node', function(evt) { + var node = evt.cyTarget; + var scratch = node.scratch('app'); + noty({ + text: (scratch.users ? '

: ' + scratch.users + '

' : '') + (scratch.groups ? ': ' + scratch.groups + '

' : ''), + type: 'information', + dismissQueue: true, + layout: 'topCenter', + theme: 'defaultTheme', + timeout: 4000, + killer: true, + }); +}); printGraph(); @@ -171,9 +189,12 @@ $(document).ready(function() { echo "cy.add({ data: { id: 'A".$transition->getID()."-".$action->getID()."', - name: \"".str_replace('"', "\\\"", $action->getName()).($unames ? "\\n(".str_replace('"', "\\\"", implode(", ", $unames)).")" : '').($gnames ? "\\n(".str_replace('"', "\\\"", implode(", ", $gnames)).")" : '')."\" + name: \"".str_replace('"', "\\\"", $action->getName())/*.($unames ? "\\n(".str_replace('"', "\\\"", implode(", ", $unames)).")" : '').($gnames ? "\\n(".str_replace('"', "\\\"", implode(", ", $gnames)).")" : '')*/."\" }, - classes: 'action' + classes: 'action', + scratch: { + app: {groups: '".implode(", ", $gnames)."', users: '".implode(", ", $unames)."'} + } });\n"; } @@ -185,7 +206,7 @@ $(document).ready(function() { echo "cy.add({ data: { id: 'S".$state->getID()."', - name: \"".str_replace('"', "\\\"", $state->getName()."\\n".$initstate)."\" + name: \"".str_replace('"', "\\\"", $state->getName()/*."\\n".$initstate*/)."\" }, classes: 'state ".($state == $this->workflow->getInitState() ? 'init' : '')."' });\n"; @@ -254,17 +275,25 @@ $(document).ready(function() { body {padding: 0px;} div.buttons {float: right; padding-left: 4px; height: 100px; width: 120px; margin-right: 5px;} div.buttons button {margin: 3px; float: right;} -#preview {background: #f5f5f5; border-top: 1px solid #e3e3e3;} -#preview img {border: 1px solid #bbb; background: #fff; min-height: 100px; min-width: 100px; height: 100px; _width: 100px; padding: 3px; margin: 3px;} +#legend {display: inline-block; margin-left: 10px;} +#preview {height: 115px; background: #f5f5f5; border-top: 1px solid #e3e3e3;} +#preview img {float: left;border: 1px solid #bbb; background: #fff; min-height: 100px; min-width: 100px; height: 100px; _width: 100px; padding: 3px; margin: 3px;} ', 'css'); $this->htmlStartPage(getMLText("admin_tools")); // $this->contentContainerStart(); ?> -
+
+
+
+
+
+
+ +