Exemplo n.º 1
0
    public function getNotifyLowstockJs()
    {
        $html = parent::getAfterElementHtml();
        $html .= '
<script type="text/javascript">
var switchNotifyLowstockSelect = function() {
	if ($("notify_lowstock").value==1) {
		$("notify_lowstock_qty").up("tr").show()
		$("notify_lowstock_qty").enable()
	} else {
		$("notify_lowstock_qty").up("tr").hide()
		$("notify_lowstock_qty").disable()
	}
}
$("notify_lowstock").observe("change", switchNotifyLowstockSelect)
document.observe("dom:loaded", switchNotifyLowstockSelect)
</script>
        ';
        return $html;
    }