myexperiment-discuss
[Top][All Lists]
Advanced

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

Re: [Myexperiment-discuss] adding stuff


From: Danius Michaelides
Subject: Re: [Myexperiment-discuss] adding stuff
Date: Tue, 1 Jul 2008 16:08:32 +0100 (BST)

On Mon, 30 Jun 2008, David R Newman wrote:

2. You could create you own SKUA javascript file but I sense there is not too much code so you might as well add it to application.js in the public/javascripts directory. A function to load the app I would guess wold look a bit like the one below.

I think you'd be better off changing app/views/layouts/application.rhtml
and include:
<%= javascript_include_tag "skua.js"%>
near the end of the <head> section of the html document eg near the one for
"boxover.js". And do the same for public/index.html if you wanted it on the
front page.

function loadSkuaApp() {
var url = "<%= SAC_ENDPOINT %>" //Plus any additional information it can be passed on loading.
window.open(url);
}

Just to be clear, this should go in a .rhtml file and not a .js file as
rails wont look into a .js file ie to expand the SAC_ENDPOINT. Again, you
could put in <script> </script> tags in app/views/layouts/application.rhtml.
(Apparently you can have .rjs files, if you're dead-set on having
SAC_ENDPOINT in a seperate javascript file).

If you're worried about adding too much to the application.rhtml file you
could pull the SKUA specific stuff out to a separate file and render it
as a partial. For example, this is done in application.rhtml for the
feed_link_tags partial, so just copy that.

3. an icon and text next to (initially) each workflow in the Workflows
tab and in the individual workflow page such that clicking the icon/text
will call a function in the Javascript file passing it the workflow
metadata and SAC endpoint.

What happens next? - is there a SAC plugin or java applet?
(I'm concerned that if you're doing something javascript/dhtml you'll hit
browser imposed restrictions on what sites can be contacted ie you might be
denied access to SAC_ENDPOINT).

Regards,
Danius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]