From cc910d6f558b2423d732dded65aa3b8b2ece88fb Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Tue, 21 Aug 2012 14:01:18 +0900 Subject: [PATCH] =?UTF-8?q?view.yml=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=8CopS?= =?UTF-8?q?kinBootstrapPlugin=E7=AD=89=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=A8?= =?UTF-8?q?=E8=A1=9D=E7=AA=81=E3=81=97=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=81=AE=E5=9B=9E=E9=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/pc_frontend/config/view.yml | 2 -- config/opDropboxPluginConfiguration.class.php | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) delete mode 100644 apps/pc_frontend/config/view.yml create mode 100644 config/opDropboxPluginConfiguration.class.php diff --git a/apps/pc_frontend/config/view.yml b/apps/pc_frontend/config/view.yml deleted file mode 100644 index bdd6d64..0000000 --- a/apps/pc_frontend/config/view.yml +++ /dev/null @@ -1,2 +0,0 @@ -default: - javascripts: [ /opDropboxPlugin/js/bootstrap-modal.js:{ position : last } , /opDropboxPlugin/js/filedialog.js:{ position : last } ] diff --git a/config/opDropboxPluginConfiguration.class.php b/config/opDropboxPluginConfiguration.class.php new file mode 100644 index 0000000..73d22b8 --- /dev/null +++ b/config/opDropboxPluginConfiguration.class.php @@ -0,0 +1,15 @@ +dispatcher->connect('op_action.pre_execute', array($this, 'appendJavascripts')); + } + + public function appendJavascripts(sfEvent $event) + { + $event['actionInstance']->getResponse()->addJavascript('/opDropboxPlugin/js/bootstrap-modal.js', 'last'); + $event['actionInstance']->getResponse()->addJavascript('/opDropboxPlugin/js/filedialog.js', 'last'); + } +}