mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-30 10:32:47 +00:00
merge of '977a2fc6635839b5595a2518bac96d0260c9b3da'
and '997781056d484980738b11e151b8156a66f0998b' Monotone-Parent: 977a2fc6635839b5595a2518bac96d0260c9b3da Monotone-Parent: 997781056d484980738b11e151b8156a66f0998b Monotone-Revision: f0967567767bc3e201a892b9a9fc17de9c47f0a1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-06T19:19:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-08-06 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m ([UIxPreferences
|
||||
-defaultAction]): if the compose message type (HTML or plain text)
|
||||
has changed, reload the page (don't close it). This is a fix for a
|
||||
bug with disabling or enabling the CKEDITOR dynamically (in JavaScript).
|
||||
|
||||
2009-08-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoGCSFolder.m (-davSyncCollection): enhanced to
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
"signatureplacement_above" = "abaixo da minha resposta";
|
||||
"signatureplacement_below" = "abaixo da citação";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Parâmetros Adicionais";
|
||||
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
"signatureplacement_above" = "pod odpověď";
|
||||
"signatureplacement_below" = "pod citaci";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Dodatečné parametry";
|
||||
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Extra Parameters";
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
"messageforward_inline" = "Inline";
|
||||
"messageforward_attached" = "As Attachment";
|
||||
|
||||
/* Identities */
|
||||
"Default identity:" = "Default identity:";
|
||||
"Manage identities..." = "Manage identities...";
|
||||
"Signature" = "Signature";
|
||||
@@ -100,6 +101,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Additional Parameters";
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Texte";
|
||||
|
||||
"composeMessageChanged" = "Changer la composition des messages nécessite d'enregistrer immédiatement vos préférences. Voulez-vous continuez?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Paramètres supplémentaires";
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Zusätzliche Einstellungen";
|
||||
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Egyszerű szöveg";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "További beállítások";
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Parametri addizionali";
|
||||
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Additional Parameters";
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
NSCalendarDate *today;
|
||||
NSMutableArray *hours;
|
||||
NSArray *daysOfWeek;
|
||||
BOOL hasChanged;
|
||||
BOOL hasChanged, composeMessageTypeHasChanged;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -87,6 +87,7 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
ASSIGN (daysOfWeek,
|
||||
[locale objectForKey: NSWeekDayNameArray]);
|
||||
hasChanged = NO;
|
||||
composeMessageTypeHasChanged = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -633,7 +634,11 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
|
||||
- (void) setUserComposeMessagesType: (NSString *) newType
|
||||
{
|
||||
[userDefaults setObject: newType forKey: @"ComposeMessagesType"];
|
||||
if (![[self userComposeMessagesType] isEqualToString: newType])
|
||||
{
|
||||
composeMessageTypeHasChanged = YES;
|
||||
[userDefaults setObject: newType forKey: @"ComposeMessagesType"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -652,11 +657,18 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
if ([[request method] isEqualToString: @"POST"])
|
||||
{
|
||||
[userDefaults synchronize];
|
||||
if (hasChanged)
|
||||
method = @"window.location.reload()";
|
||||
if (composeMessageTypeHasChanged)
|
||||
// Due to a limitation of CKEDITOR, we reload the page when the user
|
||||
// changes the composition mode to avoid Javascript errors.
|
||||
results = self;
|
||||
else
|
||||
method = nil;
|
||||
results = [self jsCloseWithRefreshMethod: method];
|
||||
{
|
||||
if (hasChanged)
|
||||
method = @"window.location.reload()";
|
||||
else
|
||||
method = nil;
|
||||
results = [self jsCloseWithRefreshMethod: method];
|
||||
}
|
||||
}
|
||||
else
|
||||
results = self;
|
||||
|
||||
@@ -100,6 +100,8 @@
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
"composeMessageChanged" = "Changing your messages composition type requires to save your preferences immediately. Continue?";
|
||||
|
||||
/* Additional Parameters */
|
||||
"Additional Parameters" = "Additional Parameters";
|
||||
|
||||
|
||||
@@ -105,11 +105,12 @@
|
||||
</table></div>
|
||||
<input type="hidden" const:id="categoriesValue"
|
||||
const:name="categoriesValue" var:value="categoriesValue"/>
|
||||
<br/>
|
||||
<label><input type="button" class="button"
|
||||
id="categoryAdd" label:value="Add"/></label>
|
||||
<label><input type="button" class="button"
|
||||
id="categoryDelete" label:value="Delete"/></label>
|
||||
<div id="windowButtons">
|
||||
<label><input type="button" class="button"
|
||||
id="categoryAdd" label:value="Add"/></label>
|
||||
<label><input type="button" class="button"
|
||||
id="categoryDelete" label:value="Delete"/></label>
|
||||
</div>
|
||||
<!-- <br/> -->
|
||||
<!-- <label><input class="checkBox" -->
|
||||
<!-- type="checkbox" var:selection="reminderEnabled" -->
|
||||
|
||||
@@ -15,31 +15,29 @@ DIV#general LABEL
|
||||
margin-left: 0px;
|
||||
white-space: normal; }
|
||||
|
||||
DIV#mailOptionsView TEXTAREA
|
||||
{ width: 420px;
|
||||
height: 4em; }
|
||||
|
||||
DIV#passwordView
|
||||
{ padding-top: 3em;
|
||||
padding-right: 10em; }
|
||||
|
||||
DIV#identitiesView
|
||||
{ padding-top: 5px;
|
||||
padding-left: 5px; }
|
||||
{ padding: 5px 5px 5px 0px;
|
||||
overflow: hidden; }
|
||||
|
||||
#signature
|
||||
{ overflow: auto;
|
||||
width: 390px;
|
||||
max-width: 390px;
|
||||
height: 145px; }
|
||||
TEXTAREA#signature
|
||||
{ height: 100%;
|
||||
width: 100%; }
|
||||
|
||||
TABLE#categoriesList
|
||||
{ width: 95%; }
|
||||
{ width: 100%; }
|
||||
|
||||
DIV#categoriesListWrapper
|
||||
{ overflow:auto;
|
||||
height:230px;
|
||||
padding:2px; }
|
||||
{ overflow: auto;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
right: 0;
|
||||
top: 8em;
|
||||
left: 0;
|
||||
padding: 2px; }
|
||||
|
||||
DIV.colorBox
|
||||
{ border: 1px solid #333333;
|
||||
@@ -55,4 +53,15 @@ TR._selected
|
||||
{ background: #333333; }
|
||||
|
||||
TD.categoryListCell
|
||||
{ -moz-user-select: none; }
|
||||
{ -moz-user-select: none; }
|
||||
|
||||
DIV#windowButtons
|
||||
{ position: fixed;
|
||||
top: auto;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 25px;
|
||||
height: 3.5em;
|
||||
line-height: 2em;
|
||||
vertical-align: middle;
|
||||
text-align: right; }
|
||||
@@ -1,252 +1,260 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
function savePreferences(sender) {
|
||||
var sigList = $("signaturePlacementList");
|
||||
if (sigList)
|
||||
sigList.disabled=false;
|
||||
var sigList = $("signaturePlacementList");
|
||||
if (sigList)
|
||||
sigList.disabled=false;
|
||||
|
||||
serializeCategories (null);
|
||||
$("mainForm").submit();
|
||||
serializeCategories (null);
|
||||
|
||||
return false;
|
||||
$("mainForm").submit();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function _setupEvents(enable) {
|
||||
var widgets = [ "timezone", "shortDateFormat", "longDateFormat",
|
||||
"timeFormat", "weekStartDay", "dayStartTime", "dayEndTime",
|
||||
"firstWeek", "messageCheck", "subscribedFoldersOnly" ];
|
||||
for (var i = 0; i < widgets.length; i++) {
|
||||
var widget = $(widgets[i]);
|
||||
if (widget) {
|
||||
if (enable)
|
||||
widget.observe("change", onChoiceChanged);
|
||||
else
|
||||
widget.stopObserving("change", onChoiceChanged);
|
||||
var widgets = [ "timezone", "shortDateFormat", "longDateFormat",
|
||||
"timeFormat", "weekStartDay", "dayStartTime", "dayEndTime",
|
||||
"firstWeek", "messageCheck", "subscribedFoldersOnly" ];
|
||||
for (var i = 0; i < widgets.length; i++) {
|
||||
var widget = $(widgets[i]);
|
||||
if (widget) {
|
||||
if (enable)
|
||||
widget.observe("change", onChoiceChanged);
|
||||
else
|
||||
widget.stopObserving("change", onChoiceChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("replyPlacementList").observe ("change", onReplyPlacementListChange);
|
||||
$("composeMessagesType").observe ("change", onComposeMessagesTypeChange);
|
||||
$("categoriesValue").value = "prout";
|
||||
$("replyPlacementList").observe ("change", onReplyPlacementListChange);
|
||||
$("composeMessagesType").observe ("change", onComposeMessagesTypeChange);
|
||||
$("categoriesValue").value = "";
|
||||
}
|
||||
|
||||
function onChoiceChanged(event) {
|
||||
var hasChanged = $("hasChanged");
|
||||
hasChanged.value = "1";
|
||||
var hasChanged = $("hasChanged");
|
||||
hasChanged.value = "1";
|
||||
|
||||
_setupEvents(false);
|
||||
_setupEvents(false);
|
||||
}
|
||||
|
||||
function initPreferences() {
|
||||
_setupEvents(true);
|
||||
if (typeof (initAdditionalPreferences) != "undefined")
|
||||
initAdditionalPreferences();
|
||||
_setupEvents(true);
|
||||
if (typeof (initAdditionalPreferences) != "undefined")
|
||||
initAdditionalPreferences();
|
||||
|
||||
if ($("signature")) {
|
||||
onComposeMessagesTypeChange ();
|
||||
}
|
||||
if ($("signature")) {
|
||||
onComposeMessagesTypeChange ();
|
||||
}
|
||||
|
||||
resetCategoriesColors (null);
|
||||
var table = $("categoriesList");
|
||||
var r = $$("TABLE#categoriesList tbody tr");
|
||||
for (var i=0; i<r.length; i++)
|
||||
r[i].identify ();
|
||||
table.multiselect = true;
|
||||
TableKit.Resizable.init(table,
|
||||
{'trueResize' : true, 'keepWidth' : true});
|
||||
resetTableActions ();
|
||||
$("categoryAdd").observe ("click", onCategoryAdd);
|
||||
$("categoryDelete").observe ("click", onCategoryDelete);
|
||||
resetCategoriesColors (null);
|
||||
var table = $("categoriesList");
|
||||
var r = $$("TABLE#categoriesList tbody tr");
|
||||
for (var i=0; i<r.length; i++)
|
||||
r[i].identify ();
|
||||
table.multiselect = true;
|
||||
resetTableActions ();
|
||||
$("categoryAdd").observe ("click", onCategoryAdd);
|
||||
$("categoryDelete").observe ("click", onCategoryDelete);
|
||||
}
|
||||
|
||||
function resetTableActions () {
|
||||
var r = $$("TABLE#categoriesList tbody tr");
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var row = $(r[i]);
|
||||
row.observe("mousedown", onRowClick);
|
||||
var tds = row.childElements ();
|
||||
tds[0].observe("mousedown", endAllEditables);
|
||||
tds[0].observe ("dblclick", onNameEdit);
|
||||
tds[1].observe("mousedown", endAllEditables);
|
||||
tds[1].childElements ()[0].observe ("dblclick", onColorEdit);
|
||||
}
|
||||
function resetTableActions() {
|
||||
var r = $$("TABLE#categoriesList tbody tr");
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var row = $(r[i]);
|
||||
row.observe("mousedown", onRowClick);
|
||||
var tds = row.childElements();
|
||||
tds[0].observe("mousedown", endAllEditables);
|
||||
tds[0].observe("dblclick", onNameEdit);
|
||||
tds[1].observe("mousedown", endAllEditables);
|
||||
tds[1].childElements()[0].observe ("dblclick", onColorEdit);
|
||||
}
|
||||
}
|
||||
|
||||
function makeEditable (element) {
|
||||
element.addClassName ("editing");
|
||||
element.removeClassName ("categoryListCell");
|
||||
var tmp = element.innerHTML;
|
||||
element.innerHTML = "";
|
||||
var textField = new Element ("input", {"type": "text",
|
||||
"width": "100%"});
|
||||
textField.value = tmp;
|
||||
textField.observe ("keydown", interceptEnter);
|
||||
element.appendChild (textField);
|
||||
textField.focus ();
|
||||
textField.select ();
|
||||
element.addClassName ("editing");
|
||||
element.removeClassName ("categoryListCell");
|
||||
var tmp = element.innerHTML;
|
||||
element.innerHTML = "";
|
||||
var textField = new Element ("input", {"type": "text",
|
||||
"width": "100%"});
|
||||
textField.value = tmp;
|
||||
textField.observe ("keydown", interceptEnter);
|
||||
element.appendChild (textField);
|
||||
textField.focus ();
|
||||
textField.select ();
|
||||
}
|
||||
|
||||
function interceptEnter (e) {
|
||||
if (e.keyCode == Event.KEY_RETURN) {
|
||||
endAllEditables (null);
|
||||
preventDefault (e);
|
||||
return false;
|
||||
}
|
||||
if (e.keyCode == Event.KEY_RETURN) {
|
||||
endAllEditables (null);
|
||||
preventDefault (e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function endEditable (element) {
|
||||
var tmp = element.childElements ().first ().value;
|
||||
element.innerHTML = tmp;
|
||||
element.removeClassName ("editing");
|
||||
element.addClassName ("categoryListCell");
|
||||
var tmp = element.childElements ().first ().value;
|
||||
element.innerHTML = tmp;
|
||||
element.removeClassName ("editing");
|
||||
element.addClassName ("categoryListCell");
|
||||
}
|
||||
|
||||
function endAllEditables (e) {
|
||||
var r = $$("TABLE#categoriesList tbody tr td");
|
||||
for (var i=0; i<r.length; i++) {
|
||||
if (r[i] != this && r[i].hasClassName ("editing"))
|
||||
endEditable ($(r[i]));
|
||||
}
|
||||
var r = $$("TABLE#categoriesList tbody tr td");
|
||||
for (var i=0; i<r.length; i++) {
|
||||
if (r[i] != this && r[i].hasClassName ("editing"))
|
||||
endEditable ($(r[i]));
|
||||
}
|
||||
}
|
||||
|
||||
function onNameEdit (e) {
|
||||
endAllEditables ();
|
||||
if (!this.hasClassName ("editing")) {
|
||||
makeEditable (this);
|
||||
}
|
||||
endAllEditables ();
|
||||
if (!this.hasClassName ("editing")) {
|
||||
makeEditable (this);
|
||||
}
|
||||
}
|
||||
|
||||
function onColorEdit (e) {
|
||||
var r = $$("TABLE#categoriesList tbody tr td div.colorEditing");
|
||||
for (var i=0; i<r.length; i++)
|
||||
r[i].removeClassName ("colorEditing");
|
||||
var r = $$("TABLE#categoriesList tbody tr td div.colorEditing");
|
||||
for (var i=0; i<r.length; i++)
|
||||
r[i].removeClassName ("colorEditing");
|
||||
|
||||
this.addClassName ("colorEditing");
|
||||
var cPicker = window.open(ApplicationBaseURL + "../" + UserLogin
|
||||
+ "/Calendar/colorPicker", "colorPicker",
|
||||
"width=250,height=200,resizable=0,scrollbars=0"
|
||||
+ "toolbar=0,location=0,directories=0,status=0,"
|
||||
+ "menubar=0,copyhistory=0", "test"
|
||||
);
|
||||
cPicker.focus();
|
||||
this.addClassName ("colorEditing");
|
||||
var cPicker = window.open(ApplicationBaseURL + "../" + UserLogin
|
||||
+ "/Calendar/colorPicker", "colorPicker",
|
||||
"width=250,height=200,resizable=0,scrollbars=0"
|
||||
+ "toolbar=0,location=0,directories=0,status=0,"
|
||||
+ "menubar=0,copyhistory=0", "test"
|
||||
);
|
||||
cPicker.focus();
|
||||
|
||||
preventDefault(e);
|
||||
preventDefault(e);
|
||||
}
|
||||
|
||||
function onColorPickerChoice (newColor) {
|
||||
var div = $$("TABLE#categoriesList tbody tr td div.colorEditing").first ();
|
||||
// div.removeClassName ("colorEditing");
|
||||
div.showColor = newColor;
|
||||
div.style.background = newColor;
|
||||
var div = $$("TABLE#categoriesList tbody tr td div.colorEditing").first ();
|
||||
// div.removeClassName ("colorEditing");
|
||||
div.showColor = newColor;
|
||||
div.style.background = newColor;
|
||||
}
|
||||
|
||||
|
||||
function onCategoryAdd (e) {
|
||||
var row = new Element ("tr");
|
||||
var nametd = new Element ("td").update ("");
|
||||
var colortd = new Element ("td");
|
||||
var colordiv = new Element ("div", {"class": "colorBox"});
|
||||
var row = new Element ("tr");
|
||||
var nametd = new Element ("td").update ("");
|
||||
var colortd = new Element ("td");
|
||||
var colordiv = new Element ("div", {"class": "colorBox"});
|
||||
|
||||
row.identify ();
|
||||
row.addClassName ("categoryListRow");
|
||||
row.identify ();
|
||||
row.addClassName ("categoryListRow");
|
||||
|
||||
nametd.addClassName ("categoryListCell");
|
||||
nametd.addClassName ("categoryListCell");
|
||||
|
||||
colortd.addClassName ("categoryListCell");
|
||||
colordiv.innerHTML = " ";
|
||||
colordiv.showColor = "#F0F0F0";
|
||||
colordiv.style.background = colordiv.showColor;
|
||||
colortd.addClassName ("categoryListCell");
|
||||
colordiv.innerHTML = " ";
|
||||
colordiv.showColor = "#F0F0F0";
|
||||
colordiv.style.background = colordiv.showColor;
|
||||
|
||||
colortd.appendChild (colordiv);
|
||||
row.appendChild (nametd);
|
||||
row.appendChild (colortd);
|
||||
$("categoriesList").tBodies[0].appendChild (row);
|
||||
makeEditable (nametd);
|
||||
colortd.appendChild (colordiv);
|
||||
row.appendChild (nametd);
|
||||
row.appendChild (colortd);
|
||||
$("categoriesList").tBodies[0].appendChild (row);
|
||||
makeEditable (nametd);
|
||||
|
||||
resetTableActions ();
|
||||
resetTableActions ();
|
||||
}
|
||||
|
||||
function onCategoryDelete (e) {
|
||||
var list = $('categoriesList').down("TBODY");;
|
||||
var rows = list.getSelectedNodes();
|
||||
var count = rows.length;
|
||||
var list = $('categoriesList').down("TBODY");;
|
||||
var rows = list.getSelectedNodes();
|
||||
var count = rows.length;
|
||||
|
||||
for (var i=0; i < count; i++) {
|
||||
rows[i].remove ();
|
||||
}
|
||||
for (var i=0; i < count; i++) {
|
||||
rows[i].remove ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function serializeCategories (e) {
|
||||
var r = $$("TABLE#categoriesList tbody tr");
|
||||
var names = "(";
|
||||
var colors = "(";
|
||||
var r = $$("TABLE#categoriesList tbody tr");
|
||||
var names = "(";
|
||||
var colors = "(";
|
||||
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var tds = r[i].childElements ();
|
||||
var name = $(tds.first ()).innerHTML;
|
||||
var color = $(tds.last ().childElements ().first ()).showColor;
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var tds = r[i].childElements ();
|
||||
var name = $(tds.first ()).innerHTML;
|
||||
var color = $(tds.last ().childElements ().first ()).showColor;
|
||||
|
||||
names += "\"" + name + "\", ";
|
||||
colors += "\"" + color + "\", ";
|
||||
}
|
||||
names = names.substr (0, names.length - 1) + ")";
|
||||
colors = colors.substr (0, colors.length - 1) + ")";
|
||||
names += "\"" + name + "\", ";
|
||||
colors += "\"" + color + "\", ";
|
||||
}
|
||||
names = names.substr (0, names.length - 1) + ")";
|
||||
colors = colors.substr (0, colors.length - 1) + ")";
|
||||
|
||||
$("categoriesValue").value = "(" + names + ", " + colors + ")";
|
||||
$("categoriesValue").value = "(" + names + ", " + colors + ")";
|
||||
}
|
||||
|
||||
|
||||
function resetCategoriesColors (e) {
|
||||
var divs = $$("DIV.colorBox");
|
||||
var divs = $$("TABLE#categoriesList DIV.colorBox");
|
||||
|
||||
for (var i = 0; i < divs.length; i++) {
|
||||
var d = $(divs[i]);
|
||||
var color = d.innerHTML;
|
||||
d.showColor = color;
|
||||
d.style.background = color;
|
||||
d.innerHTML = " ";
|
||||
}
|
||||
for (var i = 0; i < divs.length; i++) {
|
||||
var d = divs[i];
|
||||
var color = d.innerHTML;
|
||||
d.showColor = color;
|
||||
if (color != "undefined")
|
||||
d.setStyle({ backgroundColor: color });
|
||||
d.update(" ");
|
||||
}
|
||||
}
|
||||
|
||||
function onReplyPlacementListChange() {
|
||||
// above = 0
|
||||
if ($("replyPlacementList").value == 0) {
|
||||
$("signaturePlacementList").disabled=false;
|
||||
}
|
||||
else {
|
||||
$("signaturePlacementList").value=1;
|
||||
$("signaturePlacementList").disabled=true;
|
||||
}
|
||||
// above = 0
|
||||
if ($("replyPlacementList").value == 0) {
|
||||
$("signaturePlacementList").disabled=false;
|
||||
}
|
||||
else {
|
||||
$("signaturePlacementList").value=1;
|
||||
$("signaturePlacementList").disabled=true;
|
||||
}
|
||||
}
|
||||
|
||||
function onComposeMessagesTypeChange () {
|
||||
var textArea = $('signature');
|
||||
var editor = $('cke_signature');
|
||||
|
||||
// Textmode
|
||||
if ($("composeMessagesType").value == 0) {
|
||||
textArea.style.height = "340px";
|
||||
if (editor) {
|
||||
CKEDITOR.instances.signature.removeListener ()
|
||||
CKEDITOR.instances.signature.destroy (false);
|
||||
CKEDITOR.instances.signature = null;
|
||||
delete (CKEDITOR.instances.signature);
|
||||
function onComposeMessagesTypeChange(event) {
|
||||
var textArea = $('signature');
|
||||
|
||||
if (event) {
|
||||
// Due to a limitation of CKEDITOR, we reload the page when the user
|
||||
// changes the composition mode to avoid Javascript errors.
|
||||
var saveAndReload = confirm(labels["composeMessageChanged"]);
|
||||
if (saveAndReload)
|
||||
return savePreferences();
|
||||
else {
|
||||
// Restore previous value of composeMessagesType
|
||||
$("composeMessagesType").stopObserving("change", onComposeMessagesTypeChange);
|
||||
$("composeMessagesType").value = ((Event.element(event).value == 1)?"0":"1");
|
||||
Event.element(event).blur();
|
||||
$("composeMessagesType").observe("change", onComposeMessagesTypeChange);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($("composeMessagesType").value == 1) {
|
||||
// HTML mode
|
||||
CKEDITOR.replace('signature',
|
||||
{
|
||||
skin: "v2",
|
||||
resizable: CKEDITOR.DIALOG_RESIZE_NONE,
|
||||
height: "290px",
|
||||
toolbar :
|
||||
[['Bold', 'Italic', '-', 'Link',
|
||||
'Font','FontSize','-','TextColor',
|
||||
'BGColor']
|
||||
]
|
||||
}
|
||||
);
|
||||
CKEDITOR.config.disableObjectResizing = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
CKEDITOR.replace('signature',
|
||||
{
|
||||
skin: "v2",
|
||||
height: "280px",
|
||||
toolbar :
|
||||
[['Bold', 'Italic', '-', 'Link',
|
||||
'Font','FontSize','-','TextColor',
|
||||
'BGColor']
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", initPreferences);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
@@ -321,3 +321,11 @@ fieldset div, fieldset p
|
||||
/* UIxMailEditor */
|
||||
DIV#headerArea
|
||||
{ padding-bottom: 0px; }
|
||||
|
||||
/* UIxPreferences */
|
||||
TEXTAREA#signature
|
||||
{ height: 33em;
|
||||
overflow: auto; }
|
||||
|
||||
TABLE#categoriesList
|
||||
{ width: auto; }
|
||||
|
||||
Reference in New Issue
Block a user