Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-02-01 17:34:33

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

r3621: "Sections" tab AJAXified

Those of you who live a life less ordinary and run a development version may have noticed that we switched to AJAX for “save” operations on the Sections tab as per change set 3621.

This means from an end-user perspective: No more reloads after each “save” operation, no more lost changes to one section as you happend to save just the other one.

Please clear your browser’s cache, then kick the tires and report any quirks you might encounter. Browser make and model might help diagnose any bugs you encounter so be verbose.

Offline

#2 2012-02-01 18:00:44

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r3621: "Sections" tab AJAXified

The “save” button turns grey when I click it… but it stays grey. However, if you make other changes and press “save” again, the changes are saved. This is confusing, because grey (to me) means an inactive button.

Offline

#3 2012-02-01 18:04:38

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: r3621: "Sections" tab AJAXified

It should turn light grey while the request is processed and return to its normal colour once the response arrives at the client. This may take a while (even up to a few seconds).

Last edited by wet (2012-02-01 18:16:26)

Offline

#4 2012-02-01 18:21:36

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r3621: "Sections" tab AJAXified

It does turn light grey. It does not return to its normal color (not even after a minute).
I’ve tried Firefox and Chrome, both up-to-date.

Offline

#5 2012-02-01 18:26:17

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: r3621: "Sections" tab AJAXified

  • Which browser make/model?
  • Does clearing the browser cache and getting it a definitely fresh copy of http://example.com/textpattern/textpattern.js [r3618] from your web server help? Some clients are rather aggressive with JS caching.

Offline

#6 2012-02-01 18:56:39

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r3621: "Sections" tab AJAXified

Forget it. Problem found. I have sed_section_fields 0.5.3 installed. Disabling that solved the problem.
I’ll go hide in shame now ;)

Offline

#7 2012-02-01 20:32:37

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: r3621: "Sections" tab AJAXified

ruud wrote:

Forget it. Problem found. I have sed_section_fields 0.5.3 installed. Disabling that solved the problem. I’ll go hide in shame now ;)

Sounds like I should be the one hiding in shame :)


Steve

Offline

#8 2012-02-02 05:14:54

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: r3621: "Sections" tab AJAXified

Steve, have you ever tried to make use of the 'section_ui', 'extend_detail_form' pluggable UI in sed_section_fields? This callback is intended to be helpful for this kind of plugins, and if it isn’t, we should strive to improve it.

To illustrate, here’s a snippet I use elsewhere:

if (txpinterface == 'admin') {
	register_callback('wet_mytxp_section_ui', 'section_ui', 'extend_detail_form');
}

function wet_mytxp_section_ui($event, $step, $dummy, $data)
{
	$mydata = safe_row('wet_shorttitle', 'txp_section', "name = '".doSlash($data['name'])."'");
	return
	tr(
		fLabelCell(gTxt('section_shorttitle').':').
		fInputCell('shorttitle', $mydata['wet_shorttitle'], 1, 20)
	);
}

Offline

#9 2012-02-02 10:12:14

tom1
Member
Registered: 2009-03-20
Posts: 36

Re: r3621: "Sections" tab AJAXified

Sorry to intrude this thread with no testing of r3621 at all..
I just noticed updated thread here and after reading this, i remembered solution my customer found clear to non-programmer.
We made theirs ajax powered forms so, that when you edit text in input field, background color changes ( adds class ‘edited’ ).
When save happens, and ajax returns success, background color of all posted fields are changed back (removeClass(‘edited’) ).

With this its easy to see unsaved fields at quick glance. Graying out button is also a good choice, but maybe less visible to user.

Offline

Board footer

Powered by FluxBB