0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: bullets.php.tar
home/academiac/www/administrator/components/com_unitehcarousel/models/fields/bullets.php 0000604 00000004051 15137237225 0026063 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 JFormFieldBullets extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'bullets'; /** * * get label function */ protected function getLabel(){ return(""); } /** * 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 onBulletsSelect(data){'; $script[] = ' alert("do something: " + 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=com_unitehcarousel&view=slider&layout=bullets&tmpl=component'; $html[] = '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'.$this->value.'" />'; $bulletsText = "Change Bullets"; $buttonID = $this->id."-btn"; $desc = UniteFunctionsHCar::getVal($this->element, "description"); $htmlAddon = ""; if(!empty($desc)){ $htmlAddon = ' title="'.$desc.'"'; //$class .= " hasTip"; //making problems with rel } // The user select button. $html[] = ' <a id="'.$buttonID.'" class="modal panel_button" '.$htmlAddon.' href="'.$link.'&'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x: 900, y: 450}}">'.$bulletsText.'</a>'; $html = implode("\n", $html); return $html; } } home/academiac/www/administrator/components/com_unitehcarousel/views/slider/tmpl/bullets.php 0000604 00000001750 15137703610 0026724 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; $bulletsSets = HelperUniteHCar::getBulletsList(); ?> <div class="bullets_grid"> <ul class="bullets_list"> <?php foreach($bulletsSets as $name=>$set){ $urlPreview = $set["url_preview"]; ?> <li> <a href="javascript:void(0)" class="link_bullet" id="<?php echo $name?>" title="<?php echo $name?>"> <span> <img src="<?php echo $urlPreview?>" class="bullet_default"></img> </span> </a> </li> <?php } ?> </ul> <div class="clear"></div> </div> <script type="text/javascript"> jQuery("a.link_bullet").click(function(){ var link = jQuery(this); var setName = this.id; window.parent.onBulletsSelect(setName); }); </script>