From ac8d18f14a726f48836e343823371179e6595736 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 16 Jun 2010 13:16:44 +0200 Subject: [PATCH] Don't pass image directories. --- kronolith/js/kronolith.js | 8 ++++---- kronolith/lib/Kronolith.php | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 21784dfe4..e71a9a20f 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -1045,7 +1045,7 @@ KronolithCore = { if (perm.key != 'type' && ((Object.isArray(perm.value) && perm.value.size()) || (!Object.isArray(perm.value) && perm.value))) { - element.insert(' ').insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'attendees-' + cal.fg.substring(1) + '.png', title: Kronolith.text.shared })); + element.insert(' ').insert(new Element('img', { src: Kronolith.conf.images.attendees.replace(/fff/, cal.fg.substring(1)), title: Kronolith.text.shared })); throw $break; } }); @@ -2046,14 +2046,14 @@ KronolithCore = { div.insert((length ? event.t.truncate(length) : event.t).escapeHTML()); if (event.a) { div.insert(' ') - .insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'alarm-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', title: Kronolith.text.alarm + ' ' + event.a })); + .insert(new Element('img', { src: Kronolith.conf.images.alarm.replace(/fff/, Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1)), title: Kronolith.text.alarm + ' ' + event.a })); } if (event.r) { div.insert(' ') - .insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'recur-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', title: Kronolith.text.recur[event.r] })); + .insert(new Element('img', { src: Kronolith.conf.images.recur.replace(/fff/, Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1)), title: Kronolith.text.recur[event.r] })); } else if (event.bid) { div.insert(' ') - .insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'exception-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', title: Kronolith.text.recur['Exception'] })); + .insert(new Element('img', { src: Kronolith.conf.images.exception.replace(/fff/, Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1)), title: Kronolith.text.recur['Exception'] })); } return div; }, diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 1952e4da5..dc52d002b 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -187,12 +187,16 @@ class Kronolith /* Variables used in core javascript files. */ $code['conf'] = array( 'URI_AJAX' => (string)Horde::getServiceLink('ajax', 'kronolith'), - 'URI_IMG' => (string)Horde_Themes::img() . '/', 'URI_SNOOZE' => (string)Horde::url($registry->get('webroot', 'horde') . '/services/snooze.php', true, -1), 'URI_CALENDAR_EXPORT' => (string)Horde::url('data.php', true)->add(array('actionID' => 'export', 'all_events' => 1, 'exportID' => Horde_Data::EXPORT_ICALENDAR, 'exportCal' => '')), 'URI_EVENT_EXPORT' => str_replace(array('%23', '%7B', '%7D'), array('#', '{', '}'), Horde::url('event.php', true)->add(array('view' => 'ExportEvent', 'eventID' => '#{id}', 'calendar' => '#{calendar}', 'type' => '#{type}'))), 'SESSION_ID' => defined('SID') ? SID : '', - + 'images' => array( + 'attendees' => (string)Horde_Themes::img('attendees-fff.png'), + 'alarm' => (string)Horde_Themes::img('alarm-fff.png'), + 'recur' => (string)Horde_Themes::img('recur-fff.png'), + 'exception' => (string)Horde_Themes::img('exception-fff.png'), + ), 'user' => $GLOBALS['registry']->convertUsername($GLOBALS['registry']->getAuth(), false), 'prefs_url' => str_replace('&', '&', Horde::getServiceLink('options', 'kronolith')), 'app_urls' => $app_urls, -- 2.11.0