Welcome Guest, Not a member yet? Register   Sign In
v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD

[eluser]web-johnny[/eluser]
[quote author="Manjunath Reddy" date="1311663789"]Is grocery CRUD library 2.0.x is compatible with CI 2.0.2 version.?[/quote]
Oh yes it is

[eluser]web-johnny[/eluser]
[quote author="web-johnny" date="1311586469"][quote author="dodulz" date="1311576186"]on grocerycrud, when I create a table with a datetime data type, then it will generate groocerycrud filed with the datetime format (yy-mm-dd hh:mm).

the problem arises when I add data. I can not enter data,coz datetime that I choose on datepicker, does not look into the textfield. when I edit data it's no problem with datepicker. the problem when I add data.

so how to fix it?

Screenshot[/quote]
UPS :-S I think you're right this is a BUG. I will look at it and send you which line to change[/quote]

I found the bug. Go at the file : public/grocery_crud/js/jquery_plugins/jquery.ui.datetime.js and go to the line 203 and replace the function parseTime with the code below:

Code:
function parseTime (obj) {
                    if($(obj).val() != '')
                        var time = ($(obj).val() || $(this).val()).split(" ");
                    else
                        var time = ['00-00-00','00:00:00'];
                    
                    if (time.length < 2) {
                        time = ['00-00-00','00:00:00'];
                    }
                    
                    $('#pickerplug').data('lastdate',time[0]);    //lastdate = time[0];
                    $('#pickerplug').data('lasttime',time[1]);  //lasttime = time[1];                    
                    time = time[1].split(":");                    
                    
                    if (time.length < 2) {
                        time = ['00','00','00'];
                    }
                    
                    var hour    = time[0] || '00';
                    var minute     = time[1] || '00';
                    
                    writeTime(hour,'hour');
                    writeTime(minute,'minute');

                    $('#hourSlider').slider('option', 'value', hour);
                    $('#minuteSlider').slider('option', 'value', minute);    
                        
                    var zero_string = "0";
                    
                    if( $('#pickerplug').data('lastdate').charAt(0) != zero_string.charAt(0) )
                    {
                        $('#datepicker').datepicker( 'setDate',
                                                    $.datepicker.parseDate(
                                                            datepicker_def['dateFormat'],
                                                            $('#pickerplug').data('lastdate')
                                                    )
                                                );
                    }
                    else
                    {
                        $('#datepicker').datepicker( 'setDate',
                                $.datepicker.parseDate(
                                        datepicker_def['dateFormat'],
                                        ''
                                )
                            );
                    }
                }

[eluser]dodulz[/eluser]
[quote author="web-johnny" date="1311798162"][quote author="web-johnny" date="1311586469"][quote author="dodulz" date="1311576186"]on grocerycrud, when I create a table with a datetime data type, then it will generate groocerycrud filed with the datetime format (yy-mm-dd hh:mm).

the problem arises when I add data. I can not enter data,coz datetime that I choose on datepicker, does not look into the textfield. when I edit data it's no problem with datepicker. the problem when I add data.

so how to fix it?

Screenshot[/quote]
UPS :-S I think you're right this is a BUG. I will look at it and send you which line to change[/quote]

I found the bug. Go at the file : public/grocery_crud/js/jquery_plugins/jquery.ui.datetime.js and go to the line 203 and replace the function parseTime with the code below:

Code:
function parseTime (obj) {
                    if($(obj).val() != '')
                        var time = ($(obj).val() || $(this).val()).split(" ");
                    else
                        var time = ['00-00-00','00:00:00'];
                    
                    if (time.length < 2) {
                        time = ['00-00-00','00:00:00'];
                    }
                    
                    $('#pickerplug').data('lastdate',time[0]);    //lastdate = time[0];
                    $('#pickerplug').data('lasttime',time[1]);  //lasttime = time[1];                    
                    time = time[1].split(":");                    
                    
                    if (time.length < 2) {
                        time = ['00','00','00'];
                    }
                    
                    var hour    = time[0] || '00';
                    var minute     = time[1] || '00';
                    
                    writeTime(hour,'hour');
                    writeTime(minute,'minute');

                    $('#hourSlider').slider('option', 'value', hour);
                    $('#minuteSlider').slider('option', 'value', minute);    
                        
                    var zero_string = "0";
                    
                    if( $('#pickerplug').data('lastdate').charAt(0) != zero_string.charAt(0) )
                    {
                        $('#datepicker').datepicker( 'setDate',
                                                    $.datepicker.parseDate(
                                                            datepicker_def['dateFormat'],
                                                            $('#pickerplug').data('lastdate')
                                                    )
                                                );
                    }
                    else
                    {
                        $('#datepicker').datepicker( 'setDate',
                                $.datepicker.parseDate(
                                        datepicker_def['dateFormat'],
                                        ''
                                )
                            );
                    }
                }
[/quote]

it's work Big Grin
thank's to fix bug grocerycrud Big Grin

[eluser]web-johnny[/eluser]
You're welcome.
To the next version it will be already fixed. Actually the jquery plugin that I used it has this bug and I didn't realize it before.

[eluser]David Tran[/eluser]
Thank you, this library save me a lot of in develop admin backend.

And I just dont understand the "set_relation_1_n". Can you explain it for me.

[eluser]Jay Logan[/eluser]
Looks good. I use something similar for my own projects. Interested in knowing how you handle large data lists. Let's say 10,000+ records.

[eluser]Unknown[/eluser]
Thanks, spectacular, You saved me a long time.

This system handles 34,000 records without any problems.

I have a problem: Flexigrid searches do not give any results. : (

[eluser]fabgonber[/eluser]
[quote author="chule143" date="1313129263"]I have a problem: Flexigrid searches do not give any results. : ([/quote]

I know, do not use "all" search in flexigrid. it only work with one "type of register" (campo in spanish)

[eluser]Unknown[/eluser]
I been having problems installing the files.

I copied the files to my project, added the url helper and database libraries to may autoload.php, and finally connected to the database, but I end up with having only links like this:

'>Offices | '>Employees | '>Customers | '>Orders | '>Products | '>Films

I think I may have missed something.

Using:
codeigniter 2.0.2

[eluser]web-johnny[/eluser]
[quote author="humigen_man666" date="1313439159"]I been having problems installing the files.

I copied the files to my project, added the url helper and database libraries to may autoload.php, and finally connected to the database, but I end up with having only links like this:

'>Offices | '>Employees | '>Customers | '>Orders | '>Products | '>Films

I think I may have missed something.

Using:
codeigniter 2.0.2[/quote]
You must have your short_tags to on (it is at php.ini). In newer versions I replace all the code &lt;?= to &lt;?php echo , so no one to have the same problem again.




Theme © iAndrew 2016 - Forum software by © MyBB