cpee-worklist 1.0.6 → 1.0.8

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: 9a77a7170f2fcd46b9770c423d9f71534c3326f7815beced68e65689fb38ca72
4
+ data.tar.gz: d6b1be26ea13097cca31f6feba56e289fe48742f7c51b9dc34bbea3e19b52bff
5
5
  SHA512:
6
- metadata.gz: 6fcb076b22a4a4f520f9454c7b1ee0ecdc60eced3fcc4a22bcb54f9c6dc8983d739f82d2f5dde5dc78e9278acf57cf83c352a204674f01b82f5fcf2595b84a6b
7
- data.tar.gz: 1a6b4022de420fe6b6d7869d0028136c5ec907054f1d16ae8f46ca3490af9a6c1a68c9fa2d2695e38b0e584abbd7e25348abffde9a6fb5f9e6b12863485a90a6
6
+ metadata.gz: 5d74ffbefc2a1258ffc95af5cdd47764390cf05eae5779598a19cc3aa4bc9062c3d0e02b808d0c868974550e35e3394898375e9e95c4180e84fb5bbd08270c82
7
+ data.tar.gz: 0d89ba884cd33219f7305bc13c4b13750648bca47c274c71d83987b155db33eb7e502f6844b89cc3d49caa4e1f9dfdfaa8f48b5604dbaecea339080a3d21f5b5
@@ -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.8"
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
  });
@@ -140,6 +140,7 @@ function take_work(url,butt,butt2,give_or_take){ //{{{
140
140
  success: function(){
141
141
  $(butt).prop('disabled','true');
142
142
  $(butt2).prop('disabled','false');
143
+ $(butt2).removeAttr('disabled');
143
144
  },
144
145
  error: function(a,b,c){
145
146
  alert("Put didn't work");
@@ -193,11 +194,24 @@ function do_work(taskid,taskidurl) { //{{{
193
194
  iform = iform.replaceAll(replaces[0],'div.task.task_' + taskid);
194
195
  }
195
196
  }
197
+ {
198
+ let replaces = iform.match(/worklist-item/ms);
199
+ if (replaces && replaces.length > 0) {
200
+ iform = iform.replaceAll(replaces[0],'div.task.task_' + taskid);
201
+ }
202
+ }
203
+ {
204
+ let replaces = evaltext.match(/worklist-item/ms);
205
+ if (replaces && replaces.length > 0) {
206
+ evaltext = evaltext.replaceAll(replaces[0],'div.task.task_' + taskid);
207
+ }
208
+ }
196
209
 
197
210
  let container = $("<div class='task task_" + taskid + "'><form id='form_" + taskid + "'></form></div>");
198
211
  container.append(iform);
199
212
 
200
213
  let form = $("ui-area[data-belongs-to-tab="+taskid+"]");
214
+ form.addClass('areataskitem');
201
215
  let data;
202
216
  try { data = res.parameters; } catch (e) { data = {}; }
203
217
  form.append(container);
@@ -316,6 +330,14 @@ function subscribe_worklist(){ //{{{
316
330
  break;
317
331
  case 'status':
318
332
  toggle_message(data.content.status);
333
+ break;
334
+ case 'take':
335
+ case 'giveback':
336
+ if (data.content.user != $("input[name=user-name]").val()) {
337
+ tr.remove();
338
+ get_worklist();
339
+ }
340
+ break;
319
341
  default:
320
342
  tr.remove();
321
343
  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.8
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-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl