Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-03 20:54:37

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

[request] Save As, Save New button for 4.5+

For the love of [your favorite deity] let’s get a f*!ing “save as” or “save new” button on the write page. I believe this has been standard practice since computers first saved files to storage devices.

Offline

#2 2012-11-03 21:32:45

shayne
Member
From: Toronto
Registered: 2005-02-22
Posts: 34
Website

Re: [request] Save As, Save New button for 4.5+

Umm would this work? http://forum.textpattern.com/viewtopic.php?pid=73494

Offline

#3 2012-11-03 21:55:31

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Save As, Save New button for 4.5+

Um no. Here’s why

Offline

#4 2012-11-04 05:26:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [request] Save As, Save New button for 4.5+

mrdale wrote:

For the love of [your favorite deity] let’s get a f*!ing “save as” or “save new” button on the write page. I believe this has been standard practice since computers first saved files to storage devices.

+1


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2013-10-19 21:45:48

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Save As, Save New button for 4.5+

Bumpity Bump. “Save New” anyone?

Offline

#6 2013-10-20 09:56:43

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [request] Save As, Save New button for 4.5+

I’ve made experimental rah_dupliquer, that adds ⌘+D (or CTRL+D on other platforms) shortcut support to Article, Form and Page panels. The plugin is only for 4.6-dev, but you can feel free to install it using Composer or to compile it; I don’t offer support or install packages, it’s destined to break before 4.6.0 is out.

You can use the JavaScript the plugin is build around to make similar solution for 4.5. To save the current article form as new, doesn’t take more than running:

var form = $('form');
form.find('[name=exp_year], [name=url_title]').val('');
form.append([
    '<input type="hidden" name="publish" value="1" />',
    '<input type="hidden" name="publish_now" value="1" />',
    '<input type="hidden" name="Status" value="1" />'
].join(''));
form.off('submit.txpAsyncForm').trigger('submit');

The above:

  • Finds the form on the page.
  • Removes expiration year and URL title.
  • Adds in needed inputs (makes the form to create new article).
  • Turns off submit.txpAsyncForm event (on 4.5.x you will have to unregister the whole submit event I suppose, or clone the form without handlers, e.g. form.clone().trigger('submit')), and triggers submit.

Last edited by Gocom (2013-10-20 10:13:18)

Offline

#7 2013-10-20 17:14:42

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Save As, Save New button for 4.5+

Nice! Gives site editors the ability to duplicate articles from the write screen and as a bonus gives them a keyboard shortcut…

From a UI perspective it needs a simple change, a big “duplicate” or “save-new” button. That would work way better for casual site editors than an inexplicable keyboard shortcut tooltip.

What say you, J-dizzle?

Offline

#8 2013-10-20 17:37:45

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [request] Save As, Save New button for 4.5+

mrdale wrote:

What say you, J-dizzle?

That particular plugin is just for a shortcut, sorry. J-dizzle here doesn’t wear diamonds.

I personally don’t much dig button arrays, thus the ⌘+D and ⌘+S plugins of mine. I outlined the core JavaScript functionality so that someone else can scratch together a plugin that runs that same code on a button click.

Last edited by Gocom (2013-10-20 17:39:56)

Offline

#9 2013-10-20 18:00:39

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Save As, Save New button for 4.5+

OK got it. J-dizzle don’t do UX :) Badass!

So a random tooltip floating next to a button with no explanation is good enough…

…D-dawg puts on his jquery coveralls.

Offline

#10 2013-10-20 18:57:37

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [request] Save As, Save New button for 4.5+

mrdale wrote:

So a random tooltip floating next to a button with no explanation is good enough…

Not exactly random; ⌘+D is standard Mac OS shortcut and that platform is shortcut and gesture driven; all which are “hidden”.

Offline

#11 2013-10-21 01:09:01

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Save As, Save New button for 4.5+

Gonna have to do better than that for intuitive UX sir.

Offline

#12 2013-10-21 06:53:16

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [request] Save As, Save New button for 4.5+

mrdale wrote:

Gonna have to do better than that for intuitive UX sir.

That is debatable; the whole duplication is a secondary action (once a five years event for me) and the whole point of the plugin is to be buttonless and to add a keyboard shortcut. If you want a button, the plugin isn’t that. That’s why I voluntarily tried to help and shared the actual code you will need to save the form as a new article.

Offline

Board footer

Powered by FluxBB