From: Michael M Slusarz Date: Wed, 11 Aug 2010 02:44:48 +0000 (-0600) Subject: Move prefs javascript to its own file X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=93be020314e8c72e62a0d68afc0e540065134fe4;p=horde.git Move prefs javascript to its own file --- diff --git a/framework/Core/lib/Horde/Core/Prefs/Ui.php b/framework/Core/lib/Horde/Core/Prefs/Ui.php index 0576c5bd8..9b8c5766f 100644 --- a/framework/Core/lib/Horde/Core/Prefs/Ui.php +++ b/framework/Core/lib/Horde/Core/Prefs/Ui.php @@ -386,6 +386,7 @@ class Horde_Core_Prefs_Ui * do things like add javascript to the page output. This should all * be combined and served in the page HEAD. */ Horde::startBuffer(); + Horde::addScriptFile('prefs.js', 'horde'); if ($this->group) { if ($identities) { diff --git a/horde/js/prefs.js b/horde/js/prefs.js new file mode 100644 index 000000000..fc6089777 --- /dev/null +++ b/horde/js/prefs.js @@ -0,0 +1,14 @@ +/** + * Provides the javascript for the prefs page. + * + * See the enclosed file COPYING for license information (LGPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. + */ + +document.observe('dom:loaded', function() { + $('appsubmit').hide(); + + $('app').observe('change', function() { + $('appswitch').submit(); + }); +}); diff --git a/horde/templates/prefs/app.html b/horde/templates/prefs/app.html index 056666149..094a719e8 100644 --- a/horde/templates/prefs/app.html +++ b/horde/templates/prefs/app.html @@ -3,7 +3,7 @@
- @@ -14,7 +14,7 @@ - +