示例#1
0
 /**
  * Displays the view
  *
  * @param		string	$tpl	The name of the template file to parse
  *
  * @return	void
  *
  * @since		2.5
  */
 public function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     $doc->addStyleSheet(JURI::root() . 'media/overrider/css/overrider.css');
     JHtml::_('behavior.framework');
     $doc->addScript(JURI::root() . 'media/overrider/js/overrider.js');
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // Check for errors
     if (count($errors = $this->get('Errors'))) {
         throw new Exception(implode("\n", $errors));
         return;
     }
     // Check whether the cache has to be refreshed
     $cached_time = JFactory::getApplication()->getUserState('com_languages.overrides.cachedtime.' . $this->state->get('filter.client') . '.' . $this->state->get('filter.language'), 0);
     if (time() - $cached_time > 60 * 5) {
         $this->state->set('cache_expired', true);
     }
     // Add strings for translations in Javascript
     JText::script('COM_LANGUAGES_VIEW_OVERRIDE_NO_RESULTS');
     JText::script('COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR');
     $this->addToolbar();
     parent::display($tpl);
 }
示例#2
0
 protected function getInput()
 {
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_UPLOAD_FILE');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_CLOSE');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_INSERT');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_SEARCH');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_CANCEL');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_DELETE');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_CONFIRM_DELETE');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_LOAD_MORE');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_UNSUPPORTED_FORMAT');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_BROWSE_MEDIA');
     JText::script('COM_SPPAGEBUILDER_MEDIA_MANAGER_BROWSE_FOLDERS');
     JHtml::_('jquery.framework');
     $doc = JFactory::getDocument();
     $doc->addScript(JURI::base(true) . '/components/com_sppagebuilder/assets/js/media.js');
     if ($this->value) {
         $html = '<img class="sppb-media-preview" src="' . JURI::root(true) . '/' . $this->value . '" alt="" />';
     } else {
         $html = '<img class="sppb-media-preview no-image" alt="">';
     }
     $html .= '<input class="sp-media-input" type="hidden" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '">';
     $html .= '<a href="#" class="btn btn-primary sppb-btn-media-manager" data-id="' . $this->id . '"><i class="fa fa-picture-o"></i> ' . JText::_('COM_SPPAGEBUILDER_MEDIA_MANAGER_SELECT') . '</a> <a href="#" class="btn btn-danger btn-clear-image"><i class="fa fa-times"></i></a>';
     return $html;
 }
示例#3
0
 /**
  * Method to load the Chosen JavaScript framework and supporting CSS into the document head
  *
  * If debugging mode is on an uncompressed version of Chosen is included for easier debugging.
  *
  * @param   string  $selector  Class for Chosen elements.
  * @param   mixed   $debug     Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function chosen($selector = '.advandedSelect', $debug = null)
 {
     if (isset(self::$loaded[__METHOD__][$selector])) {
         return;
     }
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         JFactory::getLanguage()->load('com_tz_portfolio');
     }
     // Include jQuery
     JHtml::_('jquery.framework');
     // Add chosen.jquery.js language strings
     JText::script('JGLOBAL_SELECT_SOME_OPTIONS');
     JText::script('JGLOBAL_SELECT_AN_OPTION');
     JText::script('JGLOBAL_SELECT_NO_RESULTS_MATCH');
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     JHtml::_('script', 'jui/chosen.jquery.min.js', false, true, false, false, $debug);
     JHtml::_('stylesheet', 'jui/chosen.css', false, true);
     JFactory::getDocument()->addScriptDeclaration("\n\t\t\t\tjQuery(document).ready(function (){\n\t\t\t\t\tjQuery('" . $selector . "').chosen({\n\t\t\t\t\t\tdisable_search_threshold : 10,\n\t\t\t\t\t\tallow_single_deselect : true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t");
     self::$loaded[__METHOD__][$selector] = true;
     return;
 }
示例#4
0
 /**
  * Draws the html form element
  *
  * @param   array  $data           To pre-populate element with
  * @param   int    $repeatCounter  Repeat group counter
  *
  * @return  string	elements html
  */
 public function render($data, $repeatCounter = 0)
 {
     $str = array();
     $params = $this->getParams();
     $id = $this->getHTMLId($repeatCounter);
     $name = $this->getHTMLName($repeatCounter);
     if ($this->isEditable()) {
         $tmp = $this->_getOptions($data, $repeatCounter, true);
         // Requires chosen to work
         JText::script('JGLOBAL_KEEP_TYPING');
         JText::script('JGLOBAL_LOOKING_FOR');
         JText::script('JGLOBAL_SELECT_SOME_OPTIONS');
         JText::script('JGLOBAL_SELECT_AN_OPTION');
         JText::script('JGLOBAL_SELECT_NO_RESULTS_MATCH');
         // Note: the Chosen js should be loaded via require statement
         JHtml::_('stylesheet', 'jui/chosen.css', false, true);
         $bootstrapClass = $params->get('bootstrap_class', 'span12');
         $attr = 'multiple="multiple" class="inputbox ' . $bootstrapClass . ' small"';
         $attr .= ' data-placeholder="' . JText::_('JGLOBAL_SELECT_SOME_OPTIONS') . '"';
         $selected = $tmp;
         $str[] = JHtml::_('select.genericlist', $tmp, $name, trim($attr), 'value', 'text', $selected, $id);
         return implode("\n", $str);
     } else {
         $tmp = $this->_getOptions($data, $repeatCounter, true);
         $d = array();
         foreach ($tmp as $o) {
             $d[$o->value] = $o->text;
         }
         $name = $this->getFullName(true, false);
         $baseUrl = $this->tagUrl();
         $icon = $this->tagIcon();
         $data = FabrikHelperHTML::tagify($d, $baseUrl, $name, $icon);
         return implode("\n", $data);
     }
 }
示例#5
0
 function _displayGmap($tpl = null)
 {
     $params =& JFactory::getApplication()->getParams();
     JHTML::_('behavior.mootools');
     $document =& JFactory::getDocument();
     $document->addScript('http://maps.google.com/maps/api/js?sensor=false');
     $document->addScript(JURI::root() . '/components/com_redevent/assets/js/venuemap.js');
     JText::script("COM_REDEVENT_GET_DIRECTIONS");
     //add css file
     if (!$params->get('custom_css')) {
         $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css');
     } else {
         $document->addStyleSheet($params->get('custom_css'));
     }
     //Get Data from the model
     $row = $this->Get('Data');
     //		echo '<pre>';print_r($row); echo '</pre>';exit;
     $address = array();
     if ($row->street) {
         $address[] = $row->street;
     }
     if ($row->city) {
         $address[] = $row->city;
     }
     if ($row->country) {
         $address[] = redEVENTHelperCountries::getCountryName($row->country);
     }
     $address = implode(',', $address);
     JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, array('locdescription', 'locmage', 'countryimg', 'targetlink'));
     $row->target = JRoute::_('index.php?option=com_redevent&view=venueevents&id=' . $row->slug);
     $this->assignRef('row', $row);
     $this->assignRef('address', $address);
     parent::display($tpl);
 }
示例#6
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_BT_PORTFOLIO_COMMENT_EDITTING'));
     $document->addScript(JURI::root() . "/administrator/components/com_bt_portfolio/views/comment/submitbutton.js");
     JText::script('COM_BT_PORTFOLIO_ERROR_UNACCEPTABLE');
 }
 /**
  * Method to load the AJAX Chosen library
  *
  * If debugging mode is on an uncompressed version of AJAX Chosen is included for easier debugging.
  *
  * @param   JRegistry  $options  Options in a JRegistry object
  * @param   mixed      $debug    Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function ajaxchosen(JRegistry $options, $debug = null)
 {
     // Retrieve options/defaults
     $selector = $options->get('selector', '.tagfield');
     $type = $options->get('type', 'GET');
     $url = $options->get('url', null);
     $dataType = $options->get('dataType', 'json');
     $jsonTermKey = $options->get('jsonTermKey', 'term');
     $afterTypeDelay = $options->get('afterTypeDelay', '500');
     $minTermLength = $options->get('minTermLength', '3');
     JText::script('JGLOBAL_KEEP_TYPING');
     JText::script('JGLOBAL_LOOKING_FOR');
     // Ajax URL is mandatory
     if (!empty($url)) {
         if (isset(self::$loaded[__METHOD__][$selector])) {
             return;
         }
         // Include jQuery
         JHtml::_('jquery.framework');
         // Requires chosen to work
         self::chosen($selector, $debug);
         JHtml::_('script', 'jui/ajax-chosen.min.js', false, true, false, false, $debug);
         JFactory::getDocument()->addScriptDeclaration("\r\n\t\t\t\t(function(\$){\r\n\t\t\t\t\t\$(document).ready(function () {\r\n\t\t\t\t\t\t\$('" . $selector . "').ajaxChosen({\r\n\t\t\t\t\t\t\ttype: '" . $type . "',\r\n\t\t\t\t\t\t\turl: '" . $url . "',\r\n\t\t\t\t\t\t\tdataType: '" . $dataType . "',\r\n\t\t\t\t\t\t\tjsonTermKey: '" . $jsonTermKey . "',\r\n\t\t\t\t\t\t\tafterTypeDelay: '" . $afterTypeDelay . "',\r\n\t\t\t\t\t\t\tminTermLength: '" . $minTermLength . "'\r\n\t\t\t\t\t\t}, function (data) {\r\n\t\t\t\t\t\t\tvar results = [];\r\n\r\n\t\t\t\t\t\t\t\$.each(data, function (i, val) {\r\n\t\t\t\t\t\t\t\tresults.push({ value: val.value, text: val.text });\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t})(jQuery);\r\n\t\t\t\t");
         self::$loaded[__METHOD__][$selector] = true;
     }
     return;
 }
示例#8
0
 /**
  * Load the chosen library
  * We use this to avoid Mootools dependency
  *
  * @param   string  $selector  CSS Selector to initialise selects
  * @param   array   $options   Optional array parameters
  *
  * @return  void
  *
  * @since   1.0
  */
 public static function chosen($selector = '.chosen', $options = array())
 {
     // Only load once
     if (isset(static::$loaded[__METHOD__][$selector])) {
         return;
     }
     self::framework();
     // Add chosen.jquery.js language strings
     JText::script('JGLOBAL_SELECT_SOME_OPTIONS');
     JText::script('JGLOBAL_SELECT_AN_OPTION');
     JText::script('JGLOBAL_SELECT_NO_RESULTS_MATCH');
     RHelperAsset::load('lib/chosen.jquery.min.js', self::EXTENSION);
     RHelperAsset::load('lib/chosen.min.css', self::EXTENSION);
     RHelperAsset::load('lib/chosen-extra.css', self::EXTENSION);
     if (empty($options['disable_search_threshold'])) {
         $options['disable_search_threshold'] = 10;
     }
     if (empty($options['allow_single_deselect'])) {
         $options['allow_single_deselect'] = true;
     }
     $options = static::options2Jregistry($options);
     JFactory::getDocument()->addScriptDeclaration("\n\t\t\t(function(\$){\n\t\t\t\t\$(document).ready(function () {\n\t\t\t\t\t\$('" . $selector . "').chosen(" . $options->toString() . ");\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t");
     static::$loaded[__METHOD__][$selector] = true;
     return;
 }
示例#9
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $doc = JFactory::getDocument();
     // add documentation toolbar button
     if (version_compare(JVERSION, '3.0.0') == -1) {
         $button = '<a href="' . $this->documentation . '" style="font-weight:bold;border-color:#025A8D;background-color:#DBE4E9;" target="_blank"><span class="icon-32-help"> </span> ' . JText::_('MOD_PWEBFBLIKEBOX_DOCUMENTATION') . '</a>';
     } else {
         $button = '<a href="' . $this->documentation . '" class="btn btn-small btn-info" target="_blank"><i class="icon-support"> </i> ' . JText::_('MOD_PWEBFBLIKEBOX_DOCUMENTATION') . '</a>';
     }
     $bar = JToolBar::getInstance();
     $bar->appendButton('Custom', $button, $this->extension . '-docs');
     // add script
     $doc->addScript(JUri::root(true) . '/media/mod_pwebfblikebox/js/admin.js');
     JText::script('MOD_PWEBFBLIKEBOX_WIDTH_MESSAGE');
     // add feed script
     if ($this->value) {
         $db = JFactory::getDBO();
         $query = $db->getQuery(true);
         $query->select('manifest_cache');
         $query->from('#__extensions');
         $query->where('type = "module"');
         $query->where('element = "mod_pwebfblikebox"');
         $db->setQuery($query);
         try {
             $manifest_str = $db->loadResult();
         } catch (RuntimeException $e) {
             $manifest_str = null;
         }
         $manifest = new JRegistry($manifest_str);
         $doc->addScriptDeclaration('(function(){' . 'var pw=document.createElement("script");pw.type="text/javascript";pw.async=true;' . 'pw.src="https://www.perfect-web.co/index.php?option=com_pwebshop&view=updates&format=raw&extension=' . $this->extension . '&version=' . $manifest->get('version', '1.0.0') . '&jversion=' . JVERSION . '&host=' . urlencode(JUri::root()) . '";' . 'var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(pw,s);' . '})();');
     }
     return parent::getInput();
 }
示例#10
0
 /**
  * Display the view
  *
  * @param   string  $tpl  template
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() == 'confirmupdate') {
         $this->confirmupdate();
         return;
     }
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->pluginFields = $this->get('PluginHTML');
     $this->js = $this->get('Js');
     $this->jsevents = $this->get('JsEvents');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     // Used for js part of form
     if ($this->item->id == 0) {
         $this->elements = array(JText::_('COM_FABRIK_AVAILABLE_AFTER_SAVE'));
     } else {
         $this->elements = $this->get('Elements');
     }
     $this->assign('parent', $this->get('Parent'));
     JText::script('COM_FABRIK_ERR_ELEMENT_JS_ACTION_NOT_DEFINED');
     parent::display($tpl);
 }
示例#11
0
    /**
     * Method to get the field input markup.
     *
     * @return	string	The field input markup.
     */
    protected function getInput()
    {
        JText::script('COM_FABRIK_SUBOPTS_VALUES_ERROR');
        $default = new stdClass();
        $default->sub_values = array();
        $default->sub_labels = array();
        $default->sub_initial_selection = array();
        $opts = $this->value == '' ? json_encode($default) : json_encode($this->value);
        $script = "new Suboptions('{$this->name}', {$opts});";
        FabrikHelperHTML::script('administrator/components/com_fabrik/models/fields/suboptions.js', $script);
        $html = '<div style="float:left;width:100%">

<table style="width: 100%">
	<tr>
		<th style="width: 5%"></th>
		<th style="width: 30%">' . JText::_('COM_FABRIK_VALUE') . '</th>
		<th style="width: 30%">' . JText::_('COM_FABRIK_LABEL') . '</th>
		<th style="width: 30%">' . JText::_('COM_FABRIK_DEFAULT') . '</th>
	</tr>
</table>
<ul id="sub_subElementBody" class="subelements">
	<li></li>
</ul>
<a class="addButton" href="#" id="addSuboption">' . JText::_('COM_FABRIK_ADD') . '</a></div>';
        return $html;
    }
示例#12
0
 protected function _build($moduleID)
 {
     if ($moduleID == '') {
         $moduleID = 0;
     }
     //check phocagallery component exists
     $phocaPath = JPATH_ADMINISTRATOR . '/components/com_phocagallery';
     $phocaExists = is_dir($phocaPath) ? 1 : 0;
     //check joomgallery component exists
     $jgalleryPath = JPATH_ADMINISTRATOR . '/components/com_joomgallery';
     $jgalleryPathExists = is_dir($jgalleryPath) ? 1 : 0;
     $root = JURI::root();
     $class = $this->element['class'] ? (string) $this->element['class'] : '';
     JText::script('MOD_BTBGSLIDESHOW_ERROR_ON_PROGESS');
     JText::script('MOD_BTBGSLIDESHOW_JOOMLAFOLDER_ALERT');
     JText::script('MOD_BTBGSLIDESHOW_FLICKR_ALERT');
     JText::script('MOD_BTBGSLIDESHOW_PICASA_ALERT');
     JText::script('MOD_BTBGSLIDESHOW_PHOCA_ALERT');
     JText::script('MOD_BTBGSLIDESHOW_JOOMGALLERY_ALERT');
     JText::script('MOD_BTBGSLIDESHOW_YOUTUBE_LINK_ALERT');
     JText::script('MOD_BTBGSLIDESHOW_CONFIRM_DELETE_ALL');
     $html = '<button id="btnGetImages" class="' . $class . '">Get Images</button>';
     $html .= '<script type="text/javascript">window.moduleId = ' . $moduleID . '</script>';
     $html .= '<script type="text/javascript" src="' . JURI::root() . '/modules/mod_bt_apb/admin/js/fetchimage.js"></script>';
     return $html;
 }
 /**
  * Method to get the field input markup.
  *
  * @return  string  The field input markup.
  * @since   1.6
  */
 protected function getInput()
 {
     JHtml::_('jquery.framework');
     $itemid = JFactory::getApplication()->input->getInt('id', 0);
     $document = JFactory::getDocument();
     $document->addScript(JUri::root() . 'administrator/components/com_dzproduct/assets/js/customfield.js');
     JText::script('COM_DZPRODUCT_FIELD_CUSTOM_FIELD_ERROR_NO_FIELDS');
     JText::script('COM_DZPRODUCT_FIELD_CUSTOM_FIELD_ERROR_LOAD_FIELDS');
     JText::script('COM_DZPRODUCT_FIELD_CUSTOM_FIELD_BTN_EDIT_GROUP');
     $html = '<div 
                 id="' . $this->id . '" 
                 class="form-horizontal customfield" 
                 data-fieldname="' . $this->fieldname . '" 
                 data-controller="' . $this->element['controller'] . '" 
                 data-itemid="' . $itemid . '">
                 <div class="form-container"></div>
                 <img class="img-loading" src="' . JUri::root() . '/media/system/images/modal/spinner.gif" />
                 <div class="control-group">
                     <div class="controls">
                         <button class="btn btn-primary btn-reload"><span class="icon-refresh"></span>&nbsp;' . JText::_('COM_DZPRODUCT_RELOAD_FIELDS') . '</button>
                     </div>
                 </div>
             </div>';
     return $html;
 }
 /**
  * 设置浏览器title
  * 添加两个javascript
  **/
 protected function setDocument()
 {
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_HEARTCARE_DEVICE_EDITING'));
     $document->addScript(JUri::root() . $this->script);
     $document->addScript(JUri::root() . "/administrator/components/com_heartcare/views/device/submitbutton.js");
     JText::script('COM_HEARTCARE_DEVICE_ID_OR_TYPE_ERROR_UNACCPTABLE');
 }
 /**	 
  * Method to set up the document properties	 
  *	 
  * @return void	 
  */
 protected function setDocument()
 {
     $document = JFactory::getDocument();
     $document->setTitle('Type Me, Please - Feedback');
     $document->addScript(JURI::root() . $this->script);
     $document->addScript(JURI::root() . "/administrator/components/com_feedback");
     JText::script('COM_FEEDBACK_FEEDBACK_ERROR_UNACCEPTABLE');
 }
示例#16
0
 protected function setDocument()
 {
     if ($this->getLayout() == 'processing') {
         JText::script('COM_JUDIRECTORY_IMPORT_CSV_FINISHED');
         $document = JFactory::getDocument();
         $document->addScript(JUri::root() . "administrator/components/com_judirectory/assets/js/import-csv-ajax.js");
     }
 }
示例#17
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  */
 protected function getInput()
 {
     JText::script('COM_FABRIK_SUBOPTS_VALUES_ERROR');
     $default = new stdClass();
     $default->sub_values = array();
     $default->sub_labels = array();
     $default->sub_initial_selection = array();
     $opts = $this->value == '' ? $default : JArrayHelper::toObject($this->value);
     $j3 = FabrikWorker::j3();
     if ($j3) {
         $delButton = '<div class="btn-group">';
         $delButton .= '<a class="btn btn-success" href="#" data-button="addSuboption"><i class="icon-plus"></i> </a>';
         $delButton .= '<a class="btn btn-danger" href="#" data-button="deleteSuboption"><i class="icon-minus"></i> </a>';
         $delButton .= '</div>';
     } else {
         $delButton = '<a class="removeButton" href="#"><i class="icon-minus"></i> ' . FText::_('COM_FABRIK_DELETE') . '</a>';
     }
     if (is_array($opts)) {
         $opts['delButton'] = $delButton;
     } else {
         $opts->delButton = $delButton;
     }
     $opts->id = $this->id;
     $opts->j3 = $j3;
     $opts->defaultMax = (int) $this->getAttribute('default_max', 0);
     $opts = json_encode($opts);
     $script[] = "window.addEvent('domready', function () {";
     $script[] = "\tnew Suboptions('{$this->name}', {$opts});";
     $script[] = "});";
     FabrikHelperHTML::script('administrator/components/com_fabrik/models/fields/suboptions.js', implode("\n", $script));
     $html = array();
     if (!$j3) {
         $html[] = '<div style="float:left;width:100%">';
     }
     $html[] = '<table class="table table-striped" style="width: 100%" id="' . $this->id . '">';
     $html[] = '<thead>';
     $html[] = '<tr style="text-align:left">';
     $html[] = '<th style="width: 5%"></th>';
     $html[] = '<th style="width: 30%">' . FText::_('COM_FABRIK_VALUE') . '</th>';
     $html[] = '<th style="width: 30%">' . FText::_('COM_FABRIK_LABEL') . '</th>';
     $html[] = '<th style="width: 10%">' . FText::_('COM_FABRIK_DEFAULT') . '</th>';
     if ($j3) {
         $html[] = '<th style="width: 20%"><a class="btn btn-success" href="#" data-button="addSuboption"><i class="icon-plus"></i> </a></th>';
     }
     $html[] = '</tr>';
     $html[] = '</thead>';
     $html[] = '<tbody></tbody>';
     $html[] = '</table>';
     if (!$j3) {
         $html[] = '<ul id="sub_subElementBody" class="subelements">';
         $html[] = '<li></li>';
         $html[] = '</ul>';
         $html[] = '<a class="addButton" href="#" id="addSuboption"><i class="icon-plus"></i> ' . FText::_('COM_FABRIK_ADD') . '</a></div>';
     }
     FabrikHelperHTML::framework();
     FabrikHelperHTML::iniRequireJS();
     return implode("\n", $html);
 }
示例#18
0
 public function filter(&$text)
 {
     if ($this->getTemplate()->getParameters()->layout == 'koowa') {
         $head = JFactory::getDocument()->getHeadData();
         $mime = JFactory::getDocument()->getMimeEncoding();
         ob_start();
         echo '<title>' . $head['title'] . '</title>';
         // Generate stylesheet links
         foreach ($head['styleSheets'] as $source => $attributes) {
             $attributes['type'] = $attributes['mime'];
             unset($attributes['mime']);
             echo sprintf('<ktml:style src="%s" %s />', $source, $this->buildAttributes($attributes));
         }
         // Generate stylesheet declarations
         foreach ($head['style'] as $type => $content) {
             // This is for full XHTML support.
             if ($mime != 'text/html') {
                 $content = "<![CDATA[\n" . $content . "\n]]>";
             }
             echo sprintf('<style type="%s">%s</style>', $type, $content);
         }
         // Generate script file links
         foreach ($head['scripts'] as $path => $attributes) {
             $attributes['type'] = $attributes['mime'];
             unset($attributes['mime']);
             echo sprintf('<ktml:script src="%s" %s />', $path, $this->buildAttributes($attributes));
         }
         // Generate script declarations
         foreach ($head['script'] as $type => $content) {
             // This is for full XHTML support.
             if ($mime != 'text/html') {
                 $content = "<![CDATA[\n" . $content . "\n]]>";
             }
             echo sprintf('<script type="%s">%s</script>', $type, $content);
         }
         foreach ($head['custom'] as $custom) {
             echo $custom . "\n";
         }
         // Generate script language declarations.
         if (count(JText::script())) {
             echo '<script type="text/javascript">';
             echo '(function() {';
             echo 'var strings = ' . json_encode(JText::script()) . ';';
             echo 'if (typeof Joomla == \'undefined\') {';
             echo 'Joomla = {};';
             echo 'Joomla.JText = strings;';
             echo '}';
             echo 'else {';
             echo 'Joomla.JText.load(strings);';
             echo '}';
             echo '})();';
             echo '</script>';
         }
         $head = ob_get_clean();
         $text = $head . $text;
     }
 }
示例#19
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $isNew = $this->item->id == 0;
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('COM_MAILUP_MAILUP_CREATING') : JText::_('COM_MAILUP_MAILUP_EDITING'));
     $document->addScript(JURI::root() . $this->script);
     $document->addScript(JURI::root() . "/administrator/components/com_mailup/views/group/submitbutton.js");
     JText::script('COM_MAILUP_MAILUP_ERROR_UNACCEPTABLE');
 }
示例#20
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $this->isNew = $this->item->account_id == 0;
     $document = JFactory::getDocument();
     $document->setTitle($this->isNew ? JText::_('COM_TSJ_ACCOUNT_CREATING') : JText::_('COM_TSJ_ACCOUNT_EDITING'));
     $document->addScript(JURI::root() . $this->script);
     $document->addScript(JURI::root() . "/administrator/components/com_tsj/views/account/submitbutton.js");
     JText::script('COM_TSJ_TSJ_ERROR_UNACCEPTABLE');
 }
示例#21
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $isNew = !JRequest::get('smtp_profile_id', false);
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('COM_NEWSLETTER_SMTP_CREATING') : JText::_('COM_NEWSLETTER_SMTP_EDITING'));
     $document->addScript(JURI::root() . "administrator/components/com_newsletter/views/smtpprofile/submitbutton.js");
     $document->addScript(JURI::root() . "administrator/components/com_newsletter/views/smtpprofile/smtpprofile.js");
     JText::script('COM_NEWSLETTER_MAILBOX_ERROR_UNACCEPTABLE');
 }
 protected function setDocument()
 {
     JToolbarHelper::apply('newsletter2go.save');
     $document = JFactory::getDocument();
     //loads scripts before jQuery in tmpl/default.php....
     $document->addStyleSheet(JURI::root() . "administrator/components/com_newsletter2go/views/newsletter2go/farbtastic/farbtastic.css");
     $document->addStyleSheet(JURI::root() . "administrator/components/com_newsletter2go/views/newsletter2go/newsletter2go.css");
     JText::script('COM_NEWSLETTER2GO_NEWSLETTER2GO_ERROR_UNACCEPTABLE');
 }
示例#23
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $isNew = $this->item->id < 1;
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('ECR_UPPER_COM_COM_NAME_ECR_UPPER_COM_NAME_CREATING') : JText::_('ECR_UPPER_COM_COM_NAME_ECR_UPPER_COM_NAME_EDITING'));
     $document->addScript(JURI::root(true) . $this->script);
     $document->addScript(JURI::root(true) . '/administrator/components/ECR_COM_COM_NAME/views/ECR_LOWER_COM_NAME/submitbutton.js');
     JText::script('ECR_UPPER_COM_COM_NAME_ECR_UPPER_COM_NAME_ERROR_UNACCEPTABLE');
 }
示例#24
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $isNew = $this->item->id < 1;
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('COM_YOUTUBEGALLERY_LINKSFORM_NEW') : JText::_('COM_YOUTUBEGALLERY_LINKSFORM_EDIT'));
     $document->addScript(JURI::root() . $this->script);
     $document->addScript(JURI::root() . "/administrator/components/com_youtubegallery/views/linksform/submitbutton.js");
     JText::script('COM_YOUTUBEGALLERY_FORMEDIT_ERROR_UNACCEPTABLE');
 }
示例#25
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $isNew = $this->item->ID == 0;
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('COM_OSBIT_REGISTRATION_CREATING') : JText::_('COM_OSBIT_REGISTRATION_EDITING'));
     $document->addScript(JURI::root() . $this->script);
     $document->addScript(JURI::root() . "/administrator/components/com_osbit/views/registration/submitbutton.js");
     JText::script('COM_OSBIT_REGISTRATION_ERROR_UNACCEPTABLE');
 }
示例#26
0
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $this->document->setTitle($this->documentTitle);
     // Load language string in JavaScript
     JText::script('COM_GAMIFICATION_DELETE_IMAGE_QUESTION');
     // Add scripts
     JHtml::_('behavior.tooltip');
     JHtml::_('behavior.formvalidation');
     $this->document->addScript('../media/' . $this->option . '/js/admin/' . String::strtolower($this->getName()) . '.js');
 }
示例#27
0
 protected function setDocument()
 {
     $isNew = $this->item->id == 0;
     $userId = JFactory::getUser()->id;
     $document = JFactory::getDocument();
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $document->setTitle(JText::_('COM_JUDOWNLOAD_PAGE_' . ($checkedOut ? 'VIEW_CRITERIA' : ($isNew ? 'ADD_CRITERIA' : 'EDIT_CRITERIA'))));
     JText::script('COM_JUDOWNLOAD_WEIGHT_MUST_BE_GREATER_THAN_ZERO');
     $document->addScript(JUri::root() . $this->script);
 }
 protected function setDocument()
 {
     $isNew = $this->item->idIcon == 0;
     $application = JFactory::getApplication();
     $template = $application->getTemplate();
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('COM_SMARTICONS_ADMINISTRATION_ICON_NEW') : JText::_('COM_SMARTICONS_ADMINISTRATION_ICON_EDIT'));
     $document->addScript("../media/com_smarticons/js/edit.js");
     $document->addStyleSheet(JPATH_ADMINISTRATOR . DS . 'templates' . DS . $template . DS . 'css' . DS . 'template.css');
     JText::script('COM_SMARTICONS_ERROR_UNACCEPTABLE');
 }
 protected function setDocument()
 {
     $isNew = $this->item->id == 0;
     $document = JFactory::getDocument();
     $document->setTitle($isNew ? JText::_('COM_SRO_MANAGER_ITEM_NEW') : JText::_('COM_SRO_MANAGER_ITEM_EDIT'));
     JHtml::_('behavior.tooltip');
     JHtml::_('behavior.formvalidation');
     JHtml::script("com_sro/item.js", true, true);
     JHtml::script("com_sro/submitbutton.js", true, true);
     JText::script("COM_SRO_ERROR_UNACCEPTABLE");
 }
 /**
  * Method to set up the document properties
  *
  * @return void
  */
 protected function setDocument()
 {
     $this->document->setTitle(JText::_('COM_GAMIFICATION_PROFILES'));
     // Load language string in JavaScript
     JText::script('COM_GAMIFICATION_SEARCH_IN_TITLE_TOOLTIP');
     // Scripts
     JHtml::_('bootstrap.tooltip');
     JHtml::_('behavior.multiselect');
     JHtml::_('formbehavior.chosen', 'select');
     $this->document->addScript('../media/' . $this->option . '/js/admin/' . strtolower($this->getName()) . '.js');
 }