Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2016-11-07 08:20:40

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

Re: Save without losing my place?

Bloke wrote #302582:

This commit introduces AJAX saving of the Styles panel. Please report any findings with the latest dev branch and, if it’s acceptable, I’ll roll it out across other panels.

That is kinda unfortunate – it is the one panel I never use…
I gave it a brief test though, with a 2 line css, and it works, as far as I can tell. The contents of the textarea is saved, the focus remains on the textarea – I’ll assume the scroll position is kept as well.

Offline

#32 2016-11-07 09:48:42

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

Re: Save without losing my place?

phiw13 wrote #302726:

I’ll assume the scroll position is kept as well.

Yes it is. I’ll roll it out to the other panels this week.


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

#33 2016-11-07 18:36:14

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Save without losing my place?

Yahoo! I’m planning on testing this ASAP. This is going to make a big difference on my quality of life.

Meawhile, can I get a what what for automatic tag completion when I type </ ? (This list does not end until you’ve mostly reimplemented Sublime Text in that text box.)


Yes, I have tried turning it off and on.

Offline

#34 2016-11-14 04:16:50

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

Re: Save without losing my place?

Bloke wrote #302733:

Yes it is. I’ll roll it out to the other panels this week.

Now that it has landed for all 3 panels, I could take it for a spin in a more realistic environment. Everything works nicely.

Offline

#35 2016-11-14 18:17:55

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

Re: Save without losing my place?

phiw13 wrote #302839:

Everything works nicely.

Brill, thanks for testing. Glad it works.

I’ve uncovered one niggle on the Forms panel. If you change a Form to an unused type and save, the Form doesn’t appear in the list. This is because the AJAX is injected into the twisty container one at a time so if the new twisty isn’t in the list to begin with, it’s not added until a full page refresh occurs. Same in reverse when changing the type away from the last item in a group.

Unfortunately, doing things the other way round (writing the entire side panel out as a single block) has two consequences upon save:

  • The open/closed state of twisty panels is not remembered.
  • The multi-select checkbox feature (shift-click) is lost.

That’s down to the way the handlers are registered. Working with Oleg on a solution1.

1 Alright, full disclosure: I’ve asked Oleg to fix it because he knows more about this stuff than I do.

Last edited by Bloke (2016-11-14 18:20: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

#36 2016-11-14 23:38:01

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

Re: Save without losing my place?

Bloke wrote #302852:

I’ve uncovered one niggle on the Forms panel. […]

Ack. That is one thing I didn’t test – my playground has forms of all types… Done some post spring autumn storm cleaning, and I can reproduce that.

Offline

#37 2017-08-18 16:08:44

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

Re: Save without losing my place?

Just a quick note that the latest 4.7dev has a floating ‘Save’ button in Hive themes, and no autosize in Classic theme. This should negate any problems with having to scroll up/down the page to save an article mid-edit.

Offline

#38 2017-08-19 18:48:25

etc
Developer
Registered: 2010-11-11
Posts: 3,401
Website

Re: Save without losing my place?

It looks like some layout problem was introduced in a recent commit: the browser (FF53 W7) looses Undo option (in Body and Excerpt) on async article save.

Offline

#39 2017-08-20 00:21:01

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

Re: Save without losing my place?

etc wrote #306676:

It looks like some layout problem was introduced in a recent commit: the browser (FF53 W7) looses Undo option (in Body and Excerpt) on async article save.

You mean you cannot undo what you just typed after saving the article ?
If so, that works fine here with Safari 10 and Firefox 55 and 52ESR.

EDIT: hold on, I should amend that.

  • it works fine if I use the rah_knots extension, then the keyboard shortcut (cmd+z) to undo or use the edit menu > undo or the context menu (the textarea is the element with focus).
  • it fails if (after typing) I use the mouse and press the Save button then either press the undo keyboard shortcut or use the Edit menu (textarea looses focus).
  • it works when, after saving and pressing the Save button, I use the context menu inside the textarea (textarea regains focus as I click in it).

No idea if this is the normal Firefox behaviour or not, or if anything changed recently as I actually never use Firefox except for testing purposes.

Last edited by phiw13 (2017-08-20 00:44:53)

Offline

#40 2017-08-20 16:08:36

etc
Developer
Registered: 2010-11-11
Posts: 3,401
Website

Re: Save without losing my place?

I mean undo after save (your point 2). Don’t know if it’s a FF or jQuery bug, but if I replace the surrounding <span class="author"> with <div class="author"> in article_partial_author, it works again. Phil, is it ok this way?

Offline

Board footer

Powered by FluxBB