using non-block xforms-loading-loading

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

using non-block xforms-loading-loading

Adrian Baker-2
I'm trying to display the loading span inline - unfortunately xforms.js
effectively hardcodes it to being block level:

function xformsDisplayIndicator(state) {
    switch (state) {
        case "loading" :
            if (document.xformsLoadingLoading != null)
                document.xformsLoadingLoading.style.display = "block";
            if (document.xformsLoadingError != null)
                document.xformsLoadingError.style.display = "none";
            if (document.xformsLoadingNone != null)
                document.xformsLoadingNone.style.display = "block";
            break;
        case "error":
            if (document.xformsLoadingLoading != null)
                document.xformsLoadingLoading.style.display = "none";
            if (document.xformsLoadingError != null)
                document.xformsLoadingError.style.display = "block";
            if (document.xformsLoadingNone != null)
                document.xformsLoadingNone.style.display = "none";
            break;
        case "none":
            if (document.xformsLoadingLoading != null)
                document.xformsLoadingLoading.style.display = "none";
            if (document.xformsLoadingError != null)
                document.xformsLoadingError.style.display = "none";
            if (document.xformsLoadingNone != null)
                document.xformsLoadingNone.style.display = "block";
            break;
    }
}

This is a pity - would it better to instead add/remove a CSS class which
has display:none specfied? (eg .xforms-disabled, or create a new one) ?
This way any prexisting display style isn't blown away.

Adrian



--
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: using non-block xforms-loading-loading

Alessandro  Vernet
Administrator
On 4/5/06, Adrian Baker <[hidden email]> wrote:
> This is a pity - would it better to instead add/remove a CSS class which
> has display:none specfied? (eg .xforms-disabled, or create a new one) ?
> This way any prexisting display style isn't blown away.

Adrian,

Yes, it would make sense to use classes. We do this in several other
cases, and I am not sure why we don't do it as well for the loading,
error, and none spans! Here again, feel free to modify the code, send
us the files you have modified and we'll integrate put those changes
in the source tree.

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet