gpt4 book ai didi

javascript - Magento找不到js的引用

转载 作者:行者123 更新时间:2023-11-28 07:45:14 27 4
gpt4 key购买 nike

我正在使用函数_prepareLayout()

magento\app\design\adminhtml\default\default\template\downloadable\product\edit\downloadable\links.phtml:

 protected function _prepareLayout()
{
$this->setChild(
'upload_button',
$this->getLayout()->createBlock('adminhtml/widget_button')->addData(array(
'id' => '',
'label' => Mage::helper('adminhtml')->__('Upload Files'),
'type' => 'button',
'onclick' => 'Downloadable.massUploadByType(\'links\');Downloadable.massUploadByType(\'linkssample\')'
))
);


}

您能否提及其来源:'Downloadable.massUploadByType(\'links\');Downloadable.massUploadByType(\'linkssample\')'

最佳答案

看看 app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable.phtml:

massUploadByType : function(type){
try {
this.uploaderObj.get(type).each(function(item){
container = item.value.container.up('tr');
if (container.visible() && !container.hasClassName('no-display')) {
item.value.upload();
} else {
Downloadable.unsetUploaderObj(type, item.key);
}
});
} catch (e) {
try {
console.log(e);
} catch (e2) {
alert(e.name + '\n' + e.message);
}
}
}

关于javascript - Magento找不到js的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27512617/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com