Skip to content

Commit 3901241

Browse files
committed
zmi: minor fix of action manage_tab_tasks
shifted spinner-style to onclick-attribute
1 parent 8fb5e64 commit 3901241

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

Products/zms/conf/metacmd_manager/manage_tab_tasks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class manage_tab_tasks:
3434
package = "com.zms.foundation.metacmd.tabs"
3535

3636
# Revision
37-
revision = "5.0.1"
37+
revision = "5.0.2"
3838

3939
# Roles
4040
roles = ["*"]

Products/zms/conf/metacmd_manager/manage_tab_tasks/manage_tab_tasks.zpt

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@
1010
task_ids python:['TASK_ZMSNOTE', 'TASK_UNTRANSLATED', 'TASK_CHANGED_BY_DATE','TASK_INACTIVE_NODES'];
1111
global obs python:[]">
1212

13-
<form class="form-horizontal card border-bottom" role="form" name="form0" method="get">
13+
<form class="form-horizontal card border-bottom" role="form" name="form0" method="get" action="manage_tab_tasks">
1414
<input type="hidden" name="id" value="manage_tab_tasks" />
1515
<legend><span tal:replace="python:here.getZMILangStr('TAB_TASKS')">the task-type</span></legend>
1616
<div class="card-body">
1717
<div class="form-group row task_type my-0">
1818
<div class="col-sm-2">
19-
<button type="submit" class="btn btn-primary w-100 text-nowrap" tal:content="python:here.getZMILangStr('BTN_DISPLAY')">Display</button>
19+
<button type="submit" class="btn btn-secondary w-100 text-nowrap"
20+
onclick="$(this).html('<i class=\'fas fa-spinner fa-spin\'></i>')"
21+
tal:content="python:here.getZMILangStr('BTN_DISPLAY')">
22+
Display
23+
</button>
2024
</div>
2125
<div class="col-sm-10">
22-
<select class="form-control" id="task_type" name="task_type">
26+
<select class="form-control" id="task_type" name="task_type" onchange="$('.btn.btn-secondary').removeClass('btn-secondary').addClass('btn-primary')">
2327
<option value="" tal:content="python:'----- %s -----'%(here.getZMILangStr('ACTION_SELECT')%here.getZMILangStr('ATTR_DISPLAY'))">--- ACTION_SELECT%ATTR_DISPLAY ---</option>
2428
<option tal:repeat="wfActivity python:here.getWfActivities()" tal:attributes="value python:wfActivity['id']; selected python:['','selected'][int(request.get('task_type','')==wfActivity['id'])]" tal:content="python:wfActivity['name']">the name</option>
2529
<option tal:repeat="id task_ids" tal:attributes="value id; selected python:['','selected'][int(request.get('task_type','')==id)]" tal:content="python:here.getZMILangStr(id)">the name</option>
@@ -59,9 +63,9 @@
5963

6064
<tal:block tal:condition="python:request['task_type']=='TASK_CHANGED_BY_DATE'">
6165
<tal:block tal:define="
62-
obj_tuples python:[ ( x.attr('change_dt'), x ) for x in [here]+here.getTreeNodes(request) ];
63-
obj_tuples python:sorted(obj_tuples, key=lambda obj: obj[0], reverse=True);
64-
global obs python:[obj[1] for obj in obj_tuples]"></tal:block>
66+
obj_tuples python:[ ( x.attr('change_dt'), x ) for x in [here]+here.getTreeNodes(request) ];
67+
obj_tuples python:sorted(obj_tuples, key=lambda obj: obj[0], reverse=True);
68+
global obs python:[obj[1] for obj in obj_tuples]"></tal:block>
6569
</tal:block>
6670

6771
<tal:block tal:condition="python:request['task_type'] not in task_ids">
@@ -76,7 +80,7 @@
7680
</tal:block>
7781
</tal:block>
7882

79-
<form class="form-horizontal" method="get"
83+
<form class="form-horizontal task_list" method="get"
8084
tal:attributes="id python:request.get('task_type', None)"
8185
tal:content="structure python:here.zmi_manage_main_grid(obs=obs)">
8286
zmi_manage_main_grid
@@ -87,26 +91,27 @@
8791
</tal:block>
8892
</div><!-- #zmi-tab -->
8993
<footer tal:replace="structure python:here.zmi_body_footer(here,request)">zmi_body_footer</footer>
90-
<script>
91-
// <!--
92-
$(function() {
93-
$('.btn.btn-primary').on('click',function() {
94-
$(this).html('<i class="fas fa-spinner fa-spin"></i>')
95-
})
96-
});
97-
//-->
98-
</script>
9994
<style>
100-
/* <!-- */
101-
.zmi.tasks #TASK_INACTIVE_NODES .breadcrumb li.breadcrumb-item.active {
95+
/* <!-- */
96+
form.task_list#TASK_INACTIVE_NODES .breadcrumb li.breadcrumb-item.active {
10297
max-width: unset !important;
10398
overflow: unset;
10499
text-overflow: unset;
105100
}
106-
.zmi.tasks #TASK_INACTIVE_NODES .breadcrumb li.breadcrumb-item.active a {
101+
form.task_list#TASK_INACTIVE_NODES .breadcrumb li.breadcrumb-item.active a {
107102
text-decoration: line-through;
108103
}
109-
/* --> */
104+
form.task_list .zmi-manage-main-change {
105+
white-space: nowrap;
106+
text-align: right;
107+
}
108+
form.task_list .zmi-manage-main-change .zmi-change-uid {
109+
margin-right: .35em;
110+
}
111+
form.task_list .zmi-manage-main-change i {
112+
line-height: 1.25;
113+
}
114+
/* --> */
110115
</style>
111116
</body>
112117
</html>

0 commit comments

Comments
 (0)