Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: r3822/3: New Sections panel
@phiw13
I was hoping that since the button is already within a wrapper of .txp-edit-action
and the only other item within that wrapper is an input[type="submit"]
I could get away without adding another class? What do you think?
Offline
Re: r3822/3: New Sections panel
phiw13 wrote:
It is the only use of
<button>
in the admin backend so far, but still.
I was looking at <button>
tags the other day. We need to bear in mind that the destination action is to go back to the List panel, possibly (err, probably!) retaining any search criteria so it really needs to have an anchor like this:
http://site.com/textpattern/index.php?event=section&name=articles&sort=name&dir=asc&page=1&search_method=name&crit=some_search_term
Does <button>
support that? I think I read that you can’t put an anchor inside a button, but that might have been from w3fools so it probably didn’t count for much.
Last edited by Bloke (2012-06-24 11:49:18)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: r3822/3: New Sections panel
Bloke wrote:
Does
<button>
support that? I think I read that you can’t put an anchor inside a button, but that might have been from w3fools so it probably didn’t count for much.
As far as I know, element a
cannot appear as a descendant of the button
element. I’m searching through the HTML5 spec, will report back if otherwise. Can’t you just send something like javascript history.go(-1);
or something similar ? (haven’t given it any thought, mind…)
philwareham wrote:
I was hoping that since the button is already within a wrapper of
.txp-edit-action
and the only other item within that wrapper is aninput[type="submit"]
I could get away without adding another class? What do you think?
Hmm, but what if you add a similar action (cancel) in another context ? You’ve added so many classes that one more or less won’t kill anybody.
Anyway, given what Stef notes, button
might not be the most appropriate markup.
Last edited by phiw13 (2012-06-24 12:01:07)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: r3822/3: New Sections panel
OK, I’ll await your findings, then take it from there. If we keep button I’ll add a class.
BTW Stef, just add ‘mdn’ to any google searches you do regarding HTML elements, that should bring up docs from Mozilla Developer Network instead of W3C Schools. Much more reliable.
Last edited by philwareham (2012-06-24 12:00:25)
Offline
Re: r3822/3: New Sections panel
I wrote:
As far as I know, element
a
cannot appear as a descendant of thebutton
element. I’m searching through the HTML5 spec, will report back if otherwise.
HTMl5 spec on the button
element is categorical, here:
Phrasing content, but there must be no interactive content descendant.
(the link element is interactive content).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: r3822/3: New Sections panel
So… we use a link and style it up to look like a button. Everyone happy with that? (I’ll put a class on said link too).
Offline
Re: r3822/3: New Sections panel
philwareham wrote:
So… we use a link and style it up to look like a button. Everyone happy with that? (I’ll put a class on said link too).
That or some JavaScript. Some common classes with some JavaScript attached, and data-
params (yes, leads to invalid HTML but how gives a damn when it’s bound to change to HTML5 — or you could as well change it right now, it’s not going to break the admin-pages).
As Cancel buttons go, I’m not really fond of those. Save and cancel buttons in general are overrated and should be avoided if possible. Especially Cancel as it makes it sound as like you could Cancel your latest changes you made, which in most cases isn’t the case at all.
Which reminds me that open source projects have the trend of having fake cancel buttons all over the place. God I love GUIs build for command line tools for that reason.
Offline
Re: r3822/3: New Sections panel
@gocom
HTML5 admin side will have to wait for v4.6.
Do you think just having a close icon on modal boxes is enough, or do you think cancel buttons are ok on modals?
Offline
Offline
Re: r3822/3: New Sections panel
I think I’ll keep this whole ‘cancel’ button issue on the back-burner for now. It only becomes relevant for modals anyway – we’ve lived this long without a cancel button just fine so it can wait until v4.6.
It would be stupid to add it in now, then rip it out again in one release’s time.
Offline
Re: r3822/3: New Sections panel
philwareham wrote:
I’d rather they were links, not buttons
Seven little words…
… and seven KB of changes later (yes, really), I have the prototype done. Now I remember why I left it as a form, sheesh! But it’s worth it because it’ll make the jump to a modal window a lot simpler.
I’ve dumped the code in Phil’s lap to see if he can a) break it, and b) style the link appropriately. Assuming I’ve caught all the edge cases and he can make it pretty, it’ll be committed soon. Then I’ll do the other affected panels to bring them into line.
Last edited by Bloke (2012-06-24 20:03:43)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: r3822/3: New Sections panel
philwareham wrote:
EDIT: also, we are considering removing the ‘odd’ and ‘even’ classes from table
tbody
rows. Now that table layouts throughout the admin-side are tidied up this can be achieved withnth-child
CSS rules by theme authors instead (OK, I know IE8 and below don’t support that rule but since it’s purely aesthetic we can accept that regression, right?).
You know, using :nth-child()
causes a (minor) problem on the Preferences Pane. It also catches the table rows that contain the h3
s on the basic and advanced panels. Nothing that can’t be worked around, I just thought I mention it as fwiw.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline