]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1271 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 20 Nov 2007 17:06:58 +0000 (17:06 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 20 Nov 2007 17:06:58 +0000 (17:06 +0000)
ChangeLog
SoObjects/Appointments/SOGoAppointmentObject.m
UI/Templates/MailerUI/UIxMailEditor.wox
UI/WebServerResources/MailerUI.js
UI/WebServerResources/UIxAttendeesEditor.js
UI/WebServerResources/UIxMailEditor.js
UI/WebServerResources/generic.css

index fc8949637254a7997a15c9832524f7c4c5d83091..1a4b1c0ac0906ca9c78f4e57c133beb547743613 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-20  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * SoObjects/Appointments/SOGoAppointmentObject.m: don't take an
+       empty c_name as a valid response when looking up an event. Create
+       one in that case instead.
+
 2007-11-19  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * UI/PreferencesUI/UIxPreferences.m ([UIxPreferences -signature]):
index dac2f254752ecaec25a0133186258c3c0a84115b..b8814b8e77b12a1dde7189a061066b0d543aeb2f 100644 (file)
@@ -73,6 +73,8 @@
          if ([object isKindOfClass: [NSException class]])
            object = nil;
        }
+      else
+       object = nil;
     }
 
   if (!object)
       ex = [self saveContentString: newContent];
       if (!(ex || [event userIsOrganizer: [context activeUser]]))
        {
-         if ([[attendee rsvp] isEqualToString: @"true"])
+         if ([[attendee rsvp] isEqualToString: @"true"]
+             && [event isStillRelevant])
            [self sendResponseToOrganizer];
          organizerUID = [[event organizer] uid];
          if (organizerUID)
index 090e69f66123e2e4852ef960468b5ea66937079e..4609c7b9c962a012374981b252d2142872087dec 100644 (file)
@@ -54,7 +54,7 @@
            /></div>
     <!-- separator line --><hr/>
     </div>
-    <textarea name="text" rows="30" var:value="text"/>
+    <textarea id="text" name="text" rows="30" var:value="text"/>
     <!-- img rsrc:src="tbird_073_compose.png" alt="screenshot" / -->
   </form>
 </var:component>
index 7f4eaa97b594df450be95c50aeeb114d4924d7d5..9af0b91e38077dd28d3ccceaa80c66f9c0868bdc 100644 (file)
@@ -734,14 +734,11 @@ function configureLinksInMessage() {
   var anchors = messageDiv.getElementsByTagName('a');
   for (var i = 0; i < anchors.length; i++)
     if (anchors[i].href.substring(0,7) == "mailto:") {
-      Event.observe(anchors[i], "click",
-                   onEmailAddressClick.bindAsEventListener(anchors[i]));
-      Event.observe(anchors[i], "contextmenu",
-                   onEmailAddressClick.bindAsEventListener(anchors[i]));
+      $(anchors[i]).observe("click", onEmailTo);
+      $(anchors[i]).observe("contextmenu", onEmailAddressClick);
     }
     else
-      Event.observe(anchors[i], "click",
-                   onMessageAnchorClick.bindAsEventListener(anchors[i]));
+      $(anchors[i]).observe("click", onMessageAnchorClick);
 
   var editDraftButton = $("editDraftButton");
   if (editDraftButton)
@@ -773,7 +770,6 @@ function onICalendarButtonClick(event) {
   var link = $("iCalendarAttachment").value;
   if (link) {
     var urlstr = link + "/" + this.action;
-    log ("click: " + urlstr);
     triggerAjaxRequest(urlstr, ICalendarButtonCallback,
                       currentMailbox + "/"
                       + currentMessages[currentMailbox]);
@@ -944,6 +940,10 @@ function newContactFromEmail(event) {
   return false; /* stop following the link */
 }
 
+function onEmailTo(event) {
+  return openMailTo(this.innerHTML.strip());
+}
+
 function newEmailTo(sender) {
   return openMailTo(document.menuTarget.innerHTML);
 }
index beed7baeeff00ad8e942b886935b33ad4af6e594..7c242a3cca67e7cd1ecfc04cccbab94e67ee1d48 100644 (file)
@@ -94,7 +94,7 @@ function updateResults(http) {
          var completeEmail = contact["name"] + " <" + contact["email"] + ">";
          var node = document.createElement("li");
          list.appendChild(node);
-         node.uid = contact["uid"];
+         node.setAttribute("uid", contact["uid"]);
          node.appendChild(document.createTextNode(completeEmail));
          $(node).observe("mousedown", onAttendeeResultClick);
        }
index 54846025a1d91e89159f329fe18698ed3f8e1dab..686d5bdc02ef8f82adb5291351e0f9db626c6903 100644 (file)
@@ -1,4 +1,5 @@
 var contactSelectorAction = 'mailer-contacts';
+var signatureLength = 0;
 
 function onContactAdd() {
   var selector = null;
@@ -240,6 +241,16 @@ function clickedEditorSave(sender) {
   return false;
 }
 
+function onTextFocus() {
+  this.insertBefore(document.createTextNode("\r\n"),
+                   this.lastChild);
+  if (signatureLength > 0) {
+    var length = this.getValue().length - signatureLength - 1;
+    this.setSelectionRange(length, length);
+  }
+  Event.stopObserving(this, "focus", onTextFocus);
+}
+
 function initMailEditor() {
   var list = $("attachments");
   $(list).attachMenu("attachmentsMenu");
@@ -256,6 +267,14 @@ function initMailEditor() {
   var list = $("addressList");
   TableKit.Resizable.init(list, {'trueResize' : true, 'keepWidth' : true});
 
+  var textarea = $("text");
+  var textContent = textarea.getValue();
+  var sigLimit = textContent.lastIndexOf("--");
+  if (sigLimit > -1)
+    signatureLength = (textContent.length - sigLimit);
+  Event.observe(textarea, "focus",
+               onTextFocus.bindAsEventListener(textarea));
+
   onWindowResize(null);
   Event.observe(window, "resize", onWindowResize);
   Event.observe(window, "beforeunload", onMailEditorClose);
index 3b6c58a49dedc1f6fca7e458d9dd0e328c312fe6..38fd841b2650472a473a5ce92ca2b475f2c3d6b6 100644 (file)
@@ -196,8 +196,7 @@ DIV, TEXTAREA, INPUT, SELECT
   font-size: inherit; }
 
 TEXTAREA, INPUT.textField
-{ padding: 0px;
-  margin: .15em;
+{ margin: 1px;
   border-bottom: 1px solid #fff;
   border-right: 1px solid #fff;
   border-top: 2px solid #222;
@@ -205,8 +204,13 @@ TEXTAREA, INPUT.textField
   -moz-border-top-colors: #9c9a94 #000 transparent;
   -moz-border-left-colors: #9c9a94 #000 transparent; }
 
+TEXTAREA
+{ padding: 0px;
+  padding-left: 2px; }
+
 INPUT.textField
-{ vertical-align: middle; }
+{ padding: 2px;
+  vertical-align: middle; }
 
 DIV#toolbar
 { left: 0px;