/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @return void * * @since 11.1 */ protected function setUp() { parent::setUp(); JURI::reset(); $_SERVER['HTTP_HOST'] = 'www.example.com:80'; $_SERVER['SCRIPT_NAME'] = '/joomla/index.php'; $_SERVER['PHP_SELF'] = '/joomla/index.php'; $_SERVER['REQUEST_URI'] = '/joomla/index.php?var=value 10'; $this->object = new JURI(); }
$query['view'] = 'items'; $query['Itemid'] = $menu->getActive() ? $menu->getActive()->id : null; $cid = $app->input->get('cid', false, 'string'); $pid = $app->input->get('pid', false, 'string'); if ($cid) { $query['cid'] = $cid; } if ($pid) { $query['pid'] = $pid; } unset($query['order']); unset($query['dir']); $uri->setQuery($query); $orderUrl = 'index.php?' . $uri->getQuery(false); // JURI::reset(); $user = JFactory::getUser(); $price_auth = $this->params->get('price_restrict', '0') == '1' && $user->guest ? false : true; ?> <div class="djc_order_in thumbnail"> <ul class="djc_order_buttons djc_clearfix"> <li class="span2"><span><?php echo JText::_('COM_DJCATALOG2_ORDERBY'); ?> </span></li> <?php if ($this->params->get('show_name_orderby') > 0) { ?> <li><a href="<?php echo JRoute::_($orderUrl . '&order=i.name&dir=' . $this->lists['order_Dir'] . '#tlb'); ?>
/** * Initialising Theme Customiser Switch */ protected function attachTCSwitch() { // Load only toggler styles - inline for better performance $this->addStyleDeclaration("\n \t\t#jmthemetoggler {\n\t\t\t\tdisplay: block;\n\t\t\t\tleft: 0;\n\t\t\t\ttop: 50%;\n\t\t\t\tmargin-top: -25px;\n\t\t\t\tposition: fixed;\n\t\t\t\tbackground: #383e49;\n\t\t\t\tcolor: #fff;\n\t\t\t\twidth: 50px;\n\t\t\t\theight: 50px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tz-index: 9999;\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-align: center;\n\t\t\t\tvertical-align: middle;\n\t\t\t\tborder-radius: 0 8px 8px 0;\n\t\t\t\t-webkit-border-radius: 0 8px 8px 0;\n\t\t\t\tborder-bottom: 1px solid #2a2e37;\n\t\t\t\tborder-left: 1px solid #2a2e37;\n\t\t\t\tbox-shadow: inset 1px 1px 0px 0px rgba(255, 255, 255, 0.2);\n\t\t\t\t-webkit-box-shadow: inset 1px 1px 0px 0px rgba(255, 255, 255, 0.2);\n\t\t\t}\n #jmthemetoggler:hover {\n background: #454b55;\n }\n\t\t\t#jmthemetoggler::after {\n\t\t\t\tbackground: url('" . JMF_FRAMEWORK_URL . "/includes/assets/template/themecustomiser/tc-sprites.png') no-repeat 0 -23px;\n\t\t\t\twidth: 22px;\n\t\t\t\theight: 22px;\n\t\t\t\tposition: absolute;\n\t\t\t\tcontent: '';\n\t\t\t\tleft: 14px;\n\t\t\t\ttop: 14px;\n\t\t\t\t-webkit-transition: all 0.8s ease;\n\t\t\t\t-moz-transition: all 0.8s ease;\n\t\t\t\t-ms-transition: all 0.8s ease;\n\t\t\t\t-o-transition: all 0.8s ease;\n\t\t\t\ttransition: all 0.8s ease;\n\t\t\t}\n \t\t#jmthemetoggler:after {\n animation: 2s spinnow infinite linear;\n -moz-animation: 2s spinnow infinite linear;\n -webkit-animation: 2s spinnow infinite linear;\n -ms-animation: 2s spinnow infinite linear;\n }\n @-webkit-keyframes spinnow {\n 100% {\n transform: rotate(360deg);\n -webkit-transform: rotate(360deg);\n }\n }\n @-moz-keyframes spinnow {\n 100% {\n transform: rotate(360deg);\n -moz-transform: rotate(360deg);\n }\n }\n @-ms-keyframes spinnow {\n 100% {\n transform: rotate(360deg);\n -ms-transform: rotate(360deg);\n }\n }\n \t"); JURI::reset(); $uri = JURI::getInstance(); $uri->setVar('tc', '1'); $url_on = $uri->toString(); JURI::reset(); $this->addScriptDeclaration("\n \t\tjQuery(window).load(function(){\n \t\t\t\n \t\t\tvar url_on = '" . $url_on . "';\n \t\t\t\n \t\t\tjQuery('body').append('<span id=\"jmthemetoggler\"></span>');\n \t\t\t\n \t\t\tjQuery('#jmthemetoggler').on('click', function(){\n \t\t\t\t\n \t\t\t\tjQuery('#jmthemeoverlay').addClass('visible');\n \t\t\t\n \t\t\t\tsetTimeout(function(){\n \t\t\t\t\tjQuery.post(url_on).always(function(){\n \t\t\t\t\t\tjQuery('#jmthemetogglerform').submit();\n \t\t\t\t\t});\n \t\t\t\t}, 600);\n \t\t\t});\n \t\t});\t\t\n \t"); }