Ignore:
Timestamp:
2021-12-17T10:16:06+13:00 (2 years ago)
Author:
cstephen
Message:

Migrate from jQuery 1.10.2 -> jQuery 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default_wip/js/visual-xml-editor.js

    r35821 r35822  
    291291
    292292            $.ajax(url)
    293             .success(function(response)
     293            .done(function(response)
    294294            {
    295295                startIndex = response.search("<templateList>") + "<templateList>".length;
     
    323323                }
    324324            })
    325             .error(function()
     325            .fail(function()
    326326            {
    327327                console.log("Error retrieving GSLIB templates");
     
    383383        var customElemHolder = $("<div>");
    384384        var customCreateButton = $("<button>Create element</button>");
    385         customCreateButton.click(function()
     385        customCreateButton.on("click", function()
    386386        {
    387387            var elemName = customInput.val();
     
    648648
    649649        var _editButton = $("<button>Edit text</button>");
    650         _editButton.click(function()
     650        _editButton.on("click", function()
    651651        {
    652652            if(_editButton.button("option", "label") == "Edit text")
     
    768768            var link = $("<a href=\"javascript:;\">edit</a>");
    769769
    770             link.click(function()
     770            link.on("click", function()
    771771            {
    772772                _thisAttr.editMode();
     
    781781            var cell = $("<td>", {"class":"veDeleteCell"});
    782782            var link = $("<a href=\"javascript:;\">delete</a>");
    783             link.click(function()
     783            link.on("click", function()
    784784            {
    785785                _transactions.push({type:"remAttr", elem:_xmlElem, row:_row, rowParent:_row.parent(), name:_name, value:_value});
     
    824824            editLink.text("done");
    825825            editLink.off("click");
    826             editLink.click(function()
     826            editLink.on("click", function()
    827827            {
    828828                _thisAttr.saveEdits();
     
    871871            editLink.text("edit");
    872872            editLink.off("click");
    873             editLink.click(function()
     873            editLink.on("click", function()
    874874            {
    875875                _thisAttr.editMode();
     
    11751175            var errorFunction = function()
    11761176            {
    1177                 $.ajax(url).success(successFunction).error(errorFunction);
     1177                $.ajax(url).done(successFunction).fail(errorFunction);
    11781178            }
    11791179           
    1180             $.ajax(url).success(successFunction).error(errorFunction);
     1180            $.ajax(url).done(successFunction).fail(errorFunction);
    11811181        }
    11821182
     
    12481248
    12491249                var addButton = $("<button>Add attribute</button>");
    1250                 addButton.click(function()
     1250                addButton.on("click", function()
    12511251                {
    12521252                    var newAtt;
     
    13301330                event.stopPropagation();
    13311331            });
    1332             _div.click(function(event)
     1332            _div.on("click", function(event)
    13331333            {
    13341334                event.stopPropagation();
Note: See TracChangeset for help on using the changeset viewer.