From 0fe99cd692e9cb0d30f8c05b1439207d1b01cd8d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 28 Jun 2009 23:08:53 -0600 Subject: [PATCH] Ticket #8384: Move all javascript files to the js/ directory --- imp/config/hooks.php.dist | 2 +- imp/index-dimp.php | 2 +- imp/{templates/javascript => js/src}/mailbox-dimp.js | 0 imp/lib/IMP.php | 13 +------------ 4 files changed, 3 insertions(+), 14 deletions(-) rename imp/{templates/javascript => js/src}/mailbox-dimp.js (100%) diff --git a/imp/config/hooks.php.dist b/imp/config/hooks.php.dist index dfc440a0d..b87ab1f1a 100644 --- a/imp/config/hooks.php.dist +++ b/imp/config/hooks.php.dist @@ -322,7 +322,7 @@ // allows additional information to be added/edited from the data that is // passed to the mailbox display template: // imp: TODO -// dimp: imp/templates/javascript/mailbox-dimp.js. +// dimp: imp/js/src/mailbox-dimp.js. // The current entry array is passed in, the value returned should be the // altered array to use in the template. If you are going to add new columns, // you also have to update these fields: diff --git a/imp/index-dimp.php b/imp/index-dimp.php index b53e5ffe5..38d824d5c 100644 --- a/imp/index-dimp.php +++ b/imp/index-dimp.php @@ -21,7 +21,7 @@ $scripts = array( array('dragdrop2.js', 'horde', true), array('dhtmlHistory.js', 'horde', true), array('redbox.js', 'horde', true), - array('/templates/javascript/mailbox-dimp.js', 'imp', false), + array('mailbox-dimp.js', 'imp', true), array('DimpSlider.js', 'imp', true), array('imp.js', 'imp', true), array('dialog.js', 'imp', true) diff --git a/imp/templates/javascript/mailbox-dimp.js b/imp/js/src/mailbox-dimp.js similarity index 100% rename from imp/templates/javascript/mailbox-dimp.js rename to imp/js/src/mailbox-dimp.js diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index 94591f98f..a78e5b276 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -1466,18 +1466,7 @@ class IMP $js_tocache[$file['p'] . $file['f']] = false; $mtime[] = filemtime($file['p'] . $file['f']); } else { - if (!$file['d'] && - ($app == 'dimp') && - ($file['f'] == 'mailbox.js')) { - // Special dimp case: we keep mailbox.js in templates - // not for purposes of running PHP scripts in the - // file, but for ease of templating. Thus, this file - // is OK to include inline. - $js_tocache[$file['p'] . $file['f']] = true; - $mtime[] = filemtime($file['p'] . $file['f']); - } else { - $js_force[] = $file['u']; - } + $js_force[] = $file['u']; } } } -- 2.11.0