[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] document option open by default in eprints upload tab



Hi!

 ?here they requested me to have the options open by default for the 
document metadata when doing an upload (while creating a new eprint).

This are the changes I did:

Open perl_lib/EPrints/Plugin/InputForm/Component/Documents.pm (the same 
apply to 
lib/plugins/EPrints/Plugin/InputForm/Component/ReCollectDocuments.pm plugin)

change:

my $content = $session->make_element( "div", id=>$doc_prefix."_opts", 
class=>"ep_upload_doc_content ".($hide?"":"ep_no_js") ); (switch "" and 
"ep_no_js")

my $opts_toggle = $session->make_element( "a", onclick => 
"EPJS_blur(event); 
EPJS_toggleSlideScroll('${doc_prefix}_opts',".($hide?"true":"false").",'${doc_prefix}_block');EPJS_toggle('${doc_prefix}_opts_hide',".($hide?"false":"true").",'block');EPJS_toggle('${doc_prefix}_opts_show',".($hide?"true":"false").",'block');return 
false" ); (switch the behaviour)

my $s_options = $session->make_element( "div", 
id=>$doc_prefix."_opts_hide", class=>"ep_update_doc_options 
".($hide?"ep_hide":"") ); (switch the class hide<->show)

my $h_options = $session->make_element( "div", 
id=>$doc_prefix."_opts_show", class=>"ep_update_doc_options 
".($hide?"":"ep_hide") ); (switch the class hide<->show)


It should affect only the document in editing and only when you upload 
the file, not after you save the metadata. Any idea on how to make it 
works always (not just when uploading)?