/** * fetch Element */ function fetchElement($name, $values, &$node, $control_name) { $mediaPath = JURI::root() . str_replace(DS, '/', str_replace(JPATH_ROOT, '', dirname(dirname(dirname(__FILE__))))) . '/assets/'; JHTML::stylesheet('form.css', $mediaPath); $attributes = $node->attributes(); $class = isset($attributes['group']) && trim($attributes['group']) == 'end' ? 'lof-end-group' : 'lof-group'; $title = isset($attributes['title']) ? JText::_($attributes['title']) : 'Group'; $title = isset($attributes['title']) ? JText::_($attributes['title']) : ''; $for = isset($attributes['for']) ? $attributes['for'] : ''; if (isset($attributes['onoff'])) { // echo $control_name; die; // echo $name; die; // echo '<pre>'.print_r($values,1); die; $string = '<div ' . ($title ? "" : 'style="display:none"') . ' class="' . $class . '" title="' . $for . '">'; $checked = $values ? 'checked="checked"' : ""; // echo $checked; die; $string .= '<input type="checkbox" class="lof-onoff" id="params' . $for . '" value="" ' . $checked . ' name="' . $control_name . '[' . $for . ']" /><b>' . $title . '</b></div>'; return $string; } else { $string = '<div ' . ($title ? "" : 'style="display:none"') . ' class="' . $class . '" title="' . $for . '">' . $title . '</div>'; if (!defined('LOF_ADDED_TIME')) { $string .= '<input type="hidden" class="text_area" value="' . time() . '" id="paramsmain_lof_added_time" name="params[lof_added_time]">'; define('LOF_ADDED_TIME', 1); } } if (!defined('ADD_MEDIA_CONTROL')) { define('ADD_MEDIA_CONTROL', 1); $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__))); $uri = str_replace("/administrator/", "", $uri); JHTML::stylesheet('form.css', $uri . "/media/"); JHTML::script('form.js', $uri . "/media/"); } return $string; }
public function display($tpl = null) { // Page title $this->setTitle('Updates'); // Toolbar options JToolBarHelper::custom('refresh', 'preview.png', 'preview_f2.png', 'Refresh', false); // Add jQuery for selection effects MageBridgeTemplateHelper::load('jquery'); JHTML::script('media/com_magebridge/js/backend-update.js'); $update = MAGEBRIDGE_UPDATE_NOTAVAILABLE; $component_version = null; $data = MageBridgeUpdateHelper::getData(); foreach ($data as $index => $extension) { if (empty($extension['latest_version'])) { continue; } if ($extension['current_version'] != $extension['latest_version']) { $update = MAGEBRIDGE_UPDATE_AVAILABLE; break; } else { $update = MAGEBRIDGE_UPDATE_NOTNEEDED; } $data[$index] = $extension; } if ($update != MAGEBRIDGE_UPDATE_NOTAVAILABLE) { JToolBarHelper::custom('update', 'download.png', 'download_f2.png', 'Update', false); } if ($update == MAGEBRIDGE_UPDATE_AVAILABLE) { JError::raiseNotice('UPDATE', 'There are new updates available'); } $this->assignRef('data', $data); $this->assignRef('update', $update); parent::display($tpl); }
public function fetchElement($name, $value, &$node, $control_name) { $application = JFactory::getApplication(); $document = JFactory::getDocument(); $fieldName = $control_name . '[' . $name . ']'; $link = JURI::root() . COLOR_PICKER_URL . 'index.php?object=' . $name . '&color=' . preg_replace('/([^a-zA-Z0-9]?)/', '', $value); JHTML::script('colorpicker.js', COLOR_PICKER_URL); JHTML::_('behavior.modal', 'a.modal'); $title = JText::_('Select a Color'); $short_title = JText::_('Select'); $name_value = !empty($value) ? $value : $title; $background_color = !empty($value) ? $value : '#ffffff'; $html = <<<EOF <div style="float:left;"> <input style="background-color:#ffffff;" type="text" id="{$name}_name" value="{$name_value}" disabled="disabled" size="12" /> </div> <div style="float:left;"> <div style="background-color: {$background_color}; width:15px; height:15px; border: 1px solid #a3a3a3; margin-left:2px" id="{$name}_preview"></div> </div> <div class="button2-left"> <div class="blank"> <a class="modal" title="{$title}" href="{$link}" rel="{handler:'iframe', size: {x: 450, y: 375}}">{$short_title}</a> </div> </div> <input type="hidden" id="{$name}_id" name="{$fieldName}" value="{$value}" /> EOF; return $html; }
/** * * process input params * @return string element param */ protected function getInput() { if (!defined('_JA_PARAM_HELPER')) { define('_JA_PARAM_HELPER', 1); $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__))); $uri = str_replace("/administrator/", "", $uri); //mootools support joomla 1.7 and 2.5 JHTML::_('behavior.framework', true); JHTML::stylesheet($uri . '/assets/css/japaramhelper.css'); JHTML::script($uri . '/assets/js/japaramhelper.js'); } $func = (string) $this->element['function'] ? (string) $this->element['function'] : ''; $value = $this->value ? $this->value : (string) $this->element['default']; // var_dump($func); die; if (substr($func, 0, 1) == '@') { $func = substr($func, 1); if (method_exists($this, $func)) { return $this->{$func}(); } } else { $subtype = isset($this->element['subtype']) ? trim($this->element['subtype']) : ''; if (method_exists($this, $subtype)) { return $this->{$subtype}(); } } return; }
/** * fetch Element */ protected function getInput() { if (!defined('LOF_LOADMEDIACONTROL')) { define('LOF_LOADMEDIACONTROL', 1); $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__))); $uri = str_replace("/administrator/", "", $uri); JHTML::stylesheet($uri . "/media/" . 'form.css'); JHTML::script($uri . "/media/" . 'form.js'); } if ($this->title == 'end_form') { ?> <script type="text/javascript"> var panels = $$("#module-form .pane-sliders > .panel").fade("out").removeClass("panel").addClass("lof-panel"); var div = new Element("div", {"class":"lof-wrapper"}); var container = new Element("div", {"class":"lof-container"}); container.innerHTML='<fieldset class="fs-form"><legend><?php echo JText::_("Module Setting"); ?> </legend><div class="lof-toolbars"></div><div class="lof-fscontainer"></div></legend></fieldset>'; var _toolbar = container.getElement(".lof-toolbars"); var _container = container.getElement(".lof-fscontainer"); $$("#module-form .pane-sliders").adopt( div.adopt(container) ); new LofForm(panels, _toolbar, _container ); </script> <?php } // $text = (string)$this->element['text']?(string)$this->element['text']:''; /// return '<div class="lof-header">'.JText::_($text).'</div>'; }
/** * Displays the view. * * @param string $tpl the template name * * @return void * @since 1.0 */ public function display($tpl = null) { //TODO: Need to move css/js to SetDocument JHTML::stylesheet('media/com_newsletter/css/admin.css'); JHTML::stylesheet('media/com_newsletter/css/bounceds.css'); JHTML::script('media/com_newsletter/js/migur/js/core.js'); JHTML::script('media/com_newsletter/js/migur/js/filterpanel.js'); JHTML::script('media/com_newsletter/js/migur/js/search.js'); JHTML::script(JURI::root() . "/administrator/components/com_newsletter/views/newsletters/bounceds.js"); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); // Let's work with model 'newsletters' ! $model = $this->getModel('bounceds'); $items = $model->getItems(); $pagination = $model->getPagination(); $state = $model->getState(); $listOrder = $model->getState('list.ordering'); $listDirn = $model->getState('list.direction'); $saveOrder = $listOrder == 'a.ordering'; $this->assignRef('items', $items); $this->assignRef('pagination', $pagination); $this->assignRef('state', $state); $this->assignRef('listOrder', $listOrder); $this->assignRef('listDirn', $listDirn); $this->assignRef('saveOrder', $saveOrder); parent::display($tpl); }
function display($tpl = null) { global $mainframe; $style = $mainframe->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); $listStyle = "\n\t\t\t<ul id=\"submenu\">\n\t\t\t\t<li><a id=\"thumbs\" onclick=\"MediaManager.setViewType('thumbs')\">" . JText::_('Thumbnail View') . "</a></li>\n\t\t\t\t<li><a id=\"details\" onclick=\"MediaManager.setViewType('details')\">" . JText::_('Detail View') . "</a></li>\n\t\t\t</ul>\n\t\t"; $document =& JFactory::getDocument(); $document->setBuffer($listStyle, 'module', 'submenu'); JHTML::_('behavior.mootools'); $document->addScript('components/com_media/assets/mediamanager.js'); $document->addStyleSheet('components/com_media/assets/mediamanager.css'); JHTML::_('behavior.modal'); $document->addScriptDeclaration("\n\t\twindow.addEvent('domready', function() {\n\t\t\tdocument.preview = SqueezeBox;\n\t\t});"); JHTML::script('mootree.js'); JHTML::stylesheet('mootree.css'); JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ MediaManager.refreshFrame(); }')); $base = str_replace("\\", "/", JPATH_ROOT); $js = "\n\t\t\tvar basepath = '" . $base . '/images' . "';\n\t\t\tvar viewstyle = '" . $style . "';\n\t\t"; $document->addScriptDeclaration($js); /* * Display form for FTP credentials? * Don't set them here, as there are other functions called before this one if there is any file write operation */ jimport('joomla.client.helper'); $ftp = !JClientHelper::hasCredentials('ftp'); $this->assignRef('session', JFactory::getSession()); $this->assignRef('config', JComponentHelper::getParams('com_media')); $this->assignRef('state', $this->get('state')); $this->assign('require_ftp', $ftp); $this->assign('folders_id', ' id="media-tree"'); $this->assign('folders', $this->get('folderTree')); // Set the toolbar $this->_setToolBar(); parent::display($tpl); echo JHTML::_('behavior.keepalive'); }
public function fetchElement($name, $value, $node = null, $control_name = null) { if (!empty($control_name)) { $fieldName = $control_name . '[' . $name . ']'; } else { $fieldName = $name; } // Are the API widgets enabled? if (MagebridgeModelConfig::load('api_widgets') == true) { // Load the javascript JHTML::script('backend-elements.js', 'media/com_magebridge/js/'); JHTML::_('behavior.modal', 'a.modal'); if (!empty($node) && is_object($node)) { $returnType = $node->attributes('return'); } else { if (!empty($node) && is_array($node) && !empty($node['return'])) { $returnType = $node['return']; } else { $returnType = 'sku'; } } $title = $value; $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); $link = 'index.php?option=com_magebridge&view=element&tmpl=component&ajax=1&type=widget&object=' . $name . '&return=' . $returnType . '&current=' . $value; $html = '<div style="float: left;">'; $html .= '<input type="text" id="' . $name . '" name="' . $fieldName . '" value="' . $title . '" />'; $html .= '</div>'; $html .= '<div class="button2-left"><div class="blank">'; $html .= '<a class="modal" title="' . JText::_('Select a widget') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x:800, y:450}}">' . JText::_('Select') . '</a>'; $html .= '</div></div>' . "\n"; return $html; } return '<input type="text" name="' . $fieldName . '" value="' . $value . '" />'; }
function display($tpl = null) { global $mainframe, $option; JHTML::script('jsn_is_imageshow.js', 'administrator/components/com_imageshow/assets/js/'); JHTML::stylesheet('imageshow.css', 'administrator/components/com_imageshow/assets/css/'); JHTML::stylesheet('mediamanager.css', 'administrator/components/com_imageshow/assets/css/'); $objJSNShowlist = JSNISFactory::getObj('classes.jsn_is_showlist'); $task = JRequest::getString('task'); if ($task != 'element' && $task != 'elements') { $objJSNShowlist->checkShowlistLimition(); } $list = array(); $model = $this->getModel(); $filterState = $mainframe->getUserStateFromRequest('com_imageshow.showlist.filter_state', 'filter_state', '', 'word'); $filterOrder = $mainframe->getUserStateFromRequest('com_imageshow.showlist.filter_order', 'filter_order', '', 'cmd'); $filterOrderDir = $mainframe->getUserStateFromRequest('com_imageshow.showlist.filter_order_Dir', 'filter_order_Dir', '', 'word'); $showlistTitle = $mainframe->getUserStateFromRequest('com_imageshow.showlist.showlist_stitle', 'showlist_stitle', '', 'string'); $showlistAccess = $mainframe->getUserStateFromRequest('com_imageshow.showlist.showlist_access', 'access', '', 'string'); $type = array(0 => array('value' => '', 'text' => '- Published -'), 1 => array('value' => 'P', 'text' => 'Yes'), 2 => array('value' => 'U', 'text' => 'No')); $lists['type'] = JHTML::_('select.genericList', $type, 'filter_state', 'id="filter_state" class="inputbox" onchange="document.adminForm.submit( );"' . '', 'value', 'text', $filterState); $lists['state'] = JHTML::_('grid.state', $filterState); $lists['access'] = $model->accesslevel($showlistAccess); $lists['showlistTitle'] = $showlistTitle; $lists['order_Dir'] = $filterOrderDir; $lists['order'] = $filterOrder; $items =& $this->get('Data'); $total =& $this->get('Total'); $pagination =& $this->get('Pagination'); $this->assignRef('lists', $lists); $this->assignRef('total', $total); $this->assignRef('items', $items); $this->assignRef('pagination', $pagination); parent::display($tpl); }
function Edit() { $id = JRequest::getInt("id"); $cfg = CustomFieldsFactory::getConfig(); $field = JTable::getInstance('FieldsTable', 'JTheFactory'); $parameters_plugins = null; if ($id) { if (!$field->load($id)) { JError::raiseNotice(101, JText::_("FACTORY_ERROR_LOADING_FIELD") . " {$id}"); $this->setRedirect("index.php?option=" . APP_EXTENSION . "&task=fields.listfields"); return; } } else { $field->setDefaults(); } $lists = JTheFactoryFieldsHelper::createHTMLObjectsForField($field); JHTML::_('behavior.mootools'); //load mootools before fields.js JHTML::script("administrator/components/" . APP_EXTENSION . "/thefactory/fields/js/fields.js"); JHTML::stylesheet("administrator/components/" . APP_EXTENSION . "/thefactory/fields/css/fields.css"); if ($field->id && $field->categoryfilter) { $model = JModel::getInstance('Fields', 'JTheFactoryModel'); $assigned = $model->getAssignedCats($field); } else { //select all by default $assigned = "all"; } $lists->category = JHtml::_('factorycategory.select', 'parent[]', 'style="width:200px" multiple size=10' . ($field->categoryfilter ? '' : ' disabled'), $assigned, true); $view = $this->getView('edit'); $view->assignRef('lists', $lists); $view->assignRef('field', $field); $view->display(); }
public static function init($params = null) { // init path $modulePath = 'modules/' . self::$moduleName . '/'; $path = str_replace($modulePath, "", JURI::base()); self::$path = $path . 'modules/' . self::$moduleName . '/'; if (!$params) { jimport('joomla.application.module.helper'); $module =& JModuleHelper::getModule("mm_feedback"); $params = new JParameter($module->params); } // init scripts and styles JHTML::script('jquery-1.7.1.min.js', self::$path . 'assets/js/libs/jquery/'); JHTML::script('jquery.noconflict.js', self::$path . 'assets/js/'); JHTML::script('jquery.mousewheel-3.0.6.pack.js', self::$path . 'assets/js/libs/jquery/'); JHTML::script('jquery.fancybox.js', self::$path . 'assets/js/libs/jquery/fancybox/'); JHTML::stylesheet('jquery.fancybox.css', self::$path . 'assets/js/libs/jquery/fancybox/'); JHTML::stylesheet('jquery.fancybox-buttons.css', self::$path . 'assets/js/libs/jquery/fancybox/helpers/'); JHTML::script('jquery.fancybox-buttons.js', self::$path . 'assets/js/libs/jquery/fancybox/helpers/'); JHTML::stylesheet('jquery.fancybox-thumbs.css', self::$path . 'assets/js/libs/jquery/fancybox/helpers/'); JHTML::script('jquery.fancybox-thumbs.js', self::$path . 'assets/js/libs/jquery/fancybox/helpers/'); JHTML::script('default.js', self::$path . 'assets/js/'); JHTML::stylesheet('zenbox.css', self::$path . 'assets/css/'); // init inline scripts $doc =& JFactory::getDocument(); $result = array(); $result[] = "modMmFeedback.baseUrl = '" . JURI::base() . "'"; $result[] = "modMmFeedback.moduleName = '" . self::$moduleName . "'"; $doc->addScriptDeclaration(implode(";\n", $result) . ";"); $instance = new modMmFeedback(); $instance->params = $params; return $instance; }
function display($tpl = null) { JHTML::stylesheet(JoaktreeHelper::joaktreecss()); JHTML::script(JoaktreeHelper::jsfile()); // what is the layout $this->layout = JFactory::getApplication()->input->get('layout'); // Get data from the model if ($this->layout == 'personevent') { $this->items =& $this->get('DataPersEvent'); $this->pagination =& $this->get('personPagination'); } else { if ($this->layout == 'personname') { $this->items =& $this->get('DataPersName'); $this->pagination =& $this->get('namePagination'); } else { if ($this->layout == 'relationevent') { $this->items =& $this->get('DataRelaEvent'); $this->pagination =& $this->get('relationPagination'); } else { $this->items =& $this->get('DataPersEvent'); $this->pagination =& $this->get('personPagination'); } } } //Filter $context = 'com_joaktree.jt_settings.list.'; JoaktreeHelper::addSubmenu($this->layout); $this->addToolbar($this->layout); $this->sidebar = JHtmlSidebar::render(); $this->html = $this->getHtml(); parent::display($tpl); }
function fetchElement($name, $value, &$node, $control_name) { static $once; $assets = 'administrator/components/com_avreloaded/assets/'; $assetsuri = JURI::root() . 'administrator/components/com_avreloaded/assets/'; $js_mor = 'mooRainbow.js'; $cfg =& JFactory::getConfig(); $debug = $cfg->getValue('config.debug'); $konqcheck = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "konqueror"); // If global debugging is enabled or the browser is konqueror, // we use uncompressed JavaScript if ($debug || $konqcheck) { $js_mor = 'mooRainbow-uncompressed.js'; } JHTML::script($js_mor, $assets); JHTML::stylesheet('mooRainbow.css', $assets); if (!$once) { $once = true; $js = "window.addEvent('domready', function() {\n" . " var r = new MooRainbow('none', {align:'tl',okLabel:'" . JText::_('LBL_SELECT', true) . "',wheel:true,imgPath:'" . $assetsuri . "'});\n" . " \$\$('.rainbow').each(function(el) {\n" . " el.setStyle('cursor', 'pointer');\n" . " el.addEvent('click', function(e) { new Event(e).stop(); r.reAttachAndShow(el); }.bind(r));\n" . " });\n" . "});\n"; $style = '.moor-cursor{background-image:url(' . $assetsuri . 'moor_cursor.gif);} ' . '.moor-arrows{background-image:url(' . $assetsuri . 'moor_arrows.gif);} '; AvrGenericHelper::addJS($js); AvrGenericHelper::addCSS($style); } $size = $node->attributes('size') ? 'size="' . $node->attributes('size') . '"' : ''; $class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"'; /* * Required to avoid a cycle of encoding & * html_entity_decode was used in place of htmlspecialchars_decode because * htmlspecialchars_decode is not compatible with PHP 4 */ $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES), ENT_QUOTES); $elem = '<div>' . '<img src="' . $assetsuri . 'rainbow.png" class="rainbow" ' . 'style="vertical-align:middle;margin-right:5px;" rel="' . $control_name . $name . '" alt="" /><input type="text" name="' . $control_name . '[' . $name . ']" id="' . $control_name . $name . '" value="' . $value . '" ' . $class . ' ' . $size . ' /></div>'; return $elem; }
/** * Displays the view. * * @param string $tpl the template name * * @return void * @since 1.0 */ public function display($tpl = null) { JHTML::_('behavior.modal'); //TODO: Need to move css/js to SetDocument JHTML::stylesheet('media/com_newsletter/css/admin.css'); JHTML::stylesheet('media/com_newsletter/css/subscribers.css'); JHTML::script('media/com_newsletter/js/migur/js/core.js'); JHTML::script('media/com_newsletter/js/migur/js/filterpanel.js'); JHTML::script('media/com_newsletter/js/migur/js/search.js'); JHTML::script(JURI::root() . "administrator/components/com_newsletter/views/subscribers/subscribers.js"); $this->setModel(JModel::getInstance('lists', 'NewsletterModel')); EnvironmentHelper::showWarnings(array('checkUserConflicts')); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); } $modelSubs = $this->getModel('subscribers'); $modelLists = $this->getModel('lists'); $ss = (object) array('items' => $modelSubs->getItems(), 'pagination' => $modelSubs->getPagination(), 'state' => $modelSubs->getState(), 'listOrder' => $modelSubs->getState('list.ordering'), 'listDirn' => $modelSubs->getState('list.direction')); $this->assignRef('subscribers', $ss); $lists = (object) array('items' => $modelLists->getItems(), 'pagination' => $modelLists->getPagination(), 'state' => $modelLists->getState(), 'listOrder' => $modelLists->getState('list.ordering'), 'listDirn' => $modelLists->getState('list.direction')); $this->assignRef('lists', $lists); $this->assignRef('subscriberModel', JModel::getInstance('Subscriber', 'NewsletterModelEntity')); parent::display($tpl); }
function display($tpl = null) { /* Load required javascripts */ RaidPlannerHelper::loadJSFramework(true); JHTML::script('com_raidplanner/HtmlTable.Extended.js', false, true); $model = $this->getModel(); $paramsObj = JComponentHelper::getParams('com_raidplanner'); $menuitemid = JRequest::getInt('Itemid'); if ($menuitemid) { $menu = JFactory::getApplication()->getMenu(); $menuparams = $menu->getParams($menuitemid); $paramsObj->merge($menuparams); } $guild_id = $paramsObj->get('guild_id', '0'); $show_account = $paramsObj->get('show_account', '0'); $initial_sort = $paramsObj->get('initial_sort', '0'); $guild_plugin = RaidPlannerHelper::getGuildPlugin($guild_id); if ($guild_plugin != null) { $sync_interval = $paramsObj->get('sync_interval', 4); $sync_enabled = $paramsObj->get('armory_sync', '0') == 1; if ($sync_enabled) { $guild_plugin->trigger('onRPSyncGuild', array($guild_id, $sync_interval, false)); } $guild_plugin->trigger('onRPLoadCSS'); } $this->assignRef('guild_plugin', $guild_plugin); $this->assign('characters', $model->getGuildCharacters($guild_id)); $this->assign('guildinfo', $model->getGuildInfo($guild_id)); $this->assign('ranks', RaidPlannerHelper::getRanks()); $this->assignRef('show_account', $show_account); $this->assignRef('initial_sort', $initial_sort); parent::display($tpl); }
function __construct() { JViewLegacy::__construct(); $this->smarty=new BidsSmarty(); JHtml::_('behavior.mootools'); JHTML::script(JUri::root().'components/'.APP_EXTENSION.'/js/auctions.js'); }
protected function getInput() { $name = $this->name; $fieldName = $name; $value = $this->value; // Are the API widgets enabled? if (MagebridgeModelConfig::load('api_widgets') == true) { // Load the javascript JHTML::script('media/com_magebridge/js/backend-elements.js'); JHTML::_('behavior.modal', 'a.modal'); $returnType = (string) $this->element['return']; $title = $value; $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); $link = 'index.php?option=com_magebridge&view=element&tmpl=component&type=customer&object=' . $name . '&return=' . $returnType . '&current=' . $value; $html = '<div style="float: left;">'; $html .= '<input type="text" id="' . $name . '_name" value="' . $title . '" disabled="disabled" />'; $html .= '</div>'; $html .= '<div class="button2-left"><div class="blank">'; $html .= '<a class="modal" title="' . JText::_('Select a Customer') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x:800, y:450}}">' . JText::_('Select') . '</a>'; $html .= '</div></div>' . "\n"; $html .= '<input type="hidden" id="' . $name . '_id" name="' . $fieldName . '" value="' . $value . '" />'; return $html; } return '<input type="text" name="' . $fieldName . '" value="' . $value . '" />'; }
function fetchElement($name, $value, &$node, $control_name) { // load script JHTML::script('zoofeedglobal.js', 'administrator/components/com_zoo/joomla/elements/'); // init vars $params = $this->_parent; $id = 'feed-global-' . self::$_count++; $feed_title = $params->getValue('feed_title'); $alternate_feed_link = $params->getValue('alternate_feed_link'); $global = $params->getValue($name) === null; // create html $html[] = '<div class="global feed-global">'; $html[] = '<input id="' . $id . '" type="checkbox" name="_global"' . ($global ? ' checked="checked"' : '') . ' />'; $html[] = '<label for="' . $id . '"> ' . JText::_('Global') . '</label>'; $html[] = '<div class="input">'; $html[] = JHTML::_('select.booleanlist', $global ? $id : $control_name . '[' . $name . ']', array('role' => $control_name . '[' . $name . ']'), $value); $html[] = '<div class="feed-input">'; $html[] = '<label class="hasTip" title="' . JText::_('OPTIONAL_FEED_TITLE') . '" for="' . $id . '-feed_title">' . JText::_('Feed title') . '</label>'; $html[] = JHTML::_('control.text', $global ? $id : $control_name . '[feed_title]', $feed_title, array('id' => $id . '-feed_title', 'class' => 'feed-input-control', 'role' => $control_name . '[feed_title]')); $html[] = '<label class="hasTip" title="' . JText::_('ALTERNATE_FEED_LINK') . '" for="' . $id . '-alternate_feed_link">' . JText::_('Alternate feed link') . '</label>'; $html[] = JHTML::_('control.text', $global ? $id : $control_name . '[alternate_feed_link]', $alternate_feed_link, array('id' => $id . '-alternate_feed_link', 'class' => 'feed-input-control', 'role' => $control_name . '[alternate_feed_link]')); $html[] = '</div>'; $html[] = '</div>'; $html[] = '</div>'; return implode("\n", $html); }
function fetchElement($name, $value, &$node, $control_name) { t3_import('core/admin/util'); if (!defined('_JA_THEME')) { define('_JA_THEME', 1); $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__))); $uri = str_replace("/administrator", "", $uri); JHTML::stylesheet('jathemesettings.css', $uri . "/assets/css/"); JHTML::script('jathemesettings.js', $uri . "/assets/js/"); } $objutil = new JAT3_AdminUtil(); $template = $objutil->get_active_template(); $themes = $objutil->getThemes($template); if ($value && $themes) { if ((!isset($themes['core']) || isset($themes['core']) && !in_array($value, $themes['core'])) && (!isset($themes['local']) || isset($themes['local']) && !in_array($value, $themes['local']))) { $value = isset($themes['local']) ? $themes['local'][0] : $themes['core'][0]; } } $layout = dirname(__FILE__) . DS . 'tmpl' . DS . 'jathemesettings.php'; if (file_exists($layout)) { ob_start(); require $layout; $content = ob_get_clean(); return $content; } return ''; }
/** * Displays the view. * * @param string $tpl the template name * * @return void * @since 1.0 */ public function display($tpl = null) { JHTML::_('behavior.modal'); JHTML::stylesheet('media/com_newsletter/css/admin.css'); JHTML::stylesheet('media/com_newsletter/css/sender.css'); JHTML::script('media/com_newsletter/js/migur/js/core.js'); JHTML::script('media/com_newsletter/js/migur/js/filterpanel.js'); JHTML::script('media/com_newsletter/js/migur/js/search.js'); JHTML::script(JURI::root() . "administrator/components/com_newsletter/views/sender/sender.js"); $this->setModel(JModel::getInstance('lists', 'NewsletterModel')); $this->setModel(JModel::getInstance('newsletters', 'NewsletterModel')); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $modelLists = $this->getModel('lists'); JRequest::setVar('limit', 1); $limit = $modelLists->setState('limit', 1); $modelLists->filtering = array('state' => '1'); $lists = (object) array('items' => $modelLists->getItems(), 'pagination' => new JPagination(10, 0, 5), 'state' => $modelLists->getState(), 'listOrder' => $modelLists->getState('list.ordering'), 'listDirn' => $modelLists->getState('list.direction')); JavascriptHelper::addStringVar('defaultMailbox', MailHelper::getDefaultMailbox('idOnly')); $modelLists->setState('limit', $limit); $this->assignRef('lists', $lists); $this->addToolbar(); parent::display($tpl); }
/** * return - map_key, function="@map_key" */ function mapkey() { $value = $this->value ? $this->value : (string) $this->element['default']; $paramname = $this->name; $id = $this->id; $cols = isset($this->element['cols']) && $this->element['cols'] != '' ? 'cols="' . intval($this->element['cols']) . '"' : ''; $rows = isset($this->element['rows']) && $this->element['rows'] != '' ? 'rows="' . intval($this->element['rows']) . '"' : ''; //LOAD ASSETS $plugin = new stdClass(); $plugin->type = 'system'; $plugin->name = 'jagooglemap'; //popup JHTML::_('behavior.modal'); // $path = 'plugins/' . $plugin->type . '/' . $plugin->name . '/assets/'; JHTML::stylesheet($path . 'style.css'); JHTML::script($path . 'script.js'); JHTML::script($path . 'jagencode.js'); //google map //$map_js = 'http://maps.google.com/maps?file=api&v=2&sensor=true&key=' . $value; $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=true&key=' . $value; //v3 JHTML::script($map_js); // $html = ""; $html .= "\n\t<textarea name=\"{$paramname}\" id=\"{$id}\" {$cols} {$rows} >{$value}</textarea><br />"; return $html; }
public static function init() { // init firebug //$firephp = FirePHP::getInstance(true); //$firephp->registerErrorHandler(); //$firephp->registerExceptionHandler(); //$firephp->registerAssertionHandler(); $modulePath = 'modules/mod_ecwid_customsearch/'; $path = str_replace($modulePath, "", JURI::base()); self::$path = $path . 'modules/mod_ecwid_customsearch/'; $app =& JFactory::getApplication(); $params =& $app->getParams("com_rokecwid"); self::$storeId = $params->get('storeID', 1003); // init scripts and styles JHTML::script('jquery-1.7.1.min.js', self::$path . 'assets/js/jquery/'); JHTML::script('jquery-ui-1.8.17.custom.min.js', self::$path . 'assets/js/jquery-ui/js/'); JHTML::script('jquery.cookie.js', self::$path . 'assets/js/jquery/'); JHTML::script('jquery.noconflict.js', self::$path . 'assets/js/jquery/'); JHTML::script('purl.js', self::$path . 'assets/js/'); JHTML::script('customsearch.js?1.0', self::$path . 'assets/js/'); JHTML::stylesheet('jquery-ui-1.8.17.custom.css', self::$path . 'assets/js/jquery-ui/css/ui-lightness/'); JHTML::stylesheet('styles.css', self::$path . 'assets/css/'); // init inline scripts $doc =& JFactory::getDocument(); $result = "EcwidCustomPlugins.baseUrl = '" . JURI::base() . "';"; $doc->addScriptDeclaration($result); }
/** * load css and js file */ function loadjscss($uri) { if (!defined('_JA_PARAM_HELPER_RAINBOW_')) { define('_JA_PARAM_HELPER_RAINBOW_', 1); JHTML::script($uri . "/" . 'jacolorpicker/jscolor.js'); } }
/** * Displays the view. * * @param string $tpl the template name * * @return void * @since 1.0 */ public function display($tpl = null) { JHTML::_('behavior.modal'); //TODO: Need to move css/js to SetDocument JHTML::stylesheet('media/com_newsletter/css/admin.css'); JHTML::stylesheet('media/com_newsletter/css/templates.css'); JHTML::script('media/com_newsletter/js/migur/js/core.js'); JHTML::script(JURI::root() . "administrator/components/com_newsletter/views/templates/templates.js"); JHTML::script('media/com_newsletter/js/migur/js/filterpanel.js'); JHTML::script('media/com_newsletter/js/migur/js/search.js'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); } $modelTemps = $this->getModel('templates'); $pagination = $modelTemps->getPagination(); $temps = (object) array('items' => $modelTemps->getItems(), 'state' => $modelTemps->getState(), 'listOrder' => $modelTemps->getState('list.ordering'), 'listDirn' => $modelTemps->getState('list.direction')); $this->assignRef('templates', $temps); $this->assignRef('pagination', $pagination); parent::display($tpl); }
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { if (!defined('_JA_PARAM_HELPER_T3')) { define('_JA_PARAM_HELPER_T3', 1); $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__))); $uri = str_replace("/administrator", "", $uri); $javersion = new JVersion(); if ($javersion->RELEASE == '1.7') { JHtml::_('behavior.framework', true); } else { JHTML::_('behavior.mootools'); } JHTML::stylesheet($uri . '/assets/css/japaramhelper.css'); JHTML::script($uri . '/assets/js/japaramhelper.js'); } $func = (string) $this->element['function'] ? (string) $this->element['function'] : ''; $value = $this->value ? $this->value : (string) $this->element['default']; if (substr($func, 0, 1) == '@') { $func = substr($func, 1); if (method_exists($this, $func)) { return $this->{$func}(); } } else { $subtype = isset($this->element['subtype']) ? trim($this->element['subtype']) : ''; if (method_exists($this, $subtype)) { return $this->{$subtype}(); } } return; }
/** * Attach css, js and create toolbar for default view * * @param midxed $params */ private function _makeViewDefault($params = null) { $mainframe =& JFactory::getApplication(); // prepare database stats, etc $this->_prepareControlPanelData(); // add behaviors and styles as needed $modalSelector = 'a.modalediturl'; $js = '\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) {parent.window.location=\'index.php?option=com_sh404sef\';window.parent.shReloadModal=true}}'; $params = array('overlayOpacity' => 0, 'classWindow' => 'sh404sef-popup', 'classOverlay' => 'sh404sef-popup', 'onClose' => $js); Sh404sefHelperHtml::modal($modalSelector, $params); // add our javascript JHTML::script('cp.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // add analytics and other ajax calls loader $sefConfig =& Sh404sefFactory::getConfig(); $analyticsBootstrap = $sefConfig->analyticsReportsEnabled ? 'shSetupAnalytics({report:"dashboard",showFilters:"no"});' : ''; $js = 'window.addEvent(\'domready\', function(){ ' . $analyticsBootstrap . ' shSetupQuickControl(); shSetupSecStats(); shSetupUpdates();});'; $document =& JFactory::getDocument(); $document->addScriptDeclaration($js); // add our own css JHtml::styleSheet('cp.css', Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/'); // import tabs jimport('joomla.html.pane'); // add tooltips handler JHTML::_('behavior.tooltip'); // add title $title = Sh404sefHelperGeneral::makeToolbarTitle(JText::_('COM_SH404SEF_CONTROL_PANEL'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title'); $mainframe->set('JComponentTitle', $title); // add space for our ajax progress indicator // Get the JComponent instance of JToolBar $bar =& JToolBar::getInstance('toolbar'); // add a div to display our ajax-call-in-progress indicator $bar->addButtonPath(JPATH_COMPONENT . DS . 'classes'); $html = '<div id="sh-progress-cpprogress"></div>'; $bar->appendButton('custom', $html, 'sh-progress-button-cpprogress'); }
/** * Displays the view. * * @param string $tpl the template name * * @return void * @since 1.0 */ public function display($tpl = null) { //TODO: Need to move css/js to SetDocument JHTML::stylesheet('media/com_newsletter/css/admin.css'); JHTML::stylesheet('media/com_newsletter/css/statistic.css'); JHTML::script('media/com_newsletter/js/migur/js/core.js'); JHTML::script('media/com_newsletter/js/migur/js/filterpanel.js'); JHTML::script('media/com_newsletter/js/migur/js/search.js'); JHTML::script('media/com_newsletter/js/migur/js/raphael-min.js'); JHTML::script('media/com_newsletter/js/migur/js/g.raphael.js'); JHTML::script('media/com_newsletter/js/migur/js/g.line.js'); JHTML::script('media/com_newsletter/js/migur/js/g.pie.js'); JHTML::script('media/com_newsletter/js/migur/js/g.bar.js'); JHTML::script('media/com_newsletter/js/migur/js/raphael-migur-line.js'); JHTML::script('media/com_newsletter/js/migur/js/raphael-migur-pie.js'); JHTML::script('administrator/components/com_newsletter/views/statistic/hlines.js'); JHTML::script('administrator/components/com_newsletter/views/statistic/statistic.js'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->setStatisticsData(); parent::display($tpl); }
function onPrepareContent(&$article, &$params, $limitstart) { global $Itemid; // if not viewing a full article, do nothing if (JRequest::getCmd('view') == 'article') { // load the script $document =& JFactory::getDocument(); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.mootools'); jimport('joomla.filesystem.file'); // Changed to use CSS and JS from the plugin directory if component not available if (JFile::exists('components' . DS . 'com_biztweet' . DS . 'assets' . DS . 'btstyle.css')) { //JHTML::script('btscripts.js', 'components'.DS.'com_biztweet'.DS.'assets'.DS); JHTML::stylesheet('btstyle.css', 'components' . DS . 'com_biztweet' . DS . 'assets' . DS); } else { //JHTML::script('btscripts.js', JURI::base().'plugins/content/biztweet/'); JHTML::stylesheet('btstyle.css', JURI::base() . 'plugins/content/biztweet/'); } // Always use the local js package to avoid conflicts with BT Lite JHTML::script('btscripts.js', JURI::base() . 'plugins/content/biztweet/'); $document->addScriptDeclaration("\n\t\t\t\tvar btSitePath = '" . JURI::base() . "';\n\t\t\t\tvar btItemid = " . $Itemid . ";\n\t\t\t\tvar btSearchLimit = " . $this->_params->get('limit', 10) . ";\n\t\t\t\tvar btUpdateFrequency = " . $this->_params->get('frequency', 10) * 1000 . ";\n\t\t\t\tvar btLanguage = '" . $this->_params->get('lang', '') . "';\n\t\t\t\tvar btTwitPicThumbs = " . $this->_params->get('pic_thumb', 1) . ";\n\t\t\t\tvar btLinkNewWindow = '" . $this->_params->get('target', 1) . "';\n\t\t\t\tvar btEnableRetweet = 0;\n\t\t\t\tvar btEnableReply = 0;\n\t\t\t\twindow.addEvent('domready', function() {btUpdateSearches();});\n\t\t\t"); /* Override the default class to avoid dual lines */ $document->addStyleDeclaration("\n\t\t\t\tul.timeline li:first-child {\n\t\t\t\t\tborder-top:none;\n\t\t\t\t}\n\t\t\t"); } }
function display($tpl = null) { global $mainframe, $option; JHTML::stylesheet('imageshow.css', 'administrator/components/com_imageshow/assets/css/'); JHTML::script('jsn_is_imageshow.js', 'administrator/components/com_imageshow/assets/js/'); parent::display($tpl); }
/** * Method to get the HTML of this element * * @param null * @return string */ protected function getInput() { $name = $this->name; $value = $this->value; $id = preg_replace('/([^0-9a-zA-Z]+)/', '_', $name); // Are the API widgets enabled? if (MagebridgeModelConfig::load('api_widgets') == true) { // Load the javascript JHTML::script('media/com_magebridge/js/backend-elements.js'); JHTML::_('behavior.modal', 'a.modal'); $returnType = (string) $this->element['return']; if (empty($returnType)) { $returnType = 'sku'; } $title = $value; $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); $link = 'index.php?option=com_magebridge&view=element&tmpl=component&ajax=1'; $link .= '&type=product&object=' . $id . '&return=' . $returnType . '&current=' . $value; $html = array(); $html[] = '<span class="input-append">'; $html[] = '<input type="text" class="input-medium" id="' . $id . '" name="' . $name . '" value="' . $title . '" size="35" />'; $html[] = '<a class="modal btn" role="button" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('JSELECT') . '</a>'; $html[] = '</span>'; $html = implode("\n", $html); return $html; } return '<input type="text" name="' . $name . '" value="' . $value . '" />'; }