當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HtmlHelper::inlineJavascript方法代碼示例

本文整理匯總了PHP中HtmlHelper::inlineJavascript方法的典型用法代碼示例。如果您正苦於以下問題:PHP HtmlHelper::inlineJavascript方法的具體用法?PHP HtmlHelper::inlineJavascript怎麽用?PHP HtmlHelper::inlineJavascript使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HtmlHelper的用法示例。


在下文中一共展示了HtmlHelper::inlineJavascript方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __toString

 function __toString()
 {
     $json_config = JsonHelper::encode($this->config);
     $this->afterHTML = HtmlHelper::inlineJavascript('jQuery(function(){$("#' . $this->getId() . '").datepicker(' . $json_config . ')});');
     $this->setAttribute('class', 'form_input_text form_ycalendar');
     return parent::__toString();
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:7,代碼來源:datepicker.input.php

示例2: __toString

 function __toString()
 {
     $this->setAttribute('class', 'tinymce_textarea');
     $this->innerHTML = HtmlHelper::escape($this->_value);
     $config = JsonHelper::encode($this->config);
     $script = HtmlHelper::inlineJavascript('tinyMCE.init(' . $config . ');');
     $this->afterHTML = $script;
     self::$instances_included++;
     return parent::__toString();
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:10,代碼來源:tinymceeditor.input.php

示例3: HtmlHelper

 function __toString()
 {
     $this->_html_name = $this->_name . '[file]';
     if ($this->current_filename == '') {
         return parent::__toString();
     }
     $html = new HtmlHelper();
     $id = $this->getAttribute('id');
     $button = '<div id="editablebox_' . $id . '">' . $this->current_filename . ' ';
     $button .= $html->absoluteLink('[X]', 'javascript:void(0)', array('id' => 'delete_' . $id));
     $button .= $html->inlineJavascript('Phaxsi.Event.addEvent(document.getElementById("delete_' . $id . '"), "click", deleteFile.createDelegate(this, ["' . $id . '", "' . $this->input_hidden->getAttribute('id') . '"]));');
     $button .= '</div>';
     $this->beforeHTML = $html->javascript('/widgets/custom/editablefile.js') . $button . $this->input_hidden->__toString();
     return parent::__toString();
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:15,代碼來源:editablefile.input.php

示例4: HtmlHelper

 function __toString()
 {
     $html = new HtmlHelper();
     $this->afterHTML = $html->inlineJavascript('Phaxsi.Event.addEvent(document.getElementById("' . $this->getId() . '"), "click", function(){location.href="' . $this->url . '"})');
     return parent::__toString();
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:6,代碼來源:adminbutton.input.php

示例5: getClientValidationHtml

 function getClientValidationHtml()
 {
     if ($this->_validator && $this->_validator->getOption('client_side_validable')) {
         return HtmlHelper::inlineJavascript("Phaxsi.Validator.Current.addValidator('{$this->_name}'," . JsonHelper::encode($this->_validator->getClientOptions()) . "," . JsonHelper::encode($this->_validator->getClientErrorMessages()) . "," . JsonHelper::encode($this->getClientValidationConfig()) . ");");
     }
     return '';
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:7,代碼來源:formelementlist.base.php

示例6: getHeadHtml

 protected function getHeadHtml()
 {
     $html = new HtmlHelper($this->context);
     $output = '';
     foreach ($this->metas as $meta) {
         if ($meta['name']) {
             $output .= "<meta name=\"{$meta['name']}\" content=\"" . HtmlHelper::escape($meta['content']) . "\" />\r\n";
         } elseif ($meta['http-equiv']) {
             $output .= "<meta http-equiv=\"{$meta['http-equiv']}\" content=\"" . HtmlHelper::escape($meta['content']) . "\" />\r\n";
         }
     }
     $output .= "<title>" . HtmlHelper::escape($this->title) . "</title>\r\n";
     $output .= '<base href="' . UrlHelper::get('/') . '"/>' . "\r\n";
     if ($this->favico) {
         $output .= '<link rel="icon" type="' . $this->favico[1] . "\" href=\"" . UrlHelper::resource($this->favico[0]) . "\">\r\n";
     }
     if ($this->description) {
         $output .= '<meta name="description" content="' . HtmlHelper::escape($this->description) . "\" />\r\n";
     }
     if ($this->keywords) {
         $output .= '<meta name="keywords" content="' . HtmlHelper::escape($this->keywords) . "\" />\r\n";
     }
     foreach ($this->feeds as $feed) {
         $output .= '<link rel="alternate" type="application/rss+xml" title="RSS" href="' . UrlHelper::get($feed) . "\" />\r\n";
     }
     foreach ($this->styles as $style) {
         $output .= $html->css($style[0], $style[1]) . "\r\n";
     }
     if ($this->js_library) {
         $output .= "<script type=\"text/javascript\" src=\"{$this->js_library}\"></script>\r\n";
         $output .= $html->javascript('/' . APPU_PHAXSI . '/' . 'phaxsi-' . PhaxsiConfig::FRAMEWORK_VERSION . (AppConfig::DEBUG_MODE ? '' : '.min') . '.js') . "\r\n";
         $output .= HtmlHelper::inlineJavascript("Phaxsi.path = {" . "base: '" . UrlHelper::get('') . "'," . "local: '" . UrlHelper::localized('/') . "'," . "'public': '" . APPU_PUBLIC . "'," . "lang: '" . Lang::getCurrent() . "'}");
     }
     foreach ($this->scripts as $script) {
         $output .= $html->javascript($script) . "\r\n";
     }
     $this->styles = $this->scripts = array();
     return $output;
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:39,代碼來源:layout.class.php

示例7: open

 final function open($attributes = array())
 {
     $html_id = $this->_id;
     if (isset($attributes['id'])) {
         $html_id = $attributes['id'];
         unset($attributes['id']);
     }
     $attributes = HtmlHelper::formatAttributes($attributes);
     $validation_script = '';
     if ($this->_client_validation_enabled) {
         $this->enableClientValidation();
         $validation_script = HtmlHelper::inlineJavascript("Phaxsi.Validator.Current = Phaxsi.Validator.List['{$html_id}'] = new Phaxsi.Validator.Manager('{$html_id}');\r\n" . "Phaxsi.Validator.DefaultErrorMessages = " . JsonHelper::encode(Validator::getDefaultErrorMessages()) . ";");
         $this->_javascript .= HtmlHelper::inlineJavascript("Phaxsi.Validator.Current.attachToSubmit();");
     }
     #For xhtml strict compliance
     $target_str = $this->_target == '_self' ? '' : 'target="' . $this->_target . '"';
     return "<form id=\"{$html_id}\" accept-charset=\"" . $this->_charset . "\" action=\"" . HtmlHelper::escape($this->_action) . "\" method=\"{$this->_method}\"  {$attributes} {$target_str} enctype=\"{$this->_enc_type}\">\r\n" . $validation_script;
 }
開發者ID:RNKushwaha022,項目名稱:orange-php,代碼行數:18,代碼來源:form.base.php


注:本文中的HtmlHelper::inlineJavascript方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。