[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Myexperiment-discuss] adding stuff
From: |
Linde, A.E. |
Subject: |
RE: [Myexperiment-discuss] adding stuff |
Date: |
Wed, 2 Jul 2008 06:33:21 +0100 |
It does indeed help, Dave. Much easier. Thanks.
Hope you finally got some sleep :)
t.
________________________________________
From: David R Newman address@hidden
Sent: 01 July 2008 22:31
To: 'Linde, A.E.'
Subject: RE: [Myexperiment-discuss] adding stuff
Hi Tony,
There is a slightly hacky solution to save writing a
icon_use_javascript_func()
<%= icon('skua','#', nil, {:onclick => "skua_func(#{SAC_ENDPOINT})"}, 'SKUA'
) %>
Where skua_func is in skua.js which has been included in the html head and
has the javascript to load the SKUA app. You may need to include extra
parameters in skua_func, I am not sure what these might be but can be added
in the form address@hidden
Hope this helps,
Dave Newman
myExperiment Team Member
-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Linde, A.E.
Sent: 01 July 2008 18:20
To: address@hidden
Subject: RE: [Myexperiment-discuss] adding stuff
You guessed it, Danius!
I modified application.rhtml and added
<script type="text/javascript">var sacEndpoint = "<%=
SAC_ENDPOINT %>"</script>
<%= javascript_include_tag "skua.js" %>
and views/workflows/_table.rhtml to add:
<%= icon "skua", SAC_ENDPOINT, nil, nil,
"SKUA" %>
with the appropriate icons, js file etc added in the right places (was
mainly trying to see what would and wouldn't work: putting call to js
funciton in the icon url space certainly didn't!).
[[What happens next?]]
That's what I'm trying to figure out. I could use the url in the icon line
to invoke my app, eg
<%= icon "skua",
"http://spacebook.myskua.org/wf=1&ep="+SAC_ENDPOINT, nil, nil, "SKUA" %>
or have the icon call a function in the skua.js file: how would I do that,
the icon method in application_helper.rb assumes the second parameter is a
url: do I need to define a icon_use_js_func() method?
Cheers,
Tony.
_______________________________________________
Myexperiment-discuss mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/myexperiment-discuss
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.101 / Virus Database: 270.4.3/1528 - Release Date: 01/07/2008
07:26