omusico / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

autocomplete not work in zfdatagrid 0.8 #846

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.grid work perfectly 
2. i try to add autocomplete to my fields filters 
3. but autocomplete not work 
to add autocoplete i use :
1-
 $this->_grid->listenEvent('grid.init_deploy', array($this, 'addAutoCompleteToFields'));  (wich $this->_grid is my grid object)
and 

2-
function AddAutoCompleteToFields(Bvb_Grid_Event $event)
{
$subject = $event->getSubject();
$script = "<script type='text/javascript'>   $(document).ready(function() {";
foreach ($subject->getVisibleFields() as $name) {
$script .= "$(\"input#filter_$name\").autocomplete({source: 
'{$subject->getAutoCompleteUrlForFilter($name)}'});\n";
}
$script .= "})</script>;";

$subject->getView()->headScript()->appendScript($script);
}

What is the expected output? What do you see instead?

Please insert the appropriate values;
                    Zend Framework version:1.11
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.8
                          Operating system:xp
                               PHP Version:5.3
               Database Server and version:mysql 5
                          Source Adatapter: doctrine 1.2

Please provide any additional information below.

Original issue reported on code.google.com by madani...@gmail.com on 10 Apr 2012 at 2:36

GoogleCodeExporter commented 9 years ago
Hi , 
thanks for help 

Original comment by madani...@gmail.com on 11 Apr 2012 at 3:49

GoogleCodeExporter commented 9 years ago
Hi,

Have you loaded jquery library files?

Original comment by ivomonte...@gmail.com on 15 Apr 2012 at 2:12

GoogleCodeExporter commented 9 years ago
Hi I use the library from google api.
must download the library from jquery ?

Original comment by madani...@gmail.com on 16 Apr 2012 at 12:22

GoogleCodeExporter commented 9 years ago
No, I usually load from google site. However, you can just try download the 
jquery library (complete, just in case).

Original comment by ivomonte...@gmail.com on 5 May 2012 at 5:14

GoogleCodeExporter commented 9 years ago

Original comment by licentia...@gmail.com on 6 May 2012 at 6:04