From 52e4832afedf0222dec06bf659d777ca49e9a8d1 Mon Sep 17 00:00:00 2001
From: Gunnar Wrobel
Date: Thu, 30 Apr 2009 11:56:59 +0200
Subject: [PATCH] Reorder the www structure in a way we might do it for Horde
4. I'm probably way off here but at least it can be installed via PEAR this
way.
---
koward/www/{Koward => horde}/config/conf.php.dist | 0
koward/www/{Koward => horde}/config/hooks.php.dist | 0
koward/www/{Koward => horde}/config/nls.php.dist | 0
koward/www/horde/config/prefs.php.dist | 589 +++
koward/www/horde/config/registry.d/README | 9 +
.../www/{Koward => horde}/config/registry.php.dist | 16 +-
koward/www/htdocs/horde/js/accesskeys.js | 46 +
koward/www/htdocs/horde/js/effects.js | 1128 +++++
koward/www/htdocs/horde/js/horde.js | 267 ++
koward/www/htdocs/horde/js/prototype.js | 4320 ++++++++++++++++++++
koward/www/htdocs/horde/js/redbox.js | 130 +
.../www/htdocs/horde/themes/graphics/favicon.ico | Bin 0 -> 1150 bytes
koward/www/htdocs/horde/themes/graphics/logout.png | Bin 0 -> 385 bytes
koward/www/htdocs/horde/themes/graphics/plus.png | Bin 0 -> 229 bytes
koward/www/htdocs/horde/themes/graphics/search.png | Bin 0 -> 795 bytes
.../htdocs/horde/themes/graphics/tab_bottom.gif | Bin 0 -> 37 bytes
koward/www/htdocs/horde/themes/graphics/user.png | Bin 0 -> 797 bytes
koward/www/htdocs/horde/themes/ie5mac.css | 25 +
koward/www/htdocs/horde/themes/ie6_or_less.css | 23 +
koward/www/htdocs/horde/themes/moz14.css | 10 +
koward/www/htdocs/horde/themes/opera.css | 15 +
koward/www/htdocs/horde/themes/rtl.css | 177 +
koward/www/htdocs/horde/themes/screen.css | 1024 +++++
.../themes/silver/graphics/currentTab_left.png | Bin 0 -> 161 bytes
.../themes/silver/graphics/currentTab_right.png | Bin 0 -> 371 bytes
.../htdocs/horde/themes/silver/graphics/delete.png | Bin 0 -> 363 bytes
.../htdocs/horde/themes/silver/graphics/edit.png | Bin 0 -> 807 bytes
.../htdocs/horde/themes/silver/graphics/logout.png | Bin 0 -> 693 bytes
.../htdocs/horde/themes/silver/graphics/plus.png | Bin 0 -> 733 bytes
.../htdocs/horde/themes/silver/graphics/search.png | Bin 0 -> 692 bytes
.../horde/themes/silver/graphics/tab_left.png | Bin 0 -> 372 bytes
.../horde/themes/silver/graphics/tab_right.png | Bin 0 -> 2656 bytes
.../htdocs/horde/themes/silver/graphics/user.png | Bin 0 -> 722 bytes
koward/www/htdocs/horde/themes/silver/info.php | 20 +
koward/www/htdocs/horde/themes/silver/screen.css | 257 ++
.../www/htdocs/horde/themes/silver/themed_graphics | 0
koward/www/htdocs/horde/themes/webkit.css | 19 +
.../www/{Koward/app => htdocs/koward}/koward.php | 9 +-
.../koward}/themes/graphics/favicon.ico | Bin
.../koward}/themes/graphics/query.png | Bin
.../app => htdocs/koward}/themes/kolab/screen.css | 0
.../app => htdocs/koward}/themes/screen.css | 0
koward/www/{Koward => koward}/config/.gitignore | 0
.../{Koward => koward}/config/attributes.php.dist | 0
koward/www/koward/config/base.php.dist | 5 +
.../config/conf.php.dist} | 0
.../www/{Koward => koward}/config/labels.php.dist | 0
.../www/{Koward => koward}/config/objects.php.dist | 0
.../www/{Koward => koward}/config/order.php.dist | 0
.../www/{Koward => koward}/config/routes.php.dist | 0
.../www/{Koward => koward}/config/search.php.dist | 0
.../www/{Koward => koward}/config/visible.php.dist | 0
koward/www/koward/doc/INSTALL | 13 +
53 files changed, 8089 insertions(+), 13 deletions(-)
rename koward/www/{Koward => horde}/config/conf.php.dist (100%)
rename koward/www/{Koward => horde}/config/hooks.php.dist (100%)
rename koward/www/{Koward => horde}/config/nls.php.dist (100%)
create mode 100644 koward/www/horde/config/prefs.php.dist
create mode 100644 koward/www/horde/config/registry.d/README
rename koward/www/{Koward => horde}/config/registry.php.dist (88%)
create mode 100644 koward/www/htdocs/horde/js/accesskeys.js
create mode 100644 koward/www/htdocs/horde/js/effects.js
create mode 100644 koward/www/htdocs/horde/js/horde.js
create mode 100644 koward/www/htdocs/horde/js/prototype.js
create mode 100644 koward/www/htdocs/horde/js/redbox.js
create mode 100644 koward/www/htdocs/horde/themes/graphics/favicon.ico
create mode 100644 koward/www/htdocs/horde/themes/graphics/logout.png
create mode 100644 koward/www/htdocs/horde/themes/graphics/plus.png
create mode 100644 koward/www/htdocs/horde/themes/graphics/search.png
create mode 100644 koward/www/htdocs/horde/themes/graphics/tab_bottom.gif
create mode 100644 koward/www/htdocs/horde/themes/graphics/user.png
create mode 100644 koward/www/htdocs/horde/themes/ie5mac.css
create mode 100644 koward/www/htdocs/horde/themes/ie6_or_less.css
create mode 100644 koward/www/htdocs/horde/themes/moz14.css
create mode 100644 koward/www/htdocs/horde/themes/opera.css
create mode 100644 koward/www/htdocs/horde/themes/rtl.css
create mode 100644 koward/www/htdocs/horde/themes/screen.css
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/currentTab_left.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/currentTab_right.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/delete.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/edit.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/logout.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/plus.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/search.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/tab_left.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/tab_right.png
create mode 100644 koward/www/htdocs/horde/themes/silver/graphics/user.png
create mode 100644 koward/www/htdocs/horde/themes/silver/info.php
create mode 100644 koward/www/htdocs/horde/themes/silver/screen.css
create mode 100644 koward/www/htdocs/horde/themes/silver/themed_graphics
create mode 100644 koward/www/htdocs/horde/themes/webkit.css
rename koward/www/{Koward/app => htdocs/koward}/koward.php (73%)
rename koward/www/{Koward/app => htdocs/koward}/themes/graphics/favicon.ico (100%)
rename koward/www/{Koward/app => htdocs/koward}/themes/graphics/query.png (100%)
rename koward/www/{Koward/app => htdocs/koward}/themes/kolab/screen.css (100%)
rename koward/www/{Koward/app => htdocs/koward}/themes/screen.css (100%)
rename koward/www/{Koward => koward}/config/.gitignore (100%)
rename koward/www/{Koward => koward}/config/attributes.php.dist (100%)
create mode 100644 koward/www/koward/config/base.php.dist
rename koward/www/{Koward/config/koward.php.dist => koward/config/conf.php.dist} (100%)
rename koward/www/{Koward => koward}/config/labels.php.dist (100%)
rename koward/www/{Koward => koward}/config/objects.php.dist (100%)
rename koward/www/{Koward => koward}/config/order.php.dist (100%)
rename koward/www/{Koward => koward}/config/routes.php.dist (100%)
rename koward/www/{Koward => koward}/config/search.php.dist (100%)
rename koward/www/{Koward => koward}/config/visible.php.dist (100%)
create mode 100644 koward/www/koward/doc/INSTALL
diff --git a/koward/www/Koward/config/conf.php.dist b/koward/www/horde/config/conf.php.dist
similarity index 100%
rename from koward/www/Koward/config/conf.php.dist
rename to koward/www/horde/config/conf.php.dist
diff --git a/koward/www/Koward/config/hooks.php.dist b/koward/www/horde/config/hooks.php.dist
similarity index 100%
rename from koward/www/Koward/config/hooks.php.dist
rename to koward/www/horde/config/hooks.php.dist
diff --git a/koward/www/Koward/config/nls.php.dist b/koward/www/horde/config/nls.php.dist
similarity index 100%
rename from koward/www/Koward/config/nls.php.dist
rename to koward/www/horde/config/nls.php.dist
diff --git a/koward/www/horde/config/prefs.php.dist b/koward/www/horde/config/prefs.php.dist
new file mode 100644
index 000000000..430237f6f
--- /dev/null
+++ b/koward/www/horde/config/prefs.php.dist
@@ -0,0 +1,589 @@
+ 'enum'.
+ *
+ * escaped: For an enum or a select, are the keys and values already
+ * html-escaped? Defaults to false if not present.
+ *
+ * hook: Call a hook function for the value of this preference
+ * true: Will call the function _prefs_hook_
+ * to fill in the value of this preference.
+ * See hooks.php for more details.
+ * false: Normal behaviour - no hook is called.
+ */
+
+$prefGroups['identities'] = array(
+ 'column' => _("Your Information"),
+ 'label' => _("Personal Information"),
+ 'desc' => _("Change the name and address that people see when they read and reply to your emails."),
+ 'members' => array('default_identity', 'identityselect', 'deleteidentity',
+ 'id', 'fullname', 'from_addr')
+);
+
+$prefGroups['authentication'] = array(
+ 'column' => _("Your Information"),
+ 'label' => _("Authentication Credentials"),
+ 'desc' => _("Set authentication credentials like user names and passwords for external servers."),
+ 'members' => array('credentialsui'),
+);
+
+$auth = &Auth::singleton($GLOBALS['conf']['auth']['driver']);
+if (is_a($auth, 'Auth') && $auth->hasCapability('update')) {
+ $prefGroups['forgotpass'] = array(
+ 'column' => _("Your Information"),
+ 'label' => _("Account Password"),
+ 'desc' => _("Set options to allow you to reset your password if you ever forget it."),
+ 'members' => array('security_question', 'security_answer', 'alternate_email')
+ );
+}
+
+$prefGroups['language'] = array(
+ 'column' => _("Your Information"),
+ 'label' => _("Locale and Time"),
+ 'desc' => _("Set your preferred language, timezone and date options."),
+ 'members' => array('language', 'timezone', 'twentyFour', 'date_format', 'first_week_day')
+);
+
+$prefGroups['categories'] = array(
+ 'column' => _("Your Information"),
+ 'label' => _("Categories and Labels"),
+ 'desc' => _("Manage the list of categories you have to label items with, and colors associated with those categories."),
+ 'members' => array('categorymanagement')
+);
+
+$prefGroups['display'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("Display Options"),
+ 'desc' => _("Set your startup application, color scheme, page refreshing, and other display options."),
+ 'members' => array('initial_application', 'show_last_login', 'theme',
+ 'summary_refresh_time', 'show_sidebar', 'sidebar_width',
+ 'moz_sidebar', 'menu_view', 'menu_refresh_time',
+ 'widget_accesskey')
+);
+
+$prefGroups['logintasks'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("Login Tasks"),
+ 'desc' => sprintf(_("Customize tasks to run upon logon to %s."), $GLOBALS['registry']->get('name')),
+ 'members' => array('do_maintenance', 'confirm_maintenance')
+);
+
+$prefGroups['remote'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("Remote Servers"),
+ 'desc' => _("Set up remote servers that you want to access from your portal."),
+ 'url' => 'services/portal/rpcsum.php'
+);
+
+if (!empty($GLOBALS['conf']['facebook']['key']) && !empty($GLOBAL['conf']['facebook']['secret'])) {
+ $prefGroups['facebook'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("Facebook Integration"),
+ 'desc' => _("Set up integration with your Facebook account."),
+ 'url' => 'services/facebook.php'
+ );
+}
+
+// For alternate IMSP authentication.
+if (!empty($GLOBALS['conf']['imsp']['enabled'])) {
+ $prefGroups['imspauth'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("Alternate IMSP Login"),
+ 'desc' => _("Use if name/password is different for IMSP server."),
+ 'members' => array('imsp_auth_user', 'imsp_auth_pass')
+ );
+}
+
+// Determine functionality of richtext editor
+$prefGroups['richtext'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("Rich Text Editor Options"),
+ 'desc' => _("Which plugins to enable for the Rich Text editor."),
+ 'members' => array('editor_plugins'),
+);
+
+$prefGroups['syncml'] = array(
+ 'column' => _("Other Information"),
+ 'label' => _("SyncML"),
+ 'desc' => _("Configuration for syncing with PDAs, Smartphones and Outlook."),
+ 'url' => 'services/portal/syncml.php',
+ 'members' => array()
+);
+
+// Personal Information preferences
+
+// default identity
+// Set locked to true if you don't want the users to have multiple identities.
+$_prefs['default_identity'] = array(
+ 'value' => 0,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'enum',
+ 'enum' => (isset($GLOBALS['identity']) && is_object($GLOBALS['identity'])) ? $GLOBALS['identity']->getAll('id') : array(),
+ 'desc' => _("Your default identity:"),
+);
+
+// identities array
+// Don't change anything here.
+$_prefs['identities'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit',
+);
+
+// identify email confirmation
+$_prefs['confirm_email'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit',
+);
+
+// identity selection widget
+$_prefs['identityselect'] = array(
+ 'shared' => true,
+ 'type' => 'special',
+);
+
+// delete button
+$_prefs['deleteidentity'] = array(
+ 'type' => 'special',
+ 'shared' => true,
+);
+
+// identity name
+// If you lock this preference, you must specify a value or a hook for it in
+// horde/config/hooks.php.
+$_prefs['id'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'text',
+ 'desc' => _("Identity's name:")
+);
+
+// user full name for From: line
+// If you lock this preference, you must specify a value or a hook for it in
+// horde/config/hooks.php.
+$_prefs['fullname'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'text',
+ 'desc' => _("Your full name:")
+);
+
+// user preferred email address for From: line
+// If you lock this preference, you must specify a value or a hook for it in
+// horde/config/hooks.php.
+$_prefs['from_addr'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'text',
+ 'desc' => _("Your From: address:")
+);
+
+// Authentication Options
+
+// credentials
+$_prefs['credentials'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit'
+);
+
+// credentials interface
+$_prefs['credentialsui'] = array(
+ 'shared' => true,
+ 'type' => 'special',
+);
+
+// user security question
+$_prefs['security_question'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'text',
+ 'desc' => _("Enter a security question which you will be asked if you need to reset your password, e.g. 'what is the name of your pet?':")
+);
+
+// user security answer
+$_prefs['security_answer'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'text',
+ 'desc' => _("Insert the required answer to the security question:")
+);
+
+// user alternate email
+$_prefs['alternate_email'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'text',
+ 'desc' => _("Insert an email address to which you can receive the new password:")
+);
+
+// user language
+$_prefs['language'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'select',
+ 'escaped' => true,
+ 'desc' => _("Select your preferred language:")
+);
+
+// user time zone
+$_prefs['timezone'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'select',
+ 'desc' => _("Your current time zone:")
+);
+
+// time format
+$_prefs['twentyFour'] = array(
+ 'value' => false,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'checkbox',
+ 'desc' => _("Display 24-hour times?")
+);
+
+// date format
+$_prefs['date_format'] = array(
+ 'value' => '%x',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'enum',
+ 'enum' => array(
+ '%x' => strftime('%x'),
+ '%Y-%m-%d' => strftime('%Y-%m-%d'),
+ '%d/%m/%Y' => strftime('%d/%m/%Y'),
+ '%A %B %d, %Y' => strftime('%A %B %d, %Y'),
+ '%A, %d. %B %Y' => strftime('%A, %d. %B %Y'),
+ '%A, %d %B %Y' => strftime('%A, %d %B %Y'),
+ '%a, %b %e, %Y' => strftime('%a, %b %e, %Y'),
+ '%a, %b %e, %y' => strftime('%a, %b %e, %y'),
+ '%a, %b %e' => strftime('%a, %b %e'),
+ '%a, %e %b %Y' => strftime('%a, %e %b %Y'),
+ '%a, %e %b %y' => strftime('%a, %e %b %y'),
+ '%a %d %b %Y' => strftime ('%a %d %b %Y'),
+ '%a %x' => strftime ('%a %x'),
+ '%a %Y-%m-%d' => strftime ('%a %Y-%m-%d'),
+ '%e %b %Y' => strftime('%e %b %Y'),
+ '%e. %b %Y' => strftime('%e. %b %Y'),
+ '%e. %m %Y' => strftime('%e %m %Y'),
+ '%e. %m.' => strftime('%e. %m.'),
+ '%e. %B' => strftime('%e. %B'),
+ '%e. %B %Y' => strftime('%e. %B %Y'),
+ '%e. %B %y' => strftime('%e. %B %y'),
+ '%B %e, %Y' => strftime('%B %e, %Y'),
+ ),
+ 'desc' => _("Choose how to display dates:"),
+);
+
+// what day should be displayed as the first day of the week?
+$_prefs['first_week_day'] = array(
+ 'value' => '0',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'enum',
+ 'desc' => _("Which day would you like to be displayed as the first day of the week?"),
+ 'enum' => array('0' => _("Sunday"),
+ '1' => _("Monday"))
+);
+
+// UI theme
+$_prefs['theme'] = array(
+ 'value' => 'bluewhite',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'select',
+ 'desc' => _("Select your color scheme.")
+);
+
+// categories
+$_prefs['categories'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit'
+);
+
+// category colors
+$_prefs['category_colors'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit'
+);
+
+// UI for category management.
+$_prefs['categorymanagement'] = array(
+ 'type' => 'special'
+);
+
+$_prefs['summary_refresh_time'] = array(
+ 'value' => 300,
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'enum',
+ 'enum' => array(0 => _("Never"),
+ 30 => _("Every 30 seconds"),
+ 60 => _("Every minute"),
+ 300 => _("Every 5 minutes"),
+ 900 => _("Every 15 minutes"),
+ 1800 => _("Every half hour")),
+ 'desc' => _("Refresh Portal View:")
+);
+
+$_prefs['show_sidebar'] = array(
+ 'value' => true,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'checkbox',
+ 'desc' => sprintf(_("Show the %s Menu on the left?"), $GLOBALS['registry']->get('name', 'horde'))
+);
+
+$_prefs['sidebar_width'] = array(
+ 'value' => 150,
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'number',
+ 'desc' => sprintf(_("Width of the %s menu on the left:"), $GLOBALS['registry']->get('name', 'horde'))
+);
+
+$_prefs['moz_sidebar'] = array(
+ 'type' => 'link',
+ 'xurl' => sprintf('javascript:if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(\'%s\', \'%s\', \'%s\'); else alert(\'%s\');',
+ $GLOBALS['registry']->get('name', 'horde'),
+ Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/portal/sidebar.php', true, -1), 'mozbar', '1'),
+ Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/prefs.php', true, -1),
+ addslashes(_("Couldn't find the Mozilla Sidebar. Make sure the sidebar is open."))),
+ 'desc' => sprintf(_("Add the %s Menu as a Mozilla Sidebar"), $GLOBALS['registry']->get('name', 'horde'))
+);
+
+$_prefs['menu_view'] = array(
+ 'value' => 'both',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'enum',
+ 'enum' => array('text' => _("Text Only"),
+ 'icon' => _("Icons Only"),
+ 'both' => _("Icons with text")),
+ 'desc' => _("Menu mode:")
+);
+
+$_prefs['menu_refresh_time'] = array(
+ 'value' => 300,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'enum',
+ 'enum' => array(0 => _("Never"),
+ 30 => _("Every 30 seconds"),
+ 60 => _("Every minute"),
+ 120 => _("Every 2 minutes"),
+ 300 => _("Every 5 minutes")),
+ 'desc' => _("Refresh Dynamic Menu Elements:")
+);
+
+
+// Login/Maintenance Tasks preferences
+
+// To disable maintenance entirely, set 'value' = false and
+// 'locked' = true for all of these. To just turn it off by default,
+// set 'value' false for do_maintenance.
+// perform maintenance operations?
+$_prefs['do_maintenance'] = array(
+ 'value' => true,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'checkbox',
+ 'desc' => _("Perform maintenance operations on login?"),
+ 'help' => 'prefs-do_maintenance');
+
+// last time maintenance was run.
+// value is a UNIX timestamp of the last time maintenance ran for the user.
+$_prefs['last_maintenance'] = array(
+ 'value' => 0,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit'
+);
+
+// confirm when doing maintenance operations? If false, they will
+// be performed with no input from/check with the user.
+$_prefs['confirm_maintenance'] = array(
+ 'value' => true,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'checkbox',
+ 'desc' => _("Ask for confirmation before doing maintenance operations?"),
+ 'help' => 'prefs-confirm_maintenance');
+
+// End Login/Maintenance preferences
+
+
+// what application should we go to after login?
+$_prefs['initial_application'] = array(
+ 'value' => 'horde',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'select',
+ 'desc' => sprintf(_("What application should %s display after login?"), $GLOBALS['registry']->get('name'))
+);
+
+// should we create access keys?
+$_prefs['widget_accesskey'] = array(
+ 'value' => true,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'checkbox',
+ 'desc' => _("Should access keys be defined for most links?")
+);
+
+// the layout of the portal page.
+$_prefs['portal_layout'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'implicit'
+);
+
+// the remote servers.
+$_prefs['remote_summaries'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'implicit'
+);
+
+$_prefs['facebook'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit');
+
+// last login time of user
+// value is a serialized array of the UNIX timestamp of the last
+// login, and the host that the last login was from.
+$_prefs['last_login'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'implicit'
+);
+
+// show the last login time of user
+$_prefs['show_last_login'] = array(
+ 'value' => true,
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'checkbox',
+ 'desc' => _("Show last login time when logging in?")
+);
+
+if (!empty($GLOBALS['conf']['imsp']['enabled'])) {
+ $_prefs['imsp_auth_user'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'text',
+ 'desc' => _("Alternate IMSP Username")
+ );
+
+ $_prefs['imsp_auth_pass'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'password',
+ 'desc' => _("Alternate IMSP Password")
+ );
+}
+
+// Rich Text Editor preferences.
+$_prefs['editor_plugins'] = array(
+ 'value' => 'a:2:{i:0;s:8:"ListType";i:1;s:12:"CharacterMap";}',
+ 'locked' => false,
+ 'shared' => true,
+ 'type' => 'multienum',
+ 'enum' => array(
+ 'ContextMenu' => _("Right click context menu"),
+ 'TableOperations' => _("Table operations menu bar"),
+ 'ListType' => _("Allow setting of ordered list type"),
+ 'CharacterMap' => _("Special characters"),
+ 'AnselImage' => _("Insertion of images from Photo Galleries in text")),
+ 'desc' => _("Select editor plugins")
+);
+// End Rich Text Editor preferences.
diff --git a/koward/www/horde/config/registry.d/README b/koward/www/horde/config/registry.d/README
new file mode 100644
index 000000000..7a5c5cde2
--- /dev/null
+++ b/koward/www/horde/config/registry.d/README
@@ -0,0 +1,9 @@
+This directory can hold registry configuration snippets. Any PHP file (*.php)
+is read; all other files are ignored and so are for information only. Snippets
+can contain anything that would go in registry.php - one or more applications,
+tree blocks, conditionals, etc.
+
+Scripts that install or update files in this directory should always touch()
+the registry.d directory after completion to ensure that its modification time
+has changed; that way Horde will know to drop any cached configuration
+information.
diff --git a/koward/www/Koward/config/registry.php.dist b/koward/www/horde/config/registry.php.dist
similarity index 88%
rename from koward/www/Koward/config/registry.php.dist
rename to koward/www/horde/config/registry.php.dist
index cfa8304bb..a10117ee8 100644
--- a/koward/www/Koward/config/registry.php.dist
+++ b/koward/www/horde/config/registry.php.dist
@@ -45,22 +45,22 @@
$this->applications['horde'] = array(
'fileroot' => dirname(__FILE__) . '/..',
- 'webroot' => '/',
+ 'webroot' => '/horde',
'initial_page' => 'login.php',
'name' => _("Horde"),
'status' => 'active',
'templates' => dirname(__FILE__) . '/../templates',
'provides' => 'horde',
- 'themesuri' => '/app/themes',
- 'themesfs' => dirname(__FILE__) . '/../app/themes',
+ 'themesuri' => '/horde/themes',
+ 'themesfs' => dirname(__FILE__) . '/../../htdocs/horde/themes',
);
$this->applications['koward'] = array(
- 'fileroot' => dirname(__FILE__) . '/..',
- 'webroot' => $this->applications['horde']['webroot'] . '/app',
+ 'fileroot' => dirname(__FILE__) . '/../../koward',
+ 'webroot' => '/koward',
'name' => _("Koward"),
'status' => 'active',
- 'initial_page' => 'index.php',
- 'themesuri' => '/app/themes',
- 'themesfs' => dirname(__FILE__) . '/../app/themes',
+ 'initial_page' => 'index',
+ 'themesuri' => '/koward/themes',
+ 'themesfs' => dirname(__FILE__) . '/../../htdocs/koward/themes',
);
diff --git a/koward/www/htdocs/horde/js/accesskeys.js b/koward/www/htdocs/horde/js/accesskeys.js
new file mode 100644
index 000000000..cf565f4dc
--- /dev/null
+++ b/koward/www/htdocs/horde/js/accesskeys.js
@@ -0,0 +1,46 @@
+/**
+ * Accesskeys javascript file.
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ */
+var AccessKeys = {
+
+ macos: navigator.appVersion.indexOf("Mac") !=- 1,
+
+ keydownHandler: function(e)
+ {
+ var elt, elts, evt, key;
+
+ if ((this.macos && e.ctrlKey) ||
+ (!this.macos && e.altKey && !e.ctrlKey)) {
+ // Need to search for both upper and lowercase value
+ key = String.fromCharCode(e.keyCode || e.charCode);
+ elts = $$('[accesskey="' + key.toUpperCase() + '"]').concat($$('[accesskey="' + key.toLowerCase() + '"]'));
+
+ if (elt = elts.first()) {
+ // Remove duplicate accesskeys
+ if (elts.size() > 1) {
+ elts.slice(1).invoke('writeAttribute', 'accesskey', null);
+ }
+
+ e.stop();
+
+ // Trigger a mouse event on the accesskey element.
+ if (elt.tagName == 'INPUT') {
+ // NOOP
+ } else if (elt.match('A') && elt.onclick) {
+ elt.onclick();
+ } else if (document.createEvent) {
+ evt = document.createEvent('MouseEvents');
+ evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elt.dispatchEvent(evt);
+ } else {
+ elt.fireEvent('onclick');
+ }
+ }
+ }
+ }
+};
+
+document.observe('keydown', AccessKeys.keydownHandler.bindAsEventListener(AccessKeys));
diff --git a/koward/www/htdocs/horde/js/effects.js b/koward/www/htdocs/horde/js/effects.js
new file mode 100644
index 000000000..5a639d2de
--- /dev/null
+++ b/koward/www/htdocs/horde/js/effects.js
@@ -0,0 +1,1128 @@
+// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+// Justin Palmer (http://encytemedia.com/)
+// Mark Pilgrim (http://diveintomark.org/)
+// Martin Bialasinki
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// converts rgb() and #xxx to #xxxxxx format,
+// returns self (or first argument) if not convertable
+String.prototype.parseColor = function() {
+ var color = '#';
+ if (this.slice(0,4) == 'rgb(') {
+ var cols = this.slice(4,this.length-1).split(',');
+ var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
+ } else {
+ if (this.slice(0,1) == '#') {
+ if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
+ if (this.length==7) color = this.toLowerCase();
+ }
+ }
+ return (color.length==7 ? color : (arguments[0] || this));
+};
+
+/*--------------------------------------------------------------------------*/
+
+Element.collectTextNodes = function(element) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+ }).flatten().join('');
+};
+
+Element.collectTextNodesIgnoreClass = function(element, className) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
+ Element.collectTextNodesIgnoreClass(node, className) : ''));
+ }).flatten().join('');
+};
+
+Element.setContentZoom = function(element, percent) {
+ element = $(element);
+ element.setStyle({fontSize: (percent/100) + 'em'});
+ if (Prototype.Browser.WebKit) window.scrollBy(0,0);
+ return element;
+};
+
+Element.getInlineOpacity = function(element){
+ return $(element).style.opacity || '';
+};
+
+Element.forceRerendering = function(element) {
+ try {
+ element = $(element);
+ var n = document.createTextNode(' ');
+ element.appendChild(n);
+ element.removeChild(n);
+ } catch(e) { }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+ _elementDoesNotExistError: {
+ name: 'ElementDoesNotExistError',
+ message: 'The specified DOM element does not exist, but is required for this effect to operate'
+ },
+ Transitions: {
+ linear: Prototype.K,
+ sinoidal: function(pos) {
+ return (-Math.cos(pos*Math.PI)/2) + .5;
+ },
+ reverse: function(pos) {
+ return 1-pos;
+ },
+ flicker: function(pos) {
+ var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4;
+ return pos > 1 ? 1 : pos;
+ },
+ wobble: function(pos) {
+ return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5;
+ },
+ pulse: function(pos, pulses) {
+ return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5;
+ },
+ spring: function(pos) {
+ return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
+ },
+ none: function(pos) {
+ return 0;
+ },
+ full: function(pos) {
+ return 1;
+ }
+ },
+ DefaultOptions: {
+ duration: 1.0, // seconds
+ fps: 100, // 100= assume 66fps max.
+ sync: false, // true for combining
+ from: 0.0,
+ to: 1.0,
+ delay: 0.0,
+ queue: 'parallel'
+ },
+ tagifyText: function(element) {
+ var tagifyStyle = 'position:relative';
+ if (Prototype.Browser.IE) tagifyStyle += ';zoom:1';
+
+ element = $(element);
+ $A(element.childNodes).each( function(child) {
+ if (child.nodeType==3) {
+ child.nodeValue.toArray().each( function(character) {
+ element.insertBefore(
+ new Element('span', {style: tagifyStyle}).update(
+ character == ' ' ? String.fromCharCode(160) : character),
+ child);
+ });
+ Element.remove(child);
+ }
+ });
+ },
+ multiple: function(element, effect) {
+ var elements;
+ if (((typeof element == 'object') ||
+ Object.isFunction(element)) &&
+ (element.length))
+ elements = element;
+ else
+ elements = $(element).childNodes;
+
+ var options = Object.extend({
+ speed: 0.1,
+ delay: 0.0
+ }, arguments[2] || { });
+ var masterDelay = options.delay;
+
+ $A(elements).each( function(element, index) {
+ new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+ });
+ },
+ PAIRS: {
+ 'slide': ['SlideDown','SlideUp'],
+ 'blind': ['BlindDown','BlindUp'],
+ 'appear': ['Appear','Fade']
+ },
+ toggle: function(element, effect) {
+ element = $(element);
+ effect = (effect || 'appear').toLowerCase();
+ var options = Object.extend({
+ queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
+ }, arguments[2] || { });
+ Effect[element.visible() ?
+ Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+ }
+};
+
+Effect.DefaultOptions.transition = Effect.Transitions.sinoidal;
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create(Enumerable, {
+ initialize: function() {
+ this.effects = [];
+ this.interval = null;
+ },
+ _each: function(iterator) {
+ this.effects._each(iterator);
+ },
+ add: function(effect) {
+ var timestamp = new Date().getTime();
+
+ var position = Object.isString(effect.options.queue) ?
+ effect.options.queue : effect.options.queue.position;
+
+ switch(position) {
+ case 'front':
+ // move unstarted effects after this effect
+ this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+ e.startOn += effect.finishOn;
+ e.finishOn += effect.finishOn;
+ });
+ break;
+ case 'with-last':
+ timestamp = this.effects.pluck('startOn').max() || timestamp;
+ break;
+ case 'end':
+ // start effect after last queued effect has finished
+ timestamp = this.effects.pluck('finishOn').max() || timestamp;
+ break;
+ }
+
+ effect.startOn += timestamp;
+ effect.finishOn += timestamp;
+
+ if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
+ this.effects.push(effect);
+
+ if (!this.interval)
+ this.interval = setInterval(this.loop.bind(this), 15);
+ },
+ remove: function(effect) {
+ this.effects = this.effects.reject(function(e) { return e==effect });
+ if (this.effects.length == 0) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ loop: function() {
+ var timePos = new Date().getTime();
+ for(var i=0, len=this.effects.length;i= this.startOn) {
+ if (timePos >= this.finishOn) {
+ this.render(1.0);
+ this.cancel();
+ this.event('beforeFinish');
+ if (this.finish) this.finish();
+ this.event('afterFinish');
+ return;
+ }
+ var pos = (timePos - this.startOn) / this.totalTime,
+ frame = (pos * this.totalFrames).round();
+ if (frame > this.currentFrame) {
+ this.render(pos);
+ this.currentFrame = frame;
+ }
+ }
+ },
+ cancel: function() {
+ if (!this.options.sync)
+ Effect.Queues.get(Object.isString(this.options.queue) ?
+ 'global' : this.options.queue.scope).remove(this);
+ this.state = 'finished';
+ },
+ event: function(eventName) {
+ if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+ if (this.options[eventName]) this.options[eventName](this);
+ },
+ inspect: function() {
+ var data = $H();
+ for(property in this)
+ if (!Object.isFunction(this[property])) data.set(property, this[property]);
+ return '#';
+ }
+});
+
+Effect.Parallel = Class.create(Effect.Base, {
+ initialize: function(effects) {
+ this.effects = effects || [];
+ this.start(arguments[1]);
+ },
+ update: function(position) {
+ this.effects.invoke('render', position);
+ },
+ finish: function(position) {
+ this.effects.each( function(effect) {
+ effect.render(1.0);
+ effect.cancel();
+ effect.event('beforeFinish');
+ if (effect.finish) effect.finish(position);
+ effect.event('afterFinish');
+ });
+ }
+});
+
+Effect.Tween = Class.create(Effect.Base, {
+ initialize: function(object, from, to) {
+ object = Object.isString(object) ? $(object) : object;
+ var args = $A(arguments), method = args.last(),
+ options = args.length == 5 ? args[3] : null;
+ this.method = Object.isFunction(method) ? method.bind(object) :
+ Object.isFunction(object[method]) ? object[method].bind(object) :
+ function(value) { object[method] = value };
+ this.start(Object.extend({ from: from, to: to }, options || { }));
+ },
+ update: function(position) {
+ this.method(position);
+ }
+});
+
+Effect.Event = Class.create(Effect.Base, {
+ initialize: function() {
+ this.start(Object.extend({ duration: 0 }, arguments[0] || { }));
+ },
+ update: Prototype.emptyFunction
+});
+
+Effect.Opacity = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ // make this work on IE on elements without 'layout'
+ if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ var options = Object.extend({
+ from: this.element.getOpacity() || 0.0,
+ to: 1.0
+ }, arguments[1] || { });
+ this.start(options);
+ },
+ update: function(position) {
+ this.element.setOpacity(position);
+ }
+});
+
+Effect.Move = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ x: 0,
+ y: 0,
+ mode: 'relative'
+ }, arguments[1] || { });
+ this.start(options);
+ },
+ setup: function() {
+ this.element.makePositioned();
+ this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
+ this.originalTop = parseFloat(this.element.getStyle('top') || '0');
+ if (this.options.mode == 'absolute') {
+ this.options.x = this.options.x - this.originalLeft;
+ this.options.y = this.options.y - this.originalTop;
+ }
+ },
+ update: function(position) {
+ this.element.setStyle({
+ left: (this.options.x * position + this.originalLeft).round() + 'px',
+ top: (this.options.y * position + this.originalTop).round() + 'px'
+ });
+ }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+ return new Effect.Move(element,
+ Object.extend({ x: toLeft, y: toTop }, arguments[3] || { }));
+};
+
+Effect.Scale = Class.create(Effect.Base, {
+ initialize: function(element, percent) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ scaleX: true,
+ scaleY: true,
+ scaleContent: true,
+ scaleFromCenter: false,
+ scaleMode: 'box', // 'box' or 'contents' or { } with provided values
+ scaleFrom: 100.0,
+ scaleTo: percent
+ }, arguments[2] || { });
+ this.start(options);
+ },
+ setup: function() {
+ this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+ this.elementPositioning = this.element.getStyle('position');
+
+ this.originalStyle = { };
+ ['top','left','width','height','fontSize'].each( function(k) {
+ this.originalStyle[k] = this.element.style[k];
+ }.bind(this));
+
+ this.originalTop = this.element.offsetTop;
+ this.originalLeft = this.element.offsetLeft;
+
+ var fontSize = this.element.getStyle('font-size') || '100%';
+ ['em','px','%','pt'].each( function(fontSizeType) {
+ if (fontSize.indexOf(fontSizeType)>0) {
+ this.fontSize = parseFloat(fontSize);
+ this.fontSizeType = fontSizeType;
+ }
+ }.bind(this));
+
+ this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+
+ this.dims = null;
+ if (this.options.scaleMode=='box')
+ this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+ if (/^content/.test(this.options.scaleMode))
+ this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+ if (!this.dims)
+ this.dims = [this.options.scaleMode.originalHeight,
+ this.options.scaleMode.originalWidth];
+ },
+ update: function(position) {
+ var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+ if (this.options.scaleContent && this.fontSize)
+ this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
+ this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+ },
+ finish: function(position) {
+ if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
+ },
+ setDimensions: function(height, width) {
+ var d = { };
+ if (this.options.scaleX) d.width = width.round() + 'px';
+ if (this.options.scaleY) d.height = height.round() + 'px';
+ if (this.options.scaleFromCenter) {
+ var topd = (height - this.dims[0])/2;
+ var leftd = (width - this.dims[1])/2;
+ if (this.elementPositioning == 'absolute') {
+ if (this.options.scaleY) d.top = this.originalTop-topd + 'px';
+ if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+ } else {
+ if (this.options.scaleY) d.top = -topd + 'px';
+ if (this.options.scaleX) d.left = -leftd + 'px';
+ }
+ }
+ this.element.setStyle(d);
+ }
+});
+
+Effect.Highlight = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { });
+ this.start(options);
+ },
+ setup: function() {
+ // Prevent executing on elements not in the layout flow
+ if (this.element.getStyle('display')=='none') { this.cancel(); return; }
+ // Disable background image during the effect
+ this.oldStyle = { };
+ if (!this.options.keepBackgroundImage) {
+ this.oldStyle.backgroundImage = this.element.getStyle('background-image');
+ this.element.setStyle({backgroundImage: 'none'});
+ }
+ if (!this.options.endcolor)
+ this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
+ if (!this.options.restorecolor)
+ this.options.restorecolor = this.element.getStyle('background-color');
+ // init color calculations
+ this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+ this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+ },
+ update: function(position) {
+ this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
+ return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) });
+ },
+ finish: function() {
+ this.element.setStyle(Object.extend(this.oldStyle, {
+ backgroundColor: this.options.restorecolor
+ }));
+ }
+});
+
+Effect.ScrollTo = function(element) {
+ var options = arguments[1] || { },
+ scrollOffsets = document.viewport.getScrollOffsets(),
+ elementOffsets = $(element).cumulativeOffset();
+
+ if (options.offset) elementOffsets[1] += options.offset;
+
+ return new Effect.Tween(null,
+ scrollOffsets.top,
+ elementOffsets[1],
+ options,
+ function(p){ scrollTo(scrollOffsets.left, p.round()); }
+ );
+};
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ var options = Object.extend({
+ from: element.getOpacity() || 1.0,
+ to: 0.0,
+ afterFinishInternal: function(effect) {
+ if (effect.options.to!=0) return;
+ effect.element.hide().setStyle({opacity: oldOpacity});
+ }
+ }, arguments[1] || { });
+ return new Effect.Opacity(element,options);
+};
+
+Effect.Appear = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
+ to: 1.0,
+ // force Safari to render floated elements properly
+ afterFinishInternal: function(effect) {
+ effect.element.forceRerendering();
+ },
+ beforeSetup: function(effect) {
+ effect.element.setOpacity(effect.options.from).show();
+ }}, arguments[1] || { });
+ return new Effect.Opacity(element,options);
+};
+
+Effect.Puff = function(element) {
+ element = $(element);
+ var oldStyle = {
+ opacity: element.getInlineOpacity(),
+ position: element.getStyle('position'),
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height
+ };
+ return new Effect.Parallel(
+ [ new Effect.Scale(element, 200,
+ { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
+ Object.extend({ duration: 1.0,
+ beforeSetupInternal: function(effect) {
+ Position.absolutize(effect.effects[0].element);
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().setStyle(oldStyle); }
+ }, arguments[1] || { })
+ );
+};
+
+Effect.BlindUp = function(element) {
+ element = $(element);
+ element.makeClipping();
+ return new Effect.Scale(element, 0,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ restoreAfterFinish: true,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ }, arguments[1] || { })
+ );
+};
+
+Effect.BlindDown = function(element) {
+ element = $(element);
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: 0,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping();
+ }
+ }, arguments[1] || { }));
+};
+
+Effect.SwitchOff = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ return new Effect.Appear(element, Object.extend({
+ duration: 0.4,
+ from: 0,
+ transition: Effect.Transitions.flicker,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(effect.element, 1, {
+ duration: 0.3, scaleFromCenter: true,
+ scaleX: false, scaleContent: false, restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
+ }
+ });
+ }
+ }, arguments[1] || { }));
+};
+
+Effect.DropOut = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left'),
+ opacity: element.getInlineOpacity() };
+ return new Effect.Parallel(
+ [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+ Object.extend(
+ { duration: 0.5,
+ beforeSetup: function(effect) {
+ effect.effects[0].element.makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
+ }
+ }, arguments[1] || { }));
+};
+
+Effect.Shake = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ distance: 20,
+ duration: 0.5
+ }, arguments[1] || {});
+ var distance = parseFloat(options.distance);
+ var split = parseFloat(options.duration) / 10.0;
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left') };
+ return new Effect.Move(element,
+ { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) {
+ effect.element.undoPositioned().setStyle(oldStyle);
+ }}); }}); }}); }}); }}); }});
+};
+
+Effect.SlideDown = function(element) {
+ element = $(element).cleanWhitespace();
+ // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+ var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: window.opera ? 0 : 1,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if (window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
+ }, arguments[1] || { })
+ );
+};
+
+Effect.SlideUp = function(element) {
+ element = $(element).cleanWhitespace();
+ var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, window.opera ? 0 : 1,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ scaleMode: 'box',
+ scaleFrom: 100,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if (window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
+ }
+ }, arguments[1] || { })
+ );
+};
+
+// Bug in opera makes the TD containing this element expand for a instance after finish
+Effect.Squish = function(element) {
+ return new Effect.Scale(element, window.opera ? 1 : 0, {
+ restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ });
+};
+
+Effect.Grow = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.full
+ }, arguments[1] || { });
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var initialMoveX, initialMoveY;
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ initialMoveX = initialMoveY = moveX = moveY = 0;
+ break;
+ case 'top-right':
+ initialMoveX = dims.width;
+ initialMoveY = moveY = 0;
+ moveX = -dims.width;
+ break;
+ case 'bottom-left':
+ initialMoveX = moveX = 0;
+ initialMoveY = dims.height;
+ moveY = -dims.height;
+ break;
+ case 'bottom-right':
+ initialMoveX = dims.width;
+ initialMoveY = dims.height;
+ moveX = -dims.width;
+ moveY = -dims.height;
+ break;
+ case 'center':
+ initialMoveX = dims.width / 2;
+ initialMoveY = dims.height / 2;
+ moveX = -dims.width / 2;
+ moveY = -dims.height / 2;
+ break;
+ }
+
+ return new Effect.Move(element, {
+ x: initialMoveX,
+ y: initialMoveY,
+ duration: 0.01,
+ beforeSetup: function(effect) {
+ effect.element.hide().makeClipping().makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ new Effect.Parallel(
+ [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+ new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+ new Effect.Scale(effect.element, 100, {
+ scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
+ sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+ ], Object.extend({
+ beforeSetup: function(effect) {
+ effect.effects[0].element.setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
+ }
+ }, options)
+ );
+ }
+ });
+};
+
+Effect.Shrink = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.none
+ }, arguments[1] || { });
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ moveX = moveY = 0;
+ break;
+ case 'top-right':
+ moveX = dims.width;
+ moveY = 0;
+ break;
+ case 'bottom-left':
+ moveX = 0;
+ moveY = dims.height;
+ break;
+ case 'bottom-right':
+ moveX = dims.width;
+ moveY = dims.height;
+ break;
+ case 'center':
+ moveX = dims.width / 2;
+ moveY = dims.height / 2;
+ break;
+ }
+
+ return new Effect.Parallel(
+ [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+ new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+ new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+ ], Object.extend({
+ beforeStartInternal: function(effect) {
+ effect.effects[0].element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
+ }, options)
+ );
+};
+
+Effect.Pulsate = function(element) {
+ element = $(element);
+ var options = arguments[1] || { },
+ oldOpacity = element.getInlineOpacity(),
+ transition = options.transition || Effect.Transitions.linear,
+ reverser = function(pos){
+ return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5);
+ };
+
+ return new Effect.Opacity(element,
+ Object.extend(Object.extend({ duration: 2.0, from: 0,
+ afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
+ }, options), {transition: reverser}));
+};
+
+Effect.Fold = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height };
+ element.makeClipping();
+ return new Effect.Scale(element, 5, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(element, 1, {
+ scaleContent: false,
+ scaleY: false,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().setStyle(oldStyle);
+ } });
+ }}, arguments[1] || { }));
+};
+
+Effect.Morph = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ style: { }
+ }, arguments[1] || { });
+
+ if (!Object.isString(options.style)) this.style = $H(options.style);
+ else {
+ if (options.style.include(':'))
+ this.style = options.style.parseStyle();
+ else {
+ this.element.addClassName(options.style);
+ this.style = $H(this.element.getStyles());
+ this.element.removeClassName(options.style);
+ var css = this.element.getStyles();
+ this.style = this.style.reject(function(style) {
+ return style.value == css[style.key];
+ });
+ options.afterFinishInternal = function(effect) {
+ effect.element.addClassName(effect.options.style);
+ effect.transforms.each(function(transform) {
+ effect.element.style[transform.style] = '';
+ });
+ };
+ }
+ }
+ this.start(options);
+ },
+
+ setup: function(){
+ function parseColor(color){
+ if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
+ color = color.parseColor();
+ return $R(0,2).map(function(i){
+ return parseInt( color.slice(i*2+1,i*2+3), 16 );
+ });
+ }
+ this.transforms = this.style.map(function(pair){
+ var property = pair[0], value = pair[1], unit = null;
+
+ if (value.parseColor('#zzzzzz') != '#zzzzzz') {
+ value = value.parseColor();
+ unit = 'color';
+ } else if (property == 'opacity') {
+ value = parseFloat(value);
+ if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ } else if (Element.CSS_LENGTH.test(value)) {
+ var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
+ value = parseFloat(components[1]);
+ unit = (components.length == 3) ? components[2] : null;
+ }
+
+ var originalValue = this.element.getStyle(property);
+ return {
+ style: property.camelize(),
+ originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
+ targetValue: unit=='color' ? parseColor(value) : value,
+ unit: unit
+ };
+ }.bind(this)).reject(function(transform){
+ return (
+ (transform.originalValue == transform.targetValue) ||
+ (
+ transform.unit != 'color' &&
+ (isNaN(transform.originalValue) || isNaN(transform.targetValue))
+ )
+ );
+ });
+ },
+ update: function(position) {
+ var style = { }, transform, i = this.transforms.length;
+ while(i--)
+ style[(transform = this.transforms[i]).style] =
+ transform.unit=='color' ? '#'+
+ (Math.round(transform.originalValue[0]+
+ (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
+ (Math.round(transform.originalValue[1]+
+ (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
+ (Math.round(transform.originalValue[2]+
+ (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
+ (transform.originalValue +
+ (transform.targetValue - transform.originalValue) * position).toFixed(3) +
+ (transform.unit === null ? '' : transform.unit);
+ this.element.setStyle(style, true);
+ }
+});
+
+Effect.Transform = Class.create({
+ initialize: function(tracks){
+ this.tracks = [];
+ this.options = arguments[1] || { };
+ this.addTracks(tracks);
+ },
+ addTracks: function(tracks){
+ tracks.each(function(track){
+ track = $H(track);
+ var data = track.values().first();
+ this.tracks.push($H({
+ ids: track.keys().first(),
+ effect: Effect.Morph,
+ options: { style: data }
+ }));
+ }.bind(this));
+ return this;
+ },
+ play: function(){
+ return new Effect.Parallel(
+ this.tracks.map(function(track){
+ var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options');
+ var elements = [$(ids) || $$(ids)].flatten();
+ return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) });
+ }).flatten(),
+ this.options
+ );
+ }
+});
+
+Element.CSS_PROPERTIES = $w(
+ 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
+ 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
+ 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
+ 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
+ 'fontSize fontWeight height left letterSpacing lineHeight ' +
+ 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
+ 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
+ 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
+ 'right textIndent top width wordSpacing zIndex');
+
+Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
+
+String.__parseStyleElement = document.createElement('div');
+String.prototype.parseStyle = function(){
+ var style, styleRules = $H();
+ if (Prototype.Browser.WebKit)
+ style = new Element('div',{style:this}).style;
+ else {
+ String.__parseStyleElement.innerHTML = '';
+ style = String.__parseStyleElement.childNodes[0].style;
+ }
+
+ Element.CSS_PROPERTIES.each(function(property){
+ if (style[property]) styleRules.set(property, style[property]);
+ });
+
+ if (Prototype.Browser.IE && this.include('opacity'))
+ styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);
+
+ return styleRules;
+};
+
+if (document.defaultView && document.defaultView.getComputedStyle) {
+ Element.getStyles = function(element) {
+ var css = document.defaultView.getComputedStyle($(element), null);
+ return Element.CSS_PROPERTIES.inject({ }, function(styles, property) {
+ styles[property] = css[property];
+ return styles;
+ });
+ };
+} else {
+ Element.getStyles = function(element) {
+ element = $(element);
+ var css = element.currentStyle, styles;
+ styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
+ results[property] = css[property];
+ return results;
+ });
+ if (!styles.opacity) styles.opacity = element.getOpacity();
+ return styles;
+ };
+}
+
+Effect.Methods = {
+ morph: function(element, style) {
+ element = $(element);
+ new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { }));
+ return element;
+ },
+ visualEffect: function(element, effect, options) {
+ element = $(element);
+ var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);
+ new Effect[klass](element, options);
+ return element;
+ },
+ highlight: function(element, options) {
+ element = $(element);
+ new Effect.Highlight(element, options);
+ return element;
+ }
+};
+
+$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+
+ 'pulsate shake puff squish switchOff dropOut').each(
+ function(effect) {
+ Effect.Methods[effect] = function(element, options){
+ element = $(element);
+ Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);
+ return element;
+ };
+ }
+);
+
+$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each(
+ function(f) { Effect.Methods[f] = Element[f]; }
+);
+
+Element.addMethods(Effect.Methods);
\ No newline at end of file
diff --git a/koward/www/htdocs/horde/js/horde.js b/koward/www/htdocs/horde/js/horde.js
new file mode 100644
index 000000000..e4378c80d
--- /dev/null
+++ b/koward/www/htdocs/horde/js/horde.js
@@ -0,0 +1,267 @@
+/**
+ * General Horde UI effects javascript.
+ *
+ * $Horde: horde/js/src/horde.js,v 1.10 2007/09/25 12:57:20 slusarz Exp $
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ */
+
+var ToolTips = {
+ current: null,
+ timeout: null,
+ element: null,
+
+ attachBehavior: function()
+ {
+ links = document.getElementsByTagName('a');
+ for (var i = 0; i < links.length; i++) {
+ if (links[i].title) {
+ links[i].setAttribute('nicetitle', links[i].title);
+ links[i].removeAttribute('title');
+
+ addEvent(links[i], 'mouseover', ToolTips.onMouseover);
+ addEvent(links[i], 'mouseout', ToolTips.out);
+ addEvent(links[i], 'focus', ToolTips.onFocus);
+ addEvent(links[i], 'blur', ToolTips.out);
+ }
+ }
+ },
+
+ onMouseover: function(event)
+ {
+ if (typeof ToolTips == 'undefined') {
+ return;
+ }
+
+ if (ToolTips.timeout) {
+ clearTimeout(ToolTips.timeout);
+ }
+
+ if (event.srcElement) {
+ ToolTips.element = event.srcElement;
+ } else if (event.target) {
+ ToolTips.element = event.target;
+ }
+
+ var pos = mousePos(event);
+ ToolTips.timeout = setTimeout(function() { ToolTips.show(pos); }, 300)
+ },
+
+ onFocus: function(event)
+ {
+ if (typeof ToolTips == 'undefined') {
+ return;
+ }
+
+ if (ToolTips.timeout) {
+ clearTimeout(ToolTips.timeout);
+ }
+
+ if (event.srcElement) {
+ ToolTips.element = event.srcElement;
+ } else if (event.target) {
+ ToolTips.element = event.target;
+ }
+
+ var pos = eltPos(ToolTips.element);
+ ToolTips.timeout = setTimeout(function() { ToolTips.show(pos); }, 300)
+ },
+
+ out: function()
+ {
+ if (typeof ToolTips == 'undefined') {
+ return;
+ }
+
+ if (ToolTips.timeout) {
+ clearTimeout(ToolTips.timeout);
+ }
+
+ if (ToolTips.current) {
+ document.getElementsByTagName('body')[0].removeChild(ToolTips.current);
+ ToolTips.current = null;
+
+ var iframe = document.getElementById('iframe_tt');
+ if (iframe != null) {
+ iframe.style.display = 'none';
+ }
+ }
+ },
+
+ show: function(pos)
+ {
+ try {
+ if (ToolTips.current) {
+ ToolTips.out();
+ }
+
+ var link = ToolTips.element;
+ while (!link.getAttribute('nicetitle') && link.nodeName.toLowerCase() != 'body') {
+ link = link.parentNode;
+ }
+ var nicetitle = link.getAttribute('nicetitle');
+ if (!nicetitle) {
+ return;
+ }
+
+ var d = document.createElement('div');
+ d.className = 'nicetitle';
+ d.innerHTML = nicetitle;
+
+ var STD_WIDTH = 100;
+ var MAX_WIDTH = 600;
+ if (window.innerWidth) {
+ MAX_WIDTH = Math.min(MAX_WIDTH, window.innerWidth - 20);
+ }
+ if (document.body && document.body.scrollWidth) {
+ MAX_WIDTH = Math.min(MAX_WIDTH, document.body.scrollWidth - 20);
+ }
+
+ var nicetitle_length = 0;
+ var lines = nicetitle.replace(/
/g, "\n").split("\n");
+ for (var i = 0; i < lines.length; ++i) {
+ nicetitle_length = Math.max(nicetitle_length, lines[i].length);
+ }
+
+ var h_pixels = nicetitle_length * 7;
+ var t_pixels = nicetitle_length * 10;
+
+ var w;
+ if (h_pixels > STD_WIDTH) {
+ w = h_pixels;
+ } else if (STD_WIDTH > t_pixels) {
+ w = t_pixels;
+ } else {
+ w = STD_WIDTH;
+ }
+
+ // Make sure all of the tooltip is visible
+ var left = pos[0] + 20,
+ innerWidth = window.innerWidth || document.documentElement.clientWidth || document.body.offsetWidth,
+ pageXOffset = window.pageXOffset || document.documentElement.scrollLeft;
+ if (innerWidth && ((left + w) > (innerWidth + pageXOffset))) {
+ left = innerWidth - w - 40 + pageXOffset;
+ }
+ if (document.body.scrollWidth && ((left + w) > (document.body.scrollWidth + pageXOffset))) {
+ left = document.body.scrollWidth - w - 25 + pageXOffset;
+ }
+
+ d.id = 'toolTip';
+ d.style.left = left + 'px';
+ d.style.width = Math.min(w, MAX_WIDTH) + 'px';
+ d.style.top = (pos[1] + 10) + 'px';
+ d.style.display = '';
+
+ document.getElementsByTagName('body')[0].appendChild(d);
+ ToolTips.current = d;
+
+ if (typeof ToolTips_Option_Windowed_Controls != 'undefined') {
+ var iframe = document.getElementById('iframe_tt');
+ if (iframe == null) {
+ iframe = document.createElement('');
+ document.getElementsByTagName('body')[0].appendChild(iframe);
+ }
+ iframe.style.width = d.offsetWidth;
+ iframe.style.height = d.offsetHeight;
+ iframe.style.top = d.style.top;
+ iframe.style.left = d.style.left;
+ iframe.style.position = 'absolute';
+ iframe.style.display = 'block';
+ d.style.zIndex = 100;
+ iframe.style.zIndex = 99;
+ }
+ } catch (e) {}
+ }
+
+};
+
+/**
+ * Return the [x,y] position of the mouse.
+ */
+function mousePos(event)
+{
+ return [event.pageX || (event.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)),
+ event.pageY || (event.clientY + (document.documentElement.scrollTop || document.body.scrollTop))];
+}
+/**
+ * Return the [x,y] position of an element.
+ */
+function eltPos(elt)
+{
+ if (elt.offsetParent) {
+ for (posX = 0, posY = 0; elt.offsetParent; elt = elt.offsetParent) {
+ posX += elt.offsetLeft;
+ posY += elt.offsetTop;
+ }
+ return [posX, posY];
+ } else {
+ return [elt.x, elt.y];
+ }
+}
+
+/**
+ * Add an event listener as long as the browser supports it. Different
+ * browsers still handle these events slightly differently; in
+ * particular avoid using "this" in event functions.
+ *
+ * @author Scott Andrew
+ * @author Chuck Hagenbuch
+ */
+function addEvent(obj, evType, fn)
+{
+ if (obj.addEventListener) {
+ obj.addEventListener(evType, fn, true);
+ return true;
+ } else if (obj.attachEvent) {
+ var r = obj.attachEvent('on' + evType, fn);
+ EventCache.add(obj, evType, fn);
+ return r;
+ } else {
+ return false;
+ }
+}
+
+var EventCache = function()
+{
+ var listEvents = [];
+
+ return {
+ listEvents: listEvents,
+
+ add: function(node, sEventName, fHandler, bCapture)
+ {
+ listEvents.push(arguments);
+ },
+
+ flush: function()
+ {
+ var i, item;
+ for (i = listEvents.length - 1; i >= 0; i = i - 1) {
+ item = listEvents[i];
+
+ if (item[0].removeEventListener) {
+ item[0].removeEventListener(item[1], item[2], item[3]);
+ };
+
+ /* From this point on we need the event names to be
+ * prefixed with 'on'. */
+ if (item[1].substring(0, 2) != 'on') {
+ item[1] = 'on' + item[1];
+ }
+
+ if (item[0].detachEvent) {
+ item[0].detachEvent(item[1], item[2]);
+ }
+
+ item[0][item[1]] = null;
+ }
+ }
+ };
+}();
+
+if (document.createElement && document.getElementsByTagName) {
+ addEvent(window, 'load', ToolTips.attachBehavior);
+ addEvent(window, 'unload', ToolTips.out);
+ addEvent(window, 'unload', EventCache.flush);
+}
diff --git a/koward/www/htdocs/horde/js/prototype.js b/koward/www/htdocs/horde/js/prototype.js
new file mode 100644
index 000000000..a7fd38391
--- /dev/null
+++ b/koward/www/htdocs/horde/js/prototype.js
@@ -0,0 +1,4320 @@
+/* Prototype JavaScript framework, version 1.6.0.3
+ * (c) 2005-2008 Sam Stephenson
+ *
+ * Prototype is freely distributable under the terms of an MIT-style license.
+ * For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+ Version: '1.6.0.3',
+
+ Browser: {
+ IE: !!(window.attachEvent &&
+ navigator.userAgent.indexOf('Opera') === -1),
+ Opera: navigator.userAgent.indexOf('Opera') > -1,
+ WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
+ Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
+ navigator.userAgent.indexOf('KHTML') === -1,
+ MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
+ },
+
+ BrowserFeatures: {
+ XPath: !!document.evaluate,
+ SelectorsAPI: !!document.querySelector,
+ ElementExtensions: !!window.HTMLElement,
+ SpecificElementExtensions:
+ document.createElement('div')['__proto__'] &&
+ document.createElement('div')['__proto__'] !==
+ document.createElement('form')['__proto__']
+ },
+
+ ScriptFragment: '