Code Duplication    Length = 31-31 lines in 2 locations

public/themes/templates/1/includes/js/menus.js 2 locations

@@ 1013-1043 (lines=31) @@
1010
    });
1011
}
1012
1013
window.deleteTitleCredits = function (menuDiskTitleId, indId, authorTypeId) {
1014
    $('#JSGenericModal').dialog({
1015
        title: 'Delete from credits?',
1016
        open: $('#JSGenericModalText').text('Are you sure you want to delete this person from the title credit list?'),
1017
        resizable: false,
1018
        height: 200,
1019
        modal: true,
1020
        buttons: {
1021
            'Delete': function () {
1022
                $(this).dialog('close');
1023
                $.ajax({
1024
                    // The URL for the request
1025
                    url: 'db_menu_disk.php',
1026
                    data: 'action=delete_menu_disk_title_credits&menu_disk_title_id=' + menuDiskTitleId + '&author_type_id=' + authorTypeId + '+&ind_id=' + indId,
1027
                    type: 'POST',
1028
                    dataType: 'html',
1029
                    // Code to run if the request succeeds;
1030
                    success: function (html) {
1031
                        var returnHtml = html.split('[BRK]');
1032
                        $('#author_list').html(returnHtml[0]);
1033
                        window.OSDMessageDisplay(returnHtml[1]);
1034
                        document.getElementById('author_list').reset();
1035
                    }
1036
                });
1037
            },
1038
            Cancel: function () {
1039
                $(this).dialog('close');
1040
            }
1041
        }
1042
    });
1043
}
1044
@@ 981-1011 (lines=31) @@
978
    });
979
}
980
981
window.deleteCredits = function (menuDiskCreditsId, menuDiskId) {
982
    $('#JSGenericModal').dialog({
983
        title: 'Delete from credits?',
984
        open: $('#JSGenericModalText').text('Are you sure you want to delete this person from the credit list?'),
985
        resizable: false,
986
        height: 200,
987
        modal: true,
988
        buttons: {
989
            'Delete': function () {
990
                $(this).dialog('close');
991
                $.ajax({
992
                    // The URL for the request
993
                    url: 'db_menu_disk.php',
994
                    data: 'action=delete_menu_disk_credits&menu_disk_credits_id=' + menuDiskCreditsId + '&menu_disk_id=' + menuDiskId,
995
                    type: 'POST',
996
                    dataType: 'html',
997
                    // Code to run if the request succeeds;
998
                    success: function (html) {
999
                        var returnHtml = html.split('[BRK]');
1000
                        $('#menu_credit_list').html(returnHtml[0]);
1001
                        window.OSDMessageDisplay(returnHtml[1]);
1002
                        document.getElementById('menu_credit_list').reset();
1003
                    }
1004
                });
1005
            },
1006
            Cancel: function () {
1007
                $(this).dialog('close');
1008
            }
1009
        }
1010
    });
1011
}
1012
1013
window.deleteTitleCredits = function (menuDiskTitleId, indId, authorTypeId) {
1014
    $('#JSGenericModal').dialog({