[index] [options] [help]
See the Contact page for how to subscribe and unsubscribe.

eprints_tech messages

Please note: this page shows emails that have been sent to the eprints_tech mailing list. Some of these may be spam emails we have failed to filter.

[EP-tech] Altering ItemRef to add a new button and workflow option

From: Sam Moffatt <Samuel.Moffatt AT usq.edu.au>
Date: Tue, 30 Jun 2009 16:48:07 +1000


Threading:      • This Message
             [EP-tech] Re: Altering ItemRef to add a new button and workflow option from tdb01r AT ecs.soton.ac.uk

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi list,

I am interested in altering ItemRef to add a button that would allow
users to more fully search for a value by creating a popup window that
would allow them to find the itemref value and have it then push the
value into the field. I've had a stab at modifying
EPrints::MetaField::ItemRef but can't seem to work out how you would
feed it another param via the workflow system. I feel that this is
distinct from the input_lookup_url because I aim to popup a new window
to provide the ability to search for the correct Itemref ID instead of
having to remember just what number should be used (rather unfriendly). 

I've had a dig around the code base and nothing immediately obvious
became apparent. Anyone got any suggestions for how I'd implement this
feature?

Cheers,

Sam


This email (including any attached files) is confidential and is for the
intended recipient(s) only.  If you received this email by mistake,
please, as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland.  Although all
reasonable precautions were taken to ensure that this email contained no
viruses at the time it was sent we accept no liability for any losses
arising from its receipt.

The University of Southern Queensland is a registered provider of
education with the Australian Government (CRICOS Institution Code No's.
QLD 00244B / NSW 02225M)



[EP-tech] Re: Altering ItemRef to add a new button and workflow option

From: Tim Brody <tdb01r AT ecs.soton.ac.uk>
Date: Tue, 14 Jul 2009 12:04:53 +0100


Threading: [EP-tech] Altering ItemRef to add a new button and workflow option from Samuel.Moffatt AT usq.edu.au
      • This Message
             [EP-tech] Re: Altering ItemRef to add a new button and workflow option from laci AT degas.ceu.hu

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
On Tue, 2009-06-30 at 16:48 +1000, Sam Moffatt wrote:
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> Hi list,
> 
> I am interested in altering ItemRef to add a button that would allow
> users to more fully search for a value by creating a popup window that
> would allow them to find the itemref value and have it then push the
> value into the field. I've had a stab at modifying
> EPrints::MetaField::ItemRef but can't seem to work out how you would
> feed it another param via the workflow system. I feel that this is
> distinct from the input_lookup_url because I aim to popup a new window
> to provide the ability to search for the correct Itemref ID instead of
> having to remember just what number should be used (rather unfriendly). 
> 
> I've had a dig around the code base and nothing immediately obvious
> became apparent. Anyone got any suggestions for how I'd implement this
> feature?

I think the "EPrints" way to do this is to build an InputForm 
component
plugin. If you take a look at
Plugin::InputForm::Component::Field::Subbject (phew) you can see how a
"widget" was built to enable searching of subjects (stuff to do with
_internal_ actions).

I've also done input widgets before that combine an InputForm component
with some AJAX (so you don't need to mess around with _internal_ action
passing).

All the best,
Tim.


[EP-tech] Re: Altering ItemRef to add a new button and workflow option

From: laci AT degas.ceu.hu (Laszlo Csirmaz)
Date: Tue, 14 Jul 2009 14:17:14 +0200 (CEST)


Threading: [EP-tech] Re: Altering ItemRef to add a new button and workflow option from tdb01r AT ecs.soton.ac.uk
      • This Message
             [EP-tech] scroll abstracts from Andrea.Merkle AT unibas.ch
             [EP-tech] Re: scroll abstracts from mmr AT ecs.soton.ac.uk

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi Tim,

> I've also done input widgets before that combine an InputForm component
> with some AJAX (so you don't need to mess around with _internal_ action
> passing).
I am very much interested in this widget. In fact, I want the subject
chooser to be an AJAX file. Any hints how can it be done?

> 
> All the best,
> Tim.
> 

Best,

Laszlo


[EP-tech] scroll abstracts

From: Andrea Merkle <Andrea.Merkle AT unibas.ch>
Date: Wed, 15 Jul 2009 00:36:59 +0200


Threading: [EP-tech] Re: Altering ItemRef to add a new button and workflow option from laci AT degas.ceu.hu
      • This Message
             [EP-tech] Re: scroll abstracts from Andrea.Merkle AT unibas.ch
             [EP-tech] Re: scroll abstracts from mmr AT ecs.soton.ac.uk

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi folks,

as we have very long abstracts on summary page in our repos, it would be 
nice if it scrolls sometimes.

I tried to apply

http://www.eprints.org/tech.php/thread-6707.html

But in eprint_render.pl with

	if( $eprint->is_set( "abstract" ) )
		{
			my $div = $session->make_element( "div", 
					class=>"ep_block" );
			...
			
			my $iframe = $session->make_element( "iframe", 					style=> 
"width:90%", src=> "data=text/html, 
					<html><body>". 								 
$eprint->render_value("abstract"). 
						"</body></html>" );
			$div->appendChild( $iframe );								
		}

it does not work. An error message tells

eprint_status not set
------------------------------------------------------------------
EPrints System Error inducing stack dump
  at /opt/eprints3/perl_lib/EPrints.pm line 91
         EPrints::abort('eprint_status not set') called at 
/opt/eprints3/perl_lib/EPrints/DataObj/EPrint.pm line 544
 
EPrints::DataObj::EPrint::get_dataset('EPrints::DataObj::EPrint=HASH(0x2e5b07c)') 
called at /opt/eprints3/bin/generate_abstracts line 177

Perhaps an error in appliance of DOM with make_element? Could anybody 
indicate the problem?


Best regards,
Andrea



[EP-tech] Re: scroll abstracts

From: Marcus Ramsden <mmr AT ecs.soton.ac.uk>
Date: Wed, 15 Jul 2009 09:13:31 +0100


Threading: [EP-tech] Re: Altering ItemRef to add a new button and workflow option from laci AT degas.ceu.hu
      • This Message

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Why not try using a div with an overflow;

if ( $eprint->is_set( "abstract" ) )
{
	my $div = $session->make_element( "div", 
class=>"ep_block" );
	...
	
	my $abstract_div = $sesssion->make_element( "div", 
style=>"width:  
90%, height: 200px, overflow-y: auto;" );
	$abstract_div->appendChild( $eprint->render_value( "abstract" 
) );
}

This way if the abstract text is long enough and makes the text cause  
the div to go taller than 200px a scrollbar will appear. If you find  
that overflow-y does not work on all browsers give overflow a try.

Marcus

On 14 Jul 2009, at 23:36, Andrea Merkle wrote:

> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> Hi folks,
>
> as we have very long abstracts on summary page in our repos, it  
> would be
> nice if it scrolls sometimes.
>
> I tried to apply
>
> http://www.eprints.org/tech.php/thread-6707.html
>
> But in eprint_render.pl with
>
> 	if( $eprint->is_set( "abstract" ) )
> 		{
> 			my $div = $session->make_element( "div", 
					class=>"ep_block" );
> 			...
> 			
> 			my $iframe = $session->make_element( "iframe", 
					style=>
> "width:90%", src=> "data=text/html, 
					<html><body>". 								
> $eprint->render_value("abstract"). 
						"</body></html>" );
> 			$div->appendChild( $iframe );								
> 		}
>
> it does not work. An error message tells
>
> eprint_status not set
> ------------------------------------------------------------------
> EPrints System Error inducing stack dump
>  at /opt/eprints3/perl_lib/EPrints.pm line 91
>         EPrints::abort('eprint_status not set') called at
> /opt/eprints3/perl_lib/EPrints/DataObj/EPrint.pm line 544
>
> EPrints 
> ::DataObj 
> ::EPrint::get_dataset('EPrints::DataObj::EPrint=HASH(0x2e5b07c)')
> called at /opt/eprints3/bin/generate_abstracts line 177
>
> Perhaps an error in appliance of DOM with make_element? Could anybody
> indicate the problem?
>
>
> Best regards,
> Andrea
>
>


[EP-tech] Re: scroll abstracts

From: Andrea Merkle <Andrea.Merkle AT unibas.ch>
Date: Wed, 15 Jul 2009 16:16:05 +0200


Threading: [EP-tech] scroll abstracts from Andrea.Merkle AT unibas.ch
      • This Message

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi Marcus,

that looks fine. Thank you for the hint.

Could you tell me please in what way overflow-y is perhaps better than 
iframe?

Andrea


> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> Why not try using a div with an overflow;
> 
> if ( $eprint->is_set( "abstract" ) )
> {
> 	my $div = $session->make_element( "div", 
class=>"ep_block" );
> 	...
> 	
> 	my $abstract_div = $sesssion->make_element( "div", 
style=>"width:  
> 90%, height: 200px, overflow-y: auto;" );
> 	$abstract_div->appendChild( $eprint->render_value( 
"abstract" ) );
> }
> 
> This way if the abstract text is long enough and makes the text cause  
> the div to go taller than 200px a scrollbar will appear. If you find  
> that overflow-y does not work on all browsers give overflow a try.
> 
> Marcus
> 
> On 14 Jul 2009, at 23:36, Andrea Merkle wrote:
> 
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** EPrints community wiki - http://wiki.eprints.org/
>> Hi folks,
>>
>> as we have very long abstracts on summary page in our repos, it  
>> would be
>> nice if it scrolls sometimes.
>>
>> I tried to apply
>>
>> http://www.eprints.org/tech.php/thread-6707.html
>>
>> But in eprint_render.pl with
>>
>> 	if( $eprint->is_set( "abstract" ) )
>> 		{
>> 			my $div = $session->make_element( "div", 
					class=>"ep_block" );
>> 			...
>> 			
>> 			my $iframe = $session->make_element( "iframe", 
					style=>
>> "width:90%", src=> "data=text/html, 
					<html><body>". 								
>> $eprint->render_value("abstract"). 
						"</body></html>" );
>> 			$div->appendChild( $iframe );								
>> 		}
>>
>> it does not work. An error message tells
>>
>> eprint_status not set
>> ------------------------------------------------------------------
>> EPrints System Error inducing stack dump
>>  at /opt/eprints3/perl_lib/EPrints.pm line 91
>>         EPrints::abort('eprint_status not set') called at
>> /opt/eprints3/perl_lib/EPrints/DataObj/EPrint.pm line 544
>>
>> EPrints 
>> ::DataObj 
>> ::EPrint::get_dataset('EPrints::DataObj::EPrint=HASH(0x2e5b07c)')
>> called at /opt/eprints3/bin/generate_abstracts line 177
>>
>> Perhaps an error in appliance of DOM with make_element? Could anybody
>> indicate the problem?
>>
>>
>> Best regards,
>> Andrea
>>
>>
> 
> 


-- 
Mit freundlichen Grüssen
Andrea Merkle

******
Projektleitung OAI

Öffentliche Bibliothek der Universität Basel
Schönbeinstrasse 18-20
CH 4056 Basel
+41 61 267 2965
andrea.merkle AT unibas.ch
Erreichbarkeit Am Mo, Mi, Fr Nachmittag,
                und Do, Fr Vormittag.


[EP-tech] Re: scroll abstracts

From: Marcus Ramsden <mmr AT ecs.soton.ac.uk>
Date: Wed, 15 Jul 2009 15:25:10 +0100


Threading: [EP-tech] scroll abstracts from Andrea.Merkle AT unibas.ch
      • This Message

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi Andrea,

I would argue that an iframe is used to render another URL and not  
content that comes down as part of that page request.. Also it's a  
case that some browsers may have a hiccup with iframes, although  
without googling around the place I am not sure of the truthfulness of  
this statement :)

Marcus

On 15 Jul 2009, at 15:16, Andrea Merkle wrote:

> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> Hi Marcus,
>
> that looks fine. Thank you for the hint.
>
> Could you tell me please in what way overflow-y is perhaps better than
> iframe?
>
> Andrea
>
>
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** EPrints community wiki - http://wiki.eprints.org/
>> Why not try using a div with an overflow;
>>
>> if ( $eprint->is_set( "abstract" ) )
>> {
>> 	my $div = $session->make_element( "div", 
class=>"ep_block" );
>> 	...
>> 	
>> 	my $abstract_div = $sesssion->make_element( "div", 
style=>"width:
>> 90%, height: 200px, overflow-y: auto;" );
>> 	$abstract_div->appendChild( $eprint->render_value( 
"abstract" ) );
>> }
>>
>> This way if the abstract text is long enough and makes the text cause
>> the div to go taller than 200px a scrollbar will appear. If you find
>> that overflow-y does not work on all browsers give overflow a try.
>>
>> Marcus
>>
>> On 14 Jul 2009, at 23:36, Andrea Merkle wrote:
>>
>>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** EPrints community wiki - http://wiki.eprints.org/
>>> Hi folks,
>>>
>>> as we have very long abstracts on summary page in our repos, it
>>> would be
>>> nice if it scrolls sometimes.
>>>
>>> I tried to apply
>>>
>>> http://www.eprints.org/tech.php/thread-6707.html
>>>
>>> But in eprint_render.pl with
>>>
>>> 	if( $eprint->is_set( "abstract" ) )
>>> 		{
>>> 			my $div = $session->make_element( "div", 					 
>>> class=>"ep_block" );
>>> 			...
>>> 			
>>> 			my $iframe = $session->make_element( "iframe", 
					style=>
>>> "width:90%", src=> "data=text/html, 
					<html><body>". 								
>>> $eprint->render_value("abstract"). 
						"</body></html>" );
>>> 			$div->appendChild( $iframe );								
>>> 		}
>>>
>>> it does not work. An error message tells
>>>
>>> eprint_status not set
>>> ------------------------------------------------------------------
>>> EPrints System Error inducing stack dump
>>> at /opt/eprints3/perl_lib/EPrints.pm line 91
>>>        EPrints::abort('eprint_status not set') called at
>>> /opt/eprints3/perl_lib/EPrints/DataObj/EPrint.pm line 544
>>>
>>> EPrints
>>> ::DataObj
>>> ::EPrint::get_dataset('EPrints::DataObj::EPrint=HASH(0x2e5b07c)')
>>> called at /opt/eprints3/bin/generate_abstracts line 177
>>>
>>> Perhaps an error in appliance of DOM with make_element? Could  
>>> anybody
>>> indicate the problem?
>>>
>>>
>>> Best regards,
>>> Andrea
>>>
>>>
>>
>>
>
>
> -- 
> Mit freundlichen Grüssen
> Andrea Merkle
>
> ******
> Projektleitung OAI
>
> Öffentliche Bibliothek der Universität Basel
> Schönbeinstrasse 18-20
> CH 4056 Basel
> +41 61 267 2965
> andrea.merkle AT unibas.ch
> Erreichbarkeit Am Mo, Mi, Fr Nachmittag,
>                und Do, Fr Vormittag.

Marcus Ramsden
Technical Project Assistant
Learning Societies Laboratory, Electronics and Computer Science
University of Southampton
Room 3069, Building 32, Highfield Campus
Southampton SO17 1BJ
http://www.ecs.soton.ac.uk
------------------------------------
Skype: cuscus1986






[index] [options] [help]