Ejemplo n.º 1
0
 /**
  * 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[] = '		UniteAdminRev.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=' . GlobalsUniteRev::COMPONENT_NAME . '&view=slider&layout=arrows&tmpl=component&settingid=' . $this->id;
     $buttonType = $this->value;
     $arrArrowSet = HelperUniteRev::getArrowSet($buttonType);
     $arrowName = $arrArrowSet["name"];
     $html[] = '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . $this->value . '" />';
     $buttonID = $this->id . "-btn";
     $desc = UniteFunctionsRev::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 . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 900, y: 450}}">Change</a>';
     $html = implode("\n", $html);
     return $html;
 }