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


PHP Varien_Data_Form_Element_Abstract::getElementHtml方法代码示例

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


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

示例1: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $websites = Mage::helper('auspost')->getAllWebsites();
     if (!empty($websites)) {
         $website_id = $this->getRequest()->getParam('website');
         $website = Mage::getModel('core/website')->load($website_id, 'code');
         if ($website && in_array($website->getWebsiteId(), $websites)) {
             $html = $element->getElementHtml();
         } elseif (!$website_id) {
             $html = $element->getElementHtml();
         } else {
             $html = '<strong class="required">' . $this->__('Please buy additional domains') . '</strong>';
         }
     } else {
         $websitecode = Mage::app()->getRequest()->getParam('website');
         $websiteId = Mage::getModel('core/store')->load($websitecode)->getWebsiteId;
         $isenabled = Mage::app()->getWebsite($websiteId)->getConfig('auspost/activation/key');
         if ($isenabled != null || $isenabled != '') {
             $html = '<strong class="required">' . $this->__(' Please select a website') . '</strong>';
             $modulestatus = new Mage_Core_Model_Config();
             $modulestatus->saveConfig('carriers/auspost/active', 0);
         } else {
             $html = '<strong class="required">' . $this->__('Please enter a valid key') . '</strong>';
         }
     }
     return $html;
 }
开发者ID:bogdy2p,项目名称:apstufgnto,代码行数:27,代码来源:Enabledisable.php

示例2: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setOnclick('launchExample();');
     $html = $element->getElementHtml();
     $html .= '<script type="text/javascript">function launchExample(){ alert("This is an example"); }</script>';
     return $html;
 }
开发者ID:chigusa,项目名称:ChigusaVerticalMenu,代码行数:7,代码来源:Checkall.php

示例3: _getElementHtml

    /**
     * Add color picker
     *
     * @param Varien_Data_Form_Element_Abstract $element
     * @return String
     */
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $html = $element->getElementHtml();
        //Default HTML
        $jsPath = $this->getJsUrl('infortis/jquery/jquery-for-admin.min.js');
        $mcPath = $this->getJsUrl('infortis/jquery/plugins/mcolorpicker/');
        if (Mage::registry('jqueryLoaded') == false) {
            $html .= '
			<script type="text/javascript" src="' . $jsPath . '"></script>
			<script type="text/javascript">jQuery.noConflict();</script>
			';
            Mage::register('jqueryLoaded', 1);
        }
        if (Mage::registry('colorPickerLoaded') == false) {
            $html .= '
			<script type="text/javascript" src="' . $mcPath . 'mcolorpicker.min.js"></script>
			<script type="text/javascript">
				jQuery.fn.mColorPicker.init.replace = false;
				jQuery.fn.mColorPicker.defaults.imageFolder = "' . $mcPath . 'images/";
				jQuery.fn.mColorPicker.init.allowTransparency = true;
				jQuery.fn.mColorPicker.init.showLogo = false;
			</script>
            ';
            Mage::register('colorPickerLoaded', 1);
        }
        $html .= '
			<script type="text/javascript">
				jQuery(function($){
					$("#' . $element->getHtmlId() . '").attr("data-hex", true).width("250px").mColorPicker();
				});
			</script>
        ';
        return $html;
    }
开发者ID:klord9x,项目名称:project-nam1,代码行数:40,代码来源:Color.php

示例4: render

 /**
  * Output the region element and javasctipt that makes it dependent from country element
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $country = $element->getForm()->getElement('country_id');
     if (!is_null($country)) {
         $countryId = $country->getValue();
     } else {
         return $element->getDefaultHtml();
     }
     $regionId = $element->getForm()->getElement('region_id')->getValue();
     $quoteStoreId = $element->getEntityAttribute()->getStoreId();
     $html = '<tr>';
     $element->setClass('input-text');
     $element->setRequired(true);
     $html .= '<td class="label">' . $element->getLabelHtml() . '</td><td class="value">';
     $html .= $element->getElementHtml();
     $selectName = str_replace('region', 'region_id', $element->getName());
     $selectId = $element->getHtmlId() . '_id';
     $html .= '<select id="' . $selectId . '" name="' . $selectName . '" class="select required-entry" style="display:none">';
     $html .= '<option value="">' . $this->_factory->getHelper('customer')->__('Please select') . '</option>';
     $html .= '</select>';
     $html .= '<script type="text/javascript">' . "\n";
     $html .= '$("' . $selectId . '").setAttribute("defaultValue", "' . $regionId . '");' . "\n";
     $html .= 'new regionUpdater("' . $country->getHtmlId() . '", "' . $element->getHtmlId() . '", "' . $selectId . '", ' . $this->helper('directory')->getRegionJsonByStore($quoteStoreId) . ');' . "\n";
     $html .= '</script>' . "\n";
     $html .= '</td></tr>' . "\n";
     return $html;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:33,代码来源:Region.php

示例5: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = '';
     $data = Mage::getStoreConfig('auspost/activation/data');
     $ele_value = explode(',', str_replace($data, '', Mage::helper('core')->decrypt($element->getValue())));
     $ele_name = $element->getName();
     $ele_id = $element->getId();
     $element->setName($ele_name . '[]');
     $data_info = Mage::helper('auspost')->getDataInfo();
     if (isset($data_info['dom']) && intval($data_info['c']) > 0 && intval($data_info['suc']) == 1) {
         foreach (Mage::app()->getWebsites() as $website) {
             $url = $website->getConfig('web/unsecure/base_url');
             $url = Mage::helper('auspost')->getFormatUrl(trim(preg_replace('/^.*?\\/\\/(.*)?\\//', '$1', $url)));
             foreach ($data_info['dom'] as $web) {
                 if ($web['dom'] == $url && $web['suc'] == 1) {
                     $element->setChecked(false);
                     $id = $website->getId();
                     $name = $website->getName();
                     $element->setId($ele_id . '_' . $id);
                     $element->setValue($id);
                     if (in_array($id, $ele_value) !== false) {
                         $element->setChecked(true);
                     }
                     if ($id != 0) {
                         $html .= '<div><label>' . $element->getElementHtml() . ' ' . $name . ' </label></div>';
                     }
                 }
             }
         }
     } else {
         $html = sprintf('<strong class="required">%s</strong>', $this->__('Please enter a valid key'));
     }
     return $html;
 }
开发者ID:bogdy2p,项目名称:apstufgnto,代码行数:34,代码来源:Website.php

示例6: _getElementHtml

 /**
  * Override method to output our custom HTML with JavaScript
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return String
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     // Only do validation if module is installed and active
     if ($this->helper('bronto_common')->isModuleInstalled('Bronto_Verify')) {
         $_html = array();
         // Create form object to grab scope details
         $form = new Mage_Adminhtml_Block_System_Config_Form();
         $scope = $form->getScope();
         $scopeId = $form->getScopeId();
         $element->setData('onchange', "validateToken(this.form, this);");
         $element->setData('after_element_html', "\n                <span id=\"loadingMask\" style=\"display: none; width: 100px;\">\n                    <span class=\"loader\" id=\"loading-mask-loader\" style=\"background: url(" . $this->getSkinUrl('bronto/images/ajax-loader-tr.gif') . ") no-repeat 0 50%; background-size: 20px; padding:3px 0 3px 25px;\">" . $this->__(' Verifying...') . "</span>\n                    <span id=\"loading-mask\"></span>\n                </span>\n                <script>\n                    /**\n                     * Function to Toggle Form Elements Disabled Status Based On Token Status\n                     */\n                    function toggleDisabled(form, element) {\n                        // Get Status Text Element\n                        var statusText = \$('bronto-validation-status-text');\n                        // If Status Text Element has Class of 'invalid' or empty, set boolean disabled value\n                        var disabled = (statusText.className == 'invalid' || statusText.className == '');\n\n                        // Cycle through form elements and disable/enable elements\n                        for (i = 0; i < form.length; i++) {\n                            if (form.elements[i].id != '{$element->getId()}' &&\n                                form.elements[i].id != 'bronto_settings_enabled' &&\n                                form.elements[i].id != 'verify-button' &&\n                                form.elements[i].type != 'hidden' &&\n                                form.elements[i].name.indexOf('groups') == 0) {\n                                form.elements[i].disabled = disabled;\n                            }\n                        }\n\n                        // Get Last Element of Form, and if the class name is 'note', empty the html value\n                        var last = element.parentNode.lastChild;\n                        if (last.className == 'note') {\n                            last.innerHTML = '';\n                        }\n                    }\n\n                    function trim1 (str) {\n                        return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*\$/, '');\n                    }\n\n                    function validateToken(form, element) {\n                        var token      = trim1(\$('{$element->getId()}').value);\n                        var statusText = \$('bronto-validation-status');\n                        var reloadUrl  = '{$this->getUrl('*/apitoken/ajaxvalidation')}';\n\n                        statusText.innerHTML = \$('loadingMask').innerHTML;\n                        statusText.removeClassName('valid').removeClassName('invalid');\n\n                        new Ajax.Request(reloadUrl, {\n                            method: 'post',\n                            parameters: {token: token, scope: '{$scope}', scopeid: '{$scopeId}'},\n                            onComplete: function(transport) {\n                                Element.hide('loadingMask');\n                                statusText.innerHTML = transport.responseText;\n\n                                toggleDisabled(form, element);\n                            }\n                        });\n\n                        return false;\n                    }\n                </script>\n            ");
         if (!$this->helper('bronto_common')->getApiToken()) {
             $element->setComment('<span style="color:red;font-weight:bold">Please enter your Bronto API key here.</span>');
             $buttonHtml = "";
         } else {
             $button = $this->getLayout()->createBlock('bronto_verify/adminhtml_widget_button_runtoken')->toHtml();
             $buttonHtml = "<p class=\"form-buttons\" id=\"verify-button\">{$button}</p>";
         }
         // Show Roundtrip Install Verification Status
         $_html[] = $buttonHtml . '<style>' . '   #bronto-validation-status { color:grey; font-weight:bold; }' . '   #bronto-validation-status .valid { color: green; }' . '   #bronto-validation-status .invalid { color: red; }' . '</style>' . '<strong style="float: left; width: 80px">Last Status:</strong> ' . '<span id="bronto-validation-status">' . $this->helper('bronto_verify/apitoken')->getAdminScopedApitokenStatusText() . '</span>';
         // Show everything Else
         if (!empty($_html)) {
             $elementHtml = $element->getElementHtml();
             if ($element->getComment()) {
                 $elementHtml .= '<p class="note"><span>' . $element->getComment() . '</span></p>';
                 $element->setComment(null);
             }
             $elementHtml .= '<div style="margin-top:10px">';
             $elementHtml .= implode('<br />', $_html);
             $elementHtml .= '</div>';
             return $elementHtml;
         }
     }
     return parent::_getElementHtml($element);
 }
开发者ID:bevello,项目名称:bevello,代码行数:42,代码来源:Apitoken.php

示例7: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getLabel();
     if ($valueName === '' || $valueName === null) {
         $valueName = '...';
     }
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ' . htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = '&nbsp;<span class="rule-param">';
         /** @var Mage_Core_Model_Translate_Inline $translate */
         $translate = Mage::getSingleton('core/translate_inline');
         if ($translate->isAllowed()) {
             $valueName = Mage::helper('core/string')->truncate($valueName, 33, '...');
         }
         $html .= '<a href="javascript:void(0)" class="label">';
         $html .= Mage::helper('core')->escapeHtml($valueName);
         $html .= '</a>';
         $html .= '<span class="element"> ';
         $html .= $element->getElementHtml();
         if ($element->getExplicitApply()) {
             /** @var Aoe_FraudManager_Helper_Data $helper */
             $helper = Mage::helper('Aoe_FraudManager/Data');
             $url = $helper->getConditionApplyImageUrl();
             $label = $helper->getConditionApplyLabel();
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply">';
             $html .= '<img src="' . $url . '" class="v-middle" alt="' . $label . '" title="' . $label . '" />';
             $html .= '</a> ';
         }
         $html .= '</span>';
         $html .= '</span>&nbsp;';
     }
     return $html;
 }
开发者ID:aoepeople,项目名称:aoe_fraudmanager,代码行数:35,代码来源:Editable.php

示例8: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getValueName();
     if ($valueName === '') {
         $valueName = '...';
     }
     $valueLabel = htmlspecialchars(Mage::helper('core/string')->truncate($valueName, 150, '...'));
     switch ($this->getFormat()) {
         case 'text':
             $html = $valueLabel;
             break;
         case 'html':
             $html = '<strong>' . $valueLabel . '</strong>';
             break;
         default:
             if ($element->getIsMeta()) {
                 $html = '<input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/>';
                 $html .= htmlspecialchars($valueName);
             } else {
                 $html = '<span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>';
                 $html .= '<a href="javascript:void(0)" class="label">' . $valueLabel . '</a>';
                 $html .= '<span class="element">';
                 $html .= $element->getElementHtml();
                 if ($element->getExplicitApply()) {
                     $html .= '<a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getSkinUrl('images/rule_component_apply.gif') . '" class="v-middle" alt="' . $this->__('Apply') . '" title="' . $this->__('Apply') . '" /></a>';
                 }
                 $html .= '</span></span>';
             }
     }
     return $html;
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:32,代码来源:Editable.php

示例9: render

 /**
  * Render element
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @see Varien_Data_Form_Element_Renderer_Interface::render()
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getValueName();
     if ($element instanceof Varien_Data_Form_Element_Select && $valueName == '...') {
         $optionValues = $element->getValues();
         foreach ($optionValues as $option) {
             if ($option['value'] === '') {
                 $valueName = $option['label'];
             }
         }
     }
     if ($valueName === '') {
         $valueName = '...';
     }
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ' . htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = ' <span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>' . '<a href="javascript:void(0)" class="label">';
         $translate = Mage::getSingleton('core/translate_inline');
         $html .= $translate->isAllowed() ? Mage::helper('core')->escapeHtml($valueName) : Mage::helper('core')->escapeHtml(Mage::helper('core/string')->truncate($valueName, 33, '...'));
         $html .= '</a><span class="element"> ' . $element->getElementHtml();
         if ($element->getExplicitApply()) {
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getSkinUrl('M2ePro/images/rule_component_apply.gif') . '" class="v-middle" alt="' . Mage::helper('M2ePro')->__('Apply') . '" title="' . Mage::helper('M2ePro')->__('Apply') . '" /></a> ';
         }
         $html .= '</span></span>&nbsp;';
     }
     return $html;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:36,代码来源:Editable.php

示例10: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($country = $element->getForm()->getElement('country_id')) {
         $countryId = $country->getValue();
     } else {
         return $element->getDefaultHtml();
     }
     $regionId = $element->getForm()->getElement('region_id')->getValue();
     $html = '<tr>';
     $element->setClass('input-text');
     $html .= '<td class="label">' . $element->getLabelHtml() . '</td><td class="value">';
     $html .= $element->getElementHtml();
     $selectName = str_replace('region', 'region_id', $element->getName());
     $selectId = $element->getHtmlId() . '_id';
     $html .= '<select id="' . $selectId . '" name="' . $selectName . '" class="select required-entry" style="display:none">';
     $html .= '<option value="">' . AO::helper('customer')->__('Please select') . '</option>';
     $html .= '</select>';
     $html .= '<script type="text/javascript">
     if ($("' . $country->getHtmlId() . '") != undefined) {
         new regionUpdater("' . $country->getHtmlId() . '", "' . $element->getHtmlId() . '", "' . $selectId . '", ' . $this->helper('directory')->getRegionJson() . ');
     }
     </script>';
     $html .= '</td></tr>' . "\n";
     return $html;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:25,代码来源:Customer_Edit_Renderer_Region.php

示例11: _getElementHtml

    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $html = $element->getElementHtml();
        $jsUrl = $this->getJsUrl('smartwave/jquery/jquery-1.8.3.min.js');
        $textureUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . Mage::helper('mango')->getTexturePath();
        $bgcPickerId = str_replace('_texture', '_bg_color', $element->getHtmlId());
        $previewId = $element->getHtmlId() . '-texture-preview';
        if (Mage::registry('jqueryLoaded') == false) {
            $html .= '<script type="text/javascript" src="' . $jsUrl . '"></script>
			    <script type="text/javascript">jQuery.noConflict();</script>';
            Mage::register('jqueryLoaded', 1);
        }
        $html .= '<br/><div id="' . $previewId . '" style="width:280px; height:160px; margin:10px 0; background-color:transparent;"></div>
		    <script type="text/javascript">
			    jQuery(function($){
				    var texture		= $("#' . $element->getHtmlId() . '");
				    var bgcolor		= $("#' . $bgcPickerId . '");
				    var preview 	= $("#' . $previewId . '");
				    
				    preview.css("background-color", bgcolor.attr("value"));
				    texture.change(function() {
                        var bg_image = "url(' . $textureUrl . '" + texture.val() + ".png)";
                        if(texture.val() == 0)
                            bg_image = "none";
					    preview.css({
						    "background-color": bgcolor.css("background-color"),
						    "background-image": bg_image
					    });
				    }).change();
                    bgcolor.change(function(){texture.change();});
			    });
		    </script>';
        return $html;
    }
开发者ID:perseusl,项目名称:kingdavid,代码行数:34,代码来源:Texture.php

示例12: _getElementHtml

    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $html = $element->getElementHtml();
        $isLoadScript = Mage::registry('gmap_loaded');
        $elementId = $element->getHtmlId();
        $elementId = str_replace("_address_preview", "", $elementId);
        $latElementId = $elementId . '_location_lat';
        $lngElementId = $elementId . '_location_lng';
        $addressElementId = $element->getHtmlId();
        if (empty($isLoadScript)) {
            $html .= '<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script><script src="http://js.maxmind.com/app/geoip.js" type="text/javascript"></script><script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=places"></script><script src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'ves/themesettings/locationpicker.jquery.js"></script>';
            Mage::register('gmap_loaded', true);
        }
        $html .= '<br/><div id="map-' . $element->getHtmlId() . '" style="width:600px;height:400px">';
        $html .= '</div>';
        $html .= '<script type="text/javascript">

        jQuery(window).load(function(){
            jQuery("#map-' . $element->getHtmlId() . '").locationpicker({
                location: {latitude: $("' . $latElementId . '").value, longitude: $("' . $lngElementId . '").value},
                radius: 100,
                enableAutocomplete: true,
                inputBinding: {
                    latitudeInput: jQuery("#' . $latElementId . '"),
                    longitudeInput: jQuery("#' . $lngElementId . '"),
                    locationNameInput: jQuery("#' . $addressElementId . '")
                }
            });
});
</script>';
        return $html;
    }
开发者ID:TusharKDonda,项目名称:maruti,代码行数:32,代码来源:Gmap.php

示例13: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $after_element_html = $element->getAfterElementHtml();
     $javaScript = "\r\n            <script type=\"text/javascript\">\r\n            \tif('{$element->getHtmlId()}' == 'gomage_navigation_category_show_shopby')\r\n            \t{\r\n            \t\tvar sel_cat = \$('gomage_navigation_category_filter_type');\r\n            \t\t\r\n            \t\tEvent.observe('{$element->getHtmlId()}', 'change', function(){\r\n\t                    var value = \$('{$element->getHtmlId()}').value;                    \r\n\t                    if (value == 1){\r\n\t                    \tfor(i=sel_cat.options.length-1;i>=0;i--)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (sel_cat.options[i].value == '8'\r\n\t\t\t\t\t\t\t\t\t\t||\r\n\t\t\t\t\t\t\t\t\tsel_cat.options[i].value == '6')\r\n\t\t                    \t{\r\n\t\t                    \t\tsel_cat.remove(i);\r\n\t\t                    \t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n                    \t\r\n\t    \t\t\t\t}else{\r\n\t    \t\t\t\t\tvar option_fly = false;\r\n\t    \t\t\t\t\tvar option_plain = false;\r\n\t    \t\t\t\t\tfor(i=sel_cat.options.length-1;i>=0;i--)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (sel_cat.options[i].value == '8')\r\n\t\t                    \t{\r\n\t\t                    \t\toption_fly = true;\r\n\t\t                    \t}\r\n\t\t                    \t\r\n\t\t                    \tif (sel_cat.options[i].value == '6')\r\n\t\t                    \t{\r\n\t\t                    \t\toption_plain = true;\r\n\t\t                    \t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t    \t\t\t\t\tif ( !option_plain )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsel_cat.options[sel_cat.options.length] = new Option('Plain', '6');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ( !option_fly )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsel_cat.options[sel_cat.options.length] = new Option('Fly-Out', '8');\r\n\t\t\t\t\t\t\t}\r\n\t    \t\t\t\t}\r\n\t                });\r\n            \t}\r\n            \telse if('{$element->getHtmlId()}' == 'gomage_navigation_rightcolumnsettings_show_shopby')\r\n            \t{\r\n            \t\tvar sel_right = \$('gomage_navigation_rightcolumnsettings_filter_type');\r\n            \t\t\r\n            \t\tEvent.observe('{$element->getHtmlId()}', 'change', function(){\r\n\t                    var value = \$('{$element->getHtmlId()}').value;                    \r\n\t                    if (value == 1){\r\n\t                    \tfor(i=sel_right.options.length-1;i>=0;i--)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (sel_right.options[i].value == '8'\r\n\t\t\t\t\t\t\t\t\t\t||\r\n\t\t\t\t\t\t\t\t\tsel_right.options[i].value == '6'\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t                    \t{\r\n\t\t                    \t\tsel_right.remove(i);\r\n\t\t                    \t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n                    \t\r\n\t    \t\t\t\t}else{\r\n\t    \t\t\t\t\tvar option_fly = false;\r\n\t    \t\t\t\t\tvar option_plain = false;\r\n\t    \t\t\t\t\tfor(i=sel_right.options.length-1;i>=0;i--)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (sel_right.options[i].value == '8')\r\n\t\t                    \t{\r\n\t\t                    \t\toption_fly = true;\r\n\t\t                    \t}\r\n\t\t                    \t\r\n\t\t                    \tif (sel_right.options[i].value == '6')\r\n\t\t                    \t{\r\n\t\t                    \t\toption_plain = true;\r\n\t\t                    \t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t    \t\t\t\t\tif ( !option_plain )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsel_right.options[sel_right.options.length] = new Option('Plain', '6');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ( !option_fly )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsel_right.options[sel_right.options.length] = new Option('Fly-Out', '8');\r\n\t\t\t\t\t\t\t}\r\n\t    \t\t\t\t}\r\n\t                });\r\n            \t}\r\n            \t\r\n                \r\n                document.observe('dom:loaded', function() {   \t\r\n                \tinit_{$element->getHtmlId()}();                \t\r\n                });\r\n                document.onreadystatechange = init_{$element->getHtmlId()};\r\n                \r\n                function init_{$element->getHtmlId()}() {\r\n                \tGomage_Navigation_fireEvent(\$('{$element->getHtmlId()}'), 'change');\r\n                }\r\n            </script>";
     $element->setData('after_element_html', $javaScript . $after_element_html);
     return $element->getElementHtml();
 }
开发者ID:vstorm83,项目名称:ausport,代码行数:7,代码来源:Shopby.php

示例14: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $websites = Mage::helper('gomage_navigation')->getAvailabelWebsites();
     if (!empty($websites)) {
         $scope_website_code = $this->getRequest()->getParam('website');
         $scope_website = Mage::getModel('core/website')->load($this->getRequest()->getParam('website'), 'code');
         if ($scope_website && in_array($scope_website->getWebsiteId(), $websites)) {
             $html = $element->getElementHtml();
         } elseif (!$scope_website_code) {
             $html = $element->getElementHtml();
         } else {
             $html = '<strong class="required">' . $this->__('Please buy additional domains') . '</strong>';
         }
     } else {
         $html = '<strong class="required">' . $this->__('Please enter a valid key') . '</strong>';
     }
     return $html;
 }
开发者ID:vstorm83,项目名称:ausport,代码行数:18,代码来源:Enabledisable.php

示例15: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = $element->getElementHtml();
     $html .= '<script type="text/javascript">$("gomage_checkout_general_skin").observe("change", function(){if(this.value == "default"){$("row_gomage_checkout_general_button_skin").show();}else{$("row_gomage_checkout_general_button_skin").hide();}});</script>';
     if (Mage::getStoreConfig('gomage_checkout/general/skin') !== 'default') {
         $html .= '<script type="text/javascript">$("row_gomage_checkout_general_button_skin").hide();</script>';
     }
     return $html;
 }
开发者ID:jpedro21,项目名称:comerciodoboi,代码行数:9,代码来源:Buttonskin.php


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