Dear all,
does anyone know how do I: - customize the "Loading..." label (the one in the top-right corner) - localize the YUI calendar. As regards the YUI calendar, I've tried copying out the xforms.js from the orbeon-resources-public.jar out to resources/ops/javascript (as far as I remember, the same as in the JAR) directory, adding the appropiate entries ("pl": ...), but it didn't work out. I'm using cached, combined, minimal resources, and when I deleted the xforms-yuicalendar-min.js it was recreated but still without my changes. Perhaps I should run the minimizer tool (where do I get it from?) and put the minimized extended version in resources/ops/javascript as well? Another thing is how does Orbeon decide about the language to use - is the choice based on the browser preferences (accepted languages order), host OS settings ($LANG) or document (xml:lang)? Yet another small issue is customization of the JS error dialog, namely I've put the following content to the resources/config directory: ------------------------------------------------------------ <div xmlns="http://www.w3.org/1999/xhtml" class="xforms-error-panel xforms-initially-hidden"> <div class="hd">This text DOES NOT appear</div> <div class="bd"> <p> This thing appears, and everything else below as well. </p> <div class="xforms-error-panel-details-hidden"> [...] </div> </div> </div> ------------------------------------------------------------ and the contents on the dialog appear just fine, but the top bold label does not change - I still see "An error has occured", although the text in div class="hd" has been altered. Thanks in advance, best regards, Maciej |
Hi,
This is how I patched the YUI calendar: Extract xforms.js from orbeon-resources-public.jar to <Orbeon-App>/WEB-INF/resources/ops/javascript. Add the "pl" l10n to the variable RESOURCES. Configure Orbeon to not use minimized resources (see Orbeon Configuration). Set <html lang="pl"> in your XForms. I didn't try to minimize it... I guess you need to run the build.xml from the source... Baschir Maciej Arciuch schrieb: > Dear all, > > does anyone know how do I: > > - customize the "Loading..." label (the one in the top-right corner) > - localize the YUI calendar. > > As regards the YUI calendar, I've tried copying out the xforms.js from the > orbeon-resources-public.jar out to resources/ops/javascript (as far as I > remember, the same as in the JAR) directory, adding the appropiate entries > ("pl": ...), but it didn't work out. I'm using cached, combined, minimal > resources, and when I deleted the xforms-yuicalendar-min.js it was recreated > but still without my changes. Perhaps I should run the minimizer tool (where > do I get it from?) and put the minimized extended version in > resources/ops/javascript as well? > > Another thing is how does Orbeon decide about the language to use - is the > choice based on the browser preferences (accepted languages order), host OS > settings ($LANG) or document (xml:lang)? > > Yet another small issue is customization of the JS error dialog, namely I've > put the following content to the resources/config directory: > > ------------------------------------------------------------ > <!-- > Copyright (C) 2007 Orbeon, Inc. > > This program is free software; you can redistribute it and/or modify it > under the terms of the > GNU Lesser General Public License as published by the Free Software > Foundation; either version > 2.1 of the License, or (at your option) any later version. > > This program is distributed in the hope that it will be useful, but > WITHOUT ANY WARRANTY; > without even the implied warranty of MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. > See the GNU Lesser General Public License for more details. > > The full text of the license is available at > http://www.gnu.org/copyleft/lesser.html > --> > <div xmlns="http://www.w3.org/1999/xhtml" > class="xforms-error-panel xforms-initially-hidden"> > <div class="hd">This text DOES NOT appear</div> > <div class="bd"> > <p> > This thing appears, and everything else below as well. > </p> > <div class="xforms-error-panel-details-hidden"> [...] </div> > </div> > </div> > ------------------------------------------------------------ > > and the contents on the dialog appear just fine, but the top bold label does > not change - I still see "An error has occured", although the text in div > class="hd" has been altered. > > Thanks in advance, best regards, Maciej > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by Maciej Arciuch
Maciej,
On Mon, Nov 2, 2009 at 12:53 AM, Maciej Arciuch <[hidden email]> wrote: > - customize the "Loading..." label (the one in the top-right corner) You can change the style, say if you want the background to be yellow instead of red, by overriding the CSS class xforms-loading-loading. The text ("Loading...") is hardcoded in the Java code right now, and if you need to override it, you can do so in your theme XSL. > - localize the YUI calendar. See Baschir's response on this, and let us if anything isn't clear. And, yes, this is not ideal. In a better world, you'd have one place where you can localize all the platform-specific resources. We have been thinking of ways to do that, but didn't get to implement it yet. Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Thanks for your answer. I've tried it and it doesn't work - the "Loading..." label is changed, but in a span that is not actually shown and it seems that client-side JS code replaces the span with a new span with the old default label and different attributes the first time the red box is shown. Where does it take that label from? My code in theme-plain.xsl is: <xsl:template match="xhtml:span[contains(@class,'xforms-loading-loading')]"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:text>my text here</xsl:text> </xsl:copy> </xsl:template> When I load the page, Firebug shows only the modified span, but later a new one appears, with the old label. Anyways, what about the error-dialog issue? How can I change its header? Orbeon seems doesn't respect the new header from a custom error-dialog.xml. And how do make changes to e.g. xforms.js in resources JAR if I have minimized resources turned on? I hope I don't abuse you patience, thanks in advance, Maciej |
Administrator
|
Maciej,
On Thu, Nov 5, 2009 at 2:50 AM, Maciej Arciuch <[hidden email]> wrote: > Thanks for your answer. I've tried it and it doesn't work - the "Loading..." > label is changed, but in a span that is not actually shown and it seems that > client-side JS code replaces the span with a new span with the old default > label and different attributes the first time the red box is shown. Where > does it take that label from? Ah, good point, this doesn't work because a hard-coded value in xforms.js is used. You'll find this towards the top of the file: var DEFAULT_LOADING_TEXT = "Loading..."; I have been considering to keep the value in the span instead of using DEFAULT_LOADING_TEXT, but this is not just done in 1 line of code, since the content of the span can be replaced by a value you provide with xxforms:progress-message="..." (http://www.orbeon.com/ops/doc/reference-xforms-guide#dispatch-delay). Also, ultimately this is something we want to change so the message can be localized and can change as the html/@lang changes. So for now I recommend you change xforms.js, instead of the theme. Sorry to have mislead you! Again, this is not ideal, but I believe you had to change that file anyway for the calendar i18n, so at least you'll just have one file to change. > And how do make changes to e.g. xforms.js in resources JAR if I have > minimized resources turned on? Make your changes in xforms.js. Place your xforms.js in your WEB-INF/resources/ops/javascript. Compress it using the YUI Compressor (http://developer.yahoo.com/yui/compressor/). You can download it and run it from the command line, or you can use one of the online versions that people put up (do a search for "yui compressor online"). Name the compressed file xforms-min.js, and put it in the same directory as xforms.js. Or if you have the Orbeon Forms source code checked out, you can run "ant orbeon-minify-js". Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |