Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with saveState #62

Open
Bears85 opened this issue Sep 12, 2017 · 1 comment
Open

Issue with saveState #62

Bears85 opened this issue Sep 12, 2017 · 1 comment

Comments

@Bears85
Copy link

Bears85 commented Sep 12, 2017

Hi,

I am using django and supervisor/nginx to run my webserver. I have js-cookies in my static files (as well as a number of other items that are loaded without issue). For whatever reason, I cannot get saveState to cooperate. I am basically hanging on a blank load screen when I try to refresh the browser with saveState in the code block. If I remove saveState, everything works great.

Apologies if this isn't detailed enough, more of a weekend warrior with web dev.

Looking in DEBUG, I also see this:
[12/Sep/2017 20:53:38] "GET /static/js-cookie/src/js.cookie.js HTTP/1.1" 304 0

Here is my code block loading this in:

<html lang="en">
  <head>
    <title> Temp </title>
    {% load staticfiles %}
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
    <meta http-equiv="refresh" content="300">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="http://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.1.1/css/responsive.bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
    <script type="text/javascript" src="http://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.1.1/js/dataTables.responsive.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.1.1/js/responsive.bootstrap.min.js"></script>
    <script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="{% static '/jquery-treegrid/css/jquery.treegrid.css' %}">
    <script type="text/javascript" src="{% static '/jquery-treegrid/js/jquery.treegrid.js' %}"></script>
    <script type="text/javascript" src="{% static '/js-cookie/src/js.cookie.js' %}"></script>
    <script type="text/javascript" src="{% static '/jquery-treegrid/js/jquery.treegrid.bootstrap3.js' %}"></script>

    <style type="text/css">
      .hidden {display:none;}
    </style>
    <script type="text/javascript">
        window.onload = function(){
            document.getElementById("CurrentLink").href = window.location.toString();
        }
    </script>
    <script type="text/javascript">
    $(document).ready(function() {
        $('.tree').treegrid();
        $('.tree-2').treegrid({
            'initialState': 'collapsed',
            expanderExpandedClass: 'glyphicon glyphicon-minus',
            expanderCollapsedClass: 'glyphicon glyphicon-plus'
        });
    });
@abdulrahman-khankan
Copy link

Hi, try adding <script type="text/javascript" src="../js/jquery.cookie.js"></script> instead of js-cookie. Long shot but might be worth trying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants