jQButton - adding additional classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

jQButton - adding additional classes

John Toohey
Hi,
I want to add 'ui-state-disabled' to a JQButton. The widget hierarchy does not respond to #addClass and if I add it to the WAButton, its ignored/over-written by the jQuery script.  Using #option:at gives me the desired class, but removes all the others.

I'm using it like this :-

html button
    bePush;
    script: ((html jQuery this) button primaryIcon: 'ui-icon-refresh'; text: true);
    onClick: ((html jQuery ajax) callback: []);
    with: 'Update'.

and would like to (conditionally) add the 'ui-state-disabled'. 

--
~JT



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: jQButton - adding additional classes

Robert Sirois
Toggle class?

RS


Date: Wed, 6 Apr 2011 23:10:44 -0400
From: [hidden email]
To: [hidden email]
Subject: [Seaside] jQButton - adding additional classes

Hi,
I want to add 'ui-state-disabled' to a JQButton. The widget hierarchy does not respond to #addClass and if I add it to the WAButton, its ignored/over-written by the jQuery script.  Using #option:at gives me the desired class, but removes all the others.

I'm using it like this :-

html button
    bePush;
    script: ((html jQuery this) button primaryIcon: 'ui-icon-refresh'; text: true);
    onClick: ((html jQuery ajax) callback: []);
    with: 'Update'.

and would like to (conditionally) add the 'ui-state-disabled'. 

--
~JT



_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: jQButton - adding additional classes

John Toohey
On what? The JQButton classes do not have any class methods. Do you have a code snippet for what you mean?

On Wed, Apr 6, 2011 at 23:50, Robert Sirois <[hidden email]> wrote:
Toggle class?

RS


Date: Wed, 6 Apr 2011 23:10:44 -0400
From: [hidden email]
To: [hidden email]
Subject: [Seaside] jQButton - adding additional classes


Hi,
I want to add 'ui-state-disabled' to a JQButton. The widget hierarchy does not respond to #addClass and if I add it to the WAButton, its ignored/over-written by the jQuery script.  Using #option:at gives me the desired class, but removes all the others.

I'm using it like this :-

html button
    bePush;
    script: ((html jQuery this) button primaryIcon: 'ui-icon-refresh'; text: true);
    onClick: ((html jQuery ajax) callback: []);
    with: 'Update'.

and would like to (conditionally) add the 'ui-state-disabled'. 

--
~JT



_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
~JT



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: jQButton - adding additional classes

John Toohey
... any methods to add or remove CSS classes.

On Thu, Apr 7, 2011 at 00:37, John Toohey <[hidden email]> wrote:
On what? The JQButton classes do not have any class methods. Do you have a code snippet for what you mean?

On Wed, Apr 6, 2011 at 23:50, Robert Sirois <[hidden email]> wrote:
Toggle class?

RS


Date: Wed, 6 Apr 2011 23:10:44 -0400
From: [hidden email]
To: [hidden email]
Subject: [Seaside] jQButton - adding additional classes


Hi,
I want to add 'ui-state-disabled' to a JQButton. The widget hierarchy does not respond to #addClass and if I add it to the WAButton, its ignored/over-written by the jQuery script.  Using #option:at gives me the desired class, but removes all the others.

I'm using it like this :-

html button
    bePush;
    script: ((html jQuery this) button primaryIcon: 'ui-icon-refresh'; text: true);
    onClick: ((html jQuery ajax) callback: []);
    with: 'Update'.

and would like to (conditionally) add the 'ui-state-disabled'. 

--
~JT



_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________



--
~JT





--
~JT



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: jQButton - adding additional classes

mmimica
In reply to this post by John Toohey
John Toohey wrote:
> Hi,
> I want to add 'ui-state-disabled' to a JQButton. The widget hierarchy
> does not respond to #addClass and if I add it to the WAButton, its
> ignored/over-written by the jQuery script.  Using #option:at gives me
> the desired class, but removes all the others.
>

This bugged my too for a while. I figured out this way: mark the element
(conditionally) with a class ('disabled-button' in this example) and perform a
script like this:

parentElement script: ((html jQuery this find: '.disabled-button') addClass:
'ui-state-disabled');




--
Milan Mimica
http://sparklet.sf.net
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside