cpee-model-management 1.2.9 โ 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +668 -159
- data/README.md +1 -1
- data/cpee-model-management.gemspec +2 -2
- data/ui/css/moma.css +20 -2
- data/ui/css/stats.css +10 -1
- data/ui/index.html +8 -22
- data/ui/instances.html +0 -17
- data/ui/instances_view.html +0 -17
- data/ui/js/moma.js +50 -27
- data/ui/resources.html +0 -18
- metadata +2 -2
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ The service is running under port 9316. If this port has to be changed (or the
|
|
|
12
12
|
host, or local-only access, ...), modify the file moma.conf and change:
|
|
13
13
|
|
|
14
14
|
```yaml
|
|
15
|
-
:port:
|
|
15
|
+
:port: 9316
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
You may also change the directory where the models are saved:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "cpee-model-management"
|
|
3
|
-
s.version = "1.2.
|
|
3
|
+
s.version = "1.2.10"
|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
|
5
|
-
s.license = "
|
|
5
|
+
s.license = "GPL-3.0-or-later"
|
|
6
6
|
s.summary = "(Lifecycle) manage your process models in a directory or git repo."
|
|
7
7
|
|
|
8
8
|
s.description = "see http://cpee.org"
|
data/ui/css/moma.css
CHANGED
|
@@ -39,6 +39,9 @@
|
|
|
39
39
|
td.selected {
|
|
40
40
|
background-color: var(--x-ui-selection-background) !important;
|
|
41
41
|
}
|
|
42
|
+
td.selected i.uidash-icon-checkox:before {
|
|
43
|
+
content: "\f11d"; /* uidash-icon-checkox-checked */
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
div.fixed {
|
|
44
47
|
position: sticky;
|
|
@@ -92,16 +95,19 @@ ui-behind span {
|
|
|
92
95
|
[is="x-ui-"] table.ui-table tbody tr:nth-child(odd) td {
|
|
93
96
|
background-color: var(--x-ui-content-light-background);
|
|
94
97
|
}
|
|
95
|
-
[is="x-ui-"] table.ui-table tbody tr:hover td
|
|
98
|
+
[is="x-ui-"] table.ui-table tbody tr:hover td,
|
|
99
|
+
[is="x-ui-"] table.ui-table tbody tr.active td {
|
|
96
100
|
background-color: var(--x-ui-content-hover-background);
|
|
97
101
|
}
|
|
98
102
|
[is="x-ui-"] table.ui-table tbody td[data-class=ops] {
|
|
103
|
+
font-size: 1.4em;
|
|
99
104
|
text-align: center;
|
|
100
105
|
}
|
|
101
106
|
[is="x-ui-"] table.ui-table tbody tr:nth-child(odd) td[data-class=ops] {
|
|
102
107
|
background-color: #d0d0d0;
|
|
103
108
|
}
|
|
104
|
-
[is="x-ui-"] table.ui-table tbody tr:hover td[data-class=ops]
|
|
109
|
+
[is="x-ui-"] table.ui-table tbody tr:hover td[data-class=ops],
|
|
110
|
+
[is="x-ui-"] table.ui-table tbody tr.active td[data-class=ops] {
|
|
105
111
|
background-color: #99cee6b0;
|
|
106
112
|
}
|
|
107
113
|
|
|
@@ -112,3 +118,15 @@ ui-behind span {
|
|
|
112
118
|
tr.contextmenuitem .capitalized {
|
|
113
119
|
text-transform: capitalize;
|
|
114
120
|
}
|
|
121
|
+
tr.contextmenuitem > .contextmenuicon {
|
|
122
|
+
vertical-align: middle;
|
|
123
|
+
}
|
|
124
|
+
tr.contextmenuitem > .contextmenuicon div {
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
height: auto;
|
|
129
|
+
}
|
|
130
|
+
tr.contextmenuitem > .contextmenuicon i.uidash-icon {
|
|
131
|
+
font-size: 1.2em;
|
|
132
|
+
}
|
data/ui/css/stats.css
CHANGED
|
@@ -46,7 +46,16 @@
|
|
|
46
46
|
margin-left: 0.8em;
|
|
47
47
|
}
|
|
48
48
|
.instances .sub table > tr.text > td:first-child::before {
|
|
49
|
-
|
|
49
|
+
font-family: uidash-icons !important;
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: normal !important;
|
|
52
|
+
font-variant: normal;
|
|
53
|
+
text-transform: none;
|
|
54
|
+
line-height: 1;
|
|
55
|
+
-webkit-font-smoothing: antialiased;
|
|
56
|
+
-moz-osx-font-smoothing: grayscale;
|
|
57
|
+
|
|
58
|
+
content: "\f12d";
|
|
50
59
|
margin-right: 0.5em;
|
|
51
60
|
}
|
|
52
61
|
|
data/ui/index.html
CHANGED
|
@@ -26,22 +26,10 @@
|
|
|
26
26
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
27
27
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
28
28
|
<script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
|
|
29
|
-
<script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
|
|
31
|
-
<script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/util.js"></script>
|
|
33
29
|
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
34
30
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
35
|
-
<script type="text/javascript" src="/js_libs/parsequery.js"></script>
|
|
36
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
37
|
-
<script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
|
|
38
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
39
31
|
<script type="text/javascript" src="/js_libs/plotly.min.js"></script>
|
|
40
32
|
|
|
41
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
|
|
42
|
-
|
|
43
|
-
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
44
|
-
|
|
45
33
|
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
|
46
34
|
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
|
47
35
|
|
|
@@ -50,8 +38,6 @@
|
|
|
50
38
|
|
|
51
39
|
<link rel="stylesheet" href="/global_ui/ui.css" type="text/css"/>
|
|
52
40
|
|
|
53
|
-
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
|
54
|
-
|
|
55
41
|
<!-- custom stuff, play arround -->
|
|
56
42
|
<link rel="stylesheet" href="css/moma.css" type="text/css"/>
|
|
57
43
|
<link rel="stylesheet" href="css/stats.css" type="text/css"/>
|
|
@@ -75,11 +61,11 @@
|
|
|
75
61
|
<ui-area data-belongs-to-tab="models">
|
|
76
62
|
<div class="fixed">
|
|
77
63
|
<div class="text">Your Models are saved/versioned in <a target='_blank' href='https://git-scm.com/'>GIT</a>. So fret not. Just send an email to <a href="mail:helpdesk@cpee.org">helpdesk@cpee.org</a> if you are lost. Click on <strong>Icons</strong> of directory entries, to mark them. Then change to a different directory and move/copy them there. And as always: <a target='_blank' href='https://www.youtube.com/watch?v=kkxj5xVLyj0&feature=youtu.be&t=56'>get dressed for success</a>.</div>
|
|
78
|
-
<div class="breadcrumb"><span class="crumb" onclick=""
|
|
64
|
+
<div class="breadcrumb"><span class="crumb" onclick=""><i class="uidash-icon uidash-text uidash-icon-home"></i> Home</span></div>
|
|
79
65
|
</div>
|
|
80
66
|
<table id="models" class='ui-table'>
|
|
81
67
|
<thead>
|
|
82
|
-
<th data-class='special' class='invisible' title='click for operations'
|
|
68
|
+
<th data-class='special' class='invisible' title='click for operations'><i class="uidash-icon uidash-icon-operations"></i></th>
|
|
83
69
|
<th>Name</th>
|
|
84
70
|
<th><abbr title='force new instance'>F</abbr></th>
|
|
85
71
|
<th><abbr title='link to model source'>M</abbr></th>
|
|
@@ -91,7 +77,7 @@
|
|
|
91
77
|
</thead>
|
|
92
78
|
<template id="folder">
|
|
93
79
|
<tr>
|
|
94
|
-
<td data-class='folder' class="noselect" title='click to mark'
|
|
80
|
+
<td data-class='folder' class="noselect" title='click to mark'><i class="uidash-icon uidash-icon-folder"></i></td>
|
|
95
81
|
<td data-class='name' data-full-name=''><a href=''></a></td>
|
|
96
82
|
<td></td>
|
|
97
83
|
<td></td>
|
|
@@ -99,12 +85,12 @@
|
|
|
99
85
|
<td></td>
|
|
100
86
|
<td></td>
|
|
101
87
|
<td data-class='date'></td>
|
|
102
|
-
<td data-class='ops' class="noselect" title='click for operations'><span
|
|
88
|
+
<td data-class='ops' class="noselect" title='click for operations'><span><i class="uidash-icon uidash-icon-operations"></i></span></td>
|
|
103
89
|
</tr>
|
|
104
90
|
</template>
|
|
105
91
|
<template id="model">
|
|
106
92
|
<tr>
|
|
107
|
-
<td data-class='model' class="noselect" title='click to mark'
|
|
93
|
+
<td data-class='model' class="noselect" title='click to mark'><i class="uidash-icon uidash-icon-checkox"></i></td>
|
|
108
94
|
<td data-class='name' data-full-name=''><a target='_blank' href=''></a></td>
|
|
109
95
|
<td data-class='force'>[<a target='_blank' href='' title='force new instance'>F</a>]</td>
|
|
110
96
|
<td data-class='raw'>[<a target='_blank' href='' title='link to model source'>M</a>]</td>
|
|
@@ -112,7 +98,7 @@
|
|
|
112
98
|
<td data-class='guarded'><abbr title=''></abbr></td>
|
|
113
99
|
<td data-class='resource'></td>
|
|
114
100
|
<td data-class='date'></td>
|
|
115
|
-
<td data-class='ops' class="noselect" title='click for operations'><span
|
|
101
|
+
<td data-class='ops' class="noselect" title='click for operations'><span><i class="uidash-icon uidash-icon-operations"></i></span></td>
|
|
116
102
|
</tr>
|
|
117
103
|
</template>
|
|
118
104
|
<tbody>
|
|
@@ -127,7 +113,7 @@
|
|
|
127
113
|
getting confused and shooting yourself in the foot in your little
|
|
128
114
|
modelling world we allow only unique names. Better safe than sorry.
|
|
129
115
|
</div>
|
|
130
|
-
<div class="breadcrumb"><span class="crumb" onclick=""
|
|
116
|
+
<div class="breadcrumb"><span class="crumb" onclick=""><i class="uidash-icon uidash-icon-home"></i> Home</span></div>
|
|
131
117
|
<form id="newmod">
|
|
132
118
|
<p>
|
|
133
119
|
<input type="text" name="new" required pattern="^[a-zA-Z0-9รถรครผรรร _\-]+" placeholder="Filename (no extension necessary). Only use characters, spaces, underlines and dashes."/>
|
|
@@ -142,7 +128,7 @@
|
|
|
142
128
|
Create an empty directory. Beware, if a directory of the same name
|
|
143
129
|
already exists it can not be created.
|
|
144
130
|
</div>
|
|
145
|
-
<div class="breadcrumb"><span class="crumb" onclick=""
|
|
131
|
+
<div class="breadcrumb"><span class="crumb" onclick=""><i class="uidash-icon uidash-icon-home"></i> Home</span></div>
|
|
146
132
|
<form id="newdir">
|
|
147
133
|
<p>
|
|
148
134
|
<input type="text" name="newdir" required pattern="^[a-zA-Z0-9รถรครผรรร _\-]+" placeholder="Directory name. Only use characters, spaces, underlines and dashes."/>
|
data/ui/instances.html
CHANGED
|
@@ -26,32 +26,15 @@
|
|
|
26
26
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
27
27
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
28
28
|
<script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
|
|
29
|
-
<script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
|
|
31
|
-
<script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/util.js"></script>
|
|
33
29
|
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
34
30
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
35
|
-
<script type="text/javascript" src="/js_libs/parsequery.js"></script>
|
|
36
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
37
|
-
<script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
|
|
38
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
39
|
-
<script type="text/javascript" src="/js_libs/plotly.min.js"></script>
|
|
40
|
-
|
|
41
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
|
|
42
|
-
|
|
43
|
-
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
44
31
|
|
|
45
32
|
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
|
46
|
-
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
|
47
33
|
|
|
48
|
-
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
|
49
34
|
<link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
|
|
50
35
|
|
|
51
36
|
<link rel="stylesheet" href="/global_ui/ui.css" type="text/css"/>
|
|
52
37
|
|
|
53
|
-
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
|
54
|
-
|
|
55
38
|
<!-- custom stuff, play arround -->
|
|
56
39
|
<link rel="stylesheet" href="css/moma.css" type="text/css"/>
|
|
57
40
|
<link rel="stylesheet" href="css/stats.css" type="text/css"/>
|
data/ui/instances_view.html
CHANGED
|
@@ -26,32 +26,15 @@
|
|
|
26
26
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
27
27
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
28
28
|
<script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
|
|
29
|
-
<script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
|
|
31
|
-
<script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/util.js"></script>
|
|
33
29
|
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
34
30
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
35
|
-
<script type="text/javascript" src="/js_libs/parsequery.js"></script>
|
|
36
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
37
|
-
<script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
|
|
38
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
39
|
-
<script type="text/javascript" src="/js_libs/plotly.min.js"></script>
|
|
40
|
-
|
|
41
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
|
|
42
|
-
|
|
43
|
-
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
44
31
|
|
|
45
32
|
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
|
46
|
-
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
|
47
33
|
|
|
48
|
-
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
|
49
34
|
<link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
|
|
50
35
|
|
|
51
36
|
<link rel="stylesheet" href="/global_ui/ui.css" type="text/css"/>
|
|
52
37
|
|
|
53
|
-
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
|
54
|
-
|
|
55
38
|
<!-- custom stuff, play arround -->
|
|
56
39
|
<link rel="stylesheet" href="css/moma.css" type="text/css"/>
|
|
57
40
|
<link rel="stylesheet" href="css/stats.css" type="text/css"/>
|
data/ui/js/moma.js
CHANGED
|
@@ -86,6 +86,19 @@ function duplicate_it(name) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
+
function mark_it(tar) {
|
|
90
|
+
tar.toggleClass('selected');
|
|
91
|
+
if (tar.hasClass('selected')) {
|
|
92
|
+
selections.push(tar.attr('data-path'));
|
|
93
|
+
} else {
|
|
94
|
+
selections = selections.filter(item => item !== tar.attr('data-path'));
|
|
95
|
+
}
|
|
96
|
+
if (selections.length > 0) {
|
|
97
|
+
$('[data-class=special]').attr('class','');
|
|
98
|
+
} else {
|
|
99
|
+
$('[data-class=special]').attr('class','invisible');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
89
102
|
function delete_it(name) {
|
|
90
103
|
if (confirm('Are you really, really, REALLY sure!')) {
|
|
91
104
|
$.ajax({
|
|
@@ -245,7 +258,7 @@ $(document).ready(function() {
|
|
|
245
258
|
{
|
|
246
259
|
'label': ele,
|
|
247
260
|
'function_call': change_it,
|
|
248
|
-
'text_icon': '
|
|
261
|
+
'text_icon': '<i class="uidash-icon uidash-icon-value"></i>',
|
|
249
262
|
'type': undefined,
|
|
250
263
|
'class': 'capitalized',
|
|
251
264
|
'params': [gdir,ele]
|
|
@@ -257,41 +270,32 @@ $(document).ready(function() {
|
|
|
257
270
|
});
|
|
258
271
|
|
|
259
272
|
$('#models').on('click','[data-class=model]',(e) => {
|
|
260
|
-
|
|
261
|
-
tar.toggleClass('selected');
|
|
262
|
-
if (tar.hasClass('selected')) {
|
|
263
|
-
selections.push(tar.attr('data-path'));
|
|
264
|
-
} else {
|
|
265
|
-
selections = selections.filter(item => item !== tar.attr('data-path'));
|
|
266
|
-
}
|
|
267
|
-
if (selections.length > 0) {
|
|
268
|
-
$('[data-class=special]').attr('class','');
|
|
269
|
-
} else {
|
|
270
|
-
$('[data-class=special]').attr('class','invisible');
|
|
271
|
-
}
|
|
273
|
+
mark_it($(e.currentTarget));
|
|
272
274
|
});
|
|
273
275
|
$('#models').on('click','th[data-class=special]',(e) => {
|
|
274
276
|
var menu = {};
|
|
275
277
|
var name = $(e.currentTarget).parents('tr').find('td[data-class=name]').attr('data-full-name');
|
|
276
|
-
|
|
278
|
+
var dirs = new Set(selections.map(item => item.replace(/[^\/]*$/,''))).size;
|
|
279
|
+
var head = 'Operations (' + selections.length + (selections.length == 1 ? ' entry' : ' entries') + ' in ' + dirs + (dirs == 1 ? ' dir' : ' dirs') + ' marked)';
|
|
280
|
+
menu[head] = [
|
|
277
281
|
{
|
|
278
282
|
'label': 'Move all marked entries to the current directory',
|
|
279
283
|
'function_call': move_all,
|
|
280
|
-
'text_icon': '
|
|
284
|
+
'text_icon': '<i class="uidash-icon uidash-icon-move"></i>',
|
|
281
285
|
'type': undefined,
|
|
282
286
|
'params': []
|
|
283
287
|
},
|
|
284
288
|
{
|
|
285
289
|
'label': 'Copy all marked entries to the current directory',
|
|
286
290
|
'function_call': copy_all,
|
|
287
|
-
'text_icon': '
|
|
291
|
+
'text_icon': '<i class="uidash-icon uidash-icon-copy"></i>',
|
|
288
292
|
'type': undefined,
|
|
289
293
|
'params': []
|
|
290
294
|
},
|
|
291
295
|
{
|
|
292
296
|
'label': 'Delete all marked entries',
|
|
293
297
|
'function_call': delete_all,
|
|
294
|
-
'text_icon': '
|
|
298
|
+
'text_icon': '<i class="uidash-icon uidash-icon-delete"></i>',
|
|
295
299
|
'type': undefined,
|
|
296
300
|
'params': []
|
|
297
301
|
},
|
|
@@ -299,7 +303,7 @@ $(document).ready(function() {
|
|
|
299
303
|
'label': 'Unmarked all marked entries',
|
|
300
304
|
'function_call': unmark_all,
|
|
301
305
|
'type': undefined,
|
|
302
|
-
'text_icon': '
|
|
306
|
+
'text_icon': '<i class="uidash-icon uidash-icon-checkox"></i>',
|
|
303
307
|
'params': []
|
|
304
308
|
}
|
|
305
309
|
];
|
|
@@ -310,7 +314,7 @@ $(document).ready(function() {
|
|
|
310
314
|
{
|
|
311
315
|
'label': 'Shift all marked entries to ' + ele,
|
|
312
316
|
'function_call': shift_all,
|
|
313
|
-
'text_icon': '
|
|
317
|
+
'text_icon': '<i class="uidash-icon uidash-icon-shift"></i>',
|
|
314
318
|
'type': undefined,
|
|
315
319
|
'params': [ele]
|
|
316
320
|
}
|
|
@@ -320,15 +324,22 @@ $(document).ready(function() {
|
|
|
320
324
|
new CustomMenu(e).contextmenu(menu);
|
|
321
325
|
});
|
|
322
326
|
|
|
323
|
-
$(
|
|
327
|
+
$(document).on('contextmenu',(e) => { e.preventDefault(); });
|
|
328
|
+
$(document).on('mousedown',(e) => { $('#models tr.active').removeClass('active'); }); // CustomMenu closes on mousedown
|
|
329
|
+
|
|
330
|
+
$('#models').on('click','td[data-class=ops]',ops_menu);
|
|
331
|
+
$('#models').on('contextmenu','tbody tr',ops_menu);
|
|
332
|
+
function ops_menu(e) {
|
|
333
|
+
e.preventDefault();
|
|
324
334
|
var menu = {};
|
|
325
|
-
var name = $(e.currentTarget).
|
|
326
|
-
var
|
|
335
|
+
var name = $(e.currentTarget).closest('tr').find('td[data-class=name]').attr('data-full-name');
|
|
336
|
+
var mark = $(e.currentTarget).closest('tr').find('td[data-class=model]');
|
|
337
|
+
var is_model = mark.length > 0 ? true : false;
|
|
327
338
|
menu['Operations'] = [
|
|
328
339
|
{
|
|
329
340
|
'label': 'Delete',
|
|
330
341
|
'function_call': delete_it,
|
|
331
|
-
'text_icon': '
|
|
342
|
+
'text_icon': '<i class="uidash-icon uidash-icon-delete"></i>',
|
|
332
343
|
'type': undefined,
|
|
333
344
|
'params': [name]
|
|
334
345
|
},
|
|
@@ -336,7 +347,7 @@ $(document).ready(function() {
|
|
|
336
347
|
'label': 'Rename',
|
|
337
348
|
'function_call': rename_it,
|
|
338
349
|
'type': undefined,
|
|
339
|
-
'text_icon': '
|
|
350
|
+
'text_icon': '<i class="uidash-icon uidash-icon-rename"></i>',
|
|
340
351
|
'params': [name]
|
|
341
352
|
}
|
|
342
353
|
];
|
|
@@ -345,12 +356,23 @@ $(document).ready(function() {
|
|
|
345
356
|
{
|
|
346
357
|
'label': 'Duplicate',
|
|
347
358
|
'function_call': duplicate_it,
|
|
348
|
-
'text_icon': '
|
|
359
|
+
'text_icon': '<i class="uidash-icon uidash-icon-copy"></i>',
|
|
349
360
|
'type': undefined,
|
|
350
361
|
'params': [name]
|
|
351
362
|
}
|
|
352
363
|
);
|
|
353
364
|
}
|
|
365
|
+
if (is_model) {
|
|
366
|
+
menu['Marking'] = [
|
|
367
|
+
{
|
|
368
|
+
'label': mark.hasClass('selected') ? 'Unmark' : 'Mark',
|
|
369
|
+
'function_call': mark_it,
|
|
370
|
+
'text_icon': '<i class="uidash-icon uidash-icon-' + (mark.hasClass('selected') ? 'checkox' : 'checkox-checked') + '"></i>',
|
|
371
|
+
'type': undefined,
|
|
372
|
+
'params': [mark]
|
|
373
|
+
}
|
|
374
|
+
];
|
|
375
|
+
}
|
|
354
376
|
if (shifts.length > 0 && is_model) {
|
|
355
377
|
menu['Shifting'] = [];
|
|
356
378
|
shifts.forEach(ele => {
|
|
@@ -358,15 +380,16 @@ $(document).ready(function() {
|
|
|
358
380
|
{
|
|
359
381
|
'label': 'Shift to ' + ele,
|
|
360
382
|
'function_call': shift_it,
|
|
361
|
-
'text_icon': '
|
|
383
|
+
'text_icon': '<i class="uidash-icon uidash-icon-shift"></i>',
|
|
362
384
|
'type': undefined,
|
|
363
385
|
'params': [name,ele]
|
|
364
386
|
}
|
|
365
387
|
);
|
|
366
388
|
});
|
|
367
389
|
}
|
|
390
|
+
$(e.currentTarget).closest('tr').addClass('active');
|
|
368
391
|
new CustomMenu(e).contextmenu(menu);
|
|
369
|
-
}
|
|
392
|
+
}
|
|
370
393
|
|
|
371
394
|
$('#newmod').on('submit',(e) => {
|
|
372
395
|
$.ajax({
|
data/ui/resources.html
CHANGED
|
@@ -26,32 +26,14 @@
|
|
|
26
26
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
27
27
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
28
28
|
<script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
|
|
29
|
-
<script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
|
|
31
|
-
<script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/util.js"></script>
|
|
33
|
-
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
34
|
-
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
35
|
-
<script type="text/javascript" src="/js_libs/parsequery.js"></script>
|
|
36
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
37
|
-
<script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
|
|
38
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
39
29
|
<script type="text/javascript" src="/js_libs/plotly.min.js"></script>
|
|
40
30
|
|
|
41
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
|
|
42
|
-
|
|
43
|
-
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
44
|
-
|
|
45
31
|
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
|
46
|
-
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
|
47
32
|
|
|
48
|
-
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
|
49
33
|
<link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
|
|
50
34
|
|
|
51
35
|
<link rel="stylesheet" href="/global_ui/ui.css" type="text/css"/>
|
|
52
36
|
|
|
53
|
-
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
|
54
|
-
|
|
55
37
|
<!-- custom stuff, play arround -->
|
|
56
38
|
<link rel="stylesheet" href="css/stats.css" type="text/css"/>
|
|
57
39
|
<link rel="stylesheet" href="css/stats_standalone.css" type="text/css"/>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cpee-model-management
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juergen eTM Mangler
|
|
@@ -99,7 +99,7 @@ files:
|
|
|
99
99
|
- ui/resources.html
|
|
100
100
|
homepage: http://cpee.org/
|
|
101
101
|
licenses:
|
|
102
|
-
-
|
|
102
|
+
- GPL-3.0-or-later
|
|
103
103
|
metadata: {}
|
|
104
104
|
rdoc_options: []
|
|
105
105
|
require_paths:
|