Yii Framework Forum: Update Isotope With Javascript - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Update Isotope With Javascript Rate Topic: -----

#1 User is offline   kandalf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 21-April 12

Posted 23 January 2013 - 12:46 PM

I'm using the isotope jquery extension, my dataProvider is changing over the time so I want to update it withou refresh the entire page.

Someone know how can I do it?

I now the isotope is based on a CListView so I try to use this function $.fn.yiiListView.update(), but the yiiListView is not defined.

Any ideas that can help me?
0

#2 User is offline   michelinho80 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 07-November 12
  • Location:Tenerife, Islas Canarias, España

Posted 01 May 2013 - 10:00 AM

Have you solved it? I'm facing the same problem.

View Postkandalf, on 23 January 2013 - 12:46 PM, said:

I'm using the isotope jquery extension, my dataProvider is changing over the time so I want to update it withou refresh the entire page.

Someone know how can I do it?

I now the isotope is based on a CListView so I try to use this function $.fn.yiiListView.update(), but the yiiListView is not defined.

Any ideas that can help me?

0

#3 User is offline   kandalf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 21-April 12

Posted 01 May 2013 - 01:54 PM

View Postmichelinho80, on 01 May 2013 - 10:00 AM, said:

Have you solved it? I'm facing the same problem.


Yes i have solve it. I'm not at home, and i dont remember what i did, but when i return To home i send you my solution
1

#4 User is offline   michelinho80 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 07-November 12
  • Location:Tenerife, Islas Canarias, España

Posted 01 May 2013 - 02:34 PM

View Postkandalf, on 01 May 2013 - 01:54 PM, said:

Yes i have solve it. I'm not at home, and i dont remember what i did, but when i return To home i send you my solution


Thanks!!! :) I will remind you! haha
0

#5 User is offline   michelinho80 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 07-November 12
  • Location:Tenerife, Islas Canarias, España

Posted 02 May 2013 - 07:31 AM

Reminding...

I'm really stuck with this! :(

By now, I have created a function I call when refreshing

My button:
$this->widget('bootstrap.widgets.TbButton', array(
     'buttonType'=>'button',
     'type'=>null,
     'icon'=>'refresh',
     'size'=>'mini',
     'label'=>'Actualizar',
     'htmlOptions'=>array(
          'onclick'=>'javascript:reloadIsotope();'
     )
));


The function:
function reloadIsotope() {
	var $isoContainer = $('#listaItems .items');
	$isoContainer.isotope('reloadIsotope');
}


And the code I inserted into jquery.isotope.js:
...
reloadIsotope: function() {
	this.$allAtoms.empty();
	this.$filteredAtoms.empty();
	this.element.children().empty();
	this.reLayout();			
},
...


It seems to do the trick, isotope is being reloaded, but the ajax call is not being redone.
0

#6 User is offline   michelinho80 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 07-November 12
  • Location:Tenerife, Islas Canarias, España

Posted 06 May 2013 - 05:22 AM

Hello?
0

#7 User is offline   Trần Minh Quang 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 13-December 12
  • Location:Tan Phu district, Dong Nai province, Viet Nam

Posted 17 July 2013 - 07:04 AM

View Postmichelinho80, on 06 May 2013 - 05:22 AM, said:

Hello?


Do you fix this problem? If fixed, Can you share solution for me, please!
Code is poetry
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users