| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: view.html.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Media 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // Check to ensure this file is included in Joomla! 16 defined('_JEXEC') or die( 'Restricted access' ); 17 18 jimport( 'joomla.application.component.view'); 19 20 /** 21 * HTML View class for the Media component 22 * 23 * @static 24 * @package Joomla 25 * @subpackage Media 26 * @since 1.0 27 */ 28 class MediaViewMediaList extends JView 29 { 30 function display($tpl = null) 31 { 32 global $mainframe; 33 34 // Do not allow cache 35 JResponse::allowCache(false); 36 37 $style = $mainframe->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); 38 39 JHTML::_('behavior.mootools'); 40 41 $document = &JFactory::getDocument(); 42 $document->addStyleSheet('components/com_media/assets/medialist-'.$style.'.css'); 43 44 $document->addScriptDeclaration(" 45 window.addEvent('domready', function() { 46 window.top.document.updateUploader && window.top.document.updateUploader(); 47 $$('a.img-preview').each(function(el) { 48 el.addEvent('click', function(e) { 49 new Event(e).stop(); 50 window.top.document.preview.fromElement(el); 51 }); 52 }); 53 });"); 54 55 $this->assign('baseURL', JURI::root()); 56 $this->assignRef('images', $this->get('images')); 57 $this->assignRef('documents', $this->get('documents')); 58 $this->assignRef('folders', $this->get('folders')); 59 $this->assignRef('state', $this->get('state')); 60 61 parent::display($tpl); 62 } 63 64 function setFolder($index = 0) 65 { 66 if (isset($this->folders[$index])) { 67 $this->_tmp_folder = &$this->folders[$index]; 68 } else { 69 $this->_tmp_folder = new JObject; 70 } 71 } 72 73 function setImage($index = 0) 74 { 75 if (isset($this->images[$index])) { 76 $this->_tmp_img = &$this->images[$index]; 77 } else { 78 $this->_tmp_img = new JObject; 79 } 80 } 81 82 function setDoc($index = 0) 83 { 84 if (isset($this->documents[$index])) { 85 $this->_tmp_doc = &$this->documents[$index]; 86 } else { 87 $this->_tmp_doc = new JObject; 88 } 89 } 90 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |