No need to add prototype.js if at least 1 other script file is added
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 3 Sep 2010 22:02:42 +0000 (16:02 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Sep 2010 20:31:14 +0000 (14:31 -0600)
22 files changed:
ansel/lib/View/Image.php
framework/Core/lib/Horde.php
framework/Core/lib/Horde/Core/Ajax/Imple/SpellChecker.php
framework/Core/lib/Horde/Core/Tree/Javascript.php
framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php
framework/Form/Form/Action/reload.php
framework/Form/Form/Action/submit.php
horde/services/sidebar.php
jonah/channels/index.php
mnemo/list.php
mnemo/notes/index.php
shout/admin.php
shout/admin/accounts.php
shout/admin/numbers.php
shout/dialplan.php
shout/extensions.php
shout/recordings.php
shout/wizard.php
trean/browse.php
trean/templates/star_rating_helper.php
whups/lib/Forms/Action.php
whups/lib/View/Results.php

index bf32207..157e44d 100644 (file)
@@ -375,7 +375,6 @@ class Ansel_View_Image extends Ansel_View_Base
         /* Output the js if we are calling via the api */
         if (!empty($this->_params['api'])) {
             $includes = $GLOBALS['injector']->createInstance('Horde_Script_Files');
-            $includes->add('prototype.js', 'horde', true, true);
             $includes->add('effects.js', 'horde',true, true);
             $includes->add('stripe.js', 'horde', true, true);
             $includes->includeFiles();
index 87e4e05..2519b0a 100644 (file)
@@ -174,6 +174,9 @@ HTML;
      * Adds the javascript code to the output (if output has already started)
      * or to the list of script files to include via includeScriptFiles().
      *
+     * As long as one script file is added, 'prototype.js' will be
+     * automatically added.
+     *
      * @param string $file    The full javascript file name.
      * @param string $app     The application name. Defaults to the current
      *                        application.
index b8177c7..baab9ab 100644 (file)
@@ -57,7 +57,6 @@ class Horde_Core_Ajax_Imple_SpellChecker extends Horde_Core_Ajax_Imple
      */
     public function attach()
     {
-        Horde::addScriptFile('prototype.js', 'horde');
         Horde::addScriptFile('effects.js', 'horde');
         Horde::addScriptFile('keynavlist.js', 'horde');
         Horde::addScriptFile('spellchecker.js', 'horde');
index 18e3856..b65d9b3 100644 (file)
@@ -30,7 +30,6 @@ class Horde_Core_Tree_Javascript extends Horde_Core_Tree_Html
     {
         parent::__construct($name, $params);
 
-        Horde::addScriptFile('prototype.js', 'horde');
         Horde::addScriptFile('hordetree.js', 'horde');
 
         /* Check for a javascript session state. */
index a1ddd3e..89e7703 100644 (file)
@@ -575,7 +575,6 @@ class Horde_Core_Ui_VarRenderer_Html extends Horde_Core_Ui_VarRenderer
             . ' value="' . @htmlspecialchars($color, ENT_QUOTES, $this->_charset)
             . '" /></td>';
         if ($browser->hasFeature('javascript')) {
-            Horde::addScriptFile('prototype.js', 'horde');
             Horde::addScriptFile('colorpicker.js', 'horde');
             $html .= '<td>'
                 . Horde::link('#', _("Color Picker"), '', '',
index f5c4071..0434b38 100644 (file)
@@ -18,7 +18,6 @@ class Horde_Form_Action_reload extends Horde_Form_Action {
 
     function getActionScript($form, $renderer, $varname)
     {
-        Horde::addScriptFile('prototype.js', 'horde');
         Horde::addScriptFile('effects.js', 'horde');
         Horde::addScriptFile('redbox.js', 'horde');
         return 'if (this.value) { document.' . $form->getName() . '.formname.value=\'\'; RedBox.loading(); document.' . $form->getName() . '.submit() }';
index efaa1f6..c8170aa 100644 (file)
@@ -18,7 +18,6 @@ class Horde_Form_Action_submit extends Horde_Form_Action {
 
     function getActionScript($form, $renderer, $varname)
     {
-        Horde::addScriptFile('prototype.js', 'horde');
         Horde::addScriptFile('effects.js', 'horde');
         Horde::addScriptFile('redbox.js', 'horde');
         return 'RedBox.loading(); document.' . $form->getName() . '.submit()';
index 5cbdbc9..09ffc90 100644 (file)
@@ -26,7 +26,6 @@ if (!Horde_Util::getFormData('ajaxui') &&
      ($registry->getAuth() && $prefs->getValue('show_sidebar')))) {
     $tree = $injector->getInstance('Horde_Core_Sidebar')->getTree();
 
-    Horde::addScriptFile('prototype.js', 'horde');
     Horde::addScriptFile('sidebar.js', 'horde');
 
     $ajax_url = Horde::getServiceLink('ajax', 'horde');
index 1fec386..7e573ce 100644 (file)
@@ -92,7 +92,6 @@ $GLOBALS['notification']->notify(array('listeners' => 'status'));
 $template->set('notify', Horde::endBuffer());
 
 $title = _("Feeds");
-Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('tables.js', 'horde', true);
 Horde::addScriptFile('quickfinder.js', 'horde', true);
 require JONAH_TEMPLATES . '/common-header.inc';
index 559cfba..084b55c 100644 (file)
@@ -55,7 +55,6 @@ case 'search_memos':
 }
 
 Horde::addScriptFile('tables.js', 'horde', true);
-Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('quickfinder.js', 'horde', true);
 require MNEMO_TEMPLATES . '/common-header.inc';
 require MNEMO_TEMPLATES . '/menu.inc';
index 5202808..7e0721e 100644 (file)
@@ -39,7 +39,6 @@ $title = _("Search Results");
 $memos = $search_results;
 
 Horde::addScriptFile('tables.js', 'horde', true);
-Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('quickfinder.js', 'horde', true);
 
 require MNEMO_TEMPLATES . '/common-header.inc';
index 9e59bde..9d7e866 100644 (file)
@@ -22,7 +22,6 @@ $RENDERER = new Horde_Form_Renderer();
 $title = _("Accounts: ");
 
 Horde::addScriptFile('stripe.js', 'horde');
-Horde::addScriptFile('prototype.js', 'horde');
 
 require SHOUT_TEMPLATES . '/common-header.inc';
 require SHOUT_TEMPLATES . '/menu.inc';
index 8cddbd3..45f4869 100644 (file)
@@ -98,7 +98,6 @@ try {
 }
 
 Horde::addScriptFile('stripe.js', 'horde');
-Horde::addScriptFile('prototype.js', 'horde');
 
 require SHOUT_TEMPLATES . '/common-header.inc';
 require SHOUT_TEMPLATES . '/menu.inc';
index 482654d..7bf341d 100644 (file)
@@ -97,7 +97,6 @@ try {
 }
 
 Horde::addScriptFile('stripe.js', 'horde');
-Horde::addScriptFile('prototype.js', 'horde');
 
 require SHOUT_TEMPLATES . '/common-header.inc';
 require SHOUT_TEMPLATES . '/menu.inc';
index 4621379..9669713 100644 (file)
@@ -84,7 +84,6 @@ if ($action == 'edit') {
 }
 
 Horde::addScriptFile('stripe.js', 'horde');
-Horde::addScriptFile('prototype.js', 'horde');
 Horde::addScriptFile('scriptaculous.js', 'horde');
 
 require SHOUT_TEMPLATES . '/common-header.inc';
index e9b3acf..1080c24 100644 (file)
@@ -31,7 +31,6 @@ try {
 }
 
 Horde::addScriptFile('stripe.js', 'horde');
-Horde::addScriptFile('prototype.js', 'horde');
 Horde::addScriptFile('scriptaculous.js', 'horde');
 
 require SHOUT_TEMPLATES . '/common-header.inc';
index a3516a0..a2d6794 100644 (file)
@@ -52,7 +52,6 @@ default:
 }
 
 Horde::addScriptFile('stripe.js', 'horde');
-Horde::addScriptFile('prototype.js', 'horde');
 
 require SHOUT_TEMPLATES . '/common-header.inc';
 require SHOUT_TEMPLATES . '/menu.inc';
index 4999801..f6ba965 100644 (file)
@@ -64,7 +64,6 @@ try {
     $notification->push($e);
 }
 
-Horde::addScriptFile('prototype.js', 'horde');
 Horde::addScriptFile('scriptaculous.js', 'horde');
 Horde::addScriptFile('stripe.js', 'horde');
 
index 1bddbaf..7503536 100644 (file)
@@ -54,7 +54,6 @@ if (!empty($folder)) {
 }
 
 Horde::addScriptFile('tables.js', 'horde', true);
-Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('effects.js', 'horde', true);
 Horde::addScriptFile('redbox.js', 'horde', true);
 $title = _("Browse");
index 5d0dfc5..56972a0 100644 (file)
@@ -2,7 +2,6 @@
 // Here we should tell the view using this helper to include the
 // relevant CSS and JavaScript. Currently CSS is in the main Trean CSS
 // file.
-Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('star_rating.js', 'trean', true);
 
 // Eventual class var.
index 1416b31..30e48bf 100644 (file)
@@ -22,7 +22,6 @@ class Horde_Form_Action_whups_reload extends Horde_Form_Action {
 
     function getActionScript($form, $renderer, $varname)
     {
-        Horde::addScriptFile('prototype.js', 'horde', true);
         Horde::addScriptFile('effects.js', 'horde', true);
         Horde::addScriptFile('redbox.js', 'horde', true);
         return 'if (this.value) { document.' . $form->getName()
index c998912..de456aa 100755 (executable)
@@ -21,7 +21,6 @@ class Whups_View_Results extends Whups_View {
 
     function html()
     {
-        Horde::addScriptFile('prototype.js', 'horde', true);
         Horde::addScriptFile('tables.js', 'horde', true);
 
         global $prefs, $registry;