update.class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. require_once dirname(dirname(dirname(__FILE__))) . '/index.class.php';
  3. /**
  4. * Update controller for Collections Container
  5. *
  6. * @package collections
  7. * @subpackage controller
  8. */
  9. class CollectionsTemplateUpdateManagerController extends CollectionsBaseManagerController {
  10. public function getLanguageTopics() {
  11. return array('collections:default');
  12. }
  13. /**
  14. * Return the pagetitle
  15. *
  16. * @return string
  17. */
  18. public function getPageTitle() {
  19. return $this->modx->lexicon('collections.template.page_title');
  20. }
  21. public function process(array $scriptProperties = array()) {}
  22. public function loadCustomCssJs() {
  23. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/extra/griddraganddrop.js');
  24. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/extra/collections.renderers.js');
  25. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/extra/collections.combo.js');
  26. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/widgets/template/column.window.js');
  27. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/widgets/template/column.grid.js');
  28. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/widgets/template/template.panel.js');
  29. $this->addLastJavascript($this->collections->getOption('jsUrl').'mgr/sections/template/template.js');
  30. $this->addHtml('
  31. <script type="text/javascript">
  32. Ext.onReady(function() {
  33. MODx.load({
  34. xtype: "collections-page-template",
  35. fredInstalled: ' . (int)$this->collections->getOption("fredInstalled", null, 0) . '
  36. });
  37. });
  38. </script>
  39. ');
  40. }
  41. public function getTemplateFile() { return $this->collections->getOption('templatesPath').'template/template.tpl'; }
  42. }