Skip to content

fix: Update JavaScript functionalities#41

Open
sergioceron wants to merge 1 commit intomasterfrom
coderops/fix-d4cb7713-task-84d
Open

fix: Update JavaScript functionalities#41
sergioceron wants to merge 1 commit intomasterfrom
coderops/fix-d4cb7713-task-84d

Conversation

@sergioceron
Copy link
Copy Markdown
Member

Automated fix by CoderOps.

Swarm: swarm50
Task: Update JavaScript functionalities

Copilot AI review requested due to automatic review settings April 10, 2026 18:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to be an automated update to the shared admin/control-panel JavaScript (jscripts/cpanel.js), attempting to extend checkbox/table interactions with an optional userTableId parameter.

Changes:

  • Added userTableId parameters to switchItem(...) and updateDeleteButtons(...).
  • Modified cbTbl.selectOne to attempt table lookup via userTableId before falling back to DOM traversal.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread jscripts/cpanel.js
Comment on lines +316 to +321
cbTbl.selectOne = function(cb) {
cbTbl.highlight(cb);
// Update status of 'Select All' checkbox appropriately.
// The first ('Select All') cb should be selected IFF all the
// rest are checked,
var tbl = document.getElementById(userTableId) || cbTbl.findContainingTable(cb);
Comment thread jscripts/cpanel.js
Comment on lines +169 to +176
function updateDeleteButtons(cb, userTableId) {
if (cbTbl.numberChecked(cb, userTableId) == 0) {
disAble('deleteT');
disAble('deleteB');
} else {
enAble('deleteT');
enAble('deleteB');
}
Comment thread jscripts/cpanel.js
Comment on lines +60 to +67
function switchItem(which, userTableId) {
switchItem2(currentItem, which, userTableId);
currentItem=which;
};

/* hide one item, show another */
function switchItem2(toHide,toShow) {
hideItem(toHide);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants