Open for Voting

FEATURE REQUEST - Sort models in parts search alphabetically

More of an inconvenience, but we've noticed that the drop-down menu (part of the search criteria) for the model at the top of the screen (not for the parts list below it) does not sort alphabetically. It would be nice to have that sorted, so finding specific models to filter results would be easier. I have also entered a support case (#797545) for this.

Thanks!

  • Also Case #810105.

    Here's a possible workaround for the desperate (your mileage may vary, use at your own risk, etc.).

    Edit <webhelpdesk>/bin/webapps/helpdesk/js/tableSupport.min.js and add these lines at the bottom:

    function abssSortSelect() {

        var abssSortValue = function (x, y) {

            if (x.text < y.text)

                return -1;

            if (x.text > y.text)

                return 1;

            return 0;

        };

        var d = document.getElementById("ModelUpdater");

        var s = d.children[0];

        var a = Array();

        for (var i=0; i < s.length; ++i) {

            a.push(s.item(i));

        }

        for (var i=0; i < a.length; ++i) {

            s.removeChild(a[i]);

        }

        a.sort(abssSortValue)

        for (var i=0; i < a.length; ++i) {

            s.appendChild(a[i]);

        }

        s.value = s.item(0).value;

    }

    function abssSortButton() {

        var d = document.getElementById("ModelUpdater");

        if (!d)

            return -1;

        var d = document.getElementById("contentArea");

        d.style.position = 'relative';

        var a = document.createElement("a")

        a.id = "abssSortButton";

        a.className = "roundRectButton";

        a.style.position = 'absolute';

        a.style.top = '40px';

        a.style.right = '8px';

        a.href = "javascript:abssSortSelect();";

        a.innerHTML = '<div class="panelButton">Sort Models</div>';

        d.insertBefore(a, d.children[0]);

        return 0;

    }

    $(document).ready(abssSortButton);

    This should add a button on the far right that you can manually click to force a sort. You have to use it each time after you select a manufacturer that populates the model list:

    sort_models.png