Metadata Date field -OR IN- ... from now


(gja) #1

Hi,

 

I've been bugged by the editing interface for date metadata and how it can be confusing for people entering date information.

 

In the schema it is possible to turn off the keyword selector, to suppress the dropdown containing asset created, asset updated etc options.  Which is good.

 

However, it appears that is is not possible to turn off the " IN-  x minutes  from now" option.  Is there a way to suppress this option?

 

I know that in the asset builder I could write my own html to submit DD/MM/YYYY information, but when it comes to editing the metadata via Easy Edit that option would still be showing.  

 

Thanks Georgina.

 

 Squiz Matrix 5.1.5 and EES 1.5.0


(Nic Hubbard) #2

One option would be to hide those fields with CSS.


(Bart Banda) #3

Yea hiding it with CSS in Edit+ is the easiest way as Nic suggested. We might potentially add a feature for disabling it via a config option on the field itself. We are also planning on improving that interface to make it more user friendly in general, potentially something like the attached....  metadata-date.jpg (12.1 KB)


(gja) #4

Hi,

 

The screen shot looks like an improvement to the current interface.

I also think having the opportunity to disable via a config option the same as is possible for keyword replacements would be an improvement.

 

I find the logic of it confusing,  if I select 10 minutes from now and hit save, the DD/MM/YYYY information changes and then the relative details resets to 0 --Select One-- which then results in some uncertainty if it worked.

 

Regarding Nic's suggestion, it appears that the only way to hide in css  is to create a css  directive for every date field as it looks like the classes are not unique to this part of the date metadata field.  So I'd have to use #metadata_field_date_128110_duration and #metadata_field_date_128110_period  and then deal with the preceding bolded text separately.

 

Is there a trick to the css hiding suggestion?

 

Georgina.


(Anthony Ponomarenko) #5

Could you use something like:

 

.sq-metadata-date-wrapper span{

  display: none;

}

 

.sq-metadata-date-wrapper span:first-of-type{

  display: block;

}

 

This would hide all but the first span containing the Year/Month/Day/Time fields


(gja) #6

Thanks for the css,  I had to tweak it a little due to .sq-metadata-date-wrapper span  having a lower specificity than .sq-inline-fields-wrapper.dateTime

 

The below also works too.

 

.sq-inline-fields-wrapper.dateTime{   display: none;
}

.sq-inline-fields-wrapper.dateTime:first-of-type{
  display: block;
}

 

Georgina.