mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
MINOR: Duplicate jQuery functions for embargo and expiry fields when adding documents - this adds the relevant classes for the styling changes to work
This commit is contained in:
parent
b5c16cafe6
commit
50263f0ef1
@ -25,7 +25,7 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
|
||||
#Actions li.dms-active { border-bottom: 1px solid #C0C0C2; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c0c0c0), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#c0c0c0, #e6e6e6); background: -moz-linear-gradient(#c0c0c0, #e6e6e6); background: -o-linear-gradient(#c0c0c0, #e6e6e6); background: -ms-linear-gradient(#c0c0c0, #e6e6e6); background: linear-gradient(#c0c0c0, #e6e6e6); box-shadow: 0 1px 1px 0 #A0A0A0 inset; }
|
||||
#Actions li.dms-active:after { content: ''; display: block; position: absolute; top: 33px; left: 50%; margin-left: -6px; width: 12px; height: 12px; background: #F8F8F8; border-right: 1px solid #B3B3B3; border-top: 1px solid #B3B3B3; -moz-transform: rotate(-45deg); -webkit-transform: rotate(-45deg); pointer-events: none; }
|
||||
|
||||
#ActionsPanel .middleColumn { margin-left: 184px; }
|
||||
#ActionsPanel .middleColumn { margin-left: 184px; width: 510px; }
|
||||
form.small #ActionsPanel .middleColumn { margin-left: 120px; }
|
||||
#ActionsPanel label.fieldholder-small-label { display: none; }
|
||||
#ActionsPanel .fieldgroup-field { float: none; width: auto; }
|
||||
|
@ -43,7 +43,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#Form_ItemEditForm_Embargo input').entwine({
|
||||
$('#Form_ItemEditForm_Embargo input, #Form_EditForm_Embargo input').entwine({
|
||||
onchange: function() {
|
||||
//selected the date options
|
||||
if (this.attr('value') === 'Date') {
|
||||
@ -54,7 +54,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#Form_ItemEditForm_Expiry input').entwine({
|
||||
$('#Form_ItemEditForm_Expiry input, #Form_EditForm_Expiry input').entwine({
|
||||
onchange: function() {
|
||||
//selected the date options
|
||||
if (this.attr('value') === 'Date') {
|
||||
@ -80,12 +80,20 @@
|
||||
$('#Form_ItemEditForm_EmbargoedUntilDate-date').closest('.fieldholder-small').addClass('embargoDatetime').hide();
|
||||
$('#Form_ItemEditForm_ExpireAtDate-date').closest('.fieldholder-small').addClass('expiryDatetime').hide();
|
||||
|
||||
// We need to duplicate the above functions to work when Adding documents
|
||||
$('#Form_EditForm_EmbargoedUntilDate-date').closest('.fieldholder-small').addClass('embargoDatetime').hide();
|
||||
$('#Form_EditForm_ExpireAtDate-date').closest('.fieldholder-small').addClass('expiryDatetime').hide();
|
||||
|
||||
//show the replace panel when the page loads
|
||||
$('li[data-panel="embargo"]').click();
|
||||
|
||||
//set the initial state of the radio button and the associated dropdown hiding
|
||||
$('#Form_ItemEditForm_Embargo input[checked]').change();
|
||||
$('#Form_ItemEditForm_Expiry input[checked]').change();
|
||||
|
||||
//Again we need to duplicate the above function to work when adding documents
|
||||
$('#Form_EditForm_Embargo input[checked]').change();
|
||||
$('#Form_EditForm_Expiry input[checked]').change();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -133,6 +133,7 @@ form.small .field .TreeDropdownField,
|
||||
#ActionsPanel{
|
||||
.middleColumn{
|
||||
margin-left:184px;
|
||||
width: 510px;
|
||||
form.small &{
|
||||
margin-left: 120px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user