Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Refresh Collection View after Save in a Modal 15 Aug 2013 13:21 #10781

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
I use a modal to allow an user to add a date to an item.
The modal displays fine, the save button does its job but... Back in the collection view, the data displayed is still the old one (even if it's actually saved in db). If i refresh (F5), the data displayed are correct.
Is there a way to refresh the collection view if i hit the save button ?
I suppose it has something to do with
			case 'transportdunvhu.save':
				$this->applyRedirection($result, array(
					'stay',
					'com_recy3.vhus.transportvhus'
				), array(
					'cid[]' => null
				));
				break;

Please Log in or Create an account to join the conversation.

Refresh Collection View after Save in a Modal 16 Aug 2013 14:38 #10789

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Good catch.

This feature is missing. In facts, it is not refreshing the screen.
For the moment, I do not know the best way to do it.
- Refreshing only the row should be the best, but more difficult because it will define a new ajax layout in the view file.
- Refreshing the screen, the easiest, but not really nice.

I would prefer the first method.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Refresh Collection View after Save in a Modal 16 Aug 2013 16:07 #10793

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
Well my dear, from my point of view, i can understand you would like to do it the right way, but from my point of view, i would like to make it work now, even if it is not perfect : so, could you please tell me how to refresh the screen in the mean time ?
Thanks

Please Log in or Create an account to join the conversation.

Refresh Collection View after Save in a Modal 16 Aug 2013 17:00 #10795

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I understand my darling...
And now is it better ?

changed file :
dom/assets/toolbar/js/toolbar.js

I know it is not the best because it always refresh whatever the user has clicked on 'save' or 'cancel' or 'save and new', but for the moment it is good enough.
I really want to support full Ajax features, including edit in place and more and more...
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Refresh Collection View after Save in a Modal 16 Aug 2013 17:12 #10796

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
You are the sunshine of my life.
The only thing is it asks now for the confirmation for leaving the page
	var holdForm = true;
	window.onbeforeunload = function closeIt(){	if (holdForm) return false;};
(i know you know but i wanted you to know i know)

Please Log in or Create an account to join the conversation.

Refresh Collection View after Save in a Modal 18 Aug 2013 18:53 #10808

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Refresh Collection View after Save in a Modal 18 Aug 2013 18:54 #10809

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
great hun

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.064 seconds

Les générateurs de code je les connais presque tous pour les avoir essorés en long en large et en travers ... mais celui ci c'est vraiment un outil formidable de simplicité et d'efficacité !
Marc. (liubov - Forum)

Get Started