cpee-worklist 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88906c8c3bf4ed6fb2c559c215cad9042af3f22b1547adc27ff13a2bd75baf9f
4
- data.tar.gz: 4786e6c93cd6fd5c738e0a7bfd0cde833e7b5ee23df8adba2decd55c68321473
3
+ metadata.gz: 26aaf0fd5b133829f061e80cc2ca672db00e27e510eb88bb29f05f35a9dd5e63
4
+ data.tar.gz: 769ac778b2e7ca63989826f55a70d280c5323db23bb3475e292e71f2aa6997e3
5
5
  SHA512:
6
- metadata.gz: 6fcb076b22a4a4f520f9454c7b1ee0ecdc60eced3fcc4a22bcb54f9c6dc8983d739f82d2f5dde5dc78e9278acf57cf83c352a204674f01b82f5fcf2595b84a6b
7
- data.tar.gz: 1a6b4022de420fe6b6d7869d0028136c5ec907054f1d16ae8f46ca3490af9a6c1a68c9fa2d2695e38b0e584abbd7e25348abffde9a6fb5f9e6b12863485a90a6
6
+ metadata.gz: 629efc559c79afbc8808c4fd1385ea9910ea5e17563cd4ef12e3141aded6b0d81edbcdb140fa332b97d2768d760eac162403dfb6a3ecaca1c2e3ebb09c19c592
7
+ data.tar.gz: a334412c0442c5b1d36a9aadf247e997b8bcb0380814e14abd8c157e7d942f3ca27bc24abe589a8fb8fae351ebc767f705af745c2898d4aad60add057d2c1963
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-worklist"
3
- s.version = "1.0.6"
3
+ s.version = "1.0.7"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "Worklist for the cloud process execution engine (cpee.org)"
@@ -234,6 +234,7 @@ module CPEE
234
234
  activity['user'].include?(@r[-2])
235
235
  ) && !restrict
236
236
  tasks["#{activity['id']}"] = { :all => activity.has_key?('collect') && !activity['collect'].nil?, :uid => @r[-2], :priority => activity['priority'], :label => activity['process'] + ': ' + activity['label'] }
237
+ tasks["#{activity['id']}"][:own] = activity['user'].include?(@r[-2])
237
238
  tasks["#{activity['id']}"][:deadline] = activity['deadline'] if activity['deadline']
238
239
  end
239
240
  end
@@ -277,7 +278,7 @@ module CPEE
277
278
  activity['user'] = []
278
279
  callback_id = @a[0].activities[index]['id']
279
280
  @a[0].activities.serialize
280
- @a[0].notify('user/giveback', :callback_id => activity['id'], :cpee_callback => activity['url'], :cpee_instance => activity['cpee_instance'],:instance_uuid => activity['uuid'], :cpee_base => activity['cpee_base'], :cpee_label => activity['label'], :cpee_activity => activity['cpee_activity_id'], :orgmodel => activity['orgmodel'])
281
+ @a[0].notify('user/giveback', :user => @r[-3], :callback_id => activity['id'], :cpee_callback => activity['url'], :cpee_instance => activity['cpee_instance'],:instance_uuid => activity['uuid'], :cpee_base => activity['cpee_base'], :cpee_label => activity['label'], :cpee_activity => activity['cpee_activity_id'], :orgmodel => activity['orgmodel'])
281
282
  Riddl::Client.new(@a[0].activities[index]['url']).put [
282
283
  Riddl::Header.new('CPEE-UPDATE','true'),
283
284
  Riddl::Header.new('CPEE-STATUS','giveback'),
data/ui/css/ui.css CHANGED
@@ -73,7 +73,6 @@ button.highlight { background-color: #cc0000; }
73
73
 
74
74
  #parameters .tabbelow { height: 9em; min-height: 1.7em; }
75
75
 
76
- #areatasks { height: 100%; overflow-x: hidden; overflow-y: scroll; }
77
76
  #dat_message {
78
77
  border:1em solid white;
79
78
  }
data/ui/direct.html CHANGED
@@ -131,7 +131,7 @@
131
131
  <ui-behind ></ui-behind>
132
132
  </ui-tabbar>
133
133
  <ui-content>
134
- <ui-area data-belongs-to-tab="task" id="areatask"> <!--{{{-->
134
+ <ui-area data-belongs-to-tab="task" id="areatasklist"> <!--{{{-->
135
135
  <div id="dat_message" style="display: none;">Currently no tasks available.</div>
136
136
  <table id="dat_tasks" class="layout"></table>
137
137
  </ui-area> <!--}}}-->
data/ui/index.html CHANGED
@@ -132,7 +132,7 @@
132
132
  <ui-behind ></ui-behind>
133
133
  </ui-tabbar>
134
134
  <ui-content>
135
- <ui-area data-belongs-to-tab="task" id="areatask"> <!--{{{-->
135
+ <ui-area data-belongs-to-tab="task" id="areatasklist"> <!--{{{-->
136
136
  <div id="dat_message" style="display: none;">Currently no tasks available.</div>
137
137
  <table id="dat_tasks" class="layout"></table>
138
138
  </ui-area> <!--}}}-->
data/ui/js/worklist.js CHANGED
@@ -116,10 +116,10 @@ function get_worklist() {// {{{
116
116
  node.find('tr').attr('data-label',tasklabel);
117
117
  node.find('tr').addClass('priority_' + $(this).attr('priority'));
118
118
  $('.name',node).text(tasklabel);
119
- if ($(this).attr('uid')=='*') {
120
- $('.task_giveback',node).prop('disabled', true);
121
- } else {
119
+ if ($(this).attr('own')=='true') {
122
120
  $('.task_take',node).prop('disabled', true);
121
+ } else {
122
+ $('.task_giveback',node).prop('disabled', true);
123
123
  }
124
124
  ctv.append(node);
125
125
  });
@@ -138,8 +138,11 @@ function take_work(url,butt,butt2,give_or_take){ //{{{
138
138
  url: url,
139
139
  data:"operation="+op ,
140
140
  success: function(){
141
+ console.log(butt);
142
+ console.log(butt2);
141
143
  $(butt).prop('disabled','true');
142
144
  $(butt2).prop('disabled','false');
145
+ $(butt2).removeAttr('disabled');
143
146
  },
144
147
  error: function(a,b,c){
145
148
  alert("Put didn't work");
@@ -193,11 +196,24 @@ function do_work(taskid,taskidurl) { //{{{
193
196
  iform = iform.replaceAll(replaces[0],'div.task.task_' + taskid);
194
197
  }
195
198
  }
199
+ {
200
+ let replaces = iform.match(/worklist-item/ms);
201
+ if (replaces && replaces.length > 0) {
202
+ iform = iform.replaceAll(replaces[0],'div.task.task_' + taskid);
203
+ }
204
+ }
205
+ {
206
+ let replaces = evaltext.match(/worklist-item/ms);
207
+ if (replaces && replaces.length > 0) {
208
+ evaltext = evaltext.replaceAll(replaces[0],'div.task.task_' + taskid);
209
+ }
210
+ }
196
211
 
197
212
  let container = $("<div class='task task_" + taskid + "'><form id='form_" + taskid + "'></form></div>");
198
213
  container.append(iform);
199
214
 
200
215
  let form = $("ui-area[data-belongs-to-tab="+taskid+"]");
216
+ form.addClass('areataskitem');
201
217
  let data;
202
218
  try { data = res.parameters; } catch (e) { data = {}; }
203
219
  form.append(container);
@@ -316,6 +332,14 @@ function subscribe_worklist(){ //{{{
316
332
  break;
317
333
  case 'status':
318
334
  toggle_message(data.content.status);
335
+ break;
336
+ case 'take':
337
+ case 'giveback':
338
+ if (data.content.user != $("input[name=user-name]").val()) {
339
+ tr.remove();
340
+ get_worklist();
341
+ }
342
+ break;
319
343
  default:
320
344
  tr.remove();
321
345
  get_worklist();
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.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: tools
12
12
  cert_chain: []
13
- date: 2024-07-01 00:00:00.000000000 Z
13
+ date: 2024-07-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl