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


PHP JHtmlBehavior::modal方法代码示例

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


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

示例1: autoThumb

 /**
  * autoThumb
  *
  * @param string     $context
  * @param object     $article
  * @param \JRegistry $params
  *
  * @return  void
  */
 public static function autoThumb($context, $article, $params = null)
 {
     \JHtmlBehavior::modal();
     $minimal = 30;
     $es = \Ezset::getInstance();
     include_once EZSET_ROOT . '/lib/dom/simple_html_dom.php';
     $html = str_get_html($article->text);
     $imgs = $html->find('img');
     foreach ($imgs as $img) {
         $classes = explode(' ', $img->class);
         $imgUrl = UriHelper::pathAddHost($img->src);
         // Has class nothumb, skip to next.
         if (in_array('nothumb', $classes)) {
             continue;
         }
         // If is anchor already, skip to next.
         if ($img->parent->tag == 'a') {
             continue;
         }
         // If img tag has no width and height attrs, skip.
         if (!$img->width && !$img->height) {
             continue;
         }
         // If not localhost image, skip.
         if (!strpos('-' . $imgUrl, \JURI::root()) && $es->params->get('onlyLocalhostThumb', 1)) {
             continue;
         }
         // Get img path and size
         $imgPath = \JPath::clean(str_replace(\JURI::root(), JPATH_ROOT . '/', $imgUrl));
         $size = getimagesize($imgPath);
         // Manul size
         $imgW = $img->width;
         $imgH = $img->height;
         // Original size
         $oriW = $size[0];
         $oriH = $size[1];
         // If too small, skip.
         if ($oriW <= $minimal || $oriH <= $minimal) {
             continue;
         }
         // If large ten origin, skip.
         if ($oriW <= $imgW || $oriW <= $imgW) {
             continue;
         }
         // Get thumb url
         $thumb = new \Windwalker\Image\Thumb();
         $img->src = $thumb->resize($imgUrl, $imgW, $imgH);
         $imgtext = $img->outertext;
         $imgtext = \JHtml::link($imgUrl, $imgtext, array('class' => 'modal'));
         $img->outertext = $imgtext;
         $classes = null;
     }
     $article->text = $html->save();
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:63,代码来源:Thumb.php

示例2: defined

<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: default.php  23-06-2012 23:33:14
 **/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtmlBehavior::modal('a.amodal');
AImporter::helper('form', 'currency');
AImporter::css('common');
$config = JComponentHelper::getParams('com_bookpro');
?>

<form name="frontForm" method="post" action="index.php" id="paymentForm">
	<div class="row-fluid">
		<div class="span7">
		<div class="well well-small">
			<div class="well well-small" style="background-color: white; ">
			<?php 
echo $this->loadTemplate(strtolower($this->order->type));
?>
			<?php 
echo $this->loadTemplate('cart');
?>
			</div>
		 </div>
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:default.php

示例3: getInput

    /**
     * Method to get the field input markup.
     *
     * @return  string  The field input markup.
     */
    public function getInput()
    {
        // Load the modal behavior script.
        JHtmlBehavior::modal('a.modal');
        if (!self::$initialised) {
            $this->setScript();
        }
        // Setup variables for display.
        // ================================================================
        $html = array();
        $disabled = XmlHelper::getBool($this->element, 'disabled');
        $readonly = XmlHelper::getBool($this->element, 'readonly');
        $link = $this->getLink();
        $title = $this->getTitle();
        // Set Title
        // ================================================================
        if (empty($title)) {
            $title = \JText::_(XmlHelper::get($this->element, 'select_label', 'LIB_WINDWALKER_FORMFIELD_FINDER_SELECT_FILE'));
        }
        $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
        // The text field.
        // ================================================================
        $preview = $this->getPreview();
        // The current user display field.
        $html[] = '<span class="' . (!$disabled && !$readonly ? 'input-append' : '') . '">';
        $html[] = '<input type="text" class="' . (!$disabled && !$readonly ? 'input-medium ' . $this->element['class'] : $this->element['class']) . '" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
        if (!$disabled && !$readonly) {
            $html[] = '<a class="modal btn btn-primary" title="' . JText::_('LIB_WINDWALKER_FORMFIELD_FINDER_BROWSE_FILES') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 920, y: 450}}">
							<i class="icon-picture"></i> ' . JText::_('LIB_WINDWALKER_FORMFIELD_FINDER_BROWSE_FILES') . '</a>';
        }
        $html[] = '</span>';
        // The  class='required' for client side validation
        // ================================================================
        $class = '';
        if ($this->required) {
            $class = ' class="required modal-value"';
        }
        // Velue store input
        $disabled_attr = $disabled ? ' disabled="true" ' : '';
        $html[] = '<input type="hidden" id="' . $this->id . '"' . $class . ' name="' . $this->name . '" value="' . $this->value . '" ' . $disabled_attr . ' />';
        $html = implode("\n", $html);
        // Tooltip Preview
        // ================================================================
        if ($this->showAsTooltip) {
            $html = $preview . $html;
            $html = '<div class="input-prepend input-append" style="margin-right: 7px;">' . $html . '</div>';
        }
        // Clear Button
        // ================================================================
        $clear_title = JText::_('LIB_WINDWALKER_FORMFIELD_FINDER_SELECT_FILE');
        if (!$disabled && !$readonly) {
            $html .= '<a class="btn btn-danger delicious light red fltlft hasTooltip" title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '"' . ' href="#" onclick="';
            $html .= "AKFinderClear('{$this->id}', '{$clear_title}');";
            $html .= 'return false;';
            $html .= '">';
            $html .= '<i class="icon-remove"></i></a>';
        }
        // Image Preview
        // ================================================================
        if (!$this->showAsTooltip) {
            $html = $html . $preview;
        }
        return $html;
    }
开发者ID:beingsane,项目名称:quickcontent,代码行数:69,代码来源:finder.php

示例4: testModal

 /**
  * Tests the modal method.
  *
  * @param   string  $expected  @todo
  * @param   string  $selector  @todo
  * @param   array   $params    @todo
  *
  * @return  void
  *
  * @since         3.1
  * @dataProvider  getModalData
  */
 public function testModal($expected, $selector = 'a.modal', $params = array())
 {
     JHtmlBehavior::modal($selector, $params);
     $this->assertEquals($expected, JHtmlBehaviorInspector::getLoaded(), 'The modal behavior is not loaded with all dependencies');
 }
开发者ID:eshiol,项目名称:joomla-cms,代码行数:17,代码来源:JHtmlBehaviorTest.php

示例5: defined

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id$
 **/
defined('_JEXEC') or die('Restricted access');
JHtml::_('jquery.ui');
AImporter::css('common', 'tour');
JHtml::_('jquery.framework');
//JHtml::_('behavior.modal','a.modal_term');
AImporter::css('jquery-ui');
JHtmlBehavior::modal('a.modal_term');
//Start library gallery
AImporter::css('jquery-ui', 'responsive-calendar', 'fotorama');
AImporter::js('responsive-calendar', 'fotorama', 'underscore-min');
//End library gallery
AImporter::css('jquery.ui.datepicker');
$document = JFactory::getDocument();
$document->addScript(JURI::root() . 'components/com_bookpro/assets/js/jquery.ui.datepicker.js');
$action = 'index.php?option=com_bookpro&view=tourbook?Itemid=' . JFactory::getApplication()->input->get('Itemid');
$group_p = explode(';', trim($this->tour->pax_group));
?>
<script type="text/javascript">
	jQuery(document).ready(function(){
	
	});
开发者ID:hixbotay,项目名称:executivetransport,代码行数:29,代码来源:default.php


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