Beispiel #1
0
 /**
  * Tests the dropdown method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testDropdown()
 {
     // Initialise the dropdown script
     JHtmlBootstrap::dropdown();
     // Get the document instance
     $document = JFactory::getDocument();
     $this->assertArrayHasKey('/media/jui/js/bootstrap.min.js', $document->_scripts, 'Verify that the dropdown method initialises Bootstrap as well');
     $this->assertEquals($document->_script['text/javascript'], "(function(\$){\n\t\t\t\t\$('.dropdown-toggle').dropdown();\n\t\t\t\t})(jQuery);", 'Verify that the dropdown script is initialised');
 }
Beispiel #2
0
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = $this->item->params;
$images = json_decode($this->item->images);
$canEdit = $this->item->params->get('access-edit');
$info = $params->get('info_block_position', 0);
$app = JFactory::getApplication();
$template = $app->getTemplate();
$jsnUtils = JSNTplUtils::getInstance();
JHtml::_('behavior.tooltip');
if ($jsnUtils->isJoomla3()) {
    JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
    JHtmlBootstrap::dropdown('dropdown-toggle');
} else {
    //JHtml::addIncludePath(JPATH_COMPONENT. DIRECTORY_SEPARATOR .'helpers');
    JHtml::addIncludePath(JPATH_THEMES . DIRECTORY_SEPARATOR . $template . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'com_content');
}
if ($jsnUtils->isJoomla3()) {
    JHtml::_('behavior.framework');
    ?>
	
	<?php 
    if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate()) || strtotime($this->item->publish_down) < strtotime(JFactory::getDate()) && $this->item->publish_down != '0000-00-00 00:00:00') {
        ?>
	<div class="system-unpublished">
	<?php 
    }
    ?>