From: Michael M Slusarz Date: Mon, 29 Jun 2009 05:08:53 +0000 (-0600) Subject: Ticket #8384: Move all javascript files to the js/ directory X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0fe99cd692e9cb0d30f8c05b1439207d1b01cd8d;p=horde.git Ticket #8384: Move all javascript files to the js/ directory --- 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/js/src/mailbox-dimp.js b/imp/js/src/mailbox-dimp.js new file mode 100644 index 000000000..91f0f5502 --- /dev/null +++ b/imp/js/src/mailbox-dimp.js @@ -0,0 +1,29 @@ +/** + * mailbox-dimp.js - Template used to format the rows in the message list + * display. + * + * 'vpData' is a mandatory entry for ID/class information automatically + * generated by ViewPort.js. + * 'status', 'style', and 'subjectdata' are entries that are internally + * created by DimpBase.js. + * + * See the documentation of prototypejs - Template for the template format: + * http://www.prototypejs.org/api/template + * + * Copyright 2005-2009 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ + +DimpBase.message_list_template = +'
' + + '
' + + '
' + + '#{status}' + + '
' + + '
#{from}
' + + '
#{subjectdata}#{subject}
' + + '
#{date}
' + + '
#{size}
' + +'
'; 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']; } } } diff --git a/imp/templates/javascript/mailbox-dimp.js b/imp/templates/javascript/mailbox-dimp.js deleted file mode 100644 index 91f0f5502..000000000 --- a/imp/templates/javascript/mailbox-dimp.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * mailbox-dimp.js - Template used to format the rows in the message list - * display. - * - * 'vpData' is a mandatory entry for ID/class information automatically - * generated by ViewPort.js. - * 'status', 'style', and 'subjectdata' are entries that are internally - * created by DimpBase.js. - * - * See the documentation of prototypejs - Template for the template format: - * http://www.prototypejs.org/api/template - * - * Copyright 2005-2009 The Horde Project (http://www.horde.org/) - * - * See the enclosed file COPYING for license information (GPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. - */ - -DimpBase.message_list_template = -'
' + - '
' + - '
' + - '#{status}' + - '
' + - '
#{from}
' + - '
#{subjectdata}#{subject}
' + - '
#{date}
' + - '
#{size}
' + -'
';