Source for file newsfeed.php
Documentation is available at newsfeed.php
* @package Joomla.Administrator
* @subpackage com_newsfeeds
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Supports a modal newsfeeds picker.
* @package Joomla.Administrator
* @subpackage com_newsfeeds
protected $type =
'Modal_Newsfeed';
* Method to get the field input markup.
* @return string The field input markup.
$allowEdit =
((string)
$this->element['edit'] ==
'true') ?
true :
false;
$allowClear =
((string)
$this->element['clear'] !=
'false') ?
true :
false;
JHtml::_('behavior.framework');
JHtml::_('behavior.modal', 'a.modal');
JHtml::_('bootstrap.tooltip');
$script[] =
' function jSelectNewsfeed_'.
$this->id.
'(id, name, object) {';
$script[] =
' document.id("'.
$this->id.
'_id").value = id;';
$script[] =
' document.id("'.
$this->id.
'_name").value = name;';
$script[] =
' jQuery("#'.
$this->id.
'_edit").removeClass("hidden");';
$script[] =
' jQuery("#'.
$this->id.
'_clear").removeClass("hidden");';
$script[] =
' SqueezeBox.close();';
if ($allowClear &&
!$scriptClear)
$script[] =
' function jClearNewsfeed(id) {';
$script[] =
' document.getElementById(id + "_id").value = "";';
$script[] =
' document.getElementById(id + "_name").value = "'.
htmlspecialchars(JText::_('COM_NEWSFEEDS_SELECT_A_FEED', true), ENT_COMPAT, 'UTF-8').
'";';
$script[] =
' jQuery("#"+id + "_clear").addClass("hidden");';
$script[] =
' if (document.getElementById(id + "_edit")) {';
$script[] =
' jQuery("#"+id + "_edit").addClass("hidden");';
$script[] =
' return false;';
// Add the script to the document head.
// Setup variables for display.
$link =
'index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function=jSelectNewsfeed_'.
$this->id;
if (isset
($this->element['language']))
$link .=
'&forcedLanguage='.
$this->element['language'];
// Get the title of the linked chart
' WHERE id = '.(int)
$this->value
$title =
$db->loadResult();
catch
(RuntimeException $e)
$title =
JText::_('COM_NEWSFEEDS_SELECT_A_FEED');
// The active newsfeed id field.
if (0 == (int)
$this->value)
$value = (int)
$this->value;
// The current newsfeed display field.
$html[] =
'<span class="input-append">';
$html[] =
'<input type="text" class="input-medium" id="'.
$this->id.
'_name" value="'.
$title.
'" disabled="disabled" size="35" />';
$html[] =
'<a class="modal btn hasTooltip" title="'.
JHtml::tooltipText('COM_NEWSFEEDS_CHANGE_FEED_BUTTON').
'" href="'.
$link.
'&'.
JSession::getFormToken().
'=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> '.
JText::_('JSELECT').
'</a>';
$html[] =
'<a class="btn hasTooltip'.
($value ?
'' :
' hidden').
'" href="index.php?option=com_newsfeeds&layout=modal&tmpl=component&task=newsfeed.edit&id=' .
$value.
'" target="_blank" title="'.
JHtml::tooltipText('COM_NEWSFEEDS_EDIT_NEWSFEED').
'" ><span class="icon-edit"></span> ' .
JText::_('JACTION_EDIT') .
'</a>';
$html[] =
'<button id="'.
$this->id.
'_clear" class="btn'.
($value ?
'' :
' hidden').
'" onclick="return jClearNewsfeed(\''.
$this->id.
'\')"><span class="icon-remove"></span> ' .
JText::_('JCLEAR') .
'</button>';
// class='required' for client side validation
$class =
' class="required modal-value"';
$html[] =
'<input type="hidden" id="'.
$this->id.
'_id"'.
$class.
' name="'.
$this->name.
'" value="'.
$value.
'" />';
Documentation generated on Tue, 19 Nov 2013 15:09:24 +0100 by phpDocumentor 1.4.3