mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-02 17:09:44 +00:00
Monotone-Parent: 0dbfe804b643f92bc35b93367e1c120b395685a7
Monotone-Revision: 4540f3e456a8b7129b4cc6d8a8eea6373cc23df6 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-07-31T21:14:14 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -26,3 +26,9 @@
|
||||
"Default Roles" = "Default Roles";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
/* generic.js */
|
||||
"Unable to subscribe to that folder!" = "Unable to subscribe to that folder!";
|
||||
"You cannot subscribe to a folder that you own!" = "You cannot subscribe to a folder that you own!";
|
||||
"Unable to unsubscribe from that folder!" = "Unable to unsubscribe from that folder!";
|
||||
"You cannot unsubscribe from a folder that you own!" = "You cannot unsubscribe from a folder that you own!";
|
||||
|
||||
@@ -27,3 +27,9 @@
|
||||
"Default Roles" = "Rôles par défaut";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
/* generic.js */
|
||||
"Unable to subscribe to that folder!" = "Impossible de s'abonner à ce dossier.";
|
||||
"You cannot subscribe to a folder that you own!" = "Impossible de vous abonner à un dossier qui vous appartient.";
|
||||
"Unable to unsubscribe from that folder!" = "Impossible de se désabonner de ce dossier.";
|
||||
"You cannot unsubscribe from a folder that you own!" = "Impossible de vous désabonner d'un dossier qui vous appartient.";
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "UIxMailRenderingContext.h"
|
||||
#include <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#include "common.h"
|
||||
#include <Foundation/NSString.h>
|
||||
|
||||
@implementation UIxMailRenderingContext
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
<var:js-stringtable
|
||||
var:framework="productFrameworkName"
|
||||
const:identifier="labels" />
|
||||
<var:js-stringtable
|
||||
const:identifier="clabels" />
|
||||
|
||||
<var:if condition="isPopup" const:negate="YES"
|
||||
><var:if condition="context.isUIxDebugEnabled"
|
||||
|
||||
@@ -31,8 +31,9 @@ function validateEditorInput(sender) {
|
||||
}
|
||||
|
||||
function openContactsFolder(contactsFolder, reload, idx) {
|
||||
if (contactsFolder != currentContactFolder || reload) {
|
||||
currentContactFolder = contactsFolder;
|
||||
if ((currentContactFolder && contactsFolder != currentContactFolder)
|
||||
|| reload) {
|
||||
currentContactFolder = contactsFolder; log("openContactsFolder " + contactsFolder);
|
||||
var url = URLForFolderID(currentContactFolder) +
|
||||
"/view?noframe=1";
|
||||
|
||||
@@ -436,7 +437,7 @@ function onFolderSelectionChange() {
|
||||
}
|
||||
}
|
||||
|
||||
function refreshCurrentFolder() {
|
||||
function refreshCurrentFolder() { log("refreshCurrentFolder");
|
||||
openContactsFolder(currentContactFolder, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ Element.addMethods({
|
||||
cascadeLeftOffset: function(element) {
|
||||
element = $(element);
|
||||
var currentElement = element;
|
||||
|
||||
|
||||
var offset = 0;
|
||||
while (currentElement) {
|
||||
offset += currentElement.offsetLeft;
|
||||
currentElement = currentElement.getParentWithTagName("div");
|
||||
currentElement = $(currentElement).getParentWithTagName("div");
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
},
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ function tasksListCallback(http) {
|
||||
}
|
||||
|
||||
function restoreCurrentDaySelection(div) {
|
||||
var elements = div.getElementsByTagName("a");
|
||||
var elements = $(div).getElementsByTagName("a");
|
||||
var day = null;
|
||||
var i = 9;
|
||||
while (!day && i < elements.length)
|
||||
@@ -417,10 +417,10 @@ function restoreCurrentDaySelection(div) {
|
||||
for (i = 0; i < elements.length; i++) {
|
||||
day = elements[i].day;
|
||||
if (day && day == currentDay) {
|
||||
var td = elements[i].getParentWithTagName("td");
|
||||
var td = $(elements[i]).getParentWithTagName("td");
|
||||
if (document.selectedDate)
|
||||
document.selectedDate.deselect();
|
||||
td.select();
|
||||
$(td).select();
|
||||
document.selectedDate = td;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,13 @@ function onUserRemove(event) {
|
||||
}
|
||||
|
||||
function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
||||
addUser(refreshCallbackData["folderName"],
|
||||
refreshCallbackData["folder"]);
|
||||
if (UserLogin != refreshCallbackData["folder"]) {
|
||||
addUser(refreshCallbackData["folderName"],
|
||||
refreshCallbackData["folder"]);
|
||||
}
|
||||
else
|
||||
refreshCallbackData["window"].alert(clabels["You cannot subscribe to a folder that you own!"]
|
||||
.decodeEntities());
|
||||
}
|
||||
|
||||
function openRightsForUserID(userID) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function onContactKeydown(event) {
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
var row = this.parentNode.parentNode.nextSibling;
|
||||
while (!(row instanceof HTMLTableRowElement))
|
||||
while (row && row.tagName != 'TR')
|
||||
row = row.nextSibling;
|
||||
this.blur();
|
||||
var input = $(row.cells[0]).childNodesWithTag("input")[0];
|
||||
@@ -203,7 +203,7 @@ function checkAttendee() {
|
||||
this.focussed = false;
|
||||
var th = this.parentNode.parentNode;
|
||||
var tbody = th.parentNode;
|
||||
if (this.value.trim().length == 0)
|
||||
if (tbody && this.value.trim().length == 0)
|
||||
tbody.removeChild(th);
|
||||
else if (!this.hasfreebusy) {
|
||||
if (this.confirmedValue)
|
||||
@@ -535,4 +535,4 @@ function onFreeBusyLoadHandler() {
|
||||
initializeFreebusys();
|
||||
}
|
||||
|
||||
window.addEventListener("load", onFreeBusyLoadHandler, false);
|
||||
addEvent(window, 'load', onFreeBusyLoadHandler);
|
||||
|
||||
@@ -8,12 +8,11 @@ function onPopupAttendeesWindow(event) {
|
||||
}
|
||||
|
||||
function onSelectPrivacy(event) {
|
||||
if (event.button == 0) {
|
||||
var node = event.target;
|
||||
if (event.button == 0 || (isSafari() && event.button == 1)) {
|
||||
var node = getTarget(event);
|
||||
if (node.tagName != 'A')
|
||||
node = node.getParentWithTagName("a");
|
||||
node = node.childNodesWithTag("span")[0];
|
||||
|
||||
node = $(node).getParentWithTagName("a");
|
||||
node = $(node).childNodesWithTag("span")[0];
|
||||
popupToolbarMenu(node, "privacy-menu");
|
||||
Event.stop(event);
|
||||
// preventDefault(event);
|
||||
|
||||
@@ -3,7 +3,7 @@ function onSearchFormSubmit() {
|
||||
|
||||
var url = (ApplicationBaseURL
|
||||
+ "/foldersSearch?ldap-only=YES&search=" + searchValue.value
|
||||
+ "&type=" + window.userFolderType);
|
||||
+ "&type=" + window.opener.userFolderType);
|
||||
if (document.userFoldersRequest) {
|
||||
document.userFoldersRequest.aborted = true;
|
||||
document.userFoldersRequest.abort();
|
||||
@@ -18,7 +18,7 @@ function addLineToTree(tree, parent, line) {
|
||||
var offset = 0;
|
||||
|
||||
var nodes = line.split(";");
|
||||
if (window.userFolderType == "user"
|
||||
if (window.opener.userFolderType == "user"
|
||||
|| nodes.length > 1) {
|
||||
var parentNode = nodes[0];
|
||||
var userInfos = parentNode.split(":");
|
||||
@@ -41,7 +41,7 @@ function addLineToTree(tree, parent, line) {
|
||||
offset = nodes.length - 1;
|
||||
}
|
||||
else
|
||||
window.alert("nope:" + window.userFolderType);
|
||||
window.alert("nope:" + window.opener.userFolderType);
|
||||
|
||||
return offset;
|
||||
}
|
||||
@@ -95,19 +95,18 @@ function userFoldersCallback(http) {
|
||||
div.innerHTML = buildTree(http.responseText);
|
||||
var nodes = document.getElementsByClassName("node", $("d"));
|
||||
for (i = 0; i < nodes.length; i++)
|
||||
nodes[i].addEventListener("click",
|
||||
onFolderTreeItemClick, false);
|
||||
Event.observe(nodes[i], "click", onFolderTreeItemClick.bindAsEventListener(nodes[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onConfirmFolderSelection(event) {
|
||||
var topNode = $("d");
|
||||
if (topNode.selectedEntry) {
|
||||
var topNode = $("d");
|
||||
if (topNode.selectedEntry) {
|
||||
var node = topNode.selectedEntry.parentNode;
|
||||
var folder = node.getAttribute("dataname");
|
||||
var folderName;
|
||||
if (window.userFolderType == "user") {
|
||||
if (window.opener.userFolderType == "user") {
|
||||
var spans = document.getElementsByClassName("nodeName",
|
||||
topNode.selectedEntry);
|
||||
var email = spans[0].innerHTML;
|
||||
@@ -125,14 +124,14 @@ function onConfirmFolderSelection(event) {
|
||||
email = email.replace(">", ">");
|
||||
folderName = spans1[0].innerHTML + ' (' + email + ')';
|
||||
}
|
||||
var data = { folderName: folderName, folder: folder };
|
||||
window.opener.subscribeToFolder(window.userFolderCallback, data);
|
||||
var data = { folderName: folderName, folder: folder, window: window };
|
||||
window.opener.subscribeToFolder(window.opener.userFolderCallback, data);
|
||||
}
|
||||
}
|
||||
|
||||
function initUserFoldersWindow() {
|
||||
configureSearchField();
|
||||
$("addButton").addEventListener("click", onConfirmFolderSelection, false);
|
||||
Event.observe($("addButton"), "click", onConfirmFolderSelection);
|
||||
}
|
||||
|
||||
window.addEventListener("load", initUserFoldersWindow, false);
|
||||
addEvent(window, 'load', initUserFoldersWindow);
|
||||
|
||||
@@ -201,14 +201,14 @@ function sanitizeMailTo(dirtyMailTo) {
|
||||
|
||||
function openUserFolderSelector(callback, type) {
|
||||
var urlstr = ApplicationBaseURL;
|
||||
if (urlstr[urlstr.length-1] != '/')
|
||||
if (! urlstr.endsWith('/'))
|
||||
urlstr += '/';
|
||||
urlstr += ("../../" + UserLogin + "/Contacts/userFolders");
|
||||
var w = window.open(urlstr, "User Selector",
|
||||
var w = window.open(urlstr, "_blank",
|
||||
"width=322,height=250,resizable=1,scrollbars=0");
|
||||
w.opener = window;
|
||||
w.userFolderCallback = callback;
|
||||
w.userFolderType = type;
|
||||
window.userFolderCallback = callback;
|
||||
window.userFolderType = type;
|
||||
w.focus();
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ function onSearchKeyDown(event) {
|
||||
this.timer = setTimeout("onSearchFormSubmit()", 1000);
|
||||
}
|
||||
|
||||
function onSearchFormSubmit(event) {
|
||||
function onSearchFormSubmit(event) { log("generic.onSearchFormSubmit")
|
||||
var searchValue = $("searchValue");
|
||||
var searchCriteria = $("searchCriteria");
|
||||
|
||||
@@ -895,9 +895,9 @@ function popupToolbarMenu(node, menuId) {
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
var popup = $(menuId);
|
||||
var top = node.top + node.offsetHeight - 2;
|
||||
var top = ($(node).getStyle('top') || 0) + node.offsetHeight - 2;
|
||||
popup.setStyle({ top: top + "px",
|
||||
left: node.cascadeLeftOffset() + "px",
|
||||
left: $(node).cascadeLeftOffset() + "px",
|
||||
visibility: "visible" });
|
||||
|
||||
document.currentPopupMenu = popup;
|
||||
@@ -913,11 +913,11 @@ function folderSubscriptionCallback(http) {
|
||||
http.callbackData["method"](http.callbackData["data"]);
|
||||
}
|
||||
else
|
||||
window.alert(labels["Unable to subscribe to that folder!"].decodeEntities());
|
||||
window.alert(clabels["Unable to subscribe to that folder!"].decodeEntities());
|
||||
document.subscriptionAjaxRequest = null;
|
||||
}
|
||||
else
|
||||
log ("ajax fuckage");
|
||||
log ("folderSubscriptionCallback Ajax error");
|
||||
}
|
||||
|
||||
function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
||||
@@ -937,7 +937,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
||||
rfCbData);
|
||||
}
|
||||
else
|
||||
window.alert(labels["You cannot subscribe to a folder that you own!"]
|
||||
refreshCallbackData["window"].alert(clabels["You cannot subscribe to a folder that you own!"]
|
||||
.decodeEntities());
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ function folderUnsubscriptionCallback(http) {
|
||||
http.callbackData["method"](http.callbackData["data"]);
|
||||
}
|
||||
else
|
||||
window.alert(labels["Unable to unsubscribe from that folder!"].decodeEntities());
|
||||
window.alert(clabels["Unable to unsubscribe from that folder!"].decodeEntities());
|
||||
document.unsubscriptionAjaxRequest = null;
|
||||
}
|
||||
}
|
||||
@@ -975,7 +975,7 @@ function unsubscribeFromFolder(folder, refreshCallback, refreshCallbackData) {
|
||||
rfCbData);
|
||||
}
|
||||
else
|
||||
window.alert(labels["You cannot unsubscribe from a folder that you own!"].decodeEntities());
|
||||
window.alert(clabels["You cannot unsubscribe from a folder that you own!"].decodeEntities());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ modified by Martin Hoerning, mh@skyrix.com, 2002-12-05
|
||||
<style>
|
||||
td {font-family: Tahoma, Verdana, sans-serif; font-size: 12px;}
|
||||
</style>
|
||||
<script src="/SOGo.woa/WebServerResources/prototype.js" type="text/javascript"></script>
|
||||
<script language="JavaScript">
|
||||
|
||||
// months as they appear in the calendar's title
|
||||
@@ -110,9 +111,20 @@ function set_datetime(n_datetime, b_close) {
|
||||
? obj_caller.gen_tsmp(dt_datetime)
|
||||
: obj_caller.gen_date(dt_datetime)
|
||||
);
|
||||
var onChangeEvent = document.createEvent("Event");
|
||||
onChangeEvent.initEvent("change", false, true);
|
||||
obj_caller.target.dispatchEvent(onChangeEvent );
|
||||
if (document.initEvent) {
|
||||
var onChangeEvent = document.createEvent("Events");
|
||||
onChangeEvent.initEvent("mousedown", false, true);
|
||||
obj_caller.target.dispatchEvent(onChangeEvent);
|
||||
}
|
||||
else if (document.createEvent) {
|
||||
var onChangeEvent = document.createEvent("UIEvents");
|
||||
onChangeEvent.initEvent("mousedown", false, true);
|
||||
obj_caller.target.dispatchEvent(onChangeEvent);
|
||||
}
|
||||
else {
|
||||
// Francis: add support for IE
|
||||
obj_caller.target.fireEvent("onmousedown");
|
||||
}
|
||||
}
|
||||
if (b_close) window.close();
|
||||
else obj_caller.popup(dt_datetime.valueOf());
|
||||
|
||||
Reference in New Issue
Block a user