mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
Merge branch 'seeddms-5.0.x' into seeddms-5.1.x
This commit is contained in:
commit
10dfc4d7b8
|
@ -87,6 +87,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
||||||
echo '<script type="text/javascript" src="../js/jquery.passwordstrength.js"></script>'."\n";
|
echo '<script type="text/javascript" src="../js/jquery.passwordstrength.js"></script>'."\n";
|
||||||
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/jquery.noty.js"></script>'."\n";
|
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/jquery.noty.js"></script>'."\n";
|
||||||
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/layouts/topRight.js"></script>'."\n";
|
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/layouts/topRight.js"></script>'."\n";
|
||||||
|
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/layouts/topCenter.js"></script>'."\n";
|
||||||
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/themes/default.js"></script>'."\n";
|
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/noty/themes/default.js"></script>'."\n";
|
||||||
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/jqtree/tree.jquery.js"></script>'."\n";
|
echo '<script type="text/javascript" src="../styles/'.$this->theme.'/jqtree/tree.jquery.js"></script>'."\n";
|
||||||
// echo '<script type="text/javascript" src="../styles/'.$this->theme.'/jquery-cookie/jquery.cookie.js"></script>'."\n";
|
// echo '<script type="text/javascript" src="../styles/'.$this->theme.'/jquery-cookie/jquery.cookie.js"></script>'."\n";
|
||||||
|
|
|
@ -57,7 +57,7 @@ var cy = cytoscape({
|
||||||
'height': 40,
|
'height': 40,
|
||||||
'width': 40,
|
'width': 40,
|
||||||
'text-valign': 'top',
|
'text-valign': 'top',
|
||||||
'text-halign': 'right',
|
'text-halign': 'center',
|
||||||
// 'color': '#fff',
|
// 'color': '#fff',
|
||||||
'background-color': '#11479e',
|
'background-color': '#11479e',
|
||||||
// 'text-outline-color': '#11479e',
|
// 'text-outline-color': '#11479e',
|
||||||
|
@ -70,7 +70,7 @@ var cy = cytoscape({
|
||||||
{
|
{
|
||||||
selector: 'node.action',
|
selector: 'node.action',
|
||||||
style: {
|
style: {
|
||||||
'shape': 'rectangle',
|
'shape': 'roundrectangle',
|
||||||
'height': 30,
|
'height': 30,
|
||||||
'width': 30,
|
'width': 30,
|
||||||
'background-color': '#91479e',
|
'background-color': '#91479e',
|
||||||
|
@ -90,6 +90,8 @@ var cy = cytoscape({
|
||||||
selector: 'node.released',
|
selector: 'node.released',
|
||||||
style: {
|
style: {
|
||||||
'background-color': '#00b000',
|
'background-color': '#00b000',
|
||||||
|
'text-valign': 'bottom',
|
||||||
|
'text-margin-y': '3px',
|
||||||
// 'text-outline-color': '#00b000'
|
// 'text-outline-color': '#00b000'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -98,6 +100,8 @@ var cy = cytoscape({
|
||||||
selector: 'node.rejected',
|
selector: 'node.rejected',
|
||||||
style: {
|
style: {
|
||||||
'background-color': '#b00000',
|
'background-color': '#b00000',
|
||||||
|
'text-valign': 'bottom',
|
||||||
|
'text-margin-y': '3px',
|
||||||
// 'text-outline-color': '#b00000'
|
// 'text-outline-color': '#b00000'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -147,6 +151,20 @@ function save_handler(evt) {
|
||||||
cy.on('free', 'node', function(evt) {
|
cy.on('free', 'node', function(evt) {
|
||||||
$('#png').attr('src', cy.png({'full': true}));
|
$('#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 ? '<p><?php printMLText('users'); ?>: ' + scratch.users + '</p>' : '') + (scratch.groups ? '<?php printMLText('groups'); ?>: ' + scratch.groups + '</p>' : ''),
|
||||||
|
type: 'information',
|
||||||
|
dismissQueue: true,
|
||||||
|
layout: 'topCenter',
|
||||||
|
theme: 'defaultTheme',
|
||||||
|
timeout: 4000,
|
||||||
|
killer: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
<?php
|
<?php
|
||||||
$this->printGraph($positions);
|
$this->printGraph($positions);
|
||||||
?>
|
?>
|
||||||
|
@ -209,10 +227,13 @@ $(document).ready(function() {
|
||||||
echo "cy.add({
|
echo "cy.add({
|
||||||
data: {
|
data: {
|
||||||
id: '".$nodeid."',
|
id: '".$nodeid."',
|
||||||
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)).")" : '')*/."\"
|
||||||
},".(isset($positions[$nodeid]) ? "
|
},".(isset($positions[$nodeid]) ? "
|
||||||
position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")."
|
position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")."
|
||||||
classes: 'action'
|
classes: 'action',
|
||||||
|
scratch: {
|
||||||
|
app: {groups: '".implode(", ", $gnames)."', users: '".implode(", ", $unames)."'}
|
||||||
|
}
|
||||||
});\n";
|
});\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +246,7 @@ $(document).ready(function() {
|
||||||
echo "cy.add({
|
echo "cy.add({
|
||||||
data: {
|
data: {
|
||||||
id: '".$nodeid."',
|
id: '".$nodeid."',
|
||||||
name: \"".str_replace('"', "\\\"", $state->getName()."\\n".$initstate)."\"
|
name: \"".str_replace('"', "\\\"", $state->getName()/*."\\n".$initstate*/)."\"
|
||||||
},".(isset($positions[$nodeid]) ? "
|
},".(isset($positions[$nodeid]) ? "
|
||||||
position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")."
|
position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")."
|
||||||
classes: 'state ".($state == $this->workflow->getInitState() ? 'init' : '')."'
|
classes: 'state ".($state == $this->workflow->getInitState() ? 'init' : '')."'
|
||||||
|
@ -297,17 +318,25 @@ $(document).ready(function() {
|
||||||
body {padding: 0px;}
|
body {padding: 0px;}
|
||||||
div.buttons {float: right; padding-left: 4px; height: 100px; width: 120px; margin-right: 5px;}
|
div.buttons {float: right; padding-left: 4px; height: 100px; width: 120px; margin-right: 5px;}
|
||||||
div.buttons button {margin: 3px; float: right;}
|
div.buttons button {margin: 3px; float: right;}
|
||||||
#preview {background: #f5f5f5; border-top: 1px solid #e3e3e3;}
|
#legend {display: inline-block; margin-left: 10px;}
|
||||||
#preview img {border: 1px solid #bbb; background: #fff; min-height: 100px; min-width: 100px; height: 100px; _width: 100px; padding: 3px; margin: 3px;}
|
#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;}
|
||||||
</style>
|
</style>
|
||||||
', 'css');
|
', 'css');
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
// $this->contentContainerStart();
|
// $this->contentContainerStart();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="canvas" style="width: 100%; height:546px; _border: 1px solid #bbb;"></div>
|
<div id="canvas" style="width: 100%; height:545px; _border: 1px solid #bbb;"></div>
|
||||||
<div id="preview">
|
<div id="preview">
|
||||||
<img id="png" />
|
<img id="png" />
|
||||||
|
<div id="legend">
|
||||||
|
<i class="icon-circle" style="color: #ff9900;"></i> <?php printMLText("workflow_initstate"); ?><br />
|
||||||
|
<i class="icon-circle" style="color: #00b000;"></i> <?php echo getOverallStatusText(S_RELEASED); ?><br />
|
||||||
|
<i class="icon-circle" style="color: #b00000;"></i> <?php echo getOverallStatusText(S_REJECTED); ?><br />
|
||||||
|
<i class="icon-circle" style="color: #11479e;"></i> <?php echo getOverallStatusText(S_IN_WORKFLOW); ?><br />
|
||||||
|
<i class="icon-sign-blank" style="color: #91479e;"></i> <?php echo printMLText('global_workflow_actions'); ?>
|
||||||
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button class="btn btn-mini" id="savelayout">Save layout</button>
|
<button class="btn btn-mini" id="savelayout">Save layout</button>
|
||||||
<button class="btn btn-mini" id="setlayout" data-layout="cose">Redraw</button>
|
<button class="btn btn-mini" id="setlayout" data-layout="cose">Redraw</button>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user