From 06a1aa5a9af7423d8d1bf0781b8946a9f70ce7e7 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 23 Mar 2012 10:55:01 +0000 Subject: [PATCH] Revue complete des librairies externes et de la gestion des themes, issue #0000168, issue #0001032 --- application/Bootstrap.php | 23 +- application/configs/application.ini | 1 + .../controllers/DashboardController.php | 4 +- application/controllers/SaisieController.php | 4 +- .../controllers/SurveillanceController.php | 3 +- .../default/scripts/dashboard/newform.phtml | 2 +- .../scripts/evaluation/customindiscore3.phtml | 2 +- .../scripts/finance/saisiebilan-upload.phtml | 2 +- .../views/default/scripts/logo/crop.phtml | 4 +- .../scripts/saisie/annoncedialog.phtml | 2 +- docs/DEVDOC | 9 +- .../Application/Controller/Plugin/Theme.php | 70 + .../Application/Controller/Plugin/Themes.php | 31 - .../images => libs}/checkbox/checkbox.png | Bin .../images => libs}/checkbox/empty.png | Bin .../checkbox}/jquery.checkbox.css | 2 +- .../checkbox}/jquery.checkbox.js | 0 .../scripts => libs/form}/jquery.form.js | 0 .../default/images => libs/jcrop}/Jcrop.gif | Bin .../styles => libs/jcrop}/jquery.Jcrop.css | 0 .../scripts => libs/jcrop}/jquery.Jcrop.js | 0 .../jquery}/jquery.bgiframe.js | 0 .../default/scripts => libs/jquery}/jquery.js | 0 .../styles => libs/qtip}/jquery.qtip.css | 0 .../scripts => libs/qtip}/jquery.qtip.js | 0 .../tablesorter}/jquery.tablesorter.js | 0 .../scripts => libs/ui}/jquery-ui-i18n.js | 0 .../default/scripts => libs/ui}/jquery-ui.js | 0 .../images}/ui-bg_flat_0_aaaaaa_40x100.png | Bin .../images}/ui-bg_flat_75_ffffff_40x100.png | Bin .../images}/ui-bg_glass_55_fbf9ee_1x400.png | Bin .../images}/ui-bg_glass_65_ffffff_1x400.png | Bin .../images}/ui-bg_glass_75_dadada_1x400.png | Bin .../images}/ui-bg_glass_75_e6e6e6_1x400.png | Bin .../images}/ui-bg_glass_95_fef1ec_1x400.png | Bin .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin .../images}/ui-icons_222222_256x240.png | Bin .../images}/ui-icons_2e83ff_256x240.png | Bin .../images}/ui-icons_454545_256x240.png | Bin .../images}/ui-icons_888888_256x240.png | Bin .../images}/ui-icons_cd0a0a_256x240.png | Bin .../ui/themes/smoothness}/jquery-ui.css | 34 +- .../images/checkbox/safari-checkbox.png | Bin 1253 -> 0 bytes .../themes/default/images/tablesorter/asc.gif | Bin 54 -> 0 bytes .../themes/default/images/tablesorter/bg.gif | Bin 64 -> 0 bytes .../default/images/tablesorter/desc.gif | Bin 54 -> 0 bytes public/themes/default/scripts/growl.js | 107 - .../scripts/notminify/jquery-ui-i18n.js | 1517 -- .../default/scripts/notminify/jquery-ui.js | 11802 ---------------- .../default/scripts/notminify/jquery.Jcrop.js | 1197 -- .../scripts/notminify/jquery.bgiframe.js | 39 - .../scripts/notminify/jquery.checkbox.js | 120 - .../default/scripts/notminify/jquery.form.js | 1051 -- .../default/scripts/notminify/jquery.js | 9266 ------------ .../default/scripts/notminify/jquery.qtip.js | 3247 ----- .../scripts/notminify/jquery.tablesorter.js | 1031 -- public/themes/default/styles/surveillance.css | 10 - 57 files changed, 120 insertions(+), 29460 deletions(-) create mode 100644 library/Application/Controller/Plugin/Theme.php delete mode 100644 library/Application/Controller/Plugin/Themes.php rename public/{themes/default/images => libs}/checkbox/checkbox.png (100%) rename public/{themes/default/images => libs}/checkbox/empty.png (100%) rename public/{themes/default/styles => libs/checkbox}/jquery.checkbox.css (85%) rename public/{themes/default/scripts => libs/checkbox}/jquery.checkbox.js (100%) rename public/{themes/default/scripts => libs/form}/jquery.form.js (100%) rename public/{themes/default/images => libs/jcrop}/Jcrop.gif (100%) rename public/{themes/default/styles => libs/jcrop}/jquery.Jcrop.css (100%) rename public/{themes/default/scripts => libs/jcrop}/jquery.Jcrop.js (100%) rename public/{themes/default/scripts => libs/jquery}/jquery.bgiframe.js (100%) rename public/{themes/default/scripts => libs/jquery}/jquery.js (100%) rename public/{themes/default/styles => libs/qtip}/jquery.qtip.css (100%) rename public/{themes/default/scripts => libs/qtip}/jquery.qtip.js (100%) rename public/{themes/default/scripts => libs/tablesorter}/jquery.tablesorter.js (100%) rename public/{themes/default/scripts => libs/ui}/jquery-ui-i18n.js (100%) rename public/{themes/default/scripts => libs/ui}/jquery-ui.js (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_flat_0_aaaaaa_40x100.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_flat_75_ffffff_40x100.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_glass_55_fbf9ee_1x400.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_glass_65_ffffff_1x400.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_glass_75_dadada_1x400.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_glass_75_e6e6e6_1x400.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_glass_95_fef1ec_1x400.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-bg_highlight-soft_75_cccccc_1x100.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-icons_222222_256x240.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-icons_2e83ff_256x240.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-icons_454545_256x240.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-icons_888888_256x240.png (100%) rename public/{themes/default/images/smoothness => libs/ui/themes/smoothness/images}/ui-icons_cd0a0a_256x240.png (100%) rename public/{themes/default/styles => libs/ui/themes/smoothness}/jquery-ui.css (93%) delete mode 100644 public/themes/default/images/checkbox/safari-checkbox.png delete mode 100644 public/themes/default/images/tablesorter/asc.gif delete mode 100644 public/themes/default/images/tablesorter/bg.gif delete mode 100644 public/themes/default/images/tablesorter/desc.gif delete mode 100644 public/themes/default/scripts/growl.js delete mode 100644 public/themes/default/scripts/notminify/jquery-ui-i18n.js delete mode 100644 public/themes/default/scripts/notminify/jquery-ui.js delete mode 100644 public/themes/default/scripts/notminify/jquery.Jcrop.js delete mode 100644 public/themes/default/scripts/notminify/jquery.bgiframe.js delete mode 100644 public/themes/default/scripts/notminify/jquery.checkbox.js delete mode 100644 public/themes/default/scripts/notminify/jquery.form.js delete mode 100644 public/themes/default/scripts/notminify/jquery.js delete mode 100644 public/themes/default/scripts/notminify/jquery.qtip.js delete mode 100644 public/themes/default/scripts/notminify/jquery.tablesorter.js diff --git a/application/Bootstrap.php b/application/Bootstrap.php index 700e3b275..7d22469c2 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -5,10 +5,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap protected function _initViewSettings() { $this->bootstrap('view'); - $view = $this->getResource('view'); - $theme = 'default'; - $pathStyle = '/themes/'.$theme.'/styles'; - $pathScript = '/themes/'.$theme.'/scripts'; + $view = $this->getResource('view'); $view->setEncoding('UTF-8'); $view->doctype('XHTML1_STRICT'); $view->headMeta() @@ -21,6 +18,18 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $view->headLink() ->headLink(array('rel' => 'shortcut icon', 'type' => 'image/x-icon', 'href' => '/favicon.ico')); + $view->headTitle()->setSeparator(' - '); + $view->headTitle('Extranet Scores & Décisions'); + + /* + $theme = 'default'; + if ( Zend_Registry::isRegistered('') ){ + $theme = Zend_Registry::get('default'); + } + + $pathStyle = '/themes/'.$theme.'/styles'; + $pathScript = '/themes/'.$theme.'/scripts'; + $view->headLink() ->appendStylesheet($pathStyle.'/main.css', 'all') ->appendStylesheet($pathStyle.'/ie6.css', 'all', 'lte IE 6') @@ -40,9 +49,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap ->appendFile($pathScript.$pathScriptPlus.'/jquery-ui-i18n.js', 'text/javascript') ->appendFile($pathScript.$pathScriptPlus.'/jquery.qtip.js', 'text/javascript') ->appendFile($pathScript.'/script.js', 'text/javascript'); - - $view->headTitle()->setSeparator(' - '); - $view->headTitle('Extranet Scores & Décisions'); + */ + + } protected function _initRouter() diff --git a/application/configs/application.ini b/application/configs/application.ini index 909248301..5818b4f55 100644 --- a/application/configs/application.ini +++ b/application/configs/application.ini @@ -7,6 +7,7 @@ bootstrap.class = "Bootstrap" appnamespace = "Application" resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth" +resources.frontController.plugins.Theme = "Application_Controller_Plugin_Theme" resources.frontController.plugins.Menu = "Application_Controller_Plugin_Menu" resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf" resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml" diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index ebde8bd9b..4b703f611 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -506,8 +506,8 @@ class DashboardController extends Zend_Controller_Action $this->_forward('perms', 'error'); } - $this->view->headScript()->appendFile('/themes/default/scripts/jquery.checkbox.js', 'text/javascript'); - $this->view->headLink()->appendStylesheet('/themes/default/styles/jquery.checkbox.css', 'all'); + $this->view->headScript()->appendFile('/libs/checkbox/jquery.checkbox.js', 'text/javascript'); + $this->view->headLink()->appendStylesheet('/libs/checkbox/jquery.checkbox.css', 'all'); $request = $this->getRequest(); $idClient = $request->getParam('idClient', false); diff --git a/application/controllers/SaisieController.php b/application/controllers/SaisieController.php index d5ff2fe7b..2c268bfe4 100644 --- a/application/controllers/SaisieController.php +++ b/application/controllers/SaisieController.php @@ -670,7 +670,7 @@ class SaisieController extends Zend_Controller_Action { $this->view->headScript() ->appendFile('/themes/default/scripts/saisie.js', 'text/javascript') - ->appendFile('/themes/default/scripts/jquery.form.js', 'text/javascript'); + ->appendFile('/libs/form/jquery.form.js', 'text/javascript'); $request = $this->getRequest(); $siret = $request->getParam('siret'); @@ -1269,7 +1269,7 @@ class SaisieController extends Zend_Controller_Action //Affichage formulaire } else { - $this->view->inlineScript()->appendFile('/themes/default/scripts/jquery.form.js'); + $this->view->inlineScript()->appendFile('/libs/form/jquery.form.js'); if ( intval($siren)==0 ) { $session = new SessionEntreprise(); $siren = ''; diff --git a/application/controllers/SurveillanceController.php b/application/controllers/SurveillanceController.php index 8c92f3167..423d8356b 100644 --- a/application/controllers/SurveillanceController.php +++ b/application/controllers/SurveillanceController.php @@ -271,10 +271,11 @@ class SurveillanceController extends Zend_Controller_Action } $this->view->headLink() + ->appendStylesheet('/libs/tablesorter/themes/blue/style.css', 'all') ->appendStylesheet('/themes/default/styles/surveillance.css', 'all'); $this->view->headScript() - ->appendFile('/themes/default/scripts/jquery.tablesorter.js', 'text/javascript') + ->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript') ->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript'); $request = $this->getRequest(); diff --git a/application/views/default/scripts/dashboard/newform.phtml b/application/views/default/scripts/dashboard/newform.phtml index 3b35c9d5b..4c6701fd2 100644 --- a/application/views/default/scripts/dashboard/newform.phtml +++ b/application/views/default/scripts/dashboard/newform.phtml @@ -16,7 +16,7 @@ Fichier PDF :
- - + + +