⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Integration with Bootstrap (Grocery Js it's not running)



Aldo Christian

Aldo Christian
  • profile picture
  • Member

Posted 11 March 2015 - 08:21 AM

Dear all developer friends.

 

I have some problem (sorry for my english)..

I am during develop some web using C.I integrated with Grocery and for View, I am using Bootstrap.

 

Here's a code

<!DOCTYPE html>
<html lang="en">
			<!-- CODE FROM GROCERY CRUD -->
<?php foreach($css_files as $file): ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
    <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
			<!-- END -->
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
	

    <title>IT Support tools</title>
	
    <!-- Bootstrap Core CSS -->
    <link href="<?php echo base_url()?>/assets/interface/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="<?php echo base_url()?>/assets/interface/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- Timeline CSS -->
    <link href="<?php echo base_url()?>/assets/interface/dist/css/timeline.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="<?php echo base_url()?>/assets/interface/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="<?php echo base_url()?>/assets/interface/bower_components/morrisjs/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="<?php echo base_url()?>/assets/interface/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        ...
		...
		...

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Officer Registration</h1>
					<body> Form ini berfungsi untuk melakukan pendaftaran karyawan baru sehingga karyawan dapat mengakses sistem ini. Pemberian hak akses dapat menggunakan fungsi set user </body>
                </div>
                <!-- /.col-lg-12 -->
				<div>
					<!-- CODE FROM GROCERY CRUD -->
					<?php echo $output; ?>   
				</div>
            </div>
            <!-- /.row -->
            
            <!-- /.row -->
            

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="<?php echo base_url()?>/assets/interface/bower_components/jquery/dist/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="<?php echo base_url()?>/assets/interface/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="<?php echo base_url()?>/assets/interface/bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="<?php echo base_url()?>/assets/interface/bower_components/raphael/raphael-min.js"></script>
    <script src="<?php echo base_url()?>/assets/interface/bower_components/morrisjs/morris.min.js"></script>
    <script src="<?php echo base_url()?>/assets/interface/js/morris-data.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="<?php echo base_url()?>/assets/interface/dist/js/sb-admin-2.js"></script>

</body>

</html>

 

Bold or mark with (<!-- CODE FROM GROCERY CRUD -->)

it's a Grocery code (from example.php)

and the result is :

 

1.png

 

yuph it's works.. But the problem is javascript (i guess) it's not running.

1. Calender it's not working

2. When finish insert / delete the result it's wrong

let see

for number 1: (calender not showing)

2.png

 

number 2 : when finish insert. 

3.png

 

Please help me.

I guess the javascript address.

So how to manual address (maybe) javascript ini : ../Assets/grocery_crud/

or if you have any solution 

 

Thank you before


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 16 March 2015 - 05:48 AM

will request you to check in firefox with firebug enabled ..

that will show you what / where the issue if at all may lay in!!

then we can surely look in to resolve the issue.


Aldo Christian

Aldo Christian
  • profile picture
  • Member

Posted 19 March 2015 - 00:32 AM

thank you so much.

Hope Grocery will better future


marlaaragao

marlaaragao
  • profile picture
  • Member

Posted 11 July 2015 - 12:03 PM

Hello, I'm having exactly the same problem, and I'm not sure of what to look in Firebug, can you help me? Did you find a solution?

 

I see this error in firebug:

 

qN6Ye6i.png

 

The second error is not related to Grocery Crud.

The first error is in the file: grocery_crud/js/jquery_plugins/config/jqueru.uniform.config.js
The content of this file is:

$(function(){
	$(".radio-uniform").uniform();	
});

I know it's a jquery conflict problem, but I don't know how to solve it... Can anyone help me please?

Thanks a lot!


marlaaragao

marlaaragao
  • profile picture
  • Member

Posted 11 July 2015 - 13:13 PM

*Detail: I already tried using unset_jquery() and unset_jquery_ui() with no success.*


marlaaragao

marlaaragao
  • profile picture
  • Member

Posted 13 July 2015 - 16:56 PM

Hello, If anyone is having this problem, I managed to make it work in my case. I don't know if it's going to happen the same way in other enviroments, but all I did was putting the javascript calls (jQuery-2.1.4.min.js and 1.11.2/jquery-ui.min.js in my case) in the beggining of my template (<head> tag).

 

It is a third part template and the javascripts where in the bottom of the template. I don't know why they put the calls on the end of the <body>, so I changed it. Now it's working. Thank you.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 15 July 2015 - 19:29 PM

Hi Marla,

 

Nice to know you got the solution. Well the thing is - ppl tend to use the scripts @the bottom so that they do not disturb the loading time of the page. But if there are some scripts that exclusively call in between (if they using jquery calls) - this is going to crash for sure.

Best policy is to call the functions with document ready...


marlaaragao

marlaaragao
  • profile picture
  • Member

Posted 18 July 2015 - 12:07 PM

Hello Amit,

 

I'm a newbie yet, thank you very much for the explanation. Good day!