/administrator/components/com_media/views/imageslist/view.html.php

https://bitbucket.org/eternaware/joomus · PHP · 67 lines · 41 code · 11 blank · 15 comment · 5 complexity · f1813831eb128e8597328ae7956d4caf MD5 · raw file

  1. <?php
  2. /**
  3. * @package Joomla.Administrator
  4. * @subpackage com_media
  5. *
  6. * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
  7. * @license GNU General Public License version 2 or later; see LICENSE.txt
  8. */
  9. defined('_JEXEC') or die;
  10. /**
  11. * HTML View class for the Media component
  12. *
  13. * @package Joomla.Administrator
  14. * @subpackage com_media
  15. * @since 1.0
  16. */
  17. class MediaViewImagesList extends JViewLegacy
  18. {
  19. public function display($tpl = null)
  20. {
  21. // Do not allow cache
  22. JResponse::allowCache(false);
  23. $app = JFactory::getApplication();
  24. $lang = JFactory::getLanguage();
  25. JHtml::_('stylesheet', 'media/popup-imagelist.css', array(), true);
  26. if ($lang->isRTL()) :
  27. JHtml::_('stylesheet', 'media/popup-imagelist_rtl.css', array(), true);
  28. endif;
  29. $document = JFactory::getDocument();
  30. $document->addScriptDeclaration("var ImageManager = window.parent.ImageManager;");
  31. $images = $this->get('images');
  32. $folders = $this->get('folders');
  33. $state = $this->get('state');
  34. $this->baseURL = COM_MEDIA_BASEURL;
  35. $this->images = &$images;
  36. $this->folders = &$folders;
  37. $this->state = &$state;
  38. parent::display($tpl);
  39. }
  40. function setFolder($index = 0)
  41. {
  42. if (isset($this->folders[$index])) {
  43. $this->_tmp_folder = &$this->folders[$index];
  44. } else {
  45. $this->_tmp_folder = new JObject;
  46. }
  47. }
  48. function setImage($index = 0)
  49. {
  50. if (isset($this->images[$index])) {
  51. $this->_tmp_img = &$this->images[$index];
  52. } else {
  53. $this->_tmp_img = new JObject;
  54. }
  55. }
  56. }