Problem changing actb_delimiter in suggest-actb-min.js

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem changing actb_delimiter in suggest-actb-min.js

Henrik Pettersen
All,

I am having some difficulties in modifying the suggest-actb-min.js javascript, when the same changes to suggest-actb.js works just fine.

I am using the nightly build from April 7, but have had this issue for about 6 months. Platform is Mozilla Firefox 2.0.0.3 and Tomcat 5.

Purpose:
To add additional delimiters to the predictive text option, such that ",", "(" and "~" demarkates the beginning of a new word for the predictive text.

Steps to reproduce:

1. In suggest-actb.js, I am changing this line [13]:
         actb_self.actb_delimiter = new Array();
to
         actb_self.actb_delimiter = new Array('(', ',', '~');


2. In resources/config/properties.xml, I am changing this line [62]:
        <property as="xs:boolean" name="oxf.xforms.minimal-resources" value="true"/>
to
        <property as="xs:boolean" name=" oxf.xforms.minimal-resources" value="false"/>


3. Note that the new delimiter characters work perfectly


4. Now modify suggest-actb-min.js:
         actb_self.actb_delimiter = new Array();
to
         actb_self.actb_delimiter = new Array('(', ',', '~');


5. In resources/config/properties.xml, I am changing this line [62] back:
        <property as="xs:boolean" name=" oxf.xforms.minimal-resources" value="false"/>
to
        <property as="xs:boolean" name="oxf.xforms.minimal-resources" value="true"/>


6. Note that the predictive text option now displays, but each line in the predictive text box is blank and much narrower. There does , however, seem to the right number of lines available for the predictive text - they are just not displaying the text. And selecting one of the (invisible) lines does indeed fill the form field with the correct text.

I am finding it near impossible to debug this because of 1) my limited javascript skills, and 2) the unreadability of the minimal version. Has anyone else seen this problem before? Is this Orbeon produced javascript, or is it part of some generic library? Is the min version somehow generated from the readable version? If so, how?

Any insight would be greatly appreaciated.

Thanks!

Sincerely,
Henrik Pettersen
Cancer Research UK
http://www.acl.icnet.uk/lab/aspic.html




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem changing actb_delimiter in suggest-actb-min.js

Erik Bruchez
Administrator
Henrik,

> I am finding it near impossible to debug this because of 1) my limited
> javascript skills, and 2) the unreadability of the minimal version.

For 2), you can simply disable minimal resources in properties.xml.

<property as="xs:boolean" name="oxf.xforms.minimal-resources"
          value="false"/>

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem changing actb_delimiter in suggest-actb-min.js

Alessandro Vernet
Administrator
On 4/11/07, Erik Bruchez <[hidden email]> wrote:
> Henrik,
>
> > I am finding it near impossible to debug this because of 1) my limited
> > javascript skills, and 2) the unreadability of the minimal version.
>
> For 2), you can simply disable minimal resources in properties.xml.
>
> <property as="xs:boolean" name="oxf.xforms.minimal-resources"
>           value="false"/>

Henrik,

You can also just copy your modified suggest-actb.js over
suggest-actb-min.js. So all the other JavaScript files will use the
minimal version, except that one.

This also is what we have done for some of the JavaScript files that
ship with Orbeon Forms. For instance we have done a number of
modifications to the YUI library (all documented in the project Wiki).
When the changes are simple enough we also apply them to the -min
file, otherwise we just copy the regular file over the -min file. All
this to say that you don't need to feel bad if you are doing the same
for suggest-actb-min.js :).

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem changing actb_delimiter in suggest-actb-min.js

Henrik Pettersen
Alex,

great idea! I shall do that, then....

Thanks!

Henrik

On 4/12/07, Alessandro Vernet <[hidden email]> wrote:
On 4/11/07, Erik Bruchez <[hidden email]> wrote:
> Henrik,
>
> > I am finding it near impossible to debug this because of 1) my limited
> > javascript skills, and 2) the unreadability of the minimal version.
>
> For 2), you can simply disable minimal resources in properties.xml.
>
> <property as="xs:boolean" name="oxf.xforms.minimal-resources"
>           value="false"/>

Henrik,

You can also just copy your modified suggest-actb.js over
suggest-actb-min.js. So all the other JavaScript files will use the
minimal version, except that one.

This also is what we have done for some of the JavaScript files that
ship with Orbeon Forms. For instance we have done a number of
modifications to the YUI library (all documented in the project Wiki).
When the changes are simple enough we also apply them to the -min
file, otherwise we just copy the regular file over the -min file. All
this to say that you don't need to feel bad if you are doing the same
for suggest-actb-min.js :).

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws