From: helge Date: Tue, 12 Oct 2004 11:23:37 +0000 (+0000) Subject: work on mailer UI X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c99bad3c5f671ee6f7ceebc7d2629b2816abf1f;p=scalable-opengroupware.org work on mailer UI git-svn-id: http://svn.opengroupware.org/SOGo/trunk@382 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index ec090689..d2b497f8 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,3 +1,11 @@ +2004-10-12 Helge Hess + + * v0.9.31 + + * mailer.js: prepared JavaScript functions for editor + + * UIxMailMainFrame.wox: embed all content in a form called 'pageform' + 2004-10-11 Helge Hess * v0.9.30 diff --git a/SOGo/UI/Mailer/UIxMailEditor.wox b/SOGo/UI/Mailer/UIxMailEditor.wox index f5c758c5..7c6f291f 100644 --- a/SOGo/UI/Mailer/UIxMailEditor.wox +++ b/SOGo/UI/Mailer/UIxMailEditor.wox @@ -11,6 +11,7 @@ const:hideFolderTree="1" >
+ +
@@ -130,5 +134,6 @@
+
diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index d5906740..7fd6910f 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=30 +SUBMINOR_VERSION:=31 diff --git a/SOGo/UI/Mailer/mailer.js b/SOGo/UI/Mailer/mailer.js index 6236aa3d..d4c01cef 100644 --- a/SOGo/UI/Mailer/mailer.js +++ b/SOGo/UI/Mailer/mailer.js @@ -1,19 +1,10 @@ /* JavaScript for SOGo Mailer */ /* - window.open('url to open','window name','attribute1,attribute2') - window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow', - 'width=400,height=200') - - width,height - resizable=yes or no - scrollbars=yes or no - toolbar=yes or no - location=yes or no - directories=yes or no - status=yes or no - menubar=yes or no - copyhistory=yes or no + Window Properties: + width, height + bool: resizable, scrollbars, toolbar, location, directories, status, + menubar, copyhistory */ function clickedUid(sender, msguid) { @@ -21,7 +12,7 @@ function clickedUid(sender, msguid) { urlstr = msguid + "/view?markread=1"; window.open(urlstr, "SOGo_msg_" + msguid, - "width=680,height=480,resizable=1,scrollbars=1,toolbar=0," + + "width=640,height=480,resizable=1,scrollbars=1,toolbar=0," + "location=0,directories=0,status=0,menubar=0,copyhistory=0") return true; } @@ -51,3 +42,37 @@ function clickedCompose(sender) { "location=0,directories=0,status=0,menubar=0,copyhistory=0"); return false; /* stop following the link */ } + + +/* mail editor */ + +function validateEditorInput(sender) { + var errortext = ""; + var field; + + field = document.pageform.subject; + if (field.value == "") + errortext = errortext + "Missing Subject\n"; + + if (errortext.length > 0) { + alert("validation failed:\n" + errortext); + return false; + } + return true; +} + +function clickedEditorSend(sender) { + if (!validateEditorInput(sender)) + return false; + + alert("SEND"); + // if everything is ok, close the window +} + +function clickedEditorAttach(sender) { + alert("ATTACH"); +} + +function clickedEditorSave(sender) { + alert("SAVE"); +} diff --git a/SOGo/UI/Mailer/product.plist b/SOGo/UI/Mailer/product.plist index 9c3382c3..3bba8b1e 100644 --- a/SOGo/UI/Mailer/product.plist +++ b/SOGo/UI/Mailer/product.plist @@ -302,18 +302,20 @@ SOGoDraftObject = { slots = { - toolbar = { /* need the 'send' toolbar here */ + toolbar = { protectedBy = "View"; value = ( /* the toolbar groups */ ( /* first group */ - { link = "send"; - cssClass = "tbicon_send"; - label = "Send"; }, + { link = "#"; + onclick = "clickedEditorSend(this);return false;"; + cssClass = "tbicon_send"; label = "Send"; }, { link = "contacts"; target = "addressbook"; cssClass = "tbicon_addressbook"; label = "Contacts"; }, - { link = "attach"; + { link = "#"; + onclick = "clickedEditorAttach(this);return false;"; cssClass = "tbicon_attach"; label = "Attach"; }, - { link = "save"; + { link = "#"; + onclick = "clickedEditorSave(this);return false;"; cssClass = "tbicon_save"; label = "Save"; }, ) );