• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Mage_Adminhtml_Block_Widget_Form_Container类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('license');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml';
     $this->_mode = 'license';
     //------------------------------
     // Set header text
     //------------------------------
     $this->_headerText = Mage::helper('M2ePro')->__('License');
     //------------------------------
     // Set buttons actions
     //------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     if (Mage::getModel('M2ePro/Wizard')->isActive() && Mage::getModel('M2ePro/Wizard')->getStatus() == Ess_M2ePro_Model_Wizard::STATUS_LICENSE) {
         $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'CommonHandlersObj.reset_click()', 'class' => 'reset'));
         $this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Complete This Step'), 'onclick' => 'LicenseHandlersObj.completeStep();', 'class' => 'close'));
     } else {
         $this->_addButton('goto_about', array('label' => Mage::helper('M2ePro')->__('About'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_about/index') . '\')', 'class' => 'button_link'));
         $this->_addButton('goto_support', array('label' => Mage::helper('M2ePro')->__('Support'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_support/index') . '\')', 'class' => 'button_link'));
         $docsLink = Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/documentation/', 'baseurl');
         $this->_addButton('goto_docs', array('label' => Mage::helper('M2ePro')->__('Documentation'), 'onclick' => 'window.open(\'' . $docsLink . '\', \'M2ePro Documentation \' + \'' . $docsLink . '\'); return false;', 'class' => 'button_link'));
         $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'LicenseHandlersObj.reset_click()', 'class' => 'reset'));
     }
     //------------------------------
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:34,代码来源:License.php


示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('listingsAddStepOne');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml_listings';
     $this->_mode = 'edit';
     //------------------------------
     // Set header text
     //------------------------------
     $this->_headerText = Mage::helper('M2ePro')->__('Add Listing [Settings]');
     //------------------------------
     // Set buttons actions
     //------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     $this->_addButton('back', array('label' => Mage::helper('M2ePro')->__('Back'), 'onclick' => 'ListingEditHandlersObj.back_click(\'' . $this->getUrl('*/*/index') . '\')', 'class' => 'back'));
     $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'ListingEditHandlersObj.reset_click()', 'class' => 'reset'));
     $this->_addButton('save_and_next', array('label' => Mage::helper('M2ePro')->__('Next'), 'onclick' => 'ListingEditHandlersObj.save_click(\'' . $this->getUrl('*/*/add', array('step' => '1')) . '\')', 'class' => 'next'));
     //------------------------------
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:27,代码来源:AddStepOne.php


示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'massimporterpro';
     $this->_controller = 'adminhtml_priceupdater';
     $this->removeButton('back');
     $helper = Mage::helper('massimporterpro');
     $isValid = $helper->isValid();
     $isActive = $helper->isActive();
     $message = '';
     if (!$isActive) {
         $message = base64_decode('RXh0ZW5zaW9uIGhhcyBiZWVuIGRpc2FibGVkLiBQbGVhc2UgZW5hYmxlIGl0IGZyb20gTWFzcyBJbXBvcnRlciBQcm8gJnJhcXVvOyBNYW5hZ2UgU2V0dGluZ3M=');
     } else {
         if ($isActive && !$isValid) {
             $message = base64_decode('UGxlYXNlIGVudGVyIGEgdmFsaWQgbGljZW5zZSBrZXkgaW4gb3JkZXIgdG8gcnVuIHRoZSBleHRlbnNpb24=');
         }
     }
     if (!$isActive || $isActive && !$isValid) {
         $this->removeButton('save');
         $this->_addButton('dsave', array('label' => Mage::helper('massimporterpro')->__('Run Import'), 'onclick' => 'alert(\'' . $message . '.\')', 'class' => 'disabled'), -100);
     } else {
         $this->_updateButton('save', 'label', Mage::helper('massimporterpro')->__('Run Import'));
     }
     $this->_formScripts[] = "\n            function addUploadFile(){\n\t\t\t\tvar importFile = \$('import_file_upload').value;\n\t\t\t\tif(importFile == ''){\n\t\t\t\t\talert('Please select some import file.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar ext = importFile.substring(importFile.lastIndexOf('.') + 1);\n\t\t\t\tif(ext.toLowerCase() != 'csv'){\n\t\t\t\t\talert('Please select valid import file (CSV).');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//tweak for required feilds: import file section, delimiter, enclosed\n\t\t\t\t\$('import_file').removeClassName('required-entry');\n\t\t\t\t\$('delimiter').removeClassName('required-entry');\n\t\t\t\t\$('enclosure').removeClassName('required-entry');\n                editForm.submit('" . Mage::helper('adminhtml')->getUrl('massimporterpro/adminhtml_priceupdater/uploadCsv') . "');\n            }\n        ";
 }
开发者ID:ksaltik,项目名称:tooldexlive,代码行数:26,代码来源:Edit.php


示例4: __construct

 public function __construct()
 {
     $this->_objectId = 'invoice_id';
     $this->_controller = 'sales_order_invoice';
     $this->_mode = 'view';
     $this->_session = Mage::getSingleton('admin/session');
     parent::__construct();
     $this->_removeButton('save');
     $this->_removeButton('reset');
     $this->_removeButton('delete');
     if ($this->_isAllowedAction('cancel') && $this->getInvoice()->canCancel()) {
         $this->_addButton('cancel', array('label' => Mage::helper('sales')->__('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
     }
     if ($this->_isAllowedAction('emails')) {
         $this->addButton('send_notification', array('label' => Mage::helper('sales')->__('Send Email'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__('Are you sure you want to send Invoice email to customer?') . '\', \'' . $this->getEmailUrl() . '\')'));
     }
     $orderPayment = $this->getInvoice()->getOrder()->getPayment();
     if ($this->_isAllowedAction('creditmemo') && $this->getInvoice()->getOrder()->canCreditmemo()) {
         if ($orderPayment->canRefundPartialPerInvoice() && $this->getInvoice()->canRefund() && $orderPayment->getAmountPaid() > $orderPayment->getAmountRefunded() || $orderPayment->canRefund() && !$this->getInvoice()->getIsUsedForRefund()) {
             $this->_addButton('capture', array('label' => Mage::helper('sales')->__('Credit Memo'), 'class' => 'go', 'onclick' => 'setLocation(\'' . $this->getCreditMemoUrl() . '\')'));
         }
     }
     if ($this->_isAllowedAction('capture') && $this->getInvoice()->canCapture()) {
         $this->_addButton('capture', array('label' => Mage::helper('sales')->__('Capture'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getCaptureUrl() . '\')'));
     }
     if ($this->getInvoice()->canVoid()) {
         $this->_addButton('void', array('label' => Mage::helper('sales')->__('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
     }
     if ($this->getInvoice()->getId()) {
         $this->_addButton('print', array('label' => Mage::helper('sales')->__('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
     }
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:32,代码来源:View.php


示例5: __construct

 /**
  * Init class
  *
  */
 public function __construct()
 {
     switch (Mage::registry('store_type')) {
         case 'website':
             $this->_objectId = 'website_id';
             $saveLabel = Mage::helper('core')->__('Save Website');
             $deleteLabel = Mage::helper('core')->__('Delete Website');
             $deleteUrl = $this->getUrl('*/*/deleteWebsite', array('item_id' => Mage::registry('store_data')->getId()));
             break;
         case 'group':
             $this->_objectId = 'group_id';
             $saveLabel = Mage::helper('core')->__('Save Store');
             $deleteLabel = Mage::helper('core')->__('Delete Store');
             $deleteUrl = $this->getUrl('*/*/deleteGroup', array('item_id' => Mage::registry('store_data')->getId()));
             break;
         case 'store':
             $this->_objectId = 'store_id';
             $saveLabel = Mage::helper('core')->__('Save Store View');
             $deleteLabel = Mage::helper('core')->__('Delete Store View');
             $deleteUrl = $this->getUrl('*/*/deleteStore', array('item_id' => Mage::registry('store_data')->getId()));
             break;
     }
     $this->_controller = 'system_store';
     parent::__construct();
     $this->_updateButton('save', 'label', $saveLabel);
     $this->_updateButton('delete', 'label', $deleteLabel);
     $this->_updateButton('delete', 'onclick', 'setLocation(\'' . $deleteUrl . '\');');
     if (!Mage::registry('store_data')->isCanDelete()) {
         $this->_removeButton('delete');
     }
     if (Mage::registry('store_data')->isReadOnly()) {
         $this->_removeButton('save')->_removeButton('reset');
     }
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:38,代码来源:Edit.php


示例6: __construct

 public function __construct()
 {
     $this->_blockGroup = 'sagepayreporting';
     $this->_controller = 'adminhtml_sagepayreporting_whitelistip';
     parent::__construct();
     $this->_updateButton('save', 'label', Mage::helper('sagepayreporting')->__('Add'));
 }
开发者ID:electricjesus,项目名称:sage-pay-suite-ce,代码行数:7,代码来源:Edit.php


示例7: __construct

    public function __construct()
    {
        parent::__construct();
                 
        $this->_objectId = 'id';
        $this->_blockGroup = 'produp1';
        $this->_controller = 'adminhtml_produp1';
        
        $this->_updateButton('save', 'label', Mage::helper('produp1')->__('Save Item'));
        $this->_updateButton('delete', 'label', Mage::helper('produp1')->__('Delete Item'));
		
        $this->_addButton('saveandcontinue', array(
            'label'     => Mage::helper('adminhtml')->__('Save And Continue Edit'),
            'onclick'   => 'saveAndContinueEdit()',
            'class'     => 'save',
        ), -100);

        $this->_formScripts[] = "
            function toggleEditor() {
                if (tinyMCE.getInstanceById('produp1_content') == null) {
                    tinyMCE.execCommand('mceAddControl', false, 'produp1_content');
                } else {
                    tinyMCE.execCommand('mceRemoveControl', false, 'produp1_content');
                }
            }

            function saveAndContinueEdit(){
                editForm.submit($('edit_form').action+'back/edit/');
            }
        ";
    }
开发者ID:ravi2jdesign,项目名称:magentoOLD,代码行数:31,代码来源:Edit.php


示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'amfeed';
     $this->_controller = 'adminhtml_field';
 }
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:7,代码来源:Edit.php


示例9: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->_blockGroup && $this->_controller && $this->_mode) {
         $this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . '_form'));
     }
     return parent::_prepareLayout();
 }
开发者ID:rafaelferreiraxd,项目名称:modulos-magento,代码行数:7,代码来源:Edit.php


示例10: _construct

 /**
  * Internal constructor
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'rate_id';
     $this->_blockGroup = 'enterprise_reward';
     $this->_controller = 'adminhtml_reward_rate';
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:10,代码来源:Edit.php


示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $source = $this->getRequest()->getParam('id');
     $this->_objectId = 'id';
     $this->_blockGroup = 'inventoryplus';
     $this->_controller = 'adminhtml_stock';
     $showcustomer_url = Mage::helper('adminhtml')->getUrl('inventoryplusadmin/adminhtml_stock/showcustomer');
     $admin = Mage::getSingleton('admin/session')->getUser();
     $this->_removeButton('delete');
     $this->_removeButton('reset');
     $this->_removeButton('back');
     $stockActions = array();
     $stockActions['adjuststock'] = array('params' => array('label' => Mage::helper('inventoryplus')->__('Adjust Stock'), 'onclick' => 'location.href=\'' . $this->getUrl('*/adminhtml_adjuststock/new') . '\'', 'class' => 'save'), 'position' => 10);
     /* Quick adjust stock button */
     $this->_updateButton('save', 'label', Mage::helper('inventoryplus')->__('Update Stock In-grid'));
     $this->_updateButton('save', 'onclick', 'IMmassUpdateStock()');
     $this->_updateButton('save', 'area', 'after_header');
     /* End of Qucik adjust stock button */
     $stockActionsObject = new Varien_Object(array('actions' => $stockActions));
     Mage::dispatchEvent('inventoryplus_inventory_stock_action_buttons', array('stock_actions_object' => $stockActionsObject));
     $this->_generateStockActionButtons($stockActionsObject);
     $this->setTemplate('inventoryplus/stock/content-header.phtml');
     $this->_formScripts[] = "  \n              function IMmassUpdateStock(){\n                if(\$('select_warehouse') && \$('select_warehouse').getValue() == '0'){\n                    alert('" . $this->__('Please select a warehouse to view stock & perform in-grid update.') . "');\n                    \$('select_warehouse').addClassName('highlight');\n                    window.scrollTo(0, 0);\n                    return;\n                }\n                var r=confirm('" . Mage::helper('inventoryplus')->__('Are you sure you want to update Qty. of products?') . "');                    \n                if (r==true){\n                    editForm.submit(\$('edit_form').action);\n                }\n            }      \n            \n            function IMselectWarehouse() {\n                \$('select_warehouse').removeClassName('highlight');\n            }\n            \n            function toggleEditor() {\n                if (tinyMCE.getInstanceById('inventory_content') == null)\n                    tinyMCE.execCommand('mceAddControl', false, 'inventory_content');\n                else\n                    tinyMCE.execCommand('mceRemoveControl', false, 'inventory_content');\n            }                   \n                        \n        ";
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:25,代码来源:Edit.php


示例12: _construct

 /**
  * Initialize form
  * Add standard buttons
  * Add "Save and Continue" button
  */
 protected function _construct()
 {
     $this->_objectId = 'id';
     $this->_controller = 'promo_quote';
     parent::_construct();
     $this->_addButton('save_and_continue_edit', array('class' => 'save', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Save and Continue Edit'), 'data_attribute' => array('mage-init' => array('button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form')))), 10);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:12,代码来源:Edit.php


示例13: _prepareLayout

 protected function _prepareLayout()
 {
     if (!Mage::registry('current_customer')->isReadonly()) {
         $this->_addButton('save_and_continue', array('label' => Mage::helper('customer')->__('Save and Continue Edit'), 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')', 'class' => 'save'), 10);
     }
     return parent::_prepareLayout();
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:7,代码来源:Edit.php


示例14: getFormHtml

 public function getFormHtml()
 {
     if ($this->getChild('form')) {
         return parent::getFormHtml();
     }
     return '';
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:7,代码来源:Container.php


示例15: __construct

 public function __construct()
 {
     $this->_objectId = 'id';
     $this->_blockGroup = 'advancednewsletter';
     $this->_controller = 'adminhtml_subscriber';
     parent::__construct();
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:7,代码来源:Edit.php


示例16: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('settings');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml';
     $this->_mode = 'configuration_components';
     //------------------------------
     // Set header text
     //------------------------------
     $this->_headerText = Mage::helper('M2ePro')->__('Settings');
     //------------------------------
     // Set buttons actions
     //------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'ComponentsHandlerObj.reset_click()', 'class' => 'reset'));
     $this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Save And Complete This Step'), 'onclick' => 'ComponentsHandlerObj.completeStep();', 'class' => 'close'));
     //------------------------------
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:26,代码来源:Container.php


示例17: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'inventorybarcode';
     $this->_controller = 'adminhtml_barcode';
     //        $this->_updateButton('save', 'label', Mage::helper('inventorybarcode')->__('Save Item'));
     $this->_removeButton('delete');
     /* Add by Kai - print barcode */
     if ($this->getRequest()->getParam('print') == 'true') {
         $this->_removeButton('save');
         $this->_removeButton('reset');
         $this->_addButton('printbarcode1', array('label' => Mage::helper('adminhtml')->__('PRINT'), 'onclick' => 'printbarcode1()', 'class' => 'printbarcode1'), -100);
     } else {
         /* End add by Kai - print barcode */
         if ($this->getRequest()->getParam('id')) {
             $this->_removeButton('save');
             $this->_removeButton('reset');
             $this->_addButton('print_barcode', array('label' => Mage::helper('inventorybarcode')->__('Print Barcodes'), 'onclick' => 'createBarcode()', 'class' => 'add'), 0);
             if (Mage::registry('barcode_data')->getBarcodeStatus() == 1) {
                 $this->_addButton('disable_barcode', array('label' => Mage::helper('inventorybarcode')->__('Disable'), 'onclick' => 'disableBarcode()', 'class' => 'disable'), 0);
             } else {
                 $this->_addButton('disable_barcode', array('label' => Mage::helper('inventorybarcode')->__('Enable'), 'onclick' => 'enableBarcode()', 'class' => 'disable'), 0);
             }
         } else {
             $this->_updateButton('save', 'label', Mage::helper('inventorybarcode')->__('Save Barcode'));
         }
     }
     $classBarcode = Mage::helper('inventorybarcode')->getValidateBarcode();
     $this->_formScripts[] = "\r\n            function createBarcode(){\r\n                var url = '" . $this->getUrl('adminhtml/inb_printbarcode/selecttemplate', array('barcode' => $this->getRequest()->getParam('id'))) . "';\r\n                window.open(url,'_blank', 'scrollbars=yes, resizable=yes, width=750, height=500, left=80, menubar=yes');                \r\n            }\r\n            \r\n            function toggleEditor() {\r\n                if (tinyMCE.getInstanceById('inventorybarcode_content') == null)\r\n                    tinyMCE.execCommand('mceAddControl', false, 'inventorybarcode_content');\r\n                else\r\n                    tinyMCE.execCommand('mceRemoveControl', false, 'inventorybarcode_content');\r\n            }\r\n            \r\n            function printbarcode1()\r\n            {   \r\n                var productInput = \$\$('input[name=\"purchase_products\"]');\r\n                if(productInput[0].value == ''){\r\n                    alert('" . $this->__('Please choose barcodes before printing.') . "');\r\n                    return false;\r\n                }\r\n                \r\n                \$('edit_form').target='_blank';\r\n                editForm.submit('" . $this->getUrl('*/*/massprint') . "');\r\n            }\r\n\r\n\r\n            function saveAndContinueEdit(){\r\n                editForm.submit(\$('edit_form').action+'back/edit/');\r\n            }\r\n            \r\n            function disableBarcode(){\r\n                editForm.submit(\$('edit_form').action+'barcode_status/2/');\r\n            }\r\n            \r\n            function enableBarcode(){\r\n                editForm.submit(\$('edit_form').action+'barcode_status/1/');\r\n            }\r\n            \r\n            function setBarcodeAuto (element, id){\r\n                if(element.checked){\r\n                    \$(id).value = '';\r\n                    \$(id).readOnly = true;\r\n                    \$(id).removeClassName('" . $classBarcode . "')                    \r\n                }else{\r\n                    \$(id).readOnly = false;\r\n                    \$(id).addClassName('" . $classBarcode . "')                    \r\n                }\r\n            }\r\n            \r\n             function fileSelected() {\r\n                var file = document.getElementById('fileToUpload').files[0];\r\n                if (file) {\r\n                    var fileSize = 0;\r\n                    if (file.size > 1024 * 1024)\r\n                        fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';\r\n                    else\r\n                        fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';\r\n                    document.getElementById('fileName').innerHTML = 'Name: ' + file.name;\r\n                    document.getElementById('fileSize').innerHTML = 'Size: ' + fileSize;\r\n                    document.getElementById('fileType').innerHTML = 'Type: ' + file.type;\r\n                }\r\n            }\r\n\t\t\t\r\n            function uploadFile() {\r\n                if(!\$('fileToUpload') || !\$('fileToUpload').value){\r\n                    alert('Please choose CSV file to import!');return false;\r\n                }\r\n                if(\$('loading-mask')){\r\n                    \$('loading-mask').style.display = 'block';\r\n                    \$('loading-mask').style.height = '900px';                    \r\n                    \$('loading-mask').style.width = '1500px';                    \r\n                    \$('loading-mask').style.top = '0';                    \r\n                    \$('loading-mask').style.left = '-2';                    \r\n                }\r\n                var fd = new FormData();\r\n                fd.append('fileToUpload', document.getElementById('fileToUpload').files[0]);\r\n                fd.append('form_key', document.getElementById('form_key').value);\r\n                var xhr = new XMLHttpRequest();\r\n                xhr.upload.addEventListener('progress', uploadProgress, false);\r\n                xhr.addEventListener('load', uploadComplete, false);\r\n                xhr.addEventListener('error', uploadFailed, false);\r\n                xhr.addEventListener('abort', uploadCanceled, false);\r\n                xhr.open('POST', '" . $this->getUrl('adminhtml/inb_barcode/getImportCsv') . "');\r\n                xhr.send(fd);\r\n           }\r\n\r\n           function uploadProgress(evt) {\r\n                if (evt.lengthComputable) {\r\n                    var percentComplete = Math.round(evt.loaded * 100 / evt.total);\r\n                    //document.getElementById('progressNumber').innerHTML = percentComplete.toString() + '%';\r\n                   // document.getElementById('prog').value = percentComplete;\r\n                }\r\n                else {\r\n                   // document.getElementById('progressNumber').innerHTML = 'unable to compute';\r\n                }\r\n           }\r\n          \r\n           function uploadComplete(evt) {\r\n                var import_data = '" . Mage::getModel('admin/session')->getData('null_barcode_product_import') . "';    \r\n                    \r\n                if(import_data == '1'){\r\n                     alert('No product was added');\r\n                }\r\n                \r\n                \$('barcode_tabs_products_section').addClassName('notloaded');\r\n                barcode_tabsJsTabs.showTabContent(\$('barcode_tabs_products_section'));\r\n                //varienGlobalEvents.attachEventHandler('showTab',function(){ sendstockproductGridJsObject.doFilter(); });\r\n           }\r\n\r\n           function uploadFailed(evt) {\r\n                alert('There was an error attempting to upload the file.');\r\n           }\r\n\r\n           function uploadCanceled(evt) {\r\n                alert('The upload has been canceled by the user or the browser dropped the connection.');\r\n           }   \r\n        ";
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:31,代码来源:Edit.php


示例18: __construct

 /**
  * Initialize form
  * Add standard buttons
  * Add "Save and Continue" button
  */
 public function __construct()
 {
     $this->_objectId = 'id';
     $this->_controller = 'promo_quote';
     parent::__construct();
     $this->_addButton('save_and_continue_edit', array('class' => 'save', 'label' => Mage::helper('salesrule')->__('Save and Continue Edit'), 'onclick' => 'editForm.submit($(\'edit_form\').action + \'back/edit/\')'), 10);
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:12,代码来源:Edit.php


示例19: _construct

 /**
  * Internal constructor
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'job_code';
     $this->_blockGroup = 'aoe_scheduler';
     $this->_controller = 'adminhtml_job';
 }
开发者ID:xantin,项目名称:Aoe_Scheduler,代码行数:11,代码来源:Edit.php


示例20: _prepareLayout

 protected function _prepareLayout()
 {
     if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) && Mage::helper('googleoptimizer')->isOptimizerActive(Mage::app()->getStore()->getStoreId())) {
         $this->setChild('googleoptimizer_js', $this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml'));
     }
     return parent::_prepareLayout();
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:Edit.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Mage_Adminhtml_Block_Widget_Grid类代码示例发布时间:2022-05-23
下一篇:
PHP Mage_Adminhtml_Block_Widget_Form类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap