4028 |
26 Jul 16 |
nicklas |
var PublishForDelivery = function() |
4028 |
26 Jul 16 |
nicklas |
2 |
{ |
4028 |
26 Jul 16 |
nicklas |
var publish = {}; |
4028 |
26 Jul 16 |
nicklas |
var debug = 0; |
4028 |
26 Jul 16 |
nicklas |
5 |
|
4028 |
26 Jul 16 |
nicklas |
// Page initialization |
4028 |
26 Jul 16 |
nicklas |
publish.initPage = function() |
4028 |
26 Jul 16 |
nicklas |
8 |
{ |
4028 |
26 Jul 16 |
nicklas |
Events.addEventHandler('completedDate', 'blur', Wizard.validateDate); |
4028 |
26 Jul 16 |
nicklas |
10 |
|
4028 |
26 Jul 16 |
nicklas |
Buttons.addClickHandler('close', App.closeWindow); |
4028 |
26 Jul 16 |
nicklas |
Buttons.addClickHandler('btnOk', publish.publishForDelivery); |
4028 |
26 Jul 16 |
nicklas |
13 |
} |
4028 |
26 Jul 16 |
nicklas |
14 |
|
4028 |
26 Jul 16 |
nicklas |
publish.publishForDelivery = function() |
4028 |
26 Jul 16 |
nicklas |
16 |
{ |
4028 |
26 Jul 16 |
nicklas |
var frm = document.forms['options']; |
4028 |
26 Jul 16 |
nicklas |
if (!Wizard.isValid('completedDate')) |
4028 |
26 Jul 16 |
nicklas |
19 |
{ |
4028 |
26 Jul 16 |
nicklas |
Forms.showNotification('completedDate', frm.completedDate.value == '' ? 'Please specify a date' : 'Not a valid date'); |
4028 |
26 Jul 16 |
nicklas |
return; |
4028 |
26 Jul 16 |
nicklas |
22 |
} |
4993 |
02 Oct 18 |
nicklas |
var acceptDoNotUse = Doc.element('acceptDoNotUse'); |
4993 |
02 Oct 18 |
nicklas |
if (acceptDoNotUse && !acceptDoNotUse.checked) |
4993 |
02 Oct 18 |
nicklas |
25 |
{ |
4993 |
02 Oct 18 |
nicklas |
Forms.showNotification('acceptDoNotUse', 'Please verify that DoNotUse items should be published'); |
4993 |
02 Oct 18 |
nicklas |
return; |
4993 |
02 Oct 18 |
nicklas |
28 |
} |
4028 |
26 Jul 16 |
nicklas |
29 |
|
4028 |
26 Jul 16 |
nicklas |
var options = {}; |
4028 |
26 Jul 16 |
nicklas |
options.completedDate = frm.completedDate.value; |
4028 |
26 Jul 16 |
nicklas |
32 |
|
4028 |
26 Jul 16 |
nicklas |
window.opener.YellowLabel.publishForDelivery(null, options); |
4028 |
26 Jul 16 |
nicklas |
App.closeWindow(); |
4028 |
26 Jul 16 |
nicklas |
35 |
} |
4028 |
26 Jul 16 |
nicklas |
36 |
|
4028 |
26 Jul 16 |
nicklas |
37 |
|
4028 |
26 Jul 16 |
nicklas |
return publish; |
4028 |
26 Jul 16 |
nicklas |
39 |
}(); |
4028 |
26 Jul 16 |
nicklas |
40 |
|
4028 |
26 Jul 16 |
nicklas |
Doc.onLoad(PublishForDelivery.initPage); |
4028 |
26 Jul 16 |
nicklas |
42 |
|