/** * 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(); }
<?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>
<?php /** * @package RedSHOP.Frontend * @subpackage Template * * @copyright Copyright (C) 2005 - 2013 redCOMPONENT.com. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die; JHtml::_('behavior.tooltip'); JHtmlBehavior::modal(); $uname = ''; $uemail = ''; $address = ''; $telephone = ''; $user = JFactory::getUser(); if ($user->id) { $uname = $user->name; $uemail = $user->email; } $category_id = $this->input->getInt('category_id', null); JHtml::Script('jquery.tools.min.js', 'components/com_redshop/assets/js/', false); $template = $this->redTemplate->getTemplate('ask_question_template'); if (count($template) > 0 && $template[0]->template_desc != "") { $template_desc = $template[0]->template_desc; } else { $template_desc = '<table border="0"><tbody><tr><td>{user_name_lbl}</td><td>{user_name}</td></tr><tr><td>{user_email_lbl}</td><td>{user_email}</td></tr><tr><td>{user_question_lbl}</td><td>{user_question}</td></tr><tr><td></td><td>{send_button}</td></tr></tbody></table>'; } ?> <script type="text/javascript" language="javascript">var J = jQuery.noConflict();</script>
/** * 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 . '&' . 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; }
/** * 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'); }
/** * @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(){ });