From 2bc88a752102f3cfbd8be394c195275b79840cd0 Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Thu, 27 Dec 2012 20:27:27 +1000 Subject: [PATCH] Move Ext.onReady into controllers --- assets/components/gallery/js/mgr/sections/album/update.js | 4 ---- assets/components/gallery/js/mgr/sections/home.js | 4 ---- core/components/gallery/controllers/album/update.class.php | 4 ++-- core/components/gallery/controllers/home.class.php | 1 + 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/assets/components/gallery/js/mgr/sections/album/update.js b/assets/components/gallery/js/mgr/sections/album/update.js index 82708ea..87ea1a0 100644 --- a/assets/components/gallery/js/mgr/sections/album/update.js +++ b/assets/components/gallery/js/mgr/sections/album/update.js @@ -1,7 +1,3 @@ -Ext.onReady(function() { - MODx.load({ xtype: 'gal-page-album-update'}); -}); - GAL.page.UpdateAlbum = function(config) { config = config || {}; Ext.applyIf(config,{ diff --git a/assets/components/gallery/js/mgr/sections/home.js b/assets/components/gallery/js/mgr/sections/home.js index 27c29c6..ba2c5b7 100644 --- a/assets/components/gallery/js/mgr/sections/home.js +++ b/assets/components/gallery/js/mgr/sections/home.js @@ -1,7 +1,3 @@ -Ext.onReady(function() { - MODx.load({ xtype: 'gal-page-home'}); -}); - GAL.page.Home = function(config) { config = config || {}; Ext.applyIf(config,{ diff --git a/core/components/gallery/controllers/album/update.class.php b/core/components/gallery/controllers/album/update.class.php index ffa23bc..24d8458 100644 --- a/core/components/gallery/controllers/album/update.class.php +++ b/core/components/gallery/controllers/album/update.class.php @@ -37,9 +37,9 @@ public function loadCustomCssJs() { $this->addJavascript($this->gallery->config['jsUrl'].'mgr/widgets/album/album.panel.js'); $this->addLastJavascript($this->gallery->config['jsUrl'].'mgr/sections/album/update.js'); $this->addCss($this->gallery->config['cssUrl'].'fileuploader.css'); - + $this->addHtml(""); + $this->checkForTinyMCE(); - } public function getTemplateFile() { return $this->gallery->config['templatesPath'].'album/update.tpl'; } diff --git a/core/components/gallery/controllers/home.class.php b/core/components/gallery/controllers/home.class.php index afe16ff..c8a6df4 100644 --- a/core/components/gallery/controllers/home.class.php +++ b/core/components/gallery/controllers/home.class.php @@ -31,6 +31,7 @@ public function loadCustomCssJs() { $this->addJavascript($this->gallery->config['jsUrl'].'mgr/widgets/album/album.tree.js'); $this->addJavascript($this->gallery->config['jsUrl'].'mgr/widgets/home.panel.js'); $this->addLastJavascript($this->gallery->config['jsUrl'].'mgr/sections/home.js'); + $this->addHtml(""); } public function getTemplateFile() { return $this->gallery->config['templatesPath'].'home.tpl'; } } \ No newline at end of file