Giter Site home page Giter Site logo

Comments (4)

coordt avatar coordt commented on May 31, 2024

It appears that jQuery is loaded. It is included in Django 1.2 and is specifically loaded in the admin/editor/tree_editor.html template. is 'editor' in your installed apps?

from django-categories.

phoebebright avatar phoebebright commented on May 31, 2024

Yes I have editor in apps.

This is the top of the page that lists the categories:

<script type="text/javascript" src="/media/js/core.js"></script> <script type="text/javascript" src="/media/js/admin/RelatedObjectLookups.js"></script> <script type="text/javascript" src="/media/js/jquery.min.js"></script> <script type="text/javascript" src="/media/js/jquery.init.js"></script> <script type="text/javascript" src="/media/js/actions.min.js"></script> <script type="text/javascript" src="/media/js/urlify.js"></script> <script type="text/javascript" src="/media/js/prepopulate.min.js"></script> <script type="text/javascript" src="/site_media/editor/jquery.treeTable.js"></script> <script type="text/javascript" src="/site_media/js/genericcollections.js"></script> <script type="text/javascript"> (function($) { $(document).ready(function($) { $("tr input.action-select").actions(); }); })(django.jQuery); </script>
<script type="text/javascript">
(function($) {
    $(document).ready(function()  {
    //treeTable = $("#result_list").treeTable({initialState : "expanded"});
    treeTable = $("#result_list").treeTable({initialState : "collapsed"});
    function toggleChildren() {
        this.checked = event.currentTarget.checked;
        var row = this.parentNode.parentNode.parentNode;
        if($(row).hasClass("parent")) {
            $("table.treeTable tbody tr.child-of-" + row.id + " input").each(toggleChildren);
        }
        $("tr input.action-select").actions();
    };
    $('.action-select').each(
        function(){
            $(this).bind('click', function(event){
                // Get the tr from checkbox -> a -> td -> tr
                var row = event.currentTarget.parentNode.parentNode.parentNode;
                $("table.treeTable tbody tr.child-of-" + row.id + " input").each(toggleChildren);
            });
        });
    });
})(django.jQuery);
</script>

from django-categories.

phoebebright avatar phoebebright commented on May 31, 2024

Yes I have editor in apps.

This is the top of the page that lists the categories:

<script type="text/javascript" src="/media/js/core.js"></script> <script type="text/javascript" src="/media/js/admin/RelatedObjectLookups.js"></script> <script type="text/javascript" src="/media/js/jquery.min.js"></script> <script type="text/javascript" src="/media/js/jquery.init.js"></script> <script type="text/javascript" src="/media/js/actions.min.js"></script> <script type="text/javascript" src="/media/js/urlify.js"></script> <script type="text/javascript" src="/media/js/prepopulate.min.js"></script> <script type="text/javascript" src="/site_media/editor/jquery.treeTable.js"></script> <script type="text/javascript" src="/site_media/js/genericcollections.js"></script> <script type="text/javascript"> (function($) { $(document).ready(function($) { $("tr input.action-select").actions(); }); })(django.jQuery); </script>
<script type="text/javascript">
(function($) {
    $(document).ready(function()  {
    //treeTable = $("#result_list").treeTable({initialState : "expanded"});
    treeTable = $("#result_list").treeTable({initialState : "collapsed"});
    function toggleChildren() {
        this.checked = event.currentTarget.checked;
        var row = this.parentNode.parentNode.parentNode;
        if($(row).hasClass("parent")) {
            $("table.treeTable tbody tr.child-of-" + row.id + " input").each(toggleChildren);
        }
        $("tr input.action-select").actions();
    };
    $('.action-select').each(
        function(){
            $(this).bind('click', function(event){
                // Get the tr from checkbox -> a -> td -> tr
                var row = event.currentTarget.parentNode.parentNode.parentNode;
                $("table.treeTable tbody tr.child-of-" + row.id + " input").each(toggleChildren);
            });
        });
    });
})(django.jQuery);
</script>

from django-categories.

heymarkreeves avatar heymarkreeves commented on May 31, 2024

I'm seeing something similar presently - All the UI files are loading properly, but I'm not seeing .treeTable as a class on the table. I see child rows in the source, but I do not see them in the admin UI, and there's no toggle to expand/collapse them.

See: #79

from django-categories.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.