Ticket #8384: Move all javascript files to the js/ directory
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 29 Jun 2009 05:08:53 +0000 (23:08 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 29 Jun 2009 05:18:40 +0000 (23:18 -0600)
imp/config/hooks.php.dist
imp/index-dimp.php
imp/js/src/mailbox-dimp.js [new file with mode: 0644]
imp/lib/IMP.php
imp/templates/javascript/mailbox-dimp.js [deleted file]

index dfc440a..b87ab1f 100644 (file)
 // 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:
index b53e5ff..38d824d 100644 (file)
@@ -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 (file)
index 0000000..91f0f55
--- /dev/null
@@ -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 =
+'<div #{vpData} style="#{style}">' +
+ '<div class="msgStatus">' +
+  '<div class="msCheck"></div>' +
+  '#{status}' +
+ '</div>' +
+ '<div class="msgFrom">#{from}</div>' +
+ '<div class="msgSubject" title="#{subjecttitle}">#{subjectdata}#{subject}</div>' +
+ '<div class="msgDate">#{date}</div>' +
+ '<div class="msgSize">#{size}</div>' +
+'</div>';
index 94591f9..a78e5b2 100644 (file)
@@ -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 (file)
index 91f0f55..0000000
+++ /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 =
-'<div #{vpData} style="#{style}">' +
- '<div class="msgStatus">' +
-  '<div class="msCheck"></div>' +
-  '#{status}' +
- '</div>' +
- '<div class="msgFrom">#{from}</div>' +
- '<div class="msgSubject" title="#{subjecttitle}">#{subjectdata}#{subject}</div>' +
- '<div class="msgDate">#{date}</div>' +
- '<div class="msgSize">#{size}</div>' +
-'</div>';