there is CGridView multiple confirm and data send issue
issue described here
http://www.yiiframew...-delete-button/
if you read this (the end of it) http://www.alfajango...y-live-and-die/
you will understand that I cant do die to the function...
so if I load the CGridView via ajax, it will add the click event every time... and after some time I get handred of them...
I think the best is to go from live to delegate...
just playing now trying to figure out how to kill previus live('click') or deleegate ("a.delete", "click"
if I figure out something I will post
Page 1 of 1
CGridView multiple confirm and data send issue
#1
Posted 08 October 2011 - 07:42 PM
Certification:

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)
#2
Posted 08 October 2011 - 08:15 PM
figured out how to solve it
in CButtonColumn replace
with
you can add to the attribute the grid id or something also...
tested it... it solved my issue
in CButtonColumn replace
$js[]="jQuery('#{$this->grid->id} a.{$class}').live('click',$function);";
with
$js[]="if(jQuery('body').attr('deleteEventIsset') !== 'yes'){jQuery('body').attr('deleteEventIsset', 'yes');jQuery('#{$this->grid->id} a.{$class}').live('click',$function);}";
you can add to the attribute the grid id or something also...
tested it... it solved my issue
Certification:

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)
#3
Posted 09 October 2011 - 03:03 AM
There is also issue like that in the pagination... it add every page load via ajax and after some time for going from page 1 to 2 it will do 100 requests
CGridView works very bad inside a div after inserted via ajax...
the first time it loaded it is ok, but after some times it add up all the events and become a mess...
I actually considering using iframe instead of div...
Too much issues ...
CGridView works very bad inside a div after inserted via ajax...
the first time it loaded it is ok, but after some times it add up all the events and become a mess...
I actually considering using iframe instead of div...
Too much issues ...
Certification:

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)
#4
Posted 09 October 2011 - 03:15 AM
Moderators: I think this topic place is inside bugs
Certification:

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)
Share this topic:
Page 1 of 1

Help













