Preferences UI rewrite.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 25 Mar 2010 17:55:04 +0000 (11:55 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 6 Apr 2010 20:21:07 +0000 (14:21 -0600)
commit6e6599dfe74533b868cb0aaa80eeb6a2d482ce92
tree3b2cf17a86fd1ace6a328ea107ee4d9d7c19aa4d
parentf94e8a8507a6d50807448d4eb6bbf74d4c73e4f8
Preferences UI rewrite.

Goals of the rewrite:
1. Make ALL preference page display across ALL applications handled by a
single point: the horde services preference page. This means moving all
application specifc preference handling to inside of
Horde_Registry_Application functions. NO page, other than
horde/services/prefs.php, should be using the Horde Prefs UI functions
anymore.
2. Move Horde Prefs UI code out of Prefs package and into the Core
package. UI handling is not something that should be handled by a
library (will eventually move other things out of Prefs too, including
Category Management and Identity code, since this is code that overlays
the Prefs driver in a Horde-specific manner)
3. Simplify the prefs UI configuration. Don't require 'shared' or
'locked' entries (default to false) or 'type' entry (default to
'implicit'). Remove some unneeded types (select). Improve documentation.
4. Handle dynamic population of entries and suppression of prefGroups
and specific preferences in Application::prefsInit(). This code confuses
the prefs.php file.
5. Abstract out some common 'special' preference handlers.  For
example, identical addressbook selection code is used in several
applications (imp, kronolith, whups). Move this code to a prefs UI
widgets class so it can be reused.
6. Convert prefs templates to Horde_Template. As always, I know the
arguments against HT, but the simple fact is that is still the only
time-tested method that we used and it does produce a template file that
is easy to edit. Not to mention that the PHP code polluting the old
include files made these files absolutely unreadable and/or
maintainable.
7. Remove credentials code.  It wasn't being used anywhere in the code (I
believe it used to be a hack for IMP-related auth in Horde 3.x, but
shouldn't be needed anymore due to new authentication code).
8. Other improvements that have escaped my mind since I have been
working on this code for several weeks now...

Reasons for the rewrite:
1. The old Prefs UI code was ancient and a mess.  It was a static file
and globals were used all over the place.  New UI code is OO-based and
allows us to pass the object around, making these like suppression of
groups/prefs, hiding buttons, and current state identification much
easier and cleaner.
2. There is a need to redo the UI itself, especially for dynamic
apps, to allow for a different/better preferences experience. Thus, the
UI will eventually be able to be themed based on the current view type
(dynamic, standard, mobile/minimal). To do this, all UI needs to be
controlled from a single source, rather than disparate scripts.
3. Add ability to mark preferences as 'advanced' so they are not shown
by default.  This is prefereable to the current method of 'locking'
advanced prefs.  Admins may very well want users to be able to change a
pref, but they don't want that pref shown to basic users.
161 files changed:
agora/config/prefs.php.dist
agora/lib/Application.php
agora/templates/prefs/avatarselect.inc [deleted file]
ansel/lib/Application.php
fima/lib/Application.php
framework/Core/lib/Horde/Core/Prefs/Ui.php [new file with mode: 0644]
framework/Core/lib/Horde/Core/Prefs/Ui/Widgets.php [new file with mode: 0644]
framework/Core/lib/Horde/Core/Prefs/Utils.php [new file with mode: 0644]
framework/Core/lib/Horde/Registry/Application.php
framework/Core/lib/Horde/Script/Files.php
framework/Core/package.xml
framework/Prefs/lib/Horde/Prefs.php
framework/Prefs/lib/Horde/Prefs/CategoryManager.php
framework/Prefs/lib/Horde/Prefs/Credentials.php [deleted file]
framework/Prefs/lib/Horde/Prefs/File.php
framework/Prefs/lib/Horde/Prefs/Identity.php
framework/Prefs/lib/Horde/Prefs/Imsp.php
framework/Prefs/lib/Horde/Prefs/Kolab.php
framework/Prefs/lib/Horde/Prefs/KolabImap.php
framework/Prefs/lib/Horde/Prefs/Ldap.php
framework/Prefs/lib/Horde/Prefs/Session.php
framework/Prefs/lib/Horde/Prefs/Sql.php
framework/Prefs/lib/Horde/Prefs/Ui.php [deleted file]
framework/Prefs/package.xml
gollem/lib/Application.php
horde/config/hooks.php.dist
horde/config/prefs.php.dist
horde/js/addressbooksprefs.js [new file with mode: 0644]
horde/js/alarmprefs.js [new file with mode: 0644]
horde/js/categoryprefs.js [new file with mode: 0644]
horde/js/rpcprefs.js [new file with mode: 0644]
horde/js/sourceselect.js [new file with mode: 0644]
horde/lib/Application.php
horde/lib/Prefs/Ui.php [new file with mode: 0644]
horde/services/facebook.php
horde/services/portal/rpcsum.php [deleted file]
horde/services/portal/syncml.php [deleted file]
horde/services/prefs.php
horde/services/twitter.php
horde/templates/menu/menu.inc
horde/templates/prefs/addressbooks.html [new file with mode: 0644]
horde/templates/prefs/alarm.html [new file with mode: 0644]
horde/templates/prefs/alarm.inc [deleted file]
horde/templates/prefs/app.html [new file with mode: 0644]
horde/templates/prefs/app.inc [deleted file]
horde/templates/prefs/begin.html [new file with mode: 0644]
horde/templates/prefs/begin.inc [deleted file]
horde/templates/prefs/category.html [new file with mode: 0644]
horde/templates/prefs/categorymanagement.inc [deleted file]
horde/templates/prefs/checkbox.html [new file with mode: 0644]
horde/templates/prefs/checkbox.inc [deleted file]
horde/templates/prefs/credentialsui.inc [deleted file]
horde/templates/prefs/deleteidentity.inc [deleted file]
horde/templates/prefs/end.html [new file with mode: 0644]
horde/templates/prefs/end.inc [deleted file]
horde/templates/prefs/enum.html [new file with mode: 0644]
horde/templates/prefs/enum.inc [deleted file]
horde/templates/prefs/identityselect.html [new file with mode: 0644]
horde/templates/prefs/identityselect.inc [deleted file]
horde/templates/prefs/link.html [new file with mode: 0644]
horde/templates/prefs/link.inc [deleted file]
horde/templates/prefs/multienum.html [new file with mode: 0644]
horde/templates/prefs/multienum.inc [deleted file]
horde/templates/prefs/number.html [new file with mode: 0644]
horde/templates/prefs/number.inc [deleted file]
horde/templates/prefs/overview.html [new file with mode: 0644]
horde/templates/prefs/overview.inc [deleted file]
horde/templates/prefs/password.html [new file with mode: 0644]
horde/templates/prefs/password.inc [deleted file]
horde/templates/prefs/rawhtml.html [new file with mode: 0644]
horde/templates/prefs/rpc.html [new file with mode: 0644]
horde/templates/prefs/select.inc [deleted file]
horde/templates/prefs/source.html [new file with mode: 0644]
horde/templates/prefs/syncml.html [new file with mode: 0644]
horde/templates/prefs/text.html [new file with mode: 0644]
horde/templates/prefs/text.inc [deleted file]
horde/templates/prefs/textarea.html [new file with mode: 0644]
horde/templates/prefs/textarea.inc [deleted file]
horde/templates/rpcsum/rpcsum.inc [deleted file]
horde/templates/syncml/syncml.inc [deleted file]
horde/themes/screen.css
imp/acl.php [deleted file]
imp/config/prefs.php.dist
imp/contacts.php
imp/docs/UPGRADING
imp/filterprefs.php [deleted file]
imp/js/acl.js
imp/js/addressbooksprefs.js [deleted file]
imp/lib/Ajax/Imple/ContactAutoCompleter.php
imp/lib/Application.php
imp/lib/Auth.php
imp/lib/Block/tree_folders.php
imp/lib/Compose.php
imp/lib/Crypt/Pgp.php
imp/lib/Crypt/Smime.php
imp/lib/Imap/Acl.php
imp/lib/Mime/Viewer/Html.php
imp/lib/Prefs/Ui.php [new file with mode: 0644]
imp/pgp.php
imp/smime.php
imp/stationery.php [deleted file]
imp/templates/imp/acl/acl.html [deleted file]
imp/templates/pgp/import_key.html [new file with mode: 0644]
imp/templates/prefs/accounts.html [new file with mode: 0644]
imp/templates/prefs/accountsmanagement.inc [deleted file]
imp/templates/prefs/acl.html [new file with mode: 0644]
imp/templates/prefs/drafts.html [new file with mode: 0644]
imp/templates/prefs/draftsselect.inc [deleted file]
imp/templates/prefs/encrypt.html [new file with mode: 0644]
imp/templates/prefs/encryptselect.inc [deleted file]
imp/templates/prefs/filters/filters.html [deleted file]
imp/templates/prefs/flagmanagement.inc [deleted file]
imp/templates/prefs/flags.html [new file with mode: 0644]
imp/templates/prefs/initialpage.html [new file with mode: 0644]
imp/templates/prefs/initialpageselect.inc [deleted file]
imp/templates/prefs/pgp/import_key.html [deleted file]
imp/templates/prefs/pgp/pgp.html [deleted file]
imp/templates/prefs/pgpprivatekey.html [new file with mode: 0644]
imp/templates/prefs/pgppublickey.html [new file with mode: 0644]
imp/templates/prefs/sentmail.html [new file with mode: 0644]
imp/templates/prefs/sentmailselect.inc [deleted file]
imp/templates/prefs/smime/import_key.html [deleted file]
imp/templates/prefs/smime/smime.html [deleted file]
imp/templates/prefs/smimeprivatekey.html [new file with mode: 0644]
imp/templates/prefs/smimepublickey.html [new file with mode: 0644]
imp/templates/prefs/sound.html [new file with mode: 0644]
imp/templates/prefs/soundselect.inc [deleted file]
imp/templates/prefs/sourceselect.inc [deleted file]
imp/templates/prefs/spam.html [new file with mode: 0644]
imp/templates/prefs/spamselect.inc [deleted file]
imp/templates/prefs/stationery.html [new file with mode: 0644]
imp/templates/prefs/stationery/stationery.html [deleted file]
imp/templates/prefs/trash.html [new file with mode: 0644]
imp/templates/prefs/trashselect.inc [deleted file]
imp/templates/smime/import_key.html [new file with mode: 0644]
imp/themes/screen.css
kronolith/config/prefs.php.dist
kronolith/index.php
kronolith/lib/Application.php
kronolith/templates/prefs/default_alarm_management.inc [deleted file]
kronolith/templates/prefs/defaultalarm.html [new file with mode: 0644]
kronolith/templates/prefs/fb_cals_select.inc [deleted file]
kronolith/templates/prefs/shareselect.inc [deleted file]
kronolith/templates/prefs/sourceselect.inc [deleted file]
kronolith/themes/screen.css
nag/config/prefs.php.dist
nag/lib/Application.php
nag/templates/prefs/defaultduetimeselect.inc [deleted file]
nag/templates/prefs/tasklistselect.inc [deleted file]
turba/config/prefs.php.dist
turba/config/sources.php.dist
turba/js/columnprefs.js [new file with mode: 0644]
turba/lib/Application.php
turba/templates/prefs/addressbookselect.inc [deleted file]
turba/templates/prefs/column.html [new file with mode: 0644]
turba/templates/prefs/columnselect.inc [deleted file]
turba/templates/prefs/imsp_opt.inc [deleted file]
whups/config/prefs.php.dist
whups/lib/Application.php
whups/lib/View.php [changed mode: 0755->0644]
whups/templates/prefs/sourceselect.inc [deleted file]