Priority: Normal
Current State: Being Worked On
Released In: n/a
Target Release: major
Applies To: Extension
Component:
Branches:
I would like to use the same buttons in one skin. Currently we have
BUTTON
buttons and pattern skin buttons. That doesn't look professional. Ideally the skin uses
BUTTON
in all instances, skinned for the specific skin.
Before this can happen, a number of features need to be implemented to
BUTTON
:
- possibility to have the button generated as link (no button style and no icon, as in the topic actions at the page bottom)
- pass
text
, title
and accesskey
so they can be translated as one sentence (otherwise the 'accesskey' string is out of context, lost in the .po
file). For example, this would be used in the template: %MAKETEXT{"text='Edit' accesskey='e' title='Edit this topic text'"}%
. Alas BUTTON
(and other macros?) does not read the single quotes.
- disabled state: not clickable, "grayed out" link and button graphic
- skinnable graphic and label style, ideally size as well
Additional requirements that
MichaelDaum has posed for compatibility with older installations:
- CSS classes should not change names
- The CSS should be kept with the jquery button plugin
I have created CSS styled buttons and links that can be used as replacement for the current style that BUTTON generates, that:
- do not use a background image
- have skinnable colors (and gradient)
- have rounded borders on modern browsers (mac, ie9)
- work across all major browsers (gradients, icons, rounded borders only mac and new win browsers)
- can have an optional icon like current BUTTON
- do not use
float
, so no %CLEAR%
needed to prevent overlapping page elements
BUTTON macro: |
%BUTTON{"Create a new topic" icon="add"}% |
Renders: |
Create a new topic |
HTML: |
<a class="jqButton jqButtonDefault jqInitedButton" href="#"><span><span class="jqButtonIcon" style="background-image:url(%PUBURLPATH%/%SYSTEMWEB%/DocumentGraphics/add.png)">Create a new topic</span></span></a> |
Keep using BUTTON macro: |
%BUTTON{"Create a new topic" icon="add"}% |
To render: |
Create a new topic |
HTML: |
same HTML |
And the ability to write: |
<button type="submit" class="xjqButton" name="action_button">Create new topic</button> |
Or to write: |
<a href="#" class="xjqButton">Create new topic</a> |
And the ability to have disabled buttons: |
<a href="#" class="xjqButton xjqButtonDisabled">Edit</a> |
Rendered examples
(view in trunk to see icons)
CSS
See topic source. For each
xjqButton
, the
x
will be removed in implementation.
To resolve
- BUTTON macro:
- CSS:
- You cannot use
jqButtonDisabled
and jqButtonRed
at the same time. Perhaps a class jqButtonEnabled
is needed.
- How to add skinning if this jquery button css is loaded after the skin css? Somehow the skin css should be loaded after plugin css.
--
ArthurClemens - 14 Nov 2010
I have attached the css that could be used by jquery button.
jquery.button2.css: Alternative jquery button css
--
ArthurClemens - 18 Jan 2011