cpee-worklist 1.0.21 → 1.0.23

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.
data/ui/js/structured.js CHANGED
@@ -2,40 +2,20 @@
2
2
  This file is part of CPEE-WORKLIST.
3
3
 
4
4
  CPEE-WORKLIST is free software: you can redistribute it and/or modify it
5
- under the terms of the GNU General Public License as published by the Free
6
- Software Foundation, either version 3 of the License, or (at your option) any
7
- later version.
5
+ under the terms of the GNU General Public License as published by the
6
+ Free Software Foundation, either version 3 of the License, or (at your
7
+ option) any later version.
8
8
 
9
- CPEE-WORKLIST is distributed in the hope that it will be useful, but WITHOUT ANY
10
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
9
+ CPEE-WORKLIST is distributed in the hope that it will be useful, but WITHOUT
10
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ details.
12
13
 
13
- You should have received a copy of the GNU General Public License along with
14
- CPEE-WORKLIST (file LICENSE in the main directory). If not, see
14
+ You should have received a copy of the GNU General Public License
15
+ along with CPEE-WORKLIST (file LICENSE in the main directory). If not, see
15
16
  <http://www.gnu.org/licenses/>.
16
17
  */
17
18
 
18
- function toggle_message(message=undefined) { //{{{
19
- var url =$("input[name=base-url]").val()+'/'+$("input[name=user-name]").val()+'/';
20
- if ($("#dat_tasks tr").length == 0) {
21
- if (message != undefined) {
22
- $("#dat_message").text(message);
23
- $("#dat_message").show();
24
- } else {
25
- $.ajax({
26
- type: "GET",
27
- url: url,
28
- success: function(res){
29
- $("#dat_message").text(res);
30
- $("#dat_message").show();
31
- }
32
- });
33
- }
34
- } else {
35
- $("#dat_message").hide();
36
- }
37
- } //}}}
38
-
39
19
  function config_defaults() { //{{{
40
20
  var default_values = {};
41
21
  if (location.protocol.match(/^file/)) {
@@ -48,7 +28,7 @@ function config_defaults() { //{{{
48
28
  } //}}}
49
29
 
50
30
  $(document).ready(function() {// {{{
51
- var q = $.parseQuerySimple();
31
+ var q = Object.fromEntries(new URLSearchParams(location.search));
52
32
  $.ajax({
53
33
  url: $('body').attr('data-defaultconfig'),
54
34
  success: function(res){
@@ -67,7 +47,7 @@ $(document).ready(function() {// {{{
67
47
  }
68
48
  },
69
49
  error: function(){
70
- var res = config_defaults();
50
+ var res_def = config_defaults();
71
51
  $('body').attr('data-names', res_def['names']);
72
52
  $('input[name=base-url]').val(res_def['base-url']);
73
53
  }
@@ -79,16 +59,7 @@ $(document).ready(function() {// {{{
79
59
  uidash_toggle_vis_tab($("#worklist .switch"));
80
60
  event.preventDefault();
81
61
  });
82
- $(document).on('click','.orgmodeltab',function(event){
83
- var id = $(this).attr('data-tab');
84
- uidash_empty_tab_contents(id);
85
- // TODO Hier kommt Raphi
86
- });
87
62
  $(document).on('click','#orgmodels li a.model',function(event){
88
- // var id = $(this).attr('href').hashCode();
89
- // if (!uidash_add_tab("#main", "Orgmodel", id, true, 'orgmodeltab')) {
90
- // uidash_empty_tab_contents(id);
91
- // }
92
63
  // TODO Hier kommt Raphi
93
64
  event.preventDefault();
94
65
  });
@@ -105,12 +76,6 @@ $(document).ready(function() {// {{{
105
76
  var taskidurl = url + '/' + taskid;
106
77
  do_work(taskid,taskidurl);
107
78
  });
108
- $(document).on('click','.task_take',function(){
109
- var url =$("input[name=user-url]").val()+'/tasks';
110
- var taskid = $(this).parents('tr').attr('data-id');
111
- var taskidurl = url + '/' + taskid;
112
- take_work(taskidurl,$(this).parents('tr'),1);
113
- });
114
79
  $(document).on('click','.task_giveback',function(){
115
80
  var url =$("input[name=user-url]").val()+'/tasks';
116
81
  var taskid = $(this).parents('tr').attr('data-id');
@@ -154,7 +119,6 @@ function place_worklist_item(node,own) {
154
119
  if (!$('.dat_tasks_priority').is(':empty')) { $('.dat_tasks_priority_head').removeClass('hidden'); } else { $('.dat_tasks_priority_head').addClass('hidden'); }
155
120
  if (!$('.dat_tasks_own').is(':empty')) { $('.dat_tasks_own_head').removeClass('hidden'); } else { $('.dat_tasks_own_head').addClass('hidden'); }
156
121
  if (!$('.dat_tasks_others').is(':empty')) { $('.dat_tasks_others_head').removeClass('hidden'); } else { $('.dat_tasks_others_head').addClass('hidden'); }
157
- if (!$('.dat_tasks_others_work').is(':empty')) { $('.dat_tasks_others_work_head').removeClass('hidden'); } else { $('.dat_tasks_others_work_head').addClass('hidden'); }
158
122
  }
159
123
 
160
124
  function get_worklist() {// {{{
@@ -198,13 +162,11 @@ function get_worklist() {// {{{
198
162
  $('.dat_tasks_priority').empty();
199
163
  $('.dat_tasks_own').empty();
200
164
  $('.dat_tasks_others').empty();
201
- $('.dat_tasks_others_work').empty();
202
165
 
203
166
  $('.dat_tasks_priority_high_head').addClass('hidden');
204
167
  $('.dat_tasks_priority_head').addClass('hidden');
205
168
  $('.dat_tasks_own_head').addClass('hidden');
206
169
  $('.dat_tasks_others_head').addClass('hidden');
207
- $('.dat_tasks_others_work_head').addClass('hidden');
208
170
 
209
171
  $(res).find('task').each(function(){
210
172
  if ($(this).attr('all') == "true") {
@@ -252,7 +214,6 @@ function get_worklist() {// {{{
252
214
  }
253
215
  place_worklist_item(node.find('tr'),$(this).attr('own') == 'true' || $(this).attr('always') == 'true' ? 'true' : 'false');
254
216
  });
255
- toggle_message();
256
217
  },
257
218
  error: function(a,b,c) {
258
219
  alert("Server not running.");
@@ -448,7 +409,7 @@ function subscribe_worklist(){ //{{{
448
409
  $.ajax({
449
410
  type: "POST",
450
411
  url: url,
451
- data: "topic=user&events=status,take,giveback,finish&topic=task&events=add,delete",
412
+ data: "topic=user&events=take,giveback,finish&topic=task&events=add,delete",
452
413
  success: function(ret){
453
414
  subscription = ret;
454
415
  es = new EventSource(url + subscription + "/sse/");
@@ -464,12 +425,8 @@ function subscribe_worklist(){ //{{{
464
425
  case 'finish':
465
426
  if (data.content.user == $("input[name=user-name]").val()) {
466
427
  tr.remove();
467
- toggle_message();
468
428
  }
469
429
  break;
470
- case 'status':
471
- toggle_message(data.content.status);
472
- break;
473
430
  case 'take':
474
431
  case 'giveback':
475
432
  if (data.content.user != $("input[name=user-name]").val()) {
@@ -490,7 +447,6 @@ function subscribe_worklist(){ //{{{
490
447
  break;
491
448
  case 'delete':
492
449
  tr.remove();
493
- toggle_message();
494
450
  break;
495
451
  }
496
452
  break;
@@ -505,14 +461,3 @@ function subscribe_worklist(){ //{{{
505
461
  });
506
462
  } //}}}
507
463
 
508
- String.prototype.hashCode = function() { //{{{
509
- var hash = 0, i, chr, len;
510
- if (this.length == 0) return hash;
511
- for (i = 0, len = this.length; i < len; i++) {
512
- chr = this.charCodeAt(i);
513
- hash = ((hash << 5) - hash) + chr;
514
- hash |= 0; // Convert to 32bit integer
515
- }
516
- return hash;
517
- }; //}}}
518
-
data/ui/structured.html CHANGED
@@ -1,16 +1,18 @@
1
1
  <!--
2
2
  This file is part of CPEE-WORKLIST.
3
3
 
4
- CPEE-WORKLIST is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
6
- either version 3 of the License, or (at your option) any later version.
4
+ CPEE-WORKLIST is free software: you can redistribute it and/or modify it
5
+ under the terms of the GNU General Public License as published by the
6
+ Free Software Foundation, either version 3 of the License, or (at your
7
+ option) any later version.
7
8
 
8
- CPEE-WORKLIST is distributed in the hope that it will be useful, but WITHOUT ANY
9
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
9
+ CPEE-WORKLIST is distributed in the hope that it will be useful, but WITHOUT
10
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ details.
11
13
 
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE-WORKLIST (file LICENSE in the main directory). If not, see
14
+ You should have received a copy of the GNU General Public License
15
+ along with CPEE-WORKLIST (file LICENSE in the main directory). If not, see
14
16
  <http://www.gnu.org/licenses/>.
15
17
  -->
16
18
 
@@ -22,26 +24,11 @@
22
24
 
23
25
  <!-- libs, do not modify. When local than load local libs. -->
24
26
  <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
25
- <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
26
- <script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
27
- <script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
28
- <script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
29
- <script type="text/javascript" src="/js_libs/util.js"></script>
30
- <script type="text/javascript" src="/js_libs/printf.js"></script>
31
- <script type="text/javascript" src="/js_libs/strftime.min.js"></script>
32
- <script type="text/javascript" src="/js_libs/parsequery.js"></script>
33
- <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
34
- <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
35
- <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
36
- <script type="text/javascript" src="/js_libs/marked.min.js"></script>
37
-
38
- <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
27
+ <script type="text/javascript" src="/js_libs/uidash_util.js"></script>
39
28
 
40
29
  <script type="text/javascript" src="/js_libs/uidash.js"></script>
41
30
  <link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
42
31
 
43
- <link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
44
-
45
32
  <!-- custom stuff, play arround -->
46
33
  <link rel="stylesheet" href="css/ui.css" type="text/css"/>
47
34
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
@@ -164,12 +151,6 @@
164
151
  </td></tr>
165
152
  </thead>
166
153
  <tbody class="dat_tasks_others dat_table dat_indent_table"></tbody>
167
- <thead>
168
- <tr><td colspan="42">
169
- <div class="dat_tasks_others_work_head dat_heading hidden"><span>Tasks others currently work on ...</span></div>
170
- </td></tr>
171
- </thead>
172
- <tbody class="dat_tasks_others_work dat_table dat_indent_table"></tbody>
173
154
  </table>
174
155
  </ui-area> <!--}}}-->
175
156
  <ui-resizehandle data-belongs-to-tab="task" id="detailcolumnresizer" data-label="drag to resize" class="hidden"></ui-resizehandle>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee-worklist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.21
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -120,7 +120,7 @@ files:
120
120
  - ui/structured.json
121
121
  homepage: http://cpee.org/
122
122
  licenses:
123
- - LGPL-3.0-or-later
123
+ - GPL-3.0-or-later
124
124
  metadata: {}
125
125
  rdoc_options: []
126
126
  require_paths: