当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Widget_Tabs::_toHtml方法代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Tabs::_toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Tabs::_toHtml方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Tabs::_toHtml怎么用?PHP Mage_Adminhtml_Block_Widget_Tabs::_toHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Adminhtml_Block_Widget_Tabs的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Widget_Tabs::_toHtml方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _toHtml

    protected function _toHtml()
    {
        $additionalJavascript = <<<HTML
<script type="text/javascript">
    {$this->getJsObjectName()}.moveTabContentInDest();

    EbayMotorsHandlerObj.saveAsGroupPopupHtml = \$('save_as_group_popup').innerHTML;
    \$('save_as_group_popup').remove();
    EbayMotorsHandlerObj.setNotePopupHtml = \$('set_note_popup').innerHTML;
    \$('set_note_popup').remove();

</script>
HTML;
        $saveAsGroupPopup = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_motor_add_saveAsGroupPopup');
        $setNotePopup = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_motor_add_setNotePopup');
        return parent::_toHtml() . '<div id="ebay_motor_add_tabs_container"></div>' . $saveAsGroupPopup->toHtml() . $setNotePopup->toHtml() . $additionalJavascript;
    }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:17,代码来源:Tabs.php

示例2: _toHtml

    protected function _toHtml()
    {
        $translations = json_encode(array('Description' => Mage::helper('M2ePro')->__('Description')));
        $javascript = <<<JAVASCIRPT

<script type="text/javascript">

    M2ePro.translator.add({$translations});

    Event.observe(window, 'load', function() {
        LogHandlerObj = new LogHandler();
    });

</script>

JAVASCIRPT;
        return $javascript . parent::_toHtml() . '<div id="tabs_container"></div>';
    }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:18,代码来源:Tabs.php

示例3: _toHtml

    protected function _toHtml()
    {
        $sContent = parent::_toHtml();
        $sContent .= '
        
<script type="text/javascript">
//<![CDATA[        
        
    var productLinksController = Class.create();

    productLinksController.prototype = {
        initialize : function(fieldId, products, grid) {
            this.saveField = $(fieldId);
            this.saveFieldId = fieldId;
            this.products    = $H(products);
            this.grid        = grid;
            this.tabIndex    = 1000;
            this.grid.rowClickCallback = this.rowClick.bind(this);
            this.grid.initRowCallback = this.rowInit.bind(this);
            this.grid.checkboxCheckCallback = this.registerProduct.bind(this);
            this.grid.rows.each(this.eachRow.bind(this));
            this.saveField.value = this.serializeObject(this.products);
            this.grid.reloadParams = {"products[]":this.products.keys()};
        },
        eachRow : function(row) {
            this.rowInit(this.grid, row);
        },
        registerProduct : function(grid, element, checked) {
            if(checked){
                if(element.inputElements) {
                    this.products.set(element.value, {});
                    for(var i = 0; i < element.inputElements.length; i++) {
                        element.inputElements[i].disabled = false;
                        this.products.get(element.value)[element.inputElements[i].name] = element.inputElements[i].value;
                    }
                }
            }
            else{
                if(element.inputElements){
                    for(var i = 0; i < element.inputElements.length; i++) {
                        element.inputElements[i].disabled = true;
                    }
                }

                this.products.unset(element.value);
            }
            this.saveField.value = this.serializeObject(this.products);
            this.grid.reloadParams = {"products[]":this.products.keys()};
        },
        serializeObject : function(hash) {
            var clone = hash.clone();
            clone.each(function(pair) {
                clone.set(pair.key, encode_base64(Object.toQueryString(pair.value)));
            });
            return clone.toQueryString();
        },
        rowClick : function(grid, event) {
            var trElement = Event.findElement(event, "tr");
            var isInput   = Event.element(event).tagName == "INPUT";
            if(trElement){
                var checkbox = Element.select(trElement, "input");
                if(checkbox[0]){
                    var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
                    this.grid.setCheckboxChecked(checkbox[0], checked);
                }
            }
        },
        inputChange : function(event) {
            var element = Event.element(event);
            if(element && element.checkboxElement && element.checkboxElement.checked){
                this.products.get(element.checkboxElement.value)[element.name] = element.value;
                this.saveField.value = this.serializeObject(this.products);
            }
        },
        rowInit : function(grid, row) {
            var checkbox = $(row).select(".checkbox")[0];
            var inputs = $(row).select(".input-text");
            if(checkbox && inputs.length > 0) {
                checkbox.inputElements = inputs;
                for(var i = 0; i < inputs.length; i++) {
                    inputs[i].checkboxElement = checkbox;
                    if(this.products.get(checkbox.value) && this.products.get(checkbox.value)[inputs[i].name]) {
                        inputs[i].value = this.products.get(checkbox.value)[inputs[i].name];
                    }
                    inputs[i].disabled = !checkbox.checked;
                    inputs[i].tabIndex = this.tabIndex++;
                    Event.observe(inputs[i],"keyup", this.inputChange.bind(this));
                    Event.observe(inputs[i],"change", this.inputChange.bind(this));
                }
            }
        }
    };        
//]]>
</script>        
        ';
        return $sContent;
    }
开发者ID:brentwpeterson,项目名称:magento_cart_promo,代码行数:97,代码来源:Tabs.php

示例4: _toHtml

 protected function _toHtml()
 {
     return parent::_toHtml() . '<form id="currencies_form"><div id="tabs_container"></div></form>';
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:4,代码来源:Tabs.php

示例5: _toHtml

    protected function _toHtml()
    {
        $translations = json_encode(array('Description' => Mage::helper('M2ePro')->__('Description')));
        $tabElId = $this->getId();
        $tabsIds = $this->getTabsIds();
        $jsHideOneTab = '';
        if (count($tabsIds) === 1) {
            $jsHideOneTab = <<<JS
\$('{$tabElId}').hide();
JS;
        }
        $javascript = <<<JAVASCIRPT

<script type="text/javascript">

    M2ePro.translator.add({$translations});

    Event.observe(window, 'load', function() {
        LogHandlerObj = new LogHandler();

        {$jsHideOneTab}
    });

</script>

JAVASCIRPT;
        return $javascript . parent::_toHtml() . '<div id="tabs_container"></div>';
    }
开发者ID:ppkowalski,项目名称:M2E,代码行数:28,代码来源:Tabs.php

示例6: _toHtml

    protected function _toHtml()
    {
        $url = Mage::getModel('adminhtml/url')->getUrl('cartex/adminhtml_coupon/create');
        $sContent = parent::_toHtml();
        $sContent .= '
       
	
	<script type="text/javascript">
	var xmlhttp;
	
	function GetXmlHttpObject() {
    if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        return new XMLHttpRequest();
    }
    if (window.ActiveXObject) {
        // code for IE6, IE5
        return new ActiveXObject("Microsoft.XMLHTTP");
    }
    return null;
	}
	
	function sendcodes(){
	 
	var pre = document.getElementById("code_prefix").value;
	var num = document.getElementById("coupon_num").value;
	var len = document.getElementById("coupon_len").value;
	var dis = document.getElementById("coupon_discount").value;
	var use = document.getElementById("coupon_use").value;
	var custuse = document.getElementById("cust_use").value;
	var id = document.getElementById("cartex_id").value;
	
	xmlhttp = GetXmlHttpObject();
    if (xmlhttp == null) {
        alert("Browser does not support HTTP Request");
        return;
    }
	var url = "' . $url . '";
    url = url + "code/" + pre + "/coupon_num/" + num + "/coupon_len/" + len + "/id/" + id + "/use/" + use + "/discount/" + dis + "/cust_use/" + custuse + "/";

    xmlhttp.onreadystatechange = stateChanged;
    xmlhttp.open("GET", url, true);
    xmlhttp.send(null);
	
	}
	
function stateChanged() {
   if (xmlhttp.readyState == 4) {
       document.getElementById("coupon_text").innerHTML = xmlhttp.responseText;
	  //alert(xmlhttp.responseText);
  }
}
	</script>
<script type="text/javascript">
//<![CDATA[        
        
    var productLinksController = Class.create();

    productLinksController.prototype = {
        initialize : function(fieldId, products, grid) {
            this.saveField = $(fieldId);
            this.saveFieldId = fieldId;
            this.products    = $H(products);
            this.grid        = grid;
            this.tabIndex    = 1000;
            this.grid.rowClickCallback = this.rowClick.bind(this);
            this.grid.initRowCallback = this.rowInit.bind(this);
            this.grid.checkboxCheckCallback = this.registerProduct.bind(this);
            this.grid.rows.each(this.eachRow.bind(this));
            this.saveField.value = this.serializeObject(this.products);
            this.grid.reloadParams = {"products[]":this.products.keys()};
        },
        eachRow : function(row) {
            this.rowInit(this.grid, row);
        },
        registerProduct : function(grid, element, checked) {
            if(checked){
                if(element.inputElements) {
                    this.products.set(element.value, {});
                    for(var i = 0; i < element.inputElements.length; i++) {
                        element.inputElements[i].disabled = false;
                        this.products.get(element.value)[element.inputElements[i].name] = element.inputElements[i].value;
                    }
                }
            }
            else{
                if(element.inputElements){
                    for(var i = 0; i < element.inputElements.length; i++) {
                        element.inputElements[i].disabled = true;
                    }
                }

                this.products.unset(element.value);
            }
            this.saveField.value = this.serializeObject(this.products);
            this.grid.reloadParams = {"products[]":this.products.keys()};
        },
        serializeObject : function(hash) {
            var clone = hash.clone();
            clone.each(function(pair) {
//.........这里部分代码省略.........
开发者ID:brentwpeterson,项目名称:magento_cart_promo,代码行数:101,代码来源:Tabs.php

示例7: _toHtml

    protected function _toHtml()
    {
        $generalId = $this->getListingProduct()->getChildObject()->getGeneralId();
        $showMask = 0;
        if (!(empty($generalId) && $this->getListingProduct()->getChildObject()->isGeneralIdOwner())) {
            $showMask = 1;
        }
        $data = array('style' => 'float: right; margin-top: 7px; ', 'label' => Mage::helper('M2ePro')->__('Close'), 'onclick' => 'ListingGridHandlerObj.variationProductManageHandler.closeManageVariationsPopup()');
        $closeBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
        $additionalJavascript = <<<HTML
<script type="text/javascript">
    amazonVariationProductManageTabsJsTabs.moveTabContentInDest();

    if (!{$showMask}) {
        amazonVariationProductManageTabsJsTabs.tabs[0].hide();
    }

    ListingGridHandlerObj.variationProductManageHandler.loadVariationsGrid({$showMask});
</script>
HTML;
        return parent::_toHtml() . '<div id="variation_product_manage_tabs_container"></div>' . $additionalJavascript . $closeBtn->toHtml();
    }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:22,代码来源:Tabs.php

示例8: _toHtml

 protected function _toHtml()
 {
     $retour = parent::_toHtml();
     $button = '<div align="right"><button onclick="document.location.href=\'' . $this->getUrl('OrderPreparation/OrderPreparation/RefreshList') . '\'" class="scalable save" type="button"><span>' . $this->__('Force Refresh') . '</span></button></div>';
     return $button . $retour;
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:6,代码来源:OrderPreparationTab.php


注:本文中的Mage_Adminhtml_Block_Widget_Tabs::_toHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。