mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
ENHANCEMENT: Move Actions into a FieldGroup and style these. TODO - Toggle each individual action detail when clicking the respective button. Currently when clicking a button this hides the whole panel
This commit is contained in:
parent
aaac430e62
commit
a629f4b66e
@ -481,9 +481,16 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$fields->add(new LiteralField('BottomTaskSelection',"<div id=\"Actions\" class=\"field actions\"><label class=\"left\">Actions</label><ul><li class=\"ss-ui-button\">Replace</li><li class=\"ss-ui-button\">Embargo</li></ul></div>"));
|
$fields->add(new LiteralField('BottomTaskSelection',"<div id=\"Actions\" class=\"field actions\"><label class=\"left\">Actions</label><ul><li class=\"ss-ui-button\">Replace</li><li class=\"ss-ui-button\">Embargo</li></ul></div>"));
|
||||||
$fields->add($uploadField);
|
//$fields->add($uploadField);
|
||||||
$fields->add($pagesGrid);
|
|
||||||
|
|
||||||
|
// This adds all the actions details into a group.
|
||||||
|
// Embargo, History, etc to go in here
|
||||||
|
// These are toggled on and off via the Actions Buttons above
|
||||||
|
$fields->add($group = new FieldGroup(
|
||||||
|
$uploadField,
|
||||||
|
$pagesGrid
|
||||||
|
));
|
||||||
|
$group->setName("ActionsPanel")->addExtraClass('dmsupload ss-upload ss-uploadfield');
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,18 +9,23 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
|
|||||||
|
|
||||||
#DocumentTypeID ul { padding: 0; }
|
#DocumentTypeID ul { padding: 0; }
|
||||||
#DocumentTypeID ul input[type="radio"] { display: none; }
|
#DocumentTypeID ul input[type="radio"] { display: none; }
|
||||||
#DocumentTypeID ul li { display: inline-block; padding: 0; width: 94px; margin-right: -1px; border-radius: 0; }
|
#DocumentTypeID ul li { display: inline-block; padding: 0; width: 90px; margin-right: -1px; border-radius: 0; }
|
||||||
#DocumentTypeID ul li.val1 { width: 130px; }
|
#DocumentTypeID ul li.val1 { width: 130px; }
|
||||||
|
#DocumentTypeID ul li.val1 label { max-width: 105px; }
|
||||||
#DocumentTypeID ul li:first-child { border-radius: 6px 0 0 6px; border-left: 1px solid #C0C0C2; }
|
#DocumentTypeID ul li:first-child { border-radius: 6px 0 0 6px; border-left: 1px solid #C0C0C2; }
|
||||||
#DocumentTypeID ul li:last-child { border-radius: 0 6px 6px 0; }
|
#DocumentTypeID ul li:last-child { border-radius: 0 6px 6px 0; }
|
||||||
#DocumentTypeID ul li.selected { 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; }
|
#DocumentTypeID ul li.selected { 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; }
|
||||||
#DocumentTypeID ul li.selected :after { box-shadow: 0 1px 1px 0 #DDD; }
|
#DocumentTypeID ul li.selected :after { box-shadow: 0 1px 1px 0 #DDD; }
|
||||||
#DocumentTypeID ul li label { padding: .4em 1em; display: block; line-height: 1.4; white-space: normal; }
|
#DocumentTypeID ul li label { padding: .4em 1em; display: inline-block; line-height: 1.4; white-space: normal; max-width: 60px; }
|
||||||
|
|
||||||
#Actions li { margin-left: 2px; }
|
#Actions li { margin-left: 2px; }
|
||||||
#Actions li:first-child { margin-left: 0; }
|
#Actions li:first-child { margin-left: 0; }
|
||||||
|
|
||||||
#ReplaceFile { display: none; }
|
#ActionsPanel .middleColumn { margin-left: 184px; }
|
||||||
|
#ActionsPanel label.fieldholder-small-label { display: none; }
|
||||||
|
#ActionsPanel .fieldgroup-field { float: none; width: auto; }
|
||||||
|
#ActionsPanel .fieldgroup-field .fieldholder-small label { float: none; width: auto; margin: 0; padding: 0; }
|
||||||
|
#ActionsPanel .fieldgroup-field .fieldholder-small label.ss-ui-button { float: left; margin: 0 10px 0 0; }
|
||||||
|
|
||||||
#Form_ItemEditForm fieldset table.ss-gridfield-table { width: auto; }
|
#Form_ItemEditForm fieldset table.ss-gridfield-table { width: auto; }
|
||||||
#Form_ItemEditForm fieldset table.ss-gridfield-table tr th.main { min-width: 200px; }
|
#Form_ItemEditForm fieldset table.ss-gridfield-table tr th.main { min-width: 200px; }
|
||||||
|
@ -9,4 +9,5 @@
|
|||||||
.DMSDocumentAddController .ui-tabs ul.ui-tabs-nav li { padding-bottom: 1px; border: 1px solid #C0C0C2; }
|
.DMSDocumentAddController .ui-tabs ul.ui-tabs-nav li { padding-bottom: 1px; border: 1px solid #C0C0C2; }
|
||||||
.DMSDocumentAddController .ui-tabs ul.ui-tabs-nav li a { padding: 8px 20px 8px; }
|
.DMSDocumentAddController .ui-tabs ul.ui-tabs-nav li a { padding: 8px 20px 8px; }
|
||||||
|
|
||||||
|
#Form_EditForm_Documents { padding: 1em 0; }
|
||||||
#Form_EditForm_Documents input[name="filter[LastChanged]"] { display: none; }
|
#Form_EditForm_Documents input[name="filter[LastChanged]"] { display: none; }
|
||||||
|
@ -12,13 +12,15 @@
|
|||||||
|
|
||||||
$('#DocumentTypeID input[type=radio]').entwine({
|
$('#DocumentTypeID input[type=radio]').entwine({
|
||||||
onadd: function() {
|
onadd: function() {
|
||||||
|
// Checks to see what radio button is selected
|
||||||
if (this.is(':checked')) {
|
if (this.is(':checked')) {
|
||||||
this.change();
|
this.change();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onchange: function(e) {
|
onchange: function(e) {
|
||||||
|
// Remove selected class from radio buttons
|
||||||
$('#DocumentTypeID').find('li').removeClass('selected');
|
$('#DocumentTypeID').find('li').removeClass('selected');
|
||||||
|
//If radio button is checked then add the selected class
|
||||||
if (this.is(':checked')) {
|
if (this.is(':checked')) {
|
||||||
this.parent('li').addClass('selected');
|
this.parent('li').addClass('selected');
|
||||||
}
|
}
|
||||||
@ -27,8 +29,9 @@
|
|||||||
|
|
||||||
$('#Actions ul li').entwine({
|
$('#Actions ul li').entwine({
|
||||||
onclick: function(e) {
|
onclick: function(e) {
|
||||||
e.preventDefault();
|
//TODO - Fix so when clicking on an action it toggles the correct details inside the ActionsPanel
|
||||||
this.parents('fieldset').find('#ReplaceFile').show();
|
// Currently this just hides the whole ActionsPanel when you click an action button
|
||||||
|
this.parents('fieldset').find('#ActionsPanel').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -48,11 +48,14 @@ form.small .field .TreeDropdownField,
|
|||||||
li{
|
li{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
padding:0;
|
padding:0;
|
||||||
width:94px;
|
width:90px;
|
||||||
margin-right: -1px;
|
margin-right: -1px;
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
&.val1{
|
&.val1{
|
||||||
width:130px;
|
width:130px;
|
||||||
|
label{
|
||||||
|
max-width:105px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&:first-child{
|
&:first-child{
|
||||||
border-radius: 6px 0 0 6px;
|
border-radius: 6px 0 0 6px;
|
||||||
@ -76,9 +79,10 @@ form.small .field .TreeDropdownField,
|
|||||||
}
|
}
|
||||||
label{
|
label{
|
||||||
padding: .4em 1em;
|
padding: .4em 1em;
|
||||||
display: block;
|
display: inline-block;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
white-space:normal;
|
white-space:normal;
|
||||||
|
max-width:60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,8 +95,30 @@ form.small .field .TreeDropdownField,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ReplaceFile{
|
|
||||||
display:none;
|
#ActionsPanel{
|
||||||
|
.middleColumn{
|
||||||
|
margin-left:184px;
|
||||||
|
}
|
||||||
|
label.fieldholder-small-label{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.fieldgroup-field{
|
||||||
|
float:none;
|
||||||
|
width:auto;
|
||||||
|
.fieldholder-small{
|
||||||
|
label{
|
||||||
|
float:none;
|
||||||
|
width:auto;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
&.ss-ui-button{
|
||||||
|
float: left;
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Form_ItemEditForm{
|
#Form_ItemEditForm{
|
||||||
|
@ -41,6 +41,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#Form_EditForm_Documents input[name="filter[LastChanged]"] {
|
#Form_EditForm_Documents {
|
||||||
display: none;
|
padding: 1em 0;
|
||||||
|
input[name="filter[LastChanged]"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user