Monotone-Parent: f95c202e8a677fb1f00e60e9dde0d8bb8e420572
Monotone-Revision: 006f9f5fa97b150e56360e2767123d6b1e77e8cc Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-11-15T19:02:23 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
1be189b537
commit
a2d7ad9ad3
2
NEWS
2
NEWS
|
@ -18,7 +18,7 @@
|
|||
- improved support for multiple selection in tables and lists;
|
||||
- improved IE7 and Safari support: attendees selector, email file attachments;
|
||||
- updated PrototypeJS to version 1.6.0;
|
||||
- improved address completion in attendees selector;
|
||||
- improved address completion and freebusy timeline in attendees selector;
|
||||
- changed look of message composition window to Thunderbird 2.0;
|
||||
- countless bugfixes;
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@
|
|||
cssClass = "tbicon_delete";
|
||||
label = "Delete";
|
||||
tooltip = "Delete selected message or folder"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-junk-flat-24x24.png";
|
||||
cssClass = "tbicon_junk";
|
||||
label = "Junk";
|
||||
tooltip = "Mark the selected messages as junk"; },
|
||||
// { link = "#";
|
||||
// isSafe = NO;
|
||||
// image = "tb-mail-junk-flat-24x24.png";
|
||||
// cssClass = "tbicon_junk";
|
||||
// label = "Junk";
|
||||
// tooltip = "Mark the selected messages as junk"; },
|
||||
),
|
||||
(
|
||||
{ link = "#";
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
NSString *componentOwner;
|
||||
|
||||
NSString *attendeesNames;
|
||||
NSString *attendeesUIDs;
|
||||
NSString *attendeesEmails;
|
||||
}
|
||||
|
||||
|
@ -107,6 +108,9 @@
|
|||
- (void) setAttendeesNames: (NSString *) newAttendeesNames;
|
||||
- (NSString *) attendeesNames;
|
||||
|
||||
- (void) setAttendeesUIDs: (NSString *) newAttendeesUIDs;
|
||||
- (NSString *) attendeesUIDs;
|
||||
|
||||
- (void) setAttendeesEmails: (NSString *) newAttendeesEmails;
|
||||
- (NSString *) attendeesEmails;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#import <SoObjects/Appointments/SOGoAppointmentFolders.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentObject.h>
|
||||
#import <SoObjects/Appointments/SOGoTaskObject.h>
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||
|
@ -65,6 +66,7 @@
|
|||
componentOwner = @"";
|
||||
organizer = nil;
|
||||
attendeesNames = nil;
|
||||
attendeesUIDs = nil;
|
||||
attendeesEmails = nil;
|
||||
calendarList = nil;
|
||||
}
|
||||
|
@ -86,6 +88,7 @@
|
|||
[cycleEnd release];
|
||||
[url release];
|
||||
[attendeesNames release];
|
||||
[attendeesUIDs release];
|
||||
[attendeesEmails release];
|
||||
[calendarList release];
|
||||
|
||||
|
@ -96,10 +99,14 @@
|
|||
{
|
||||
NSEnumerator *attendees;
|
||||
iCalPerson *currentAttendee;
|
||||
NSMutableString *names, *emails;
|
||||
NSMutableString *names, *uids, *emails;
|
||||
NSString *uid;
|
||||
LDAPUserManager *um;
|
||||
|
||||
names = [NSMutableString new];
|
||||
uids = [NSMutableString new];
|
||||
emails = [NSMutableString new];
|
||||
um = [LDAPUserManager sharedUserManager];
|
||||
|
||||
attendees = [[component attendees] objectEnumerator];
|
||||
currentAttendee = [attendees nextObject];
|
||||
|
@ -107,12 +114,18 @@
|
|||
{
|
||||
[names appendFormat: @"%@,", [currentAttendee cn]];
|
||||
[emails appendFormat: @"%@,", [currentAttendee rfc822Email]];
|
||||
uid = [um getUIDForEmail: [currentAttendee rfc822Email]];
|
||||
if (uid != nil)
|
||||
[uids appendFormat: @"%@,", uid];
|
||||
else
|
||||
[uids appendString: @","];
|
||||
currentAttendee = [attendees nextObject];
|
||||
}
|
||||
|
||||
if ([names length] > 0)
|
||||
{
|
||||
ASSIGN (attendeesNames, [names substringToIndex: [names length] - 1]);
|
||||
ASSIGN (attendeesUIDs, [uids substringToIndex: [uids length] - 1]);
|
||||
ASSIGN (attendeesEmails,
|
||||
[emails substringToIndex: [emails length] - 1]);
|
||||
}
|
||||
|
@ -242,6 +255,16 @@
|
|||
return attendeesNames;
|
||||
}
|
||||
|
||||
- (void) setAttendeesUIDs: (NSString *) newAttendeesUIDs
|
||||
{
|
||||
ASSIGN (attendeesUIDs, newAttendeesUIDs);
|
||||
}
|
||||
|
||||
- (NSString *) attendeesUIDs
|
||||
{
|
||||
return attendeesUIDs;
|
||||
}
|
||||
|
||||
- (void) setAttendeesEmails: (NSString *) newAttendeesEmails
|
||||
{
|
||||
ASSIGN (attendeesEmails, newAttendeesEmails);
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
var:value="privacy"/>
|
||||
<input type="hidden" name="attendeesNames" id="attendeesNames"
|
||||
var:value="attendeesNames"/>
|
||||
<input type="hidden" name="attendeesUIDs" id="attendeesUIDs"
|
||||
var:value="attendeesUIDs"/>
|
||||
<input type="hidden" name="attendeesEmails" id="attendeesEmails"
|
||||
var:value="attendeesEmails"/>
|
||||
<input type="hidden" name="calendarFoldersList"
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
<var:string value="productLocalizableStrings" const:escapeHTML="NO"/>
|
||||
</script>
|
||||
<script type="text/javascript" rsrc:src="events.js"><!-- space --></script>
|
||||
<script type="text/javascript" rsrc:src="fastinit.js"><!-- space --></script>
|
||||
<script type="text/javascript" rsrc:src="prototype.js"><!-- space --></script>
|
||||
<script type="text/javascript" rsrc:src="tablekit.js"><!-- space --></script>
|
||||
<script type="text/javascript" rsrc:src="tablekit-trueresize.js"><!-- space --></script>
|
||||
|
|
|
@ -764,4 +764,4 @@ function initContacts(event) {
|
|||
}
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initContacts);
|
||||
FastInit.addOnLoad(initContacts);
|
||||
|
|
|
@ -1169,8 +1169,8 @@ function openInbox(node) {
|
|||
mailboxTree.o(1);
|
||||
}
|
||||
|
||||
function initMailer(event) {
|
||||
if (!document.body.hasClassName("popup")) {
|
||||
function initMailer(event) { log ("initMailer");
|
||||
if (!$(document.body).hasClassName("popup")) {
|
||||
// initDnd();
|
||||
initMailboxTree();
|
||||
initMessageCheckTimer();
|
||||
|
@ -1652,7 +1652,7 @@ function getMenus() {
|
|||
return menus;
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initMailer);
|
||||
FastInit.addOnLoad(initMailer);
|
||||
|
||||
function Mailbox(type, name) {
|
||||
this.type = type;
|
||||
|
|
|
@ -38,4 +38,4 @@ function onLoginCallback(http) {
|
|||
}
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initLogin);
|
||||
FastInit.addOnLoad(initLogin);
|
||||
|
|
|
@ -1660,4 +1660,4 @@ function initCalendars() {
|
|||
}
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initCalendars);
|
||||
FastInit.addOnLoad(initCalendars);
|
||||
|
|
|
@ -142,4 +142,4 @@ function onAclLoadHandler() {
|
|||
this.userRightsWidth = window.opener.getUsersRightsWindowWidth();
|
||||
}
|
||||
|
||||
addEvent(window, 'load', onAclLoadHandler);
|
||||
FastInit.addOnLoad(onAclLoadHandler);
|
||||
|
|
|
@ -286,4 +286,4 @@ function onAppointmentEditorLoad() {
|
|||
initTimeWidgets(widgets);
|
||||
}
|
||||
|
||||
addEvent(window, 'load', onAppointmentEditorLoad);
|
||||
FastInit.addOnLoad(onAppointmentEditorLoad);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
var resultsDiv;
|
||||
var searchField;
|
||||
var running = false;
|
||||
var address;
|
||||
var delay = 500;
|
||||
var requestField;
|
||||
var searchField;
|
||||
var awaitingFreeBusyRequests = new Array();
|
||||
var additionalDays = 2;
|
||||
|
||||
|
@ -11,6 +11,7 @@ var dayStartHour = 8;
|
|||
var dayEndHour = 18;
|
||||
|
||||
var attendeesNames;
|
||||
var attendeesUIDs;
|
||||
var attendeesEmails;
|
||||
|
||||
function onContactKeydown(event) {
|
||||
|
@ -57,16 +58,17 @@ function onContactKeydown(event) {
|
|||
}
|
||||
|
||||
function triggerRequest() {
|
||||
if (requestField) {
|
||||
if (document.contactLookupAjaxRequest) {
|
||||
document.contactLookupAjaxRequest.aborted = yes;
|
||||
document.contactLookupAjaxRequest.abort();
|
||||
}
|
||||
var urlstr = ( UserFolderURL + "Contacts/contactSearch?search="
|
||||
+ escape(requestField.value) );
|
||||
//log (urlstr);
|
||||
document.contactLookupAjaxRequest = triggerAjaxRequest(urlstr,
|
||||
updateResults,
|
||||
requestField);
|
||||
}
|
||||
}
|
||||
|
||||
function updateResults(http) {
|
||||
|
@ -74,7 +76,7 @@ function updateResults(http) {
|
|||
var menu = $('attendeesMenu');
|
||||
var list = menu.down("ul");
|
||||
|
||||
searchField = http.callbackData;
|
||||
searchField = http.callbackData; // requestField
|
||||
searchField.hasfreebusy = false;
|
||||
|
||||
if (http.status == 200) {
|
||||
|
@ -123,9 +125,9 @@ function updateResults(http) {
|
|||
if (data.length == 1) {
|
||||
var contact = data[0];
|
||||
if (contact["uid"].length > 0)
|
||||
searchField.uid = contact["uid"];
|
||||
searchField.setAttribute("uid", contact["uid"]);
|
||||
else
|
||||
searchField.uid = null;
|
||||
searchField.setAttribute("uid", null);
|
||||
var completeEmail = contact["name"] + " <" + contact["email"] + ">";
|
||||
if (contact["name"].substring(0, searchField.value.length).toUpperCase()
|
||||
== searchField.value.toUpperCase())
|
||||
|
@ -153,29 +155,13 @@ function updateResults(http) {
|
|||
|
||||
function onAttendeeResultClick(event) {
|
||||
if (searchField) {
|
||||
searchField.uid = this.uid;
|
||||
searchField.setAttribute("uid", this.getAttribute("uid"));
|
||||
searchField.value = this.firstChild.nodeValue.trim();
|
||||
searchField.confirmedValue = searchField.value;
|
||||
searchField.blur(); // triggers checkAttendee function call
|
||||
}
|
||||
}
|
||||
|
||||
function UIDLookupCallback(http) {
|
||||
if (http.readyState == 4) {
|
||||
if (http.status == 200) {
|
||||
var searchField = http.callbackData;
|
||||
var start = searchField.value.length;
|
||||
var text = http.responseText.split(":");
|
||||
if (text[0].length > 0) {
|
||||
searchField.uid = text[0];
|
||||
displayFreeBusyForNode(searchField);
|
||||
}
|
||||
else
|
||||
searchField.uid = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resetFreeBusyZone() {
|
||||
var table = $("freeBusy");
|
||||
var row = table.tHead.rows[2];
|
||||
|
@ -270,6 +256,9 @@ function newAttendee(event) {
|
|||
}
|
||||
|
||||
function checkAttendee() {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
if (document.currentPopupMenu && !this.confirmedValue) {
|
||||
// Hack for IE7; blur event is triggered on input field when
|
||||
// selecting a menu item
|
||||
|
@ -277,29 +266,32 @@ function checkAttendee() {
|
|||
if (visible)
|
||||
return;
|
||||
}
|
||||
|
||||
this.focussed = false;
|
||||
var th = this.parentNode.parentNode;
|
||||
var tbody = th.parentNode;
|
||||
var row = this.parentNode.parentNode;
|
||||
var tbody = row.parentNode;
|
||||
if (tbody && this.value.trim().length == 0)
|
||||
tbody.removeChild(th);
|
||||
tbody.removeChild(row);
|
||||
else if (!this.hasfreebusy) {
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
displayFreeBusyForNode(this);
|
||||
this.hasfreebusy = true;
|
||||
}
|
||||
resetAttendeesValue();
|
||||
|
||||
requestField = null;
|
||||
searchField = null;
|
||||
}
|
||||
|
||||
function displayFreeBusyForNode(node) {
|
||||
var nodes = node.parentNode.parentNode.cells;
|
||||
if (node.getAttribute("uid")) {
|
||||
if (document.contactFreeBusyAjaxRequest)
|
||||
awaitingFreeBusyRequests.push(node);
|
||||
else {
|
||||
var nodes = node.parentNode.parentNode.cells;
|
||||
if (node.uid) {
|
||||
for (var i = 1; i < nodes.length; i++) {
|
||||
$(nodes[i]).removeClassName("noFreeBusy");
|
||||
nodes[i].innerHTML = ('<span class="freeBusyZoneElement"></span>'
|
||||
$(nodes[i]).innerHTML = ('<span class="freeBusyZoneElement"></span>'
|
||||
+ '<span class="freeBusyZoneElement"></span>'
|
||||
+ '<span class="freeBusyZoneElement"></span>'
|
||||
+ '<span class="freeBusyZoneElement"></span>');
|
||||
|
@ -310,18 +302,18 @@ function displayFreeBusyForNode(node) {
|
|||
}
|
||||
var sd = $('startTime_date').valueAsShortDateString();
|
||||
var ed = $('endTime_date').valueAsShortDateString();
|
||||
var urlstr = ( UserFolderURL + "../" + node.uid + "/freebusy.ifb/ajaxRead?"
|
||||
var urlstr = ( UserFolderURL + "../" + node.getAttribute("uid") + "/freebusy.ifb/ajaxRead?"
|
||||
+ "sday=" + sd + "&eday=" + ed + "&additional=" +
|
||||
additionalDays );
|
||||
document.contactFreeBusyAjaxRequest
|
||||
= triggerAjaxRequest(urlstr,
|
||||
updateFreeBusyData,
|
||||
node);
|
||||
}
|
||||
} else {
|
||||
for (var i = 1; i < nodes.length; i++) {
|
||||
$(nodes[i]).addClassName("noFreeBusy");
|
||||
nodes[i].innerHTML = '';
|
||||
}
|
||||
$(nodes[i]).update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -362,22 +354,6 @@ function updateFreeBusyData(http) {
|
|||
}
|
||||
}
|
||||
|
||||
function resetAttendeesValue() {
|
||||
var table = $("freeBusy");
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length - 2; i++) {
|
||||
var currentInput = inputs[i];
|
||||
var uid = currentInput.getAttribute("uid");
|
||||
if (uid) {
|
||||
currentInput.uid = uid;
|
||||
currentInput.setAttribute("uid", null);
|
||||
}
|
||||
currentInput.setAttribute("autocomplete", "off");
|
||||
}
|
||||
inputs[inputs.length - 2].setAttribute("autocomplete", "off");
|
||||
Event.observe(inputs[inputs.length - 2], "click", newAttendee);
|
||||
}
|
||||
|
||||
function resetAllFreeBusys() {
|
||||
var table = $("freeBusy");
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
|
@ -411,23 +387,31 @@ function onEditorOkClick(event) {
|
|||
preventDefault(event);
|
||||
|
||||
attendeesNames = new Array();
|
||||
attendeesUIDs = new Array();
|
||||
attendeesEmails = new Array();
|
||||
|
||||
var table = $("freeBusy");
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length - 2; i++) {
|
||||
var name = extractEmailName(inputs[i].value);
|
||||
if (!(name && name.length > 0))
|
||||
name = inputs[i].uid;
|
||||
var email = extractEmailAddress(inputs[i].value);
|
||||
var uid = "";
|
||||
if (inputs[i].getAttribute("uid"))
|
||||
uid = inputs[i].getAttribute("uid");
|
||||
if (!(name && name.length > 0))
|
||||
if (inputs[i].uid)
|
||||
name = inputs[i].uid;
|
||||
else
|
||||
name = email;
|
||||
var pos = attendeesEmails.indexOf(email);
|
||||
if (pos == -1)
|
||||
pos = attendeesEmails.length;
|
||||
attendeesNames[pos] = name;
|
||||
attendeesUIDs[pos] = uid;
|
||||
attendeesEmails[pos] = email;
|
||||
}
|
||||
|
||||
parent$("attendeesNames").value = attendeesNames.join(",");
|
||||
parent$("attendeesUIDs").value = attendeesUIDs.join(",");
|
||||
parent$("attendeesEmails").value = attendeesEmails.join(",");
|
||||
window.opener.refreshAttendees();
|
||||
|
||||
|
@ -507,7 +491,6 @@ function onTimeDateWidgetChange(event) {
|
|||
prepareTableHeaders();
|
||||
prepareTableRows();
|
||||
redisplayFreeBusyZone();
|
||||
resetAttendeesValue();
|
||||
resetAllFreeBusys();
|
||||
}
|
||||
|
||||
|
@ -563,53 +546,52 @@ function prepareTableRows() {
|
|||
|
||||
function prepareAttendees() {
|
||||
var value = parent$("attendeesNames").value;
|
||||
var table = $("freeBusy");
|
||||
if (value.length > 0) {
|
||||
attendeesNames = parent$("attendeesNames").value.split(",");
|
||||
attendeesUIDs = parent$("attendeesUIDs").value.split(",");
|
||||
attendeesEmails = parent$("attendeesEmails").value.split(",");
|
||||
|
||||
var body = $("freeBusy").tBodies[0];
|
||||
var tbody = table.tBodies[0];
|
||||
var model = tbody.rows[tbody.rows.length - 1];
|
||||
var newAttendeeRow = tbody.rows[tbody.rows.length - 2];
|
||||
for (var i = 0; i < attendeesNames.length; i++) {
|
||||
var tr = body.insertRow(i);
|
||||
var td = document.createElement("td");
|
||||
$(td).addClassName("attendees");
|
||||
var input = document.createElement("input");
|
||||
var row = model.cloneNode(true);
|
||||
tbody.insertBefore(row, newAttendeeRow);
|
||||
$(row).removeClassName("attendeeModel");
|
||||
var input = $(row).down("input");
|
||||
var value = "";
|
||||
if (attendeesNames[i].length > 0)
|
||||
if (attendeesNames[i].length > 0 && attendeesNames[i] != attendeesEmails[i])
|
||||
value += attendeesNames[i] + " ";
|
||||
value += "<" + attendeesEmails[i] + ">";
|
||||
input.value = value;
|
||||
$(input).addClassName("textField");
|
||||
if (attendeesUIDs[i].length > 0)
|
||||
input.setAttribute("uid", attendeesUIDs[i]);
|
||||
input.setAttribute("name", "");
|
||||
input.setAttribute("modified", "0");
|
||||
input.observe("blur", checkAttendee);
|
||||
input.observe("keydown", onContactKeydown);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(input);
|
||||
displayFreeBusyForNode(input);
|
||||
}
|
||||
}
|
||||
else {
|
||||
attendeesNames = new Array();
|
||||
attendeesUIDs = new Array();
|
||||
attendeesEmails = new Array();
|
||||
}
|
||||
}
|
||||
|
||||
function initializeFreebusys() {
|
||||
var inputs = $("freeBusy").getElementsByTagName("input");
|
||||
var baseUrl = UserFolderURL + "Contacts/contactSearch?search=";
|
||||
for (var i = 0; i < attendeesEmails.length; i++)
|
||||
triggerAjaxRequest(baseUrl + attendeesEmails[i],
|
||||
UIDLookupCallback, inputs[i]);
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
inputs[inputs.length - 2].setAttribute("autocomplete", "off");
|
||||
Event.observe(inputs[inputs.length - 2], "click", newAttendee);
|
||||
}
|
||||
|
||||
function onFreeBusyLoadHandler() {
|
||||
initializeWindowButtons();
|
||||
initializeTimeWidgets();
|
||||
prepareAttendees();
|
||||
prepareTableHeaders();
|
||||
prepareTableRows();
|
||||
redisplayFreeBusyZone();
|
||||
resetAttendeesValue();
|
||||
initializeFreebusys();
|
||||
prepareAttendees();
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", onFreeBusyLoadHandler);
|
||||
FastInit.addOnLoad(onFreeBusyLoadHandler);
|
||||
|
|
|
@ -6,4 +6,4 @@ function initACLButtons() {
|
|||
Event.observe($("cancelButton"), "click", onCancelClick);
|
||||
}
|
||||
|
||||
addEvent(window, "load", initACLButtons);
|
||||
FastInit.addOnLoad(initACLButtons);
|
||||
|
|
|
@ -158,4 +158,4 @@ function onComponentEditorLoad(event) {
|
|||
false);
|
||||
}
|
||||
|
||||
addEvent(window, 'load', onComponentEditorLoad);
|
||||
FastInit.addOnLoad(onComponentEditorLoad);
|
||||
|
|
|
@ -134,4 +134,4 @@ function initEditorForm() {
|
|||
$("givenName").onkeyup = onFnNewValue;
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initEditorForm);
|
||||
FastInit.addOnLoad(initEditorForm);
|
||||
|
|
|
@ -141,4 +141,4 @@ function initUserFoldersWindow() {
|
|||
Event.observe($("addButton"), "click", onConfirmFolderSelection);
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initUserFoldersWindow);
|
||||
FastInit.addOnLoad(initUserFoldersWindow);
|
||||
|
|
|
@ -7,4 +7,4 @@ function initACLButtons() {
|
|||
Event.observe(button, "click", onCancelClick);
|
||||
}
|
||||
|
||||
addEvent(window, "load", initACLButtons);
|
||||
FastInit.addOnLoad(initACLButtons);
|
||||
|
|
|
@ -368,4 +368,4 @@ function onMailEditorClose(event) {
|
|||
Event.stopObserving(window, "beforeunload", onMailEditorClose);
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initMailEditor);
|
||||
FastInit.addOnLoad(initMailEditor);
|
||||
|
|
|
@ -9,4 +9,4 @@ function initPopupMailer(event) {
|
|||
resizeMailContent();
|
||||
}
|
||||
|
||||
addEvent(window, 'load', initPopupMailer);
|
||||
FastInit.addOnLoad(initPopupMailer);
|
||||
|
|
|
@ -6,4 +6,4 @@ function initACLButtons() {
|
|||
$("cancelButton").addEventListener("click", onCancelClick, false);
|
||||
}
|
||||
|
||||
addEvent(window, "load", initACLButtons);
|
||||
FastInit.addOnLoad(initACLButtons);
|
||||
|
|
|
@ -297,4 +297,4 @@ function onTaskEditorLoad() {
|
|||
initializeStatusLine();
|
||||
}
|
||||
|
||||
addEvent(window, 'load', onTaskEditorLoad);
|
||||
FastInit.addOnLoad(onTaskEditorLoad);
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2007 Andrew Tetlaw
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use, copy,
|
||||
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
* of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
* *
|
||||
*
|
||||
*
|
||||
* FastInit
|
||||
* http://tetlaw.id.au/view/javascript/fastinit
|
||||
* Andrew Tetlaw
|
||||
* Version 1.4.1 (2007-03-15)
|
||||
* Based on:
|
||||
* http://dean.edwards.name/weblog/2006/03/faster
|
||||
* http://dean.edwards.name/weblog/2006/06/again/
|
||||
* Help from:
|
||||
* http://www.cherny.com/webdev/26/domloaded-object-literal-updated
|
||||
*
|
||||
*/
|
||||
var FastInit = {
|
||||
onload : function() {
|
||||
if (FastInit.done) { return; }
|
||||
FastInit.done = true;
|
||||
for(var x = 0, al = FastInit.f.length; x < al; x++) {
|
||||
FastInit.f[x]();
|
||||
}
|
||||
},
|
||||
addOnLoad : function() {
|
||||
var a = arguments;
|
||||
for(var x = 0, al = a.length; x < al; x++) {
|
||||
if(typeof a[x] === 'function') {
|
||||
if (FastInit.done ) {
|
||||
a[x]();
|
||||
} else {
|
||||
FastInit.f.push(a[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
listen : function() {
|
||||
if (/WebKit|khtml/i.test(navigator.userAgent)) {
|
||||
FastInit.timer = setInterval(function() {
|
||||
if (/loaded|complete/.test(document.readyState)) {
|
||||
clearInterval(FastInit.timer);
|
||||
delete FastInit.timer;
|
||||
FastInit.onload();
|
||||
}}, 10);
|
||||
} else if (document.addEventListener) {
|
||||
document.addEventListener('DOMContentLoaded', FastInit.onload, false);
|
||||
} else if(!FastInit.iew32) {
|
||||
if(window.addEventListener) {
|
||||
window.addEventListener('load', FastInit.onload, false);
|
||||
} else if (window.attachEvent) {
|
||||
return window.attachEvent('onload', FastInit.onload);
|
||||
}
|
||||
}
|
||||
},
|
||||
f:[],done:false,timer:null,iew32:false
|
||||
};
|
||||
/*@cc_on @*/
|
||||
/*@if (@_win32)
|
||||
FastInit.iew32 = true;
|
||||
document.write('<script id="__ie_onload" defer src="' + ((location.protocol == 'https:') ? '//0' : 'javascript:void(0)') + '"><\/script>');
|
||||
document.getElementById('__ie_onload').onreadystatechange = function(){if (this.readyState == 'complete') { FastInit.onload(); }};
|
||||
/*@end @*/
|
||||
FastInit.listen();
|
|
@ -1402,7 +1402,7 @@ function onFinalLoadHandler(event) {
|
|||
safetyNet.parentNode.removeChild(safetyNet);
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", onLoadHandler);
|
||||
FastInit.addOnLoad(onLoadHandler);
|
||||
|
||||
function parent$(element) {
|
||||
return this.opener.document.getElementById(element);
|
||||
|
|
Loading…
Reference in New Issue