Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting / Save #17

Open
H-i-red opened this issue Sep 10, 2017 · 1 comment
Open

Sorting / Save #17

H-i-red opened this issue Sep 10, 2017 · 1 comment

Comments

@H-i-red
Copy link

H-i-red commented Sep 10, 2017

I you sort fields and leave the page without saving, all order are lost.
It does not save the sorting order.

@H-i-red
Copy link
Author

H-i-red commented Oct 1, 2017

well I digged around your JS code and found that you do not "keep" the state when you "DELETE/SORT/CLONE" an entry/module, if you trigger it in your render function everything works..
: obj.closest('form').trigger('keep');

fn.render = function(obj) {
		var output = '';
		var fields = obj.find('.egr-presentation').children();
		var out = '';
		var textarea = obj.find('.egr-output').find('textarea');
		out = fn.renderLoop(fields, out, level, true);
		textarea.val(out);
		textarea.blur();
		obj.closest('form').trigger('keep');
	};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant