Merged in darojas/processmaker/master-core (pull request #1280)
PM-1117 Paused Case - SOLVED
This commit is contained in:
37
workflow/engine/templates/cases/casesList.js
Normal file → Executable file
37
workflow/engine/templates/cases/casesList.js
Normal file → Executable file
@@ -25,17 +25,33 @@ var textJump;
|
|||||||
var ids = '';
|
var ids = '';
|
||||||
var winReassignInCasesList;
|
var winReassignInCasesList;
|
||||||
|
|
||||||
function formatAMPM(date, initVal) {
|
function formatAMPM(date, initVal, calendarDate) {
|
||||||
var hours = date.getHours();
|
|
||||||
var minutes = (initVal === true)? ((date.getMinutes()<15)? 0: ((date.getMinutes()<30)? 15: ((date.getMinutes()<45)? 30: 45))): date.getMinutes();
|
var currentDate = new Date();
|
||||||
var ampm = hours >= 12 ? 'PM' : 'AM';
|
var currentDay = currentDate.getDate();
|
||||||
hours = hours % 12;
|
var currentMonth = currentDate.getMonth()+1;
|
||||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
if (currentDay < 10) {
|
||||||
minutes = minutes < 10 ? '0' + minutes : minutes;
|
currentDay = '0' + currentDay;
|
||||||
var strTime = hours + ':' + minutes + ' ' + ampm;
|
}
|
||||||
|
if (currentMonth < 10) {
|
||||||
|
currentMonth = '0' + currentMonth;
|
||||||
|
}
|
||||||
|
currentDate = currentMonth + '-' + currentDay;
|
||||||
|
if (currentDate == calendarDate) {
|
||||||
|
var hours = date.getHours();
|
||||||
|
var minutes = (initVal === true)? ((date.getMinutes()<15)? 15: ((date.getMinutes()<30)? 30: ((date.getMinutes()<45)? 45: 45))): date.getMinutes();
|
||||||
|
var ampm = hours >= 12 ? 'PM' : 'AM';
|
||||||
|
hours = hours % 12;
|
||||||
|
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||||
|
minutes = minutes < 10 ? '0' + minutes : minutes;
|
||||||
|
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||||
|
} else {
|
||||||
|
var strTime = '12:00 AM';
|
||||||
|
}
|
||||||
return strTime;
|
return strTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ext.Ajax.timeout = 4 * 60 * 1000;
|
Ext.Ajax.timeout = 4 * 60 * 1000;
|
||||||
|
|
||||||
var caseSummary = function() {
|
var caseSummary = function() {
|
||||||
@@ -248,13 +264,14 @@ function pauseCase(date){
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
html: '<div align="center" style="font: 14px tahoma,arial,helvetica,sans-serif">' + _('ID_PAUSE_CASE_TO_DATE') +' '+date.format('M j, Y')+'? </div> <br/>'
|
html: '<div align="center" style="font: 14px tahoma,arial,helvetica,sans-serif">' + _('ID_PAUSE_CASE_TO_DATE') +' '+date.format('M j, Y')+'? </div> <br/>'
|
||||||
|
|
||||||
},
|
},
|
||||||
new Ext.form.TimeField({
|
new Ext.form.TimeField({
|
||||||
id: 'unpauseTime',
|
id: 'unpauseTime',
|
||||||
fieldLabel: _('ID_UNPAUSE_TIME'),
|
fieldLabel: _('ID_UNPAUSE_TIME'),
|
||||||
name: 'unpauseTime',
|
name: 'unpauseTime',
|
||||||
value: formatAMPM(new Date(), false),
|
value: formatAMPM(new Date(), false, date.format('m-d')),
|
||||||
minValue: formatAMPM(new Date(), true),
|
minValue: formatAMPM(new Date(), true, date.format('m-d')),
|
||||||
format: 'h:i A'
|
format: 'h:i A'
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user