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 +4 -4
- data/cpee-worklist.gemspec +1 -1
- data/lib/cpee-worklist/implementation.rb +2 -1
- data/ui/css/ui.css +0 -1
- data/ui/direct.html +1 -1
- data/ui/index.html +1 -1
- data/ui/js/worklist.js +25 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a77a7170f2fcd46b9770c423d9f71534c3326f7815beced68e65689fb38ca72
|
4
|
+
data.tar.gz: d6b1be26ea13097cca31f6feba56e289fe48742f7c51b9dc34bbea3e19b52bff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d74ffbefc2a1258ffc95af5cdd47764390cf05eae5779598a19cc3aa4bc9062c3d0e02b808d0c868974550e35e3394898375e9e95c4180e84fb5bbd08270c82
|
7
|
+
data.tar.gz: 0d89ba884cd33219f7305bc13c4b13750648bca47c274c71d83987b155db33eb7e502f6844b89cc3d49caa4e1f9dfdfaa8f48b5604dbaecea339080a3d21f5b5
|
data/cpee-worklist.gemspec
CHANGED
@@ -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
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="
|
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="
|
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('
|
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.
|
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-
|
13
|
+
date: 2024-07-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|