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


PHP Varien_Data_Form_Element_Abstract::getAfterElementHtml方法代码示例

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


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

示例1: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $after_element_html = $element->getAfterElementHtml();
     $javaScript = "\r\n            <script type=\"text/javascript\">\r\n                Event.observe('{$element->getHtmlId()}', 'change', function(){\r\n                    var value = \$('{$element->getHtmlId()}').value;                    \r\n                    var elements = eval({$this->_getAssociatedElements()});\r\n\r\n                    if (value == " . GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Type_Inblock::TYPE_FIXED . "){\r\n                    \tfor (var i = 0; i < elements.length; i++) {\r\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \r\n                            if (\$(id)){\r\n                            \t\$(id).up('td').up('tr').show();\t\r\n    \t\t\t\t\t\t}\r\n                        }\r\n                        var id = '{$this->_getBasePartName($element)}' + 'max_inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'inblock_height';\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n                        if (\$(id) && \$('row_'+ '{$this->_getBasePartName($element)}' + 'inblock_type').visible() == true){\r\n                        \t\$(id).up('td').up('tr').show();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\$(id).up('td').up('tr').hide();\r\n\t\t\t\t\t\t}\r\n    \t\t\t\t}else if (value == " . GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Type_Inblock::TYPE_AUTO . "){\r\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\r\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \r\n                            if (\$(id)){\r\n                            \t\$(id).up('td').up('tr').hide();\t\r\n    \t\t\t\t\t\t}\r\n                        }\r\n    \t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'max_inblock_height';\r\n    \t\t\t\t\tvar filter_type = \$('{$this->_getBasePartName($element)}' + 'filter_type').value;\r\n                        if (\$(id) && filter_type == 9){\r\n                        \t\$(id).up('td').up('tr').show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n    \t\t\t\t}else{\r\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\r\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \r\n                            if (\$(id)){\r\n                            \t\$(id).up('td').up('tr').hide();\t\r\n    \t\t\t\t\t\t}\r\n                        }\r\n                        var id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'max_inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n    \t\t\t\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,代码来源:Inblocktype.php

示例2: _getElementHtml

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('select');
     $hours = 0;
     $minutes = 0;
     if ($value = $element->getValue()) {
         $values = explode(',', $value);
         if (is_array($values) && count($values) == 2) {
             $hours = $values[0];
             $minutes = $values[1];
         }
     }
     $optionTemplate = '<option value="%s" %s>%s</option>';
     $html = sprintf('<input type="hidden" id="%s" />', $element->getHtmlId());
     $html .= sprintf('<select name="%s" %s style="width:60px">', $element->getName(), $element->serialize($element->getHtmlAttributes()));
     for ($i = 0; $i < 24; $i++) {
         $hour = str_pad($i, 2, '0', STR_PAD_LEFT);
         $html .= sprintf($optionTemplate, $hour, (int) $hours === $i ? 'selected="selected"' : '', $hour);
     }
     $html .= '</select>&nbsp;:&nbsp;';
     $html .= sprintf('<select name="%s" %s style="width:60px">', $element->getName(), $element->serialize($element->getHtmlAttributes()));
     for ($i = 0; $i < 60; $i++) {
         $minute = str_pad($i, 2, '0', STR_PAD_LEFT);
         $html .= sprintf($optionTemplate, $minute, (int) $minutes === $i ? 'selected="selected"' : '', $minute);
     }
     $html .= '</select>';
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:WeareJH,项目名称:esendex-magento-extension,代码行数:34,代码来源:CronTime.php

示例3: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = "";
     $html .= '<a id="' . $element->getHtmlId() . '" ' . $element->serialize($element->getHtmlAttributes()) . '>' . $element->getEscapedValue() . "</a>\n";
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:Link.php

示例4: _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

示例5: getAfterElementHtml

    public function getAfterElementHtml()
    {
        $html = '<script type="text/javascript">
            Event.observe($("' . $this->getHtmlId() . '"), "change", onChange' . $this->getHtmlId() . ');
            function onChange' . $this->getHtmlId() . '(e) {
                var currentValue = $("' . $this->getHtmlId() . '").value;
                var values = [];
                $$("#' . $this->getHtmlId() . ' option").each(function(element) {
                    values.push(element.value);
                });
                values.each(function(item) {
                    var id = "' . $this->getHtmlId() . '_" + item;
                    if ($(id)) {
                        $(id).up(1).hide();
                    }
                });

                var id = "' . $this->getHtmlId() . '_" + currentValue;
                if ($(id)) {
                    $(id).up(1).show();
                }
            }
            onChange' . $this->getHtmlId() . '();
            </script>
        ';
        return $html . parent::getAfterElementHtml();
    }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:27,代码来源:Switchfield.php

示例6: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $after_element_html = $element->getAfterElementHtml();
     $javaScript = "\n            <script type=\"text/javascript\">\n                Event.observe('{$element->getHtmlId()}', 'change', function(){\n                    var value = \$('{$element->getHtmlId()}').value;                    \n                    var elements = eval({$this->_getAssociatedElements()});\n                    if (value == " . GoMage_Navigation_Model_Layer::FILTER_TYPE_IMAGE . "){\n                    \tfor (var i = 0; i < elements.length; i++) {\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \n                            if (\$(id)){\n                            \t\$(id).up('td').up('tr').show();\t\n    \t\t\t\t\t\t}\n                        }\n                        var id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \n                        if (\$(id)){\n                        \t\$(id).up('td').up('tr').hide();\t\n\t\t\t\t\t\t}\n    \t\t\t\t}else if (value == " . GoMage_Navigation_Model_Layer::FILTER_TYPE_DEFAULT_INBLOCK . "){\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \n                            if (\$(id)){\n                            \t\$(id).up('td').up('tr').hide();\t\n    \t\t\t\t\t\t}\n                        }\n    \t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \n                        if (\$(id)){\n                        \t\$(id).up('td').up('tr').show();\t\n\t\t\t\t\t\t}\n    \t\t\t\t}else{\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \n                            if (\$(id)){\n                            \t\$(id).up('td').up('tr').hide();\t\n    \t\t\t\t\t\t}\n                        }\n                        var id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \n                        if (\$(id)){\n                        \t\$(id).up('td').up('tr').hide();\t\n\t\t\t\t\t\t}\n    \t\t\t\t}\n                });\n                document.observe('dom:loaded', function() {   \t\n                \tinit_{$element->getHtmlId()}();                \t\n                });\n                document.onreadystatechange = init_{$element->getHtmlId()};\n                \n                function init_{$element->getHtmlId()}() {\n                \tGomage_Navigation_fireEvent(\$('{$element->getHtmlId()}'), 'change');\n                }\n            </script>";
     $element->setData('after_element_html', $javaScript . $after_element_html);
     return $element->getElementHtml();
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:7,代码来源:Navigationtype.php

示例7: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = $element->getBold() ? '<strong>' : '';
     $html .= $element->getValue();
     $html .= $element->getBold() ? '</strong>' : '';
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:8,代码来源:Field.php

示例8: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = "";
     $html .= "<input class=' input-text'  type='hidden' id='" . $element->getHtmlId() . "' name='" . $element->getName() . "' value='" . $element->getEscapedValue() . "' '" . $element->serialize($element->getHtmlAttributes()) . "/>";
     $html .= "\n<script>\n    document.observe('dom:loaded', function(){\n       \n        if(!\$('" . $element->getHtmlId() . "').value.isJSON())\$('" . $element->getHtmlId() . "').value='{\"days\":[],\"hours\":[]}';\n         cron=\$('" . $element->getHtmlId() . "').value.evalJSON();\n       \n        \n        cron.days.each(function(d){\n            if(\$('d-'+d)){\n                \$('d-'+d).checked=true;\n                \$('d-'+d).ancestors()[0].addClassName('checked');\n            }\n            \n        })\n        cron.hours.each(function(h){\n            if( \$('h-'+h.replace(':',''))){\n                \$('h-'+h.replace(':','')).checked=true;\n                \$('h-'+h.replace(':','')).ancestors()[0].addClassName('checked');\n            }\n        })\n        \n        \$\$('.cron-box').each(function(e){\n            e.observe('click',function(){\n                \n                if(e.checked)e.ancestors()[0].addClassName('checked');\n                else e.ancestors()[0].removeClassName('checked');\n               \n                d=new Array\n                \$\$('.cron-d-box INPUT').each(function(e){\n                    if(e.checked) d.push(e.value)\n                })\n                h=new Array;\n                \$\$('.cron-h-box INPUT').each(function(e){\n                    if(e.checked) h.push(e.value)\n                })\n                \n                \$('" . $element->getHtmlId() . "').value=Object.toJSON({days:d,hours:h})\n               \n            }) \n        })\n    })\n    \n</script>\n";
     $html .= "\n<style>\n    .morning .cron-h-box{\n        border: 1px solid #AFAFAF;\n        border-radius: 3px 3px 3px 3px;\n        margin: 2px;\n        padding: 0 3px;\n        background:#efefef;\n    }\n    .afternoon .cron-h-box{\n        border: 1px solid #AFAFAF;\n        border-radius: 3px 3px 3px 3px;\n        margin: 2px;\n        padding: 0 3px;\n        background:#efefef;\n    }\n    .morning-half .cron-h-box{\n        border: 1px solid #AFAFAF;\n        border-radius: 3px 3px 3px 3px;\n        margin: 2px;\n        padding: 0 3px;\n        background:#efefef;\n    }\n    .afternoon-half .cron-h-box{\n\n        border: 1px solid #AFAFAF;\n        border-radius: 3px 3px 3px 3px;\n        margin: 2px;\n        padding: 0 3px;\n        background:#efefef;\n    }\n\n    .cron-d-box{\n\n        background:#efefef;\n        border: 1px solid #AFAFAF;\n        border-radius: 3px 3px 3px 3px;\n        margin: 2px;\n        padding: 0 3px;\n    }\n    .checked{\n        background-color: #EFFFF0!important;\n    }\n</style>";
     $html .= "<table style='width:600px !important'>\n            <thead> \n                <tr><th>Days of the week</th><th width='20'></th><th colspan='4'>Hours of the day</th></tr>\n            </thead>\n            <tr>\n                <td width='300'>\n                    <div class='cron-d-box'><input class='cron-box' value='Monday' id='d-Monday' type='checkbox'/> Monday</div>\n                    <div class='cron-d-box'><input class='cron-box' value='Tuesday' id='d-Tuesday' type='checkbox'/> Tuesday</div>\n                    <div class='cron-d-box'><input class='cron-box' value='Wednesday' id='d-Wednesday' type='checkbox'/> Wednesday</div>\n                    <div class='cron-d-box'><input class='cron-box' value='Thursday' id='d-Thursday' type='checkbox'/> Thursday</div>\n                    <div class='cron-d-box'><input class='cron-box' value='Friday' id='d-Friday' type='checkbox'/> Friday</div>\n                    <div class='cron-d-box'><input class='cron-box' value='Saturday' id='d-Saturday' type='checkbox'/> Saturday</div>\n                    <div class='cron-d-box'><input class='cron-box' value='Sunday' id='d-Sunday' type='checkbox'/> Sunday</div>\n                </td>\n                <td></td>\n                <td width='150' class='morning-half'>\n                    <div class='cron-h-box'><input class='cron-box' value='00:00' id='h-0000'  type='checkbox'/> 00:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='01:00' id='h-0100' type='checkbox'/> 01:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='02:00' id='h-0200' type='checkbox'/> 02:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='03:00' id='h-0300' type='checkbox'/> 03:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='04:00' id='h-0400' type='checkbox'/> 04:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='05:00' id='h-0500' type='checkbox'/> 05:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='06:00' id='h-0600'  type='checkbox'/> 06:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='07:00' id='h-0700' type='checkbox'/> 07:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='08:00' id='h-0800'  type='checkbox'/> 08:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='09:00' id='h-0900' type='checkbox'/> 09:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='10:00' id='h-1000' type='checkbox'/> 10:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='11:00' id='h-1100' type='checkbox'/> 11:00 AM</div>\n\n                </td>\n                <td width='150' class='morning'>\n                    <div class='cron-h-box'><input class='cron-box' value='00:30' id='h-0030' type='checkbox'/> 00:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='01:30' id='h-0130' type='checkbox'/> 01:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='02:30' id='h-0230' type='checkbox'/> 02:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='03:30' id='h-0330' type='checkbox'/> 03:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='04:30' id='h-0430' type='checkbox'/> 04:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='05:30' id='h-0530' type='checkbox'/> 05:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='06:30' id='h-0630' type='checkbox'/> 06:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='07:30' id='h-0730' type='checkbox'/> 07:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='08:30' id='h-0830' type='checkbox'/> 08:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='09:30' id='h-0930' type='checkbox'/> 09:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='10:30' id='h-1030' type='checkbox'/> 10:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='11:30' id='h-1130' type='checkbox'/> 11:30 AM</div>\n\n\n\n\n                </td>\n                <td width='150' class='afternoon-half'>\n                    <div class='cron-h-box'><input class='cron-box' value='12:00' id='h-1200' type='checkbox'/> 12:00 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='13:00' id='h-1300' type='checkbox'/> 01:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='14:00' id='h-1400' type='checkbox'/> 02:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='15:00' id='h-1500' type='checkbox'/> 03:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='16:00' id='h-1600' type='checkbox'/> 04:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='17:00' id='h-1700' type='checkbox'/> 05:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='18:00' id='h-1800' type='checkbox'/> 06:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='19:00' id='h-1900' type='checkbox'/> 07:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='20:00' id='h-2000' type='checkbox'/> 08:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='21:00' id='h-2100' type='checkbox'/> 09:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='22:00' id='h-2200' type='checkbox'/> 10:00 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='23:00' id='h-2300' type='checkbox'/> 11:00 PM</div>\n\n                </td>\n                <td width='150' class='afternoon'>\n                    <div class='cron-h-box'><input class='cron-box' value='12:30' id='h-1230' type='checkbox'/> 12:30 AM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='13:30' id='h-1330' type='checkbox'/> 01:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='14:30' id='h-1430' type='checkbox'/> 02:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='15:30' id='h-1530' type='checkbox'/> 03:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='16:30' id='h-1630' type='checkbox'/> 04:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='17:30' id='h-1730' type='checkbox'/> 05:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='18:30' id='h-1830' type='checkbox'/> 06:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='19:30' id='h-1930' type='checkbox'/> 07:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='20:30' id='h-2030' type='checkbox'/> 08:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='21:30' id='h-2130' type='checkbox'/> 09:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='22:30' id='h-2230' type='checkbox'/> 10:30 PM</div>\n                    <div class='cron-h-box'><input class='cron-box' value='23:30' id='h-2330' type='checkbox'/> 11:30 PM</div>\n\n\n                </td>\n            </tr>\n        </table>";
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:10,代码来源:Cron.php

示例9: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementId = $element->getHtmlId();
     /* read configurations from system.xml */
     $configarray = $element->getData('field_config')->asArray();
     $min = $configarray['parameters']['min'];
     $max = $configarray['parameters']['max'];
     $step = $configarray['parameters']['step'];
     $label = $configarray['parameters']['label'];
     $skin = $configarray['parameters']['skin'];
     /* default values when theres no definition in system.xml */
     if ($min == '') {
         $min = '0';
     }
     if ($max == '') {
         $max = '10';
     }
     if ($step == '') {
         $step = '1';
     }
     if ($min >= $max) {
         $min = '0';
         $max = '10';
         $step = '1';
     }
     if ($label == '') {
         $label = 'Unit / Maßeinheit';
     }
     //wrong or no entering of a skin
     switch ($skin) {
         case 'blue':
         case 'plastic':
         case 'round':
         case 'round_plastic':
             break;
         default:
             $skin = 'plastic';
     }
     //normal Inputfield, wolud hidden by the Slider JS
     $html = '<input id="' . $elementId . '" name="' . $element->getName() . '" value="' . $element->getEscapedValue() . '" ' . $element->serialize($element->getHtmlAttributes()) . '/>' . "\n";
     //additional JS with configurations from system.xml
     $html .= '<script type="text/javascript" charset="utf-8">
                     if(typeof jQuery == "function") {//jQuery is a function when the jQuery library was loaded
                         jQuery.noConflict();//get no conflicts with prototype in magento
                         if(typeof jQuery("#' . $elementId . '").slider == "function") {//jQuery.slider is a function when the jQuerySlider library was loaded
                             jQuery("#' . $elementId . '").slider({ from: ' . $min . ', to: ' . $max . ', step: ' . $step . ', dimension: \'&nbsp;' . $label . '\', skin: "' . $skin . '" });
                         }
                     }
              </script>';
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:par-orillonsoft,项目名称:JCarouselSlider,代码行数:52,代码来源:Slidingregulation.php

示例10: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementId = $element->getHtmlId();
     /*read configurations from system.xml*/
     $configarray = $element->getData('field_config')->asArray();
     $iframeurl = $configarray['parameters']['iframeurl'];
     $iframeheight = $configarray['parameters']['iframeheight'];
     /* default values when theres no definition in system.xml or a wrong entry */
     if ($iframeheight == '') {
         $iframeheight = '400px';
     } else {
         if (strlen($iframeheight) >= 3) {
             /* the last both chars build the unit of length */
             $unitOfLength = substr($iframeheight, -2, 2);
             switch ($unitOfLength) {
                 case 'em':
                 case 'ex':
                 case 'px':
                 case 'in':
                 case 'cm':
                 case 'mm':
                 case 'pt':
                 case 'pc':
                     break;
                 default:
                     $iframeheight = '400px';
             }
         } else {
             $iframeheight = '400px';
         }
     }
     /* open the url in the iframe, when its readable */
     if ($iframeurl != '' && @fopen($iframeurl, 'r')) {
         $iframe = '<iframe src="' . $iframeurl . '" width="100%" height="100%" name="Netresearch" marginheight="0" marginwidth="0" frameborder="0"></iframe>';
         $html = '<div style="width:100%;height:' . $iframeheight . '">' . $iframe . '</div>';
     } else {
         $html = $this->getLayout()->createBlock('core/template')->setTemplate('jcslider/promotion/iframe.phtml')->toHtml();
         /*when you need functions use:
           $html = $this->getLayout()->createBlock('jcslider/promotion_iframe')->setTemplate('jcslider/promotion/iframe.phtml')->toHtml() ;
           
           ...an define functions in:
           app\code\community\Netresearch\JCarouselSlider\Block\Promotion\Iframe.php
           */
     }
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:par-orillonsoft,项目名称:JCarouselSlider,代码行数:47,代码来源:PromotionFieldRenderer.php

示例11: getAfterElementHtml

 public function getAfterElementHtml()
 {
     $html = '<script type="text/javascript">';
     foreach ($this->_positions as $position) {
         $html .= 'Event.observe($("' . $this->getHtmlId() . $position . '"), "click", onClick' . $this->getHtmlId() . ');';
     }
     $html .= '
         function onClick' . $this->getHtmlId() . '(e) {
             $$(".' . $this->getHtmlId() . 'labelposition-item").each(function(i) { i.removeClassName("active") });
             $(e.currentTarget).toggleClassName("active");
             $("' . $this->getHtmlId() . '").value = $(e.currentTarget).readAttribute("data-position");
         }';
     if ($this->getValue()) {
         $html .= '$("' . $this->getHtmlId() . $this->getValue() . '").toggleClassName("active");';
     }
     $html .= '
         </script>
     ';
     return $html . parent::getAfterElementHtml();
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:20,代码来源:Varien_Data_Form_Element_Labelposition.php

示例12: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('select');
     $value_hrs = 0;
     $value_min = 0;
     $value_sec = 0;
     if ($value = $element->getValue()) {
         $values = explode(',', $value);
         if (is_array($values) && count($values) == 3) {
             $value_hrs = $values[0];
             $value_min = $values[1];
             $value_sec = $values[2];
         }
     }
     $html = '<input type="hidden" id="' . $element->getHtmlId() . '" />';
     $html .= '<select name="' . $element->getName() . '" ' . $element->serialize($element->getHtmlAttributes()) . ' style="width:50px">' . "\n";
     for ($i = 0; $i < 24; $i++) {
         $hour = str_pad($i, 2, '0', STR_PAD_LEFT);
         $html .= '<option value="' . $hour . '" ' . ($value_hrs == $i ? 'selected="selected"' : '') . '>' . $hour . '</option>';
     }
     $html .= '</select>' . "\n";
     $html .= '&nbsp;:&nbsp;<select name="' . $element->getName() . '" ' . $element->serialize($element->getHtmlAttributes()) . ' style="width:50px">' . "\n";
     for ($i = 0; $i < 60; $i++) {
         $hour = str_pad($i, 2, '0', STR_PAD_LEFT);
         $html .= '<option value="' . $hour . '" ' . ($value_min == $i ? 'selected="selected"' : '') . '>' . $hour . '</option>';
     }
     $html .= '</select>' . "\n";
     $html .= '<select name="' . $element->getName() . '" ' . $element->serialize($element->getHtmlAttributes()) . ' style="width:50px;display:none;">' . "\n";
     for ($i = 0; $i < 60; $i++) {
         $hour = str_pad($i, 2, '0', STR_PAD_LEFT);
         $html .= '<option value="' . $hour . '" ' . ($value_sec == $i ? 'selected="selected"' : '') . '>' . $hour . '</option>';
     }
     $html .= '</select>' . "\n";
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:portchris,项目名称:NaturalRemedyCompany,代码行数:36,代码来源:Time.php

示例13: _getElementHtml

 /**
  * Get the element's HTML.
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $value = $this->_getValue();
     $html = '<input id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $value . '" ' . $this->serialize($element->getHtmlAttributes()) . '/>' . "\n";
     $html .= $element->getAfterElementHtml();
     return $html;
 }
开发者ID:myparcelnl,项目名称:magento1,代码行数:13,代码来源:Hidden.php

示例14: _fixChooserAjaxUrl

 /**
  * Replaces part of the chooser ajax fetch url,
  * because we hit 404 page when we have routers defined in the following way:
  *
  * 	<admin>
  *       <routers>
  *           <brands>
  *               <use>admin</use>
  *               <args>
  *                   <module>MyCompany_MyModule</module>
  *                   <frontName>myfrontname</frontName>
  *               </args>
  *           </brands>
  *       </routers>
  *   </admin>
  *
  * Basically we just replace "myfrontname" with the admin front name
  *
  * @param Varien_Data_Form_Element_Abstract $element
  */
 protected function _fixChooserAjaxUrl($element)
 {
     $adminPath = (string) Mage::getConfig()->getNode(Mage_Adminhtml_Helper_Data::XML_PATH_ADMINHTML_ROUTER_FRONTNAME);
     $currentRouterName = Mage::app()->getRequest()->getRouteName();
     if ($adminPath != $currentRouterName) {
         $afterElementHtml = $element->getAfterElementHtml();
         $afterElementHtml = str_replace('/' . $currentRouterName . '/', '/' . $adminPath . '/', $afterElementHtml);
         $element->setAfterElementHtml($afterElementHtml);
     }
 }
开发者ID:bmcg,项目名称:Jarlssen_ChooserWidget,代码行数:30,代码来源:Chooser.php

示例15: getAfterElementHtml

 public function getAfterElementHtml()
 {
     if (parent::getAfterElementHtml() != '') {
         return Mage::app()->getLayout()->createBlock('core/template')->setTemplate('aligent/customformelements/form/field/array/change.phtml')->setElement($this)->toHtml();
     }
     return '';
 }
开发者ID:artmouse,项目名称:Magento-CustomFormElements,代码行数:7,代码来源:Array.php


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