[BlueBream] Javascript

Baiju M baiju.m.mail at gmail.com
Wed Mar 24 22:53:27 EDT 2010


Hi Paul,
           I don't know the answer for @@ , ++resource++ and ++view++
I hope you don't mind forwarding this mail to list.

Can anyone clarify this ?

Thanks,
Baiju M

On Thu, Mar 25, 2010 at 1:46 AM, Paul Harouff <pharouff at gmail.com> wrote:
> The documentation is very incomplete on this. Following the directions
> to set up the resource directory was okay, but it only tells you how
> to access the files from a browser using a URL (i.e.,
> @@/subfolders/filename.ext). It says nothing about how to access the
> file directly from inside a template file or script file (i.e.,
> ++resource++resourcename/subfolders/filename.ext).
>
> The second page didn't explain the proper syntax either, but it gave
> me enough information to figure it out on my own after 3 or 4
> attempts.
>
> I still don't understand the difference between @@ = ++view++ on the
> first page and @@ = ++resource++ on the second page.
>
>
> I have a folder "js" containing a script file ietm.js and a subfolder
> "img" with images like folder.gif
>
> First, in configure.zcml, I registered the javascript folder:
>
>  <browser:resourceDirectory
>     name="js"
>     directory="js"
>     />
>
> Then, in index.pt, I changed the reference to the script file as follows:
>
>    <SCRIPT type="text/javascript" src="++resource++js/ietm.js"></SCRIPT>
>
> Then, in ietm.js, I globally changed every reference to
> 'img/folder.gif' as follows:
>
>    folder    : '++resource++js/img/folder.gif',
>
>
> Now it works.
>
>
> Paul
>
>
> On Tue, Mar 23, 2010 at 9:15 PM, Baiju M <baiju.m.mail at gmail.com> wrote:
>> On Wed, Mar 24, 2010 at 7:30 AM, Paul Harouff <pharouff at gmail.com> wrote:
>>> I have ported an index.html file over to blubream index.pt file. Three
>>> files, ietm.css, ietm.js, and TBE_icon_small.png, are also in the
>>> src/csdb/main folder.
>>>
>>> When I restart the server, I can open @@index, but it does not appear
>>> to be loading ietm.css and ietm.js when they are referenced in
>>> index.pt.
>>>
>>> Below is a snippet of the top of the file (it is pretty huge). When I
>>> open the page, the formatting isn't even close to what is specified in
>>> the CSS. The logo at the top of the page is missing. And the Firefox
>>> error console says it is complaining it can't find the function
>>> pageLoad() which is the very first function in the ietm.js file.
>>>
>>> What am I doing wrong? Does bluebream need me to do something more
>>> than just placing these files in the same folder?
>>
>> Please look at this manual:
>> http://bluebream.muthukadan.net/doc/1.0/manual/browserresource.html
>>
>> There is a community package also:
>> http://wiki.zope.org/bluebream/BrowserResource
>>
>> Please let me know, if anything is confusing in that documentation.
>> (This is work in progress)
>>
>> Regards,
>> Baiju M
>>
>


More information about the bluebream mailing list