mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-04 22:56:24 +00:00
See ChangeLog.
Monotone-Parent: 870459b5cd89f38f2c5d579fccb19dba58515f8b Monotone-Revision: 4d8fb1ed0734fbcfd6dc4e68194b48101ac46567 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-01-30T19:59:05
This commit is contained in:
17
ChangeLog
17
ChangeLog
@@ -1,3 +1,20 @@
|
||||
2012-01-30 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxCalUserRightsEditor.js (onUpdateACL):
|
||||
ask confirmation when giving access to all authenticated users or
|
||||
when giving public access.
|
||||
|
||||
* UI/WebServerResources/UIxMailUserRightsEditor.js (onUpdateACL): idem.
|
||||
|
||||
* UI/WebServerResources/UIxContactsUserRightsEditor.js (onUpdateACL): idem.
|
||||
|
||||
* UI/WebServerResources/SchedulerUI.js (onViewEventCallback):
|
||||
moved start/end time just under the event name.
|
||||
|
||||
* UI/WebServerResources/generic.js (showConfirmDialog): this
|
||||
function now accepts two additional arguments to change the
|
||||
default "yes" and "no" buttons.
|
||||
|
||||
2012-01-27 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
"Are you sure you want to give rights to all authenticated users?" = "Are you sure you want to give rights to all authenticated users?";
|
||||
"Are you sure you want to give rights to everybody?" = "Are you sure you want to give rights to everybody?";
|
||||
"Give Access" = "Give Access";
|
||||
"Keep Private" = "Keep Private";
|
||||
|
||||
/* generic.js */
|
||||
"Unable to subscribe to that folder!"
|
||||
= "Unable to subscribe to that folder!";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
const:toolbar="none"
|
||||
const:popup="YES">
|
||||
<form id="userRightsForm" const:href="saveUserRights">
|
||||
<input type="hidden" name="uid" var:value="uid"/>
|
||||
<input id="uid" type="hidden" name="uid" var:value="uid"/>
|
||||
<div class="title">
|
||||
<var:if condition="userIsDefaultUser">
|
||||
<label><span class="value"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
const:toolbar="none"
|
||||
const:popup="YES">
|
||||
<form id="userRightsForm" const:href="saveUserRights">
|
||||
<input type="hidden" name="uid" var:value="uid"/>
|
||||
<input id="uid" type="hidden" name="uid" var:value="uid"/>
|
||||
<div class="title">
|
||||
<var:if condition="userIsDefaultUser">
|
||||
<label><span class="value"><var:string label:value="Default Roles"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
const:toolbar="none"
|
||||
const:popup="YES">
|
||||
<form id="userRightsForm" const:href="saveUserRights">
|
||||
<input type="hidden" name="uid" var:value="uid"/>
|
||||
<input id="uid" type="hidden" name="uid" var:value="uid"/>
|
||||
<div class="title">
|
||||
<var:if condition="userIsDefaultUser">
|
||||
<label><span class="value"><var:string label:value="Any Authenticated User"
|
||||
|
||||
@@ -725,6 +725,13 @@ function onViewEventCallback(http) {
|
||||
|
||||
var paras = div.getElementsByTagName("p");
|
||||
var para = $(paras[0]);
|
||||
if (parseInt(data["isAllDay"]) == 0) {
|
||||
para.down("SPAN").update(data["startTime"] + " - " + data["endTime"]);
|
||||
para.show();
|
||||
} else
|
||||
para.hide();
|
||||
|
||||
para = $(paras[1]);
|
||||
if (data["calendar"].length) {
|
||||
// Remove owner email from calendar's name
|
||||
para.down("SPAN", 1).update(data["calendar"].replace(/ \<.*\>/, ""));
|
||||
@@ -732,20 +739,13 @@ function onViewEventCallback(http) {
|
||||
} else
|
||||
para.hide();
|
||||
|
||||
para = $(paras[1]);
|
||||
para = $(paras[2]);
|
||||
if (data["location"].length) {
|
||||
para.down("SPAN", 1).update(data["location"]);
|
||||
para.show();
|
||||
} else
|
||||
para.hide();
|
||||
|
||||
para = $(paras[2]);
|
||||
if (parseInt(data["isAllDay"]) == 0) {
|
||||
para.down("SPAN").update(data["startTime"] + " - " + data["endTime"]);
|
||||
para.show();
|
||||
} else
|
||||
para.hide();
|
||||
|
||||
para = $(paras[3]);
|
||||
if (data["description"].length) {
|
||||
para.update(data["description"].replace(/\r?\n/g, "<BR/>"));
|
||||
|
||||
@@ -27,3 +27,10 @@ DIV.buttons
|
||||
{ text-align: right;
|
||||
margin: 1em;
|
||||
margin-top: 0px; }
|
||||
|
||||
DIV.dialog.none
|
||||
{ position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
margin: 50px auto; }
|
||||
@@ -1,12 +1,57 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
function onUpdateACL(event) {
|
||||
var uid = $('uid').value;
|
||||
if (uid == '<default>' || uid == 'anonymous') {
|
||||
var selects = $$('#userRightsForm select');
|
||||
var enabled = false;
|
||||
for (var i = 0; i < selects.length; i++) {
|
||||
if (selects[i].value != 'None') {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!enabled) {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].checked) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (enabled) {
|
||||
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to " + ((uid == "<default>")?"all authenticated users":"everybody") + "?"),
|
||||
onUpdateACLConfirm, onUpdateACLCancel,
|
||||
"Give Access", "Keep Private");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return onUpdateACLConfirm(event);
|
||||
}
|
||||
|
||||
function onUpdateACLConfirm(event) {
|
||||
disposeDialog();
|
||||
|
||||
$('userRightsForm').submit();
|
||||
Event.stop(event);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onUpdateACLCancel(event) {
|
||||
var options = $$('#userRightsForm option');
|
||||
for (var i = 0; i < options.length; i++)
|
||||
options[i].selected = (options[i].value == 'None');
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
for (var i = 0; i < inputs.length; i++)
|
||||
if (inputs[i].checked)
|
||||
inputs[i].checked = false;
|
||||
|
||||
disposeDialog();
|
||||
}
|
||||
|
||||
function onCancelACL(event) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
@@ -47,3 +47,10 @@ DIV.calendarUserRights > TABLE TD
|
||||
DIV.buttons
|
||||
{ text-align: right;
|
||||
margin: 1em; }
|
||||
|
||||
DIV.dialog.none
|
||||
{ position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
margin: 10px auto; }
|
||||
@@ -1,12 +1,45 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
function onUpdateACL(event) {
|
||||
var uid = $('uid').value;
|
||||
if (uid == '<default>' || uid == 'anonymous') {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
var enabled = false;
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].checked) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (enabled) {
|
||||
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to " + ((uid == "<default>")?"all authenticated users":"everybody") + "?"),
|
||||
onUpdateACLConfirm, onUpdateACLCancel,
|
||||
"Give Access", "Keep Private");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return onUpdateACLConfirm(event);
|
||||
}
|
||||
|
||||
function onUpdateACLConfirm(event) {
|
||||
disposeDialog();
|
||||
|
||||
$('userRightsForm').submit();
|
||||
Event.stop(event);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onUpdateACLCancel(event) {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
for (var i = 0; i < inputs.length; i++)
|
||||
if (inputs[i].checked)
|
||||
inputs[i].checked = false;
|
||||
|
||||
disposeDialog();
|
||||
}
|
||||
|
||||
function onCancelACL(event) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
@@ -47,3 +47,10 @@ DIV.calendarUserRights > TABLE TD
|
||||
DIV.buttons
|
||||
{ text-align: right;
|
||||
margin: 1em; }
|
||||
|
||||
DIV.dialog.none
|
||||
{ position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
margin: 75px auto; }
|
||||
@@ -1,12 +1,44 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
function onUpdateACL(event) {
|
||||
if ($('uid').value == 'anyone') {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
var enabled = false;
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].checked) {
|
||||
enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (enabled) {
|
||||
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to all authenticated users?"),
|
||||
onUpdateACLConfirm, onUpdateACLCancel,
|
||||
"Give Access", "Keep Private");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return onUpdateACLConfirm(event);
|
||||
}
|
||||
|
||||
function onUpdateACLConfirm(event) {
|
||||
disposeDialog();
|
||||
|
||||
$('userRightsForm').submit();
|
||||
Event.stop(event);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onUpdateACLCancel(event) {
|
||||
var inputs = $$('#userRightsForm input[type="checkbox"]');
|
||||
for (var i = 0; i < inputs.length; i++)
|
||||
if (inputs[i].checked)
|
||||
inputs[i].checked = false;
|
||||
|
||||
disposeDialog();
|
||||
}
|
||||
|
||||
function onCancelACL(event) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
@@ -722,7 +722,6 @@ function popupMenu(event, menuId, target) {
|
||||
visibility: "visible" });
|
||||
|
||||
document.currentPopupMenu = popup;
|
||||
|
||||
$(document.body).observe("mousedown", onBodyClickMenuHandler);
|
||||
}
|
||||
}
|
||||
@@ -1963,15 +1962,15 @@ function _showAlertDialog(label) {
|
||||
dialog.appear({ duration: 0.2 });
|
||||
}
|
||||
|
||||
function showConfirmDialog(title, label, callbackYes, callbackNo) {
|
||||
function showConfirmDialog(title, label, callbackYes, callbackNo, yesLabel, noLabel) {
|
||||
var div = $("bgDialogDiv");
|
||||
if (div && div.visible() && div.getOpacity() > 0)
|
||||
dialogsStack.push(_showConfirmDialog.bind(this, title, label, callbackYes, callbackNo));
|
||||
dialogsStack.push(_showConfirmDialog.bind(this, title, label, callbackYes, callbackNo, yesLabel, noLabel));
|
||||
else
|
||||
_showConfirmDialog(title, label, callbackYes, callbackNo);
|
||||
_showConfirmDialog(title, label, callbackYes, callbackNo, yesLabel, noLabel);
|
||||
}
|
||||
|
||||
function _showConfirmDialog(title, label, callbackYes, callbackNo) {
|
||||
function _showConfirmDialog(title, label, callbackYes, callbackNo, yesLabel, noLabel) {
|
||||
var key = title;
|
||||
if (Object.isElement(label)) key += label.allTextContent();
|
||||
else key += label;
|
||||
@@ -1988,8 +1987,8 @@ function _showConfirmDialog(title, label, callbackYes, callbackNo) {
|
||||
}
|
||||
else {
|
||||
var fields = createElement("p");
|
||||
fields.appendChild(createButton(null, _("Yes"), callbackYes));
|
||||
fields.appendChild(createButton(null, _("No"), callbackNo || disposeDialog));
|
||||
fields.appendChild(createButton(null, _(yesLabel || "Yes"), callbackYes));
|
||||
fields.appendChild(createButton(null, _(noLabel || "No"), callbackNo || disposeDialog));
|
||||
dialog = createDialog(null,
|
||||
title,
|
||||
label,
|
||||
@@ -2098,7 +2097,7 @@ function disposeDialog() {
|
||||
dialogsStack.splice(0, 1);
|
||||
dialogFcn.delay(0.2);
|
||||
}
|
||||
else {
|
||||
else if ($('bgDialogDiv')) {
|
||||
var bgFade = Effect.Fade('bgDialogDiv', { duration: 0.2 });
|
||||
// By the end the background fade out, a new dialog
|
||||
// may need to be displayed.
|
||||
|
||||
@@ -215,4 +215,10 @@ TABLE#filtersList
|
||||
/* UIxComponentEditor */
|
||||
|
||||
.SOGoTimePickerMenu > DIV
|
||||
{ width: 310px; }
|
||||
{ width: 310px; }
|
||||
|
||||
/* UIx*UserRights */
|
||||
BODY.popup DIV.dialog.none
|
||||
{ left: 50%;
|
||||
width: 350px;
|
||||
margin-left: -175px; }
|
||||
Reference in New Issue
Block a user