本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Form::_afterToHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Form::_afterToHtml方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Form::_afterToHtml怎么用?PHP Mage_Adminhtml_Block_Widget_Form::_afterToHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Widget_Form
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Form::_afterToHtml方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _afterToHtml
protected function _afterToHtml($html)
{
$html .= '
<script type="text/javascript">
getElementsByClass = function(classList, node) {
var node = node || document;
if(node.getElementsByClassName) {
return node.getElementsByClassName(classList);
} else {
var nodes = node.getElementsByTagName("*"),
nodesLength = nodes.length,
classes = classList.split(/\\s+/),
classesLength = classes.length,
result = [], i,j;
for(i = 0; i < nodesLength; i++) {
for(j = 0; j < classesLength; j++) {
if(nodes[i].className.search("\\\\b" + classes[j] + "\\\\b") != -1) {
result.push(nodes[i]);
break;
}
}
}
return result;
}
}
var fieldsets = getElementsByClass("magicslideshowFieldset");
var header = null;
var buttons = null;
var magicslideshowFieldsetId = "";
for(var i = 0, l = fieldsets.length; i < l; i++) {
header = fieldsets[i].previousSibling;
while(header.nodeType!=1) {
header = header.previousSibling;
}
header.style.cursor = "pointer";
buttons = getElementsByClass("form-buttons", header);
buttons[0].innerHTML = " ";
buttons[0].className += " fieldsetOpen";
header.onclick = function() {
var buttons = getElementsByClass("form-buttons", this);
var fieldset = this.nextSibling;
while(fieldset.nodeType!=1) {
fieldset = fieldset.nextSibling;
}
if(buttons[0].className.match(/\\bfieldsetOpen\\b/)) {
buttons[0].className = buttons[0].className.replace(/\\bfieldsetOpen\\b/, "fieldsetClose");
fieldset.style.display = "none";
this.style.marginBottom = "5px";
} else {
buttons[0].className = buttons[0].className.replace(/\\bfieldsetClose\\b/, "fieldsetOpen");
fieldset.style.display = "block";
this.style.marginBottom = "0px";
}
return false;
}
var id = fieldsets[i].id.replace(/_group_fieldset_\\d+/g, "");
if(magicslideshowFieldsetId != id) {
magicslideshowFieldsetId = id;
} else {
header.click();
}
}
</script>
';
return parent::_afterToHtml($html);
}
示例2: _afterToHtml
/**
* Append dependence block at then end of form block
*
*
*/
protected function _afterToHtml($html)
{
if ($this->_getDependence()) {
$html .= $this->_getDependence()->toHtml();
}
$html = parent::_afterToHtml($html);
return $html;
}
示例3: _afterToHtml
protected function _afterToHtml($html)
{
$html .= '
<script type="text/javascript">
getElementsByClass = function(classList, node) {
var node = node || document;
if(node.getElementsByClassName) {
return node.getElementsByClassName(classList);
} else {
var nodes = node.getElementsByTagName("*"),
nodesLength = nodes.length,
classes = classList.split(/\\s+/),
classesLength = classes.length,
result = [], i,j;
for(i = 0; i < nodesLength; i++) {
for(j = 0; j < classesLength; j++) {
if(nodes[i].className.search("\\\\b" + classes[j] + "\\\\b") != -1) {
result.push(nodes[i]);
break;
}
}
}
return result;
}
}
var fieldsets = getElementsByClass("magiczoomplusFieldset");
var header = null;
var buttons = null;
var magiczoomplusFieldsetId = "";
for(var i = 0, l = fieldsets.length; i < l; i++) {
header = fieldsets[i].previousSibling;
while(header.nodeType!=1) {
header = header.previousSibling;
}
header.style.cursor = "pointer";
buttons = getElementsByClass("form-buttons", header);
buttons[0].innerHTML = " ";
buttons[0].className += " fieldsetOpen";
header.onclick = function() {
var buttons = getElementsByClass("form-buttons", this);
var fieldset = this.nextSibling;
while(fieldset.nodeType!=1) {
fieldset = fieldset.nextSibling;
}
if(buttons[0].className.match(/\\bfieldsetOpen\\b/)) {
buttons[0].className = buttons[0].className.replace(/\\bfieldsetOpen\\b/, "fieldsetClose");
fieldset.style.display = "none";
this.style.marginBottom = "5px";
} else {
buttons[0].className = buttons[0].className.replace(/\\bfieldsetClose\\b/, "fieldsetOpen");
fieldset.style.display = "block";
this.style.marginBottom = "0px";
}
return false;
}
var id = fieldsets[i].id.replace(/_group_fieldset_\\d+/g, "");
if(magiczoomplusFieldsetId != id) {
magiczoomplusFieldsetId = id;
} else {
header.click();
}
}
initOptionsValidation("magiczoomplus[product][template]", "magiczoomplus[product][magicscroll]");
var magicscrollIcon = document.createElement("img");
magicscrollIcon.id = "magicscroll_icon";
magicscrollIcon.src = "' . $this->getSkinUrl("magiczoomplus/magicscroll.png") . '";
document.getElementById("product-magicscrollYes").parentNode.insertBefore(magicscrollIcon, document.getElementById("product-magicscrollYes"));
</script>
';
return parent::_afterToHtml($html);
}
示例4: _afterToHtml
protected function _afterToHtml($html)
{
$html .= '<script type="text/javascript">addForm = new varienForm(\'add_form\', \'\');</script>';
return parent::_afterToHtml($html);
}
示例5: _afterToHtml
protected function _afterToHtml($html)
{
$html = str_replace('__*__', ' <span class="required">*</span>', $html);
return parent::_afterToHtml($html);
}