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


PHP Mage_Adminhtml_Block_Widget_Grid::_toHtml方法代码示例

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


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

示例1: _toHtml

 protected function _toHtml()
 {
     if ($this->getRequest()->getParam('ajax')) {
         return parent::_toHtml();
     }
     return $this->_getFormMessages() . parent::_toHtml();
 }
开发者ID:xiaoguizhidao,项目名称:autotech_design,代码行数:7,代码来源:Grid.php

示例2: _toHtml

 protected function _toHtml()
 {
     $html = parent::_toHtml();
     if ($this->getRequest()->getParam('isAjax')) {
         return $html;
     }
     return $this->_getBeforeGridHtml() . $html . $this->_getAfterGridHtml();
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:8,代码来源:Grid.php

示例3: _toHtml

 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     $html = '';
     if ($this->getRequest()->isAjax()) {
         $html = '<div id="messages">' . $this->getMessagesBlock()->getGroupedHtml() . '</div>';
     }
     $html .= parent::_toHtml();
     return $html;
 }
开发者ID:tschifftner,项目名称:Magento-MEP,代码行数:14,代码来源:Grid.php

示例4: _toHtml

    protected function _toHtml()
    {
        $css = '
<style type="text/css">
.grid tr.even, .grid tr.even tr
{
    background: transparent;
}
</style>';
        return $css . parent::_toHtml();
    }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:11,代码来源:Grid.php

示例5: _toHtml

    protected function _toHtml()
    {
        $urlParams = array('model' => $this->getModelName(), 'table' => $this->getRequest()->getParam('table'));
        $root = 'adminhtml_development_database';
        $urls = json_encode(array($root . '/deleteTableRows' => $this->getUrl('*/*/deleteTableRows', $urlParams), $root . '/updateTableCells' => $this->getUrl('*/*/updateTableCells', $urlParams), $root . '/addTableRow' => $this->getUrl('*/*/addTableRow', $urlParams), $root . '/getTableCellsPopupHtml' => $this->getUrl('*/*/getTableCellsPopupHtml', $urlParams)));
        $commonJs = <<<HTML
<script type="text/javascript">
    DevelopmentDatabaseGridHandlerObj.afterInitPage();
</script>
HTML;
        $additionalJs = '';
        if (!$this->getRequest()->isXmlHttpRequest()) {
            $additionalJs = <<<HTML
<script type="text/javascript">

   M2ePro.url.add({$urls});
   DevelopmentDatabaseGridHandlerObj = new DatabaseGridHandler('{$this->getId()}');

</script>
HTML;
        }
        return parent::_toHtml() . $additionalJs . $commonJs;
    }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:23,代码来源:Grid.php

示例6: _toHtml

 public function _toHtml()
 {
     $html = parent::_toHtml();
     // add store switcher
     if (!Mage::app()->isSingleStoreMode() && $this->getRequest()->getParam('webform_id') && !$this->getRequest()->getParam('ajax')) {
         $store_switcher = $this->getLayout()->createBlock('adminhtml/store_switcher', 'store_switcher');
         $store_switcher->setUseConfirm(false);
         $html = $store_switcher->toHtml() . $html;
     }
     return $html;
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:11,代码来源:SingPost_WebForms_Block_Adminhtml_Results_Grid.php

示例7: _toHtml

    protected function _toHtml()
    {
        $additionalJs = '<script type="text/javascript">
    $H(EbayMotorCompatibilityHandlerObj.savedNotes).each(function(note) {
         if ($(\'note_view_\' + note.key)) {
             $(\'note_view_\' + note.key).innerHTML = note.value;
         }
    });
</script>';
        return parent::_toHtml() . $additionalJs;
    }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:11,代码来源:Grid.php

示例8: _toHtml

    protected function _toHtml()
    {
        $cssBefore = <<<STYLE
<style type="text/css">
    table.massaction div.right {
        display: none;
    }
</style>
STYLE;
        $helper = Mage::helper('M2ePro');
        $isShowRuleBlock = json_encode($this->isShowRuleBlock());
        $selectItemsMessage = $helper->escapeJs($helper->__('Please select the Products you want to perform the Action on.'));
        $createEmptyListingMessage = $helper->escapeJs($helper->__('Are you sure you want to create empty Listing?'));
        $showAdvancedFilterButtonText = $helper->escapeJs($helper->__('Show Advanced Filter'));
        $hideAdvancedFilterButtonText = $helper->escapeJs($helper->__('Hide Advanced Filter'));
        $addProductsUrl = $this->getUrl('*/adminhtml_common_listing_productAdd/addProducts', array('component' => $this->getData('component')));
        $backUrl = $this->getUrl('*/*/index');
        $javascript = <<<HTML
<script type="text/javascript">
    if (typeof M2ePro == 'undefined') {
        M2ePro = {};
        M2ePro.url = {};
        M2ePro.formData = {};
        M2ePro.customData = {};
        M2ePro.text = {};
    }

    M2ePro.text.select_items_message = '{$selectItemsMessage}';
    M2ePro.text.create_empty_listing_message = '{$createEmptyListingMessage}';
    M2ePro.text.show_advanced_filter = '{$showAdvancedFilterButtonText}';
    M2ePro.text.hide_advanced_filter = '{$hideAdvancedFilterButtonText}';
    M2ePro.url.add_products = '{$addProductsUrl}';
    M2ePro.url.back = '{$backUrl}';

    WrapperObj = new AreaWrapper('add_products_container');
    ProgressBarObj = new ProgressBar('add_products_progress_bar');
    AddListingObj = new CommonListingAddListingHandler(M2ePro, ProgressBarObj, WrapperObj);
    AddListingObj.listing_id = '{$this->getRequest()->getParam('id')}';
    ProductGridHandlerObj = new ListingProductGridHandler(AddListingObj);
    ProductGridHandlerObj.setGridId('{$this->getId()}');

    var init = function () {
        {$this->getId()}JsObject.doFilter = ProductGridHandlerObj.setFilter;
        {$this->getId()}JsObject.resetFilter = ProductGridHandlerObj.resetFilter;
        if ({$isShowRuleBlock}) {
            \$('listing_product_rules').show();
            if (\$('advanced_filter_button')) {
                \$('advanced_filter_button').simulate('click');
            }
        }
    }

    {$this->isAjax} ? init()
                    : Event.observe(window, 'load', init);
</script>
HTML;
        return $cssBefore . parent::_toHtml() . $javascript;
    }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:58,代码来源:Grid.php

示例9: _toHtml

    protected function _toHtml()
    {
        $listingId = $this->getListingProduct()->getListingId();
        /** @var $helper Ess_M2ePro_Helper_Data */
        $helper = Mage::helper('M2ePro');
        // ---------------------------------------
        $urls = array();
        $path = 'adminhtml_common_log/listingProduct';
        $urls[$path] = $this->getUrl('*/' . $path, array('channel' => Ess_M2ePro_Helper_Component_Amazon::NICK, 'back' => $helper->makeBackUrlParam('*/adminhtml_common_amazon_listing/view', array('id' => $listingId))));
        $urls['adminhtml_common_amazon_listing_variation_product_manage/createNewChild'] = $this->getUrl('*/adminhtml_common_amazon_listing_variation_product_manage/createNewChild');
        $urls = json_encode($urls);
        // ---------------------------------------
        $component = Ess_M2ePro_Helper_Component_Amazon::NICK;
        $logViewUrl = $this->getUrl('*/adminhtml_common_log/listing', array('id' => $listingId, 'channel' => Ess_M2ePro_Block_Adminhtml_Common_Log_Tabs::CHANNEL_ID_AMAZON, 'back' => $helper->makeBackUrlParam('*/adminhtml_common_amazon_listing/view', array('id' => $listingId))));
        $checkLockListing = $this->getUrl('*/adminhtml_listing/checkLockListing', array('component' => $component));
        $lockListingNow = $this->getUrl('*/adminhtml_listing/lockListingNow', array('component' => $component));
        $unlockListingNow = $this->getUrl('*/adminhtml_listing/unlockListingNow', array('component' => $component));
        $getErrorsSummary = $this->getUrl('*/adminhtml_listing/getErrorsSummary');
        $runListProducts = $this->getUrl('*/adminhtml_common_amazon_listing/runListProducts');
        $runReviseProducts = $this->getUrl('*/adminhtml_common_amazon_listing/runReviseProducts');
        $runRelistProducts = $this->getUrl('*/adminhtml_common_amazon_listing/runRelistProducts');
        $runStopProducts = $this->getUrl('*/adminhtml_common_amazon_listing/runStopProducts');
        $runStopAndRemoveProducts = $this->getUrl('*/adminhtml_common_amazon_listing/runStopAndRemoveProducts');
        $runDeleteAndRemoveProducts = $this->getUrl('*/adminhtml_common_amazon_listing/runDeleteAndRemoveProducts');
        $setChildListingProductOptions = $this->getUrl('*/adminhtml_common_amazon_listing_variation_product_manage/setChildListingProductOptions');
        $taskCompletedMessage = $helper->escapeJs($helper->__('Task completed. Please wait ...'));
        $taskCompletedSuccessMessage = $helper->escapeJs($helper->__('"%task_title%" Task has successfully submitted to be processed.'));
        $taskCompletedWarningMessage = $helper->escapeJs($helper->__('"%task_title%" Task has completed with warnings.
            <a target="_blank" href="%url%">View Log</a> for details.'));
        $taskCompletedErrorMessage = $helper->escapeJs($helper->__('"%task_title%" Task has completed with errors. <a target="_blank" href="%url%">View Log</a> for details.'));
        $lockedObjNoticeMessage = $helper->escapeJs($helper->__('Some Amazon request(s) are being processed now.'));
        $sendingDataToAmazonMessage = $helper->escapeJs($helper->__('Sending %product_title% Product(s) data on Amazon.'));
        $viewAllProductLogMessage = $helper->escapeJs($helper->__('View All Product Log.'));
        $listingLockedMessage = $helper->escapeJs($helper->__('The Listing was locked by another process. Please try again later.'));
        $listingEmptyMessage = $helper->escapeJs($helper->__('Listing is empty.'));
        $listingAllItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing All Items On Amazon'));
        $listingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing Selected Items On Amazon'));
        $revisingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Revising Selected Items On Amazon'));
        $relistingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Relisting Selected Items On Amazon'));
        $stoppingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping Selected Items On Amazon'));
        $stoppingAndRemovingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping On Amazon And Removing From Listing Selected Items'));
        $deletingAndRemovingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Removing From Amazon And Listing Selected Items'));
        $selectItemsMessage = $helper->escapeJs($helper->__('Please select Items.'));
        $selectActionMessage = $helper->escapeJs($helper->__('Please select Action.'));
        $errorChangingProductOptions = $helper->escapeJs($helper->__('Please Select Product Options.'));
        $successWord = $helper->escapeJs($helper->__('Success'));
        $noticeWord = $helper->escapeJs($helper->__('Notice'));
        $warningWord = $helper->escapeJs($helper->__('Warning'));
        $errorWord = $helper->escapeJs($helper->__('Error'));
        $closeWord = $helper->escapeJs($helper->__('Close'));
        $confirmWord = $helper->escapeJs($helper->__('Confirm'));
        $cancelWord = $helper->escapeJs($helper->__('Cancel'));
        $textConfirm = $helper->escapeJs($helper->__('Are you sure?'));
        $mapToTemplateDescription = $this->getUrl('*/adminhtml_common_amazon_listing/mapToTemplateDescription');
        $unmapFromTemplateDescription = $this->getUrl('*/adminhtml_common_amazon_listing/unmapFromTemplateDescription');
        $validateProductsForTemplateDescriptionAssign = $this->getUrl('*/adminhtml_common_amazon_listing/validateProductsForTemplateDescriptionAssign');
        $viewTemplateDescriptionsGrid = $this->getUrl('*/adminhtml_common_amazon_listing/viewTemplateDescriptionsGrid');
        $templateDescriptionPopupTitle = $helper->escapeJs($helper->__('Assign Description Policy for Products'));
        $getAFNQtyBySku = $this->getUrl('*/adminhtml_common_amazon_listing/getAFNQtyBySku');
        $generalId = $this->getListingProduct()->getGeneralId();
        $hideMassAction = empty($generalId) ? '$(\'amazonVariationProductManageGrid_massaction-form\').hide();' : '';
        $javascriptMain = <<<HTML
<script type="text/javascript">

    if (typeof M2ePro == 'undefined') {
        M2ePro = {};
        M2ePro.url = {};
        M2ePro.formData = {};
        M2ePro.customData = {};
        M2ePro.text = {};
    }

    M2ePro.url.add({$urls});

    M2ePro.url.logViewUrl = '{$logViewUrl}';

    M2ePro.url.checkLockListing = '{$checkLockListing}';
    M2ePro.url.lockListingNow = '{$lockListingNow}';
    M2ePro.url.unlockListingNow = '{$unlockListingNow}';
    M2ePro.url.getErrorsSummary = '{$getErrorsSummary}';

    M2ePro.url.runListProducts = '{$runListProducts}';
    M2ePro.url.runReviseProducts = '{$runReviseProducts}';
    M2ePro.url.runRelistProducts = '{$runRelistProducts}';
    M2ePro.url.runStopProducts = '{$runStopProducts}';
    M2ePro.url.runStopAndRemoveProducts = '{$runStopAndRemoveProducts}';
    M2ePro.url.runDeleteAndRemoveProducts = '{$runDeleteAndRemoveProducts}';
    M2ePro.url.setChildListingProductOptions = '{$setChildListingProductOptions}';

    M2ePro.url.mapToTemplateDescription = '{$mapToTemplateDescription}';
    M2ePro.url.unmapFromTemplateDescription = '{$unmapFromTemplateDescription}';
    M2ePro.url.validateProductsForTemplateDescriptionAssign = '{$validateProductsForTemplateDescriptionAssign}';
    M2ePro.url.viewTemplateDescriptionsGrid = '{$viewTemplateDescriptionsGrid}';

    M2ePro.url.getAFNQtyBySku = '{$getAFNQtyBySku}';

    M2ePro.text.task_completed_message = '{$taskCompletedMessage}';
    M2ePro.text.task_completed_success_message = '{$taskCompletedSuccessMessage}';
    M2ePro.text.task_completed_warning_message = '{$taskCompletedWarningMessage}';
    M2ePro.text.task_completed_error_message = '{$taskCompletedErrorMessage}';
//.........这里部分代码省略.........
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:101,代码来源:Grid.php

示例10: _toHtml

    protected function _toHtml()
    {
        if ($this->getRequest()->isXmlHttpRequest()) {
            return parent::_toHtml();
        }
        $urls = json_encode(array_merge(Mage::helper('M2ePro')->getControllerActions('adminhtml_ebay_listing'), Mage::helper('M2ePro')->getControllerActions('adminhtml_ebay_listing_productAdd'), Mage::helper('M2ePro')->getControllerActions('adminhtml_ebay_log'), Mage::helper('M2ePro')->getControllerActions('adminhtml_ebay_template')));
        $translations = json_encode(array('Cancel' => Mage::helper('M2ePro')->__('Cancel'), 'Save' => Mage::helper('M2ePro')->__('Save'), 'Edit Listing Title' => Mage::helper('M2ePro')->__('Edit Listing Title')));
        $javascriptsMain = <<<HTML

<script type="text/javascript">

    Event.observe(window, 'load', function() {
        M2ePro.url.add({$urls});
        M2ePro.translator.add({$translations});

        EbayListingGridHandlerObj = new EbayListingGridHandler('{$this->getId()}');
    });

</script>

HTML;
        return parent::_toHtml() . $javascriptsMain;
    }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:23,代码来源:Grid.php

示例11: _toHtml

    protected function _toHtml()
    {
        //------------------------------
        $urls = Mage::helper('M2ePro')->getControllerActions('adminhtml_ebay_listing_categorySettings', array('_current' => true));
        $path = 'adminhtml_ebay_listing_categorySettings';
        $urls[$path] = $this->getUrl('*/' . $path, array('step' => 3, '_current' => true));
        $path = 'adminhtml_ebay_category/getChooserEditHtml';
        $urls[$path] = $this->getUrl('*/' . $path, array('account_id' => $this->listing->getAccountId(), 'marketplace_id' => $this->listing->getMarketplaceId()));
        $urls = json_encode($urls);
        //------------------------------
        //------------------------------
        $translations = array();
        // M2ePro_TRANSLATIONS
        // You have not selected the Primary eBay Category for some products.
        $text = 'You have not selected the Primary eBay Category for some products.';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        // M2ePro_TRANSLATIONS
        // Are you sure?
        $text = 'Are you sure?';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        // M2ePro_TRANSLATIONS
        // eBay could not assign categories for %product_tite% products.
        $text = 'eBay could not assign categories for %product_title% products.';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        // M2ePro_TRANSLATIONS
        // Suggested Categories were successfully received for %product_title% product(s).
        $text = 'Suggested Categories were successfully received for %product_title% product(s).';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        // M2ePro_TRANSLATIONS
        // Set eBay Category
        $text = 'Set eBay Category';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        // M2ePro_TRANSLATIONS
        // Set eBay Category for Product(s)
        $text = 'Set eBay Category for Product(s)';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        // M2ePro_TRANSLATIONS
        // Set eBay Primary Category for Product(s)
        $text = 'Set eBay Primary Category for Product(s)';
        $translations[$text] = Mage::helper('M2ePro')->__($text);
        $translations = json_encode($translations);
        //------------------------------
        //------------------------------
        $constants = Mage::helper('M2ePro')->getClassConstantAsJson('Ess_M2ePro_Helper_Component_Ebay_Category');
        //------------------------------
        $getSuggested = json_encode((bool) Mage::helper('M2ePro/Data_Global')->getValue('get_suggested'));
        $commonJs = <<<HTML
<script type="text/javascript">
    EbayListingCategoryProductGridHandlerObj.afterInitPage();
    EbayListingCategoryProductGridHandlerObj.getGridMassActionObj().setGridIds('{$this->getGridIdsJson()}');
</script>
HTML;
        $additionalJs = '';
        if (!$this->getRequest()->isXmlHttpRequest()) {
            $additionalJs = <<<HTML
<script type="text/javascript">

    M2ePro.url.add({$urls});
    M2ePro.translator.add({$translations});
    M2ePro.php.setConstants({$constants},'Ess_M2ePro_Helper_Component_Ebay_Category');

    WrapperObj = new AreaWrapper('products_container');
    ProgressBarObj = new ProgressBar('products_progress_bar');

    EbayListingCategoryProductGridHandlerObj = new EbayListingCategoryProductGridHandler('{$this->getId()}');
    EbayListingCategoryProductSuggestedSearchHandlerObj = new EbayListingCategoryProductSuggestedSearchHandler();

    if ({$getSuggested}) {
        Event.observe(window, 'load', function() {
            EbayListingCategoryProductGridHandlerObj.getSuggestedCategoriesForAll();
        });
    }
</script>
HTML;
        }
        return parent::_toHtml() . $additionalJs . $commonJs;
    }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:77,代码来源:Grid.php

示例12: _toHtml

    protected function _toHtml()
    {
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    \$\$('#playProductSearchGrid div.grid th').each(function(el){
        el.style.padding = '2px 2px';
    });

    \$\$('#playProductSearchGrid div.grid td').each(function(el){
        el.style.padding = '2px 2px';
    });

</script>
JAVASCRIPT;
        //------------------------------
        $data = array('id' => 'productSearch_cleanSuggest_button', 'label' => Mage::helper('M2ePro')->__('Clear Search Result'), 'class' => 'productSearch_cleanSuggest_button');
        $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
        //------------------------------
        $buttonBlockHtml = Mage::helper('M2ePro/Data_Global')->getValue('is_suggestion') ? $buttonBlock->toHtml() : '';
        return $buttonBlockHtml . parent::_toHtml() . $javascriptsMain;
    }
开发者ID:technomagegithub,项目名称:magento,代码行数:22,代码来源:Grid.php

示例13: _toHtml

    protected function _toHtml()
    {
        $help = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_bids_help')->toHtml();
        $html = parent::_toHtml();
        $data = array('style' => 'float: right; margin: 7px 0;', 'label' => Mage::helper('M2ePro')->__('Close'), 'onclick' => 'Windows.getFocusedWindow().close()');
        $closeBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
        return <<<HTML
<div style="margin: 10px 0;">
{$help}
    <div style="height: 250px; overflow: auto;">
        {$html}
    </div>
    {$closeBtn->toHtml()}
</div>
HTML;
    }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:16,代码来源:Grid.php

示例14: _toHtml

    protected function _toHtml()
    {
        $additionalHtml = <<<HTML
<style type="text/css">
    #{$this->getId()} table td, #{$this->getId()} table th {
        padding: 5px;
    }
</style>
HTML;
        $additionalHtml .= '<script type="text/javascript">';
        if ($this->canDisplayContainer()) {
            $additionalHtml .= <<<JS
EbayMotorViewFilterGridHandlerObj = new EbayMotorViewFilterGridHandler(
    '{$this->getId()}',
    '{$this->getListingProductId()}'
);
JS;
        }
        $additionalHtml .= <<<JS
EbayMotorViewFilterGridHandlerObj.afterInitPage();
JS;
        $additionalHtml .= '</script>';
        return '<div style="height: 350px; overflow: auto;">' . parent::_toHtml() . '</div>' . $additionalHtml;
    }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:24,代码来源:Grid.php

示例15: _toHtml

    protected function _toHtml()
    {
        $emptyGrid = json_encode(false);
        $warning = '';
        if ($this->getCollection()->getSize() < 1) {
            $warning = Mage::helper('M2ePro')->__('Listings, which have the same Attribute Set, Marketplace and Account were not found.');
            $emptyGrid = json_encode(true);
            $warning = <<<HTML
<div class="warning-msg" id="empty_grid_warning">
    <div style="margin: 10px 0 10px 35px; font-weight: bold;">{$warning}</div>
</div>
HTML;
            $warning = Mage::helper('M2ePro')->escapeJS($warning);
        }
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    var warning_msg_block = \$('empty_grid_warning');
    warning_msg_block && warning_msg_block.remove();

    if ({$emptyGrid}) {
        \$('{$this->getId()}').insert({
            before: '{$warning}'
        });
    }

    \$\$('#listingMovingGrid div.grid th').each(function(el){
        el.style.padding = '2px 4px';
    });

    \$\$('#listingMovingGrid div.grid td').each(function(el){
        el.style.padding = '2px 4px';
    });

</script>
JAVASCRIPT;
        return parent::_toHtml() . $javascriptsMain;
    }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:38,代码来源:Grid.php


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