check/uncheck in UCP improved selection 1.1.1/1.1.2

Dont let your users mess with check/uncheck multiple items at a time on UCP on active/closed auction

  1. kslakhani
    WeBid Version:
    • 1.1.1/1.1.2
    Title: check/uncheck in UCP improved selection
    Credits:
    credit goes to kslakhani and webidsupport.com
    Install Time: Estimated Time to install is 2 minutes
    Install Difficulty: easy

    In user panel on active auctions or closed auctions user can select/check multiple column items at a same time and chances to mess with their items.
    To prevent this we need to change small javascript on yourauctions.tpl and youractions_c.tpl or you can use the same with your other theme files as per your requirements.

    open in your_site_installation_directory/themes/default/yourauctions.tpl
    find on line 5 (yours maybe diff.)
    HTML:
    $("#closeall").click(function() {
            var checked_status = this.checked;
            $("input[name='closenow[]']").each(function() {
                this.checked = checked_status;
            });      
        });
        $("#deleteall").click(function() {
            var checked_status = this.checked;
            $("input[name='O_delete[]']").each(function() {
                this.checked = checked_status;
            });       
        });   
        
    and replace with
    HTML:
    $("#closeall").click(function() {
            var checked_status = this.checked;
            $("input[name='closenow[]']").each(function() {
                this.checked = checked_status;
            });
            $("input[name='O_delete[]']").prop("checked", false);
            $("#deleteall").prop("checked", false);
        });
        $("#deleteall").click(function() {
            var checked_status = this.checked;
            $("input[name='O_delete[]']").each(function() {
                this.checked = checked_status;
            });
            $("input[name='closenow[]']").prop("checked", false);
            $("#closeall").prop("checked", false);
        });
        $("input[name='closenow[]']").click(function() {
            $("#deleteall").prop("checked", false);
            $("input[name='O_delete[]']").each(function() {
                    this.checked = false;
                });
        });
        $("input[name='O_delete[]']").click(function() {
            $("#closeall").prop("checked", false);
            $("input[name='closenow[]']").each(function() {
                    this.checked = false;
                });
        });
    thats it for youractions.tpl

    now open yourauctions_c.tpl in the same directory and find on line no. 6
    HTML:
    $("#sellall").click(function() {
            var checked_status = this.checked;
            $("input[name='sell[]']").each(function() {
                this.checked = checked_status;
            });
        });
        $("#deleteall").click(function() {
            var checked_status = this.checked;
            $("input[name='delete[]']").each(function() {
                this.checked = checked_status;
            });
        });
    and replace with
    HTML:
    $("#sellall").click(function() {
            var checked_status = this.checked;
            $("input[name='relist[]']").each(function() {
                this.checked = checked_status;
            });
            $("input[name='delete[]']").prop("checked", false);
            $("#deleteall").prop("checked", false);
        });
        $("#deleteall").click(function() {
            var checked_status = this.checked;
            $("input[name='delete[]']").each(function() {
                this.checked = checked_status;
            });
            $("input[name='relist[]']").prop("checked", false);
            $("#sellall").prop("checked", false);
        });
        $("input[name='relist[]']").click(function() {
            $("#deleteall").prop("checked", false);
            $("input[name='delete[]']").each(function() {
                    this.checked = false;
                });
        });
        $("input[name='delete[]']").click(function() {
            $("#sellall").prop("checked", false);
            $("input[name='relist[]']").each(function() {
                    this.checked = false;
                });
        });
    your done with your closed auctions.
    You can do same script with other file as well just replace id or name of the checkbox.
    I take no responsibility if you mess with your code just do backup of your existing files/directories:D
    I know its not a big MOD but could be useful;)