I've got a problem on the attributemanajer.js
The problem is that when i add a new option using the attribute manager on the catalog file, the div blackout not appear in the center of the plugin, instead appeats on the top of the page, and this not look fine.
to solve this i've got to change the function create_custom_prompt() to this
function createCustomPrompt() {
var attributeManager = getElement("attributeManager");
var attributeManagerX = findPosX(attributeManager);
var attributeManagerY = findPosY(attributeManager);
var attributeManagerW = attributeManager.scrollWidth;
var attributeManagerH = attributeManager.scrollHeight;
// cover the attribute manager with a semi tranparent div
newBit = attributeManager.appendChild(document.createElemen t("div"));
newBit.id = "blackout";
newBit.style.height = attributeManagerH + 'px';
newBit.style.width = attributeManagerW + 'px';
newBit.style.left += attributeManagerX + 'px';
newBit.style.top += attributeManagerY + 'px';
// hide select boxes (for IE)
showHideSelectBoxes('hidden');
// create a popup shaddow
popupShaddow = attributeManager.appendChild(document.createElemen t("div"));
popupShaddow.id = "popupShaddow";
// create the contents div
popupContents = attributeManager.appendChild(document.createElemen t("div"));
popupContents.id = "popupContents";
// put the ajax reqest text in the box
popupContents.innerHTML = amRequester.getText();
// work out the center postion for the box
leftPos = (((attributeManagerW - popupContents.scrollWidth) / 2) + attributeManagerX);
topPos = (((attributeManagerH - popupContents.scrollHeight) / 2) + attributeManagerY);
// position the box
popupContents.style.left = leftPos + 'px';
popupContents.style.top = topPos + 'px';
// size the shadow
popupShaddow.style.width = popupContents.scrollWidth + 'px';
popupShaddow.style.height = popupContents.scrollHeight + 'px';
// position the shadow
popupShaddow.style.left = leftPos+6 + 'px';
popupShaddow.style.top = topPos+6 + 'px';
// if the form has any inputs focus on the first one
if(inputs == popupContents.getElementsByTagName("input"))
inputs[0].focus();
return false;
}
the real change is to add to all nodes that change style.left, top, width and height, add + 'px'
i've upload only the javascript file.
Sorry for my English!!
More...





LinkBack URL
About LinkBacks








Reply With Quote
Bookmarks