Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Refresh Collection View after Save in a Modal

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
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;
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
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
The administrator has disabled public write access.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
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
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
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
The administrator has disabled public write access.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
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)
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Fixed.
Coding is now a piece of cake
The administrator has disabled public write access.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
great hun
The administrator has disabled public write access.
Time to create page: 0.070 seconds

Get Started