0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: arrows.php.tar
home/academiac/www/administrator/components/com_unitehcarousel/models/fields/arrows.php 0000604 00000004174 15137237210 0025726 0 ustar 00 <?php /** * @package Unite Horizontal Carousel for Joomla 1.7-2.5 * @author UniteCMS.net * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('JPATH_BASE') or die; /** * Supports a modal article picker. * * @package Joomla.Administrator * @subpackage com_content * @since 1.6 */ class JFormFieldArrows extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'arrows'; /** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function onArrowsSelect(data){'; $script[] = ' UniteAdmin.onArrowsChange(data);'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option='.GlobalsUniteHCar::COMPONENT_NAME.'&view=slider&layout=arrows&tmpl=component&settingid='.$this->id; $buttonType = $this->value; $arrArrowSet = HelperUniteHCar::getArrowSet($buttonType); $arrowName = $arrArrowSet["name"]; $html[] = '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'.$this->value.'" />'; $buttonID = $this->id."-btn"; $desc = UniteFunctionsHCar::getVal($this->element, "description"); // The the arrow $imageArrow = $arrArrowSet["url_right"]; $html[] = '<span class="chooser-image-wrapper"><img id="'.$this->id.'-img" title="'.$arrowName.'" src="'.$imageArrow.'"></span>'; //put select button $html[] = ' <a id="'.$buttonID.'" class="modal button-secondary button-chooser" href="'.$link.'&'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x: 900, y: 450}}">Change</a>'; $html = implode("\n", $html); return $html; } } home/academiac/www/administrator/components/com_unitehcarousel/views/slider/tmpl/arrows.php 0000604 00000002445 15137703616 0026577 0 ustar 00 <?php /** * @package Unite Horizontal Carousel for Joomla 1.7-2.5 * @author UniteCMS.net * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ // No direct access. defined('_JEXEC') or die; $arrowsSets = HelperUniteHCar::getArrowsList(); $settingID = UniteFunctionsHCar::getGetVar("settingid"); ?> <div class="arrows_grid"> <ul class="arrows_list"> <?php foreach($arrowsSets as $name=>$set){ $urlLeft = $set["url_left"]; $urlRight = $set["url_right"]; ?> <li> <a href="javascript:void(0)" class="link_arrow" id="<?php echo $name?>" title="<?php echo $name?>"> <span> <img src="<?php echo $urlLeft?>" class="arrow_left"></img> <img src="<?php echo $urlRight?>" class="arrow_right"></img> </span> </a> </li> <?php } ?> </ul> <div class="clear"></div> </div> <script type="text/javascript"> jQuery("a.link_arrow").click(function(){ var link = jQuery(this); var data = {}; data.settingID = '<?php echo $settingID?>'; data.url_left = link.find(".arrow_left").attr("src"); data.url_right = link.find(".arrow_right").attr("src"); data.arrowName = this.id; window.parent.onArrowsSelect(data); }); </script>