Customer Portal - Status Drop Down Menu

The select_controls div on the Joomla portal doesn’t seem to reorder the queried table. Don’t think I have a permissions issue. Wanted to see if someone was able to get it to function or can confirm this is a UI bug? Will continue to test.

-Nate

Hi Nate,

If you could attach a few screenshots we can look into/resolve the issue.

Thanks,

Will.

Sorry about the delay, Will.

Showing my Cases

Changing to Open

Changing to Closed

There is no change to the list order or visibility.

Yikes! Forgot to follow up with this. This issue is still occurring. Cant sort by opened or closed. The error I get in the browser is:

Uncaught TypeError: Cannot read property ‘afnFiltering’ of undefined index.php?Itemid=106:135
(anonymous function)

Seems to be related to Joomla Server /components/com_advancedopenportal/views/listcases/tmpl/default.php


<script>
    jQuery.fn.dataTableExt.[b]afnFiltering[/b].push(
        function( oSettings, aData, iDataIndex ) {
            var chosen = jQuery("#status_select").val();
            if(!chosen){
                return true;
            }
            var rowVal = aData[3];
            return rowVal == chosen;
        }
    );
    jQuery(document).ready(function() {
        var table = jQuery('#case_table').dataTable({
            "bFilter": true,
            "bStateSave": true,
            "sDom": '<"table_controls"fr>tip',
            "aaSorting": [[ 0, "desc" ]],
            "aoColumnDefs": [
                {"sWidth": "5%", "aTargets": [0]},
                {"sWidth": "50%", "aTargets": [1]},
                {"sWidth": "10%", "aTargets": [2]},
                { "bVisible": false, "aTargets": [3]},
                {"sWidth": "15%", "aTargets": [4]},
                {"sWidth": "15%", "aTargets": [5]}
            ]
        });
        jQuery("#select_controls").prependTo(".table_controls");
        jQuery("#status_select").change(function(){
            table.fnDraw();
        });
    } );

</script>

Can this be logged as a bug?

Hi,

I suspect this is caused by the use of jQuery rather than the more usual $ notation. This will be changed in the next AOP release but manually changing this will likely fix the issue. If it doesn’t or if this issue occurs with the upcoming AOP version please let us know.

Thanks,
Jim

Hey Jim,

Sorry just realized you answered this after going back thorough my open Topics. I 've made the changes and all is good in my hood. Hope you are well.

<script>
    $.fn.dataTableExt.afnFiltering.push(
        function( oSettings, aData, iDataIndex ) {
            var chosen = $("#status_select").val();
            if(!chosen){
                return true;
            }
            var rowVal = aData[3];
            return rowVal == chosen;
        }
    );
   $(document).ready(function() {
        var table = $('#case_table').dataTable({
            "bFilter": true,
            "bStateSave": true,
            "sDom": '<"table_controls"fr>tip',
            "aaSorting": [[ 0, "desc" ]],
            "aoColumnDefs": [
                {"sWidth": "5%", "aTargets": [0]},
                {"sWidth": "50%", "aTargets": [1]},
                {"sWidth": "10%", "aTargets": [2]},
                { "bVisible": false, "aTargets": [3]},
                {"sWidth": "15%", "aTargets": [4]},
                {"sWidth": "15%", "aTargets": [5]}
            ]
        });
        $("#select_controls").prependTo(".table_controls");
        $("#status_select").change(function(){
            table.fnDraw();
        });
    } );

</script>