Skip to content

Commit

Permalink
Migrate more inline handlers (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam authored Mar 8, 2024
1 parent 627e074 commit b942ceb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions viscstudies/resources/views/migrateStudyDesigns.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,8 @@
Ext4.onReady(function() {
_migrateControl.getStudyDesigns();
LABKEY.NavTrail.setTrail("Migrate Study Designs");
document.getElementById('migrateButton')['onclick'] = _migrateControl.doMigration;
document.getElementById('deleteButton')['onclick'] = _migrateControl.deleteAllRows;
});

</script>
Expand All @@ -1056,5 +1058,5 @@
<div id="migrateList"><ul>

</ul></div>
<button id="migrateButton" onclick="_migrateControl.doMigration();" disabled>Migrate</button>
<button id="deleteButton" onclick="_migrateControl.deleteAllRows();">Delete Migrated Data</button>
<button id="migrateButton" disabled>Migrate</button>
<button id="deleteButton">Delete Migrated Data</button>
6 changes: 3 additions & 3 deletions viscstudies/webapp/viscstudies/study.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@ function initFacets()
});
tip.on("afterrender", function(t) {
// Attach event handlers after HTML is rendered
document.getElementById('showAll_' + id)['click'] = function() { selectAll(id); return false;}
document.getElementById('showAll_' + id)['onclick'] = function() { selectAll(id); return false;}
for (let i = 0; i < facet2.allOptions.length; i++)
{
const id = facet2.id;
const idx = i;
document.getElementById(checkboxId(facet2, i))['click'] = function() { optionClicked(this, id, idx); };
document.getElementById('selectOnly_' + i)['click'] = function() { selectOnly(id, i); return false; }
document.getElementById(checkboxId(facet2, i))['onclick'] = function() { optionClicked(this, id, idx); };
document.getElementById('selectOnly_' + i)['onclick'] = function() { selectOnly(id, i); return false; }
}
});
}
Expand Down

0 comments on commit b942ceb

Please sign in to comment.