Textpattern CMS support forum

You are not logged in. Register | Login | Help

#101 2016-08-29 18:19:13

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 983
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

Where is a good place to put JavaScript to be loaded on the admin panel (specifically for the Write panel), that won’t be wiped when I upgrade Textpattern again?

I find I’m very used to the “Save/Publish” button being below all the toggles on the right, and I’d like to .clone() it so it appears there in the DOM.

Is bot_wtc the best way to do this, or is there a better way now?

Thanks!

Offline

#102 2016-08-29 18:25:03

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,175
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

johnstephens wrote #300855:

Where is a good place to put JavaScript to be loaded on the admin panel (specifically for the Write panel), that won’t be wiped when I upgrade Textpattern again?

Info here

PS. I will release beta3 tomorrow everyone when I’m back in the work office.

Offline

#103 2016-08-29 20:32:15

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,191

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

assets → css → custom.css
assets → css → custom.js

define(‘admin_custom_css’, ‘your_custom_rules.css’);
define(‘admin_custom_js’, ‘your_custom_javascript.js’);

Very grateful for both of these, Phil! :)
(And hat tip towards GugUser.)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#104 2016-08-29 20:45:01

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,175
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

Actually I think it should be assets -> js -> custom.js

Will check in the morning and amend if necessary.

Offline

#105 2016-08-30 00:04:26

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,625
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

Quick Q (nitpicking maybe?) regarding the tag builder (more exactly, the tag builder link on the Pages & Forms panels)

The mockups (here and here) have that link inserted adjacent to the label for the textarea (“page code”), where as the current code in Core has the link inserted before that label.

Current Core code on Pages panel:

<a class="txp-tagbuilder-dialog" href="#"><span class="ui-icon ui-extra-icon-code"></span> Tag builder</a>
<div class="txp-form-field">
<div class="txp-form-field-label"><label for="html">Page code</label></div>
<div class="txp-form-field-value"><textarea class="code" id="html" name="html" cols="64" rows="32" dir="ltr" spellcheck="false">//code in here</textarea></div>
</div>

Which one is the desired code? I think I prefer the code as seen in the mock ups, it makes more sense accessibility wise.

Last edited by phiw13 (2016-08-30 00:10:17)

Offline

#106 2016-08-30 06:25:41

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,175
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

@philw agreed, it should be as in the mocks. Will fix today. Good spot!

Offline

#107 2016-08-30 08:32:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,620
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

philwareham wrote #300866:

it should be as in the mocks. Will fix today.

Good luck fixing it :-) I couldn’t get it working when I did it last week, hence I added it before the textarea and label.

Four options:

  • Drop the inputLabel() and construct by hand, which then removes the ability for plugins to chime in on that element.
  • Move the href() inside the inputLabel() attached to the textarea block, but that puts it inside the txp-form-field-value block and knackers the line spacing. Since the label itself is only constructed from a single argument — the gTxt() string of the label — you can’t pass anything else into inputLabel() to attach to the label.
  • Add it via JavaScript, which will show up after page load.
  • Live with imperfect markup.

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

#108 2016-08-30 08:39:19

gaekwad
Member
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,438

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

Standing by to bump the demo site to beta 3 when it’s ready to fly.

Offline

#109 2016-08-30 13:23:36

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,625
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

philwareham wrote #300866:

@philw agreed, it should be as in the mocks. Will fix today. Good spot!

:-) (blame Voice-over for this – for once I got my ears tuned enough to be able to listen.)

Bloke wrote #300870:

Good luck fixing it :-) I couldn’t get it working when I did it last week, hence I added it before the textarea and label.

:-(
[sigh].

If it is too complicated to mimic the mock-up markup, could the element be wrapped in a <p> ? It feels so lonely there poor little inline element in that see of blocks…

Last edited by phiw13 (2016-08-30 13:24:07)

Offline

#110 2016-08-30 14:16:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,620
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 2 released

phiw13 wrote #300875:

could the element be wrapped in a <p> ? It feels so lonely there poor little inline element in that see of blocks…

Yeah, that’s easy. Phil might have to alter the markup and/or CSS to make it continue to exhibit the same inline-block / floaty behaviour, so I’ll leave it to him unless he delegates it back to me!


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

Board footer

Powered by FluxBB