/** * timePickerField * * @param string $selected Value * @param string $name The name for the field * @param array $idTag Additional HTML attributes for the <select> tag * @param array $attribs Additional HTML attributes * @param string $extensionmainjs Module name * * @return string HTML */ public static function timePickerField($selected, $name, $idTag = null, $attribs = array(), $extensionmainjs = null) { static $initialized = false; if ($selected) { $selected = EParameter::convertUTCLocal($selected); $selected = EParameter::getTimePart($selected); } if (!$initialized) { $initialized = true; JHtml::stylesheet('lib_extly/bootstrap-timepicker.min.css', false, true); if ($extensionmainjs) { $dependencies = array(); if (EXTLY_J25) { $dependencies['bootstrap-timepicker'] = array(DependencyManager::EXTLY_J25_JQUERY); } $file = 'media/lib_extly/js/utils/bootstrap-timepicker-nohide.min'; $paths = array('bootstrap-timepicker' => $file); Extly::addAppDependency($extensionmainjs, $dependencies, $paths); } else { JHtml::script('lib_extly/utils/bootstrap-timepicker-nohide.min.js', false, true); } } if (!$idTag) { $idTag = self::generateIdTag(); } $jlang = JFactory::getLanguage(); $langTag = $jlang->getTag(); if (empty($attribs)) { $attribs = array('class' => 'span6'); } $field_class = ''; if (array_key_exists('field-class', $attribs)) { $field_class = $attribs['field-class']; } $attribs = JArrayHelper::toString($attribs); Extly::addPostRequireScript("jQuery('#{$idTag}').timepicker({\nshowMeridian: false\n}).timepicker('setTime', '{$selected}');"); $control = "<div class=\"input-append time {$field_class}\">\n<input id=\"{$idTag}\" name=\"{$name}\" type=\"text\" {$attribs}/>\n<span class=\"add-on\"><i class=\"xticon xticon-clock-o\"></i></span>\n</div>"; return $control; }
/** * @package Extly.Components * @subpackage com_autotweet - A powerful social content platform to manage multiple social networks. * * @author Prieco S.A. <*****@*****.**> * @copyright Copyright (C) 2007 - 2015 Prieco, S.A. All rights reserved. * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL * @link http://www.extly.com http://support.extly.com */ // No direct access defined('_JEXEC') or die('Restricted access'); $channeltypeId = $this->input->get('channeltype_id', AutotweetModelChanneltypes::TYPE_LIOAUTH2_CHANNEL, 'cmd'); $accessTokenEncoded = htmlentities($accessToken); $expires_date = $this->item->xtform->get('expires_date'); $expires_date = EParameter::convertUTCLocal($expires_date); $lioauth2ChannelHelper = new LiOAuth2ChannelHelper($this->item); $authUrl = $lioauth2ChannelHelper->getAuthorizationUrl(); if (!empty($accessTokenEncoded) && $channeltypeId == AutotweetModelChanneltypes::TYPE_LIOAUTH2COMPANY_CHANNEL) { ?> <div class="control-group"> <label class="required control-label" for="xtformlioauth2company_id" id="lioauth2company_id-lbl"><?php echo JText::_('COM_AUTOTWEET_CHANNEL_LINKEDIN_COMPANY_ID'); ?> <span class="star"> *</span></label> <div class="controls"> <a class="btn btn-info" id="lioauth2companyloadbutton"><?php echo JText::_('COM_AUTOTWEET_VIEW_CHANNEL_LOADBUTTON_TITLE'); ?> </a>
/** * _getAjaxData. * * @return array */ private function _getAjaxData() { $data = array(); $publish_up = $this->input->get('publish_up', null, 'string'); if (empty($publish_up)) { $publish_up = EParameter::convertUTCLocal(JFactory::getDate()->toSql()); } $description = $this->input->get('description', null, 'string'); if (empty($description)) { throw new Exception('Invalid message'); } $url = $this->input->get('url', null, 'string'); $title = $this->input->get('title', null, 'string'); if (empty($title)) { $title = $description; } $data['publish_up'] = $publish_up; $data['plugin'] = $this->input->get('plugin', null, 'cmd'); $data['ref_id'] = $this->input->get('ref_id', null, 'string'); $data['description'] = $description; $data['url'] = $url; $data['image_url'] = $this->input->get('image_url', null, 'string'); $data['published'] = $this->input->get('published', 0, 'int'); $data['id'] = $this->input->get('id', 0, 'int'); $xtform = array(); $xtform['title'] = $title; $xtform['hashtags'] = $this->input->get('hashtags', null, 'string'); $xtform['fulltext'] = $this->input->get('fulltext', null, 'string'); $xtform['catid'] = $this->input->get('catid', null, 'string'); $xtform['author'] = $this->input->get('author', null, 'string'); $xtform['language'] = $this->input->get('language', null, 'string'); $xtform['access'] = $this->input->get('access', null, 'string'); $xtform['target_id'] = $this->input->get('target_id', null, 'string'); $data['xtform'] = $xtform; if (AUTOTWEETNG_JOOCIAL) { $data['autotweet_advanced_attrs'] = $this->input->get('autotweet_advanced_attrs', null, 'string'); } return $data; }
/** * convertUTCLocalAgenda * * @param array &$agendas Param * * @return void */ public static function convertUTCLocalAgenda(&$agendas) { $result = array(); if ($agendas && is_array($agendas)) { foreach ($agendas as $agenda) { $result[] = EParameter::convertUTCLocal($agenda); } } $agendas = $result; }