]> err.no Git - scalable-opengroupware.org/commitdiff
AnaisUidSelector, usage of it in UIxCalWeekOverview and diverse enhancements
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 11 Aug 2004 17:46:10 +0000 (17:46 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 11 Aug 2004 17:46:10 +0000 (17:46 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@184 d1b88da0-ebda-0310-925b-ed51d893ca5b

14 files changed:
SOGo/SOGo.xcode/project.pbxproj
SOGo/UI/Anais/AnaisSelector.m
SOGo/UI/Anais/AnaisSelector.wox
SOGo/UI/Anais/AnaisUidSelector.m [new file with mode: 0644]
SOGo/UI/Anais/AnaisUidSelector.wox [new file with mode: 0644]
SOGo/UI/Anais/ChangeLog
SOGo/UI/Anais/GNUmakefile
SOGo/UI/Anais/Version
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/UIxAppNavView.m
SOGo/UI/Common/UIxPageFrame.wox
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/English.lproj/default.strings
SOGo/UI/Scheduler/UIxCalWeekOverview.wox

index 5116ad7cbb3afd512653e892cb505fd69a331cc7..4a20be5da75e27b12f8d26deb00d23da4640bc3e 100644 (file)
@@ -36,9 +36,9 @@
                AD07123606C904C900A9EEF4 = {
                        children = (
                                AD07137606C926BF00A9EEF4,
+                               AD07123D06C904C900A9EEF4,
                                AD07123706C904C900A9EEF4,
                                AD07123C06C904C900A9EEF4,
-                               AD07123D06C904C900A9EEF4,
                                AD07124306C904E500A9EEF4,
                                AD07124006C904DE00A9EEF4,
                                AD07124606C9050700A9EEF4,
                        children = (
                                AD07124C06C9052700A9EEF4,
                                AD07124B06C9052700A9EEF4,
+                               AD0715CB06CA711600A9EEF4,
+                               AD0715CA06CA711600A9EEF4,
                        );
                        isa = PBXGroup;
                        name = Components;
                        path = ChangeLog;
                        refType = 4;
                        sourceTree = "<group>";
+                       tabWidth = 4;
+                       usesTabs = 1;
+               };
+               AD0715CA06CA711600A9EEF4 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.xml;
+                       path = AnaisUidSelector.wox;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD0715CB06CA711600A9EEF4 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = AnaisUidSelector.m;
+                       refType = 4;
+                       sourceTree = "<group>";
                };
                AD152B6F06AC159A002375D2 = {
                        fileEncoding = 4;
index ecde16326d759f0351c88f6eed6740beaa60f409..9cba783fc4250022c4d4b02cf332f191eb8bf481 100644 (file)
@@ -42,7 +42,7 @@
 
 - (NSString *)jsFunctionName;
 - (NSString *)jsFunctionHref;
-- (NSString *)getCode;
+- (NSString *)jsCode;
 @end
 
 #include "common.h"
         [self jsFunctionName]];
 }
 
-- (NSString *)getCode {
+- (NSString *)jsCode {
     static NSString *codeFmt = \
     @"function %@() {\n"
     @"  var url = '/anais/aideAnais.php?m_fonc=%@%@&m_champ=mail,uid,sn#mon_etiquette';\n"
index 6e67a5e461efb03fa79eee4ef1c701c3427b4e1a..1f1928695992269d408a06c91969a72fc2ad956e 100644 (file)
@@ -4,9 +4,10 @@
       xmlns:var="http://www.skyrix.com/od/binding"
       xmlns:const="http://www.skyrix.com/od/constant"
       xmlns:rsrc="OGo:url"
+      class="button_auto_env"
 >
   <script language="JavaScript">
-    <var:string value="getCode" const:escapeHTML="NO" />
+    <var:string value="jsCode" const:escapeHTML="NO" />
   </script>
   <a var:href="jsFunctionHref"
      class="button_auto"
diff --git a/SOGo/UI/Anais/AnaisUidSelector.m b/SOGo/UI/Anais/AnaisUidSelector.m
new file mode 100644 (file)
index 0000000..00cc3e8
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OGo
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+// $Id$
+
+
+#include <SOGoUI/UIxComponent.h>
+
+@interface AnaisUidSelector : UIxComponent
+{
+    NSArray *calendarUIDs;
+    NSString *uid;
+    BOOL meTooChecked;
+}
+
+- (NSString *)prettyUid;
+
+- (NSString *)jsCode;
+
+@end
+
+#include "common.h"
+
+@implementation AnaisUidSelector
+
+- (id)init {
+    self = [super init];
+    if(self) {
+    }
+    return self;
+}
+
+- (void)dealloc {
+    [self->calendarUIDs release];
+    [self->uid release];
+    [super dealloc];
+}
+
+- (void)setCalendarUIDs:(NSArray *)_calendarUIDs {
+    ASSIGN(self->calendarUIDs, _calendarUIDs);
+}
+- (NSArray *)calendarUIDs {
+    return self->calendarUIDs;
+}
+- (void)setUid:(NSString *)_uid {
+    ASSIGN(self->uid, _uid);
+}
+- (NSString *)uid {
+    return self->uid;
+}
+- (NSString *)prettyUid {
+    if([self->calendarUIDs objectAtIndex:0] == self->uid)
+        return self->uid;
+    return [NSString stringWithFormat:@", %@", self->uid];
+}
+
+- (void)setMeTooChecked:(BOOL)_meTooChecked {
+    self->meTooChecked = _meTooChecked;
+}
+- (BOOL)meTooChecked {
+    return self->meTooChecked;
+}
+
+
+/* JavaScript */
+
+- (NSString *)jsCode {
+    static NSString *script = \
+    @"function submitUidList() {\n"
+    @"}\n"
+    @"function clearUidList() {\n"
+    @"  var o = document.getElementById('anaisUidList');\n"
+    @"  var dst = o.parentNode;\n"
+    @"  var n = document.createElement('td');\n"
+    @"  n.setAttribute('id', 'anaisUidList');\n"
+    @"  dst.replaceChild(n, o);\n"
+    @"}\n"
+    @"function addUid(division, cn, dn, email, uid, sn) {\n"
+    @"  if(!uid)\n"
+    @"    uid='helge';\n"
+    @"  var td = document.getElementById('anaisUidList');\n"
+    @"  if(td.hasChildNodes())\n"
+    @"    uid=', '+uid;\n"
+    @"  var text = document.createTextNode(uid);\n"
+    @"  td.appendChild(text);\n"
+    @"}\n"
+    @"";
+    return script;
+}
+
+@end
diff --git a/SOGo/UI/Anais/AnaisUidSelector.wox b/SOGo/UI/Anais/AnaisUidSelector.wox
new file mode 100644 (file)
index 0000000..ac691eb
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version='1.0' standalone='yes'?>
+
+<table xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:var="http://www.skyrix.com/od/binding"
+       xmlns:const="http://www.skyrix.com/od/constant"
+       xmlns:rsrc="OGo:url"
+       xmlns:label="OGo:label"
+       width="100%"
+       border="0"
+ >
+  <script language="JavaScript">
+    <var:string value="jsCode" const:escapeHTML="NO" />
+  </script>
+  <tr valign="top">
+    <td align="left">
+      <table cellspacing="2" cellpadding="0">
+        <tr valign="middle">
+          <td>
+            <var:component className="AnaisSelector"
+                           label:title="Search in Anais"
+                           const:windowId="UidSelector"
+                           const:callback="addUid"
+                           const:division="CC"
+            />
+          </td>
+          <td>
+            <input type="checkbox" var:checked="meTooChecked" />
+            <var:string label:value="me too" />
+          </td>
+          <td class="button_auto_env">
+            <a href="javascript:submitUidList()"
+                class="button_auto"
+             ><var:string label:value="show" /></a>
+          </td>
+          <td class="button_auto_env">
+            <a href="javascript:clearUidList()"
+                class="button_auto"
+             ><var:string label:value="clear" /></a>
+          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+  <tr valign="middle">
+    <td id="anaisUidList" align="left">
+      <var:foreach list="calendarUIDs" item="uid">
+        <var:string value="prettyUid" />
+      </var:foreach>
+    </td>
+  </tr>
+</table>
index a3e53f0ae7244608fce4db619d2c804b005df471..677db86ec7df3e50710cf0901e730c62831af265 100644 (file)
@@ -1,5 +1,11 @@
 2004-08-11  Marcus Mueller  <znek@mulle-kybernetik.com>
 
+       * AnaisUidSelector.[m|wox]: added (v0.9.1)
+
+2004-08-11  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.0
+
        * AnaisSelector.[m|wox]: added several associations used for uniquing
          the selector and one for preselecting a certain division (LDAP).
 
index a6d97f8e39063a254cd8f8692abb958b3e9d537b..554bf368cc0bd7e9c5ec4bf256d21104646ad029 100644 (file)
@@ -11,12 +11,14 @@ AnaisUI_PRINCIPAL_CLASS = AnaisUIProduct
 AnaisUI_OBJC_FILES +=          \
        AnaisUIProduct.m        \
        AnaisSelector.m         \
+       AnaisUidSelector.m      \
 
 
 AnaisUI_RESOURCE_FILES +=      \
        Version                 \
        product.plist           \
        AnaisSelector.wox       \
+       AnaisUidSelector.wox    \
 
 
 ADDITIONAL_INCLUDE_DIRS += \
index 399c230aff80ce9c6419352d8e4e7cd3a8aa3584..a5a614689bac1243dc1ae44137e1d2230327f86d 100644 (file)
@@ -1,3 +1,3 @@
 # $Id: Version 165 2004-08-05 17:55:50Z znek $
 
-SUBMINOR_VERSION:=0
+SUBMINOR_VERSION:=1
index f9a7ee8c48f2869b4e795d1f7126568af07efd5e..64c4a54cc4f9b0db78b90a71f772f1e977121032 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-11  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * UIxPageFrame.wox, UIxAppNavView.m: added labels (v0.9.9)
+
 2004-08-11    <helge@agenor.opengroupware.org>
 
        * UIxPageFrame: minor fixes to UI (v0.9.8)
index e8cb9eb239f4eb2da2c484240015009a14994d33..7aa13d650a077574d0f02e46fc915b8eed766405 100644 (file)
@@ -20,9 +20,9 @@
 */
 // $Id$
 
-#include <NGObjWeb/WOComponent.h>
+#include <SOGoUI/UIxComponent.h>
 
-@interface UIxAppNavView : WOComponent
+@interface UIxAppNavView : UIxComponent
 {
     id element;
     id lastElement;
@@ -75,7 +75,8 @@
     name = [obj davDisplayName];
     if ([name length] == 0)
       name = NSStringFromClass([obj class]);
-    
+    name = [self labelForKey:name];
+
     if (![name hasPrefix:@"sogod"]) {
       NSMutableDictionary *c;
       NSString *url;
index 82b6d2dd133ef6f40e83aa7be1f703a362810452..700b1705514e9cf22bcc7d8c95fad21ef2c65088 100644 (file)
@@ -3,6 +3,7 @@
       xmlns:var="http://www.skyrix.com/od/binding"
       xmlns:const="http://www.skyrix.com/od/constant"
       xmlns:rsrc="OGo:url"
+      xmlns:label="OGo:label"
 >
   <head>
     <title>
                             <font class="skydockfont">
                               <a var:href="userRootURL"
                                  class="skydockfont"
-                              >Contacts</a>
+                              ><var:string label:value="Contacts" /></a>
                             </font>
                           </td>
                         </tr>
                             <font class="skydockfont">
                               <a var:href="calendarRootURL"
                                  class="skyDockFont"
-                              >Calendar</a>
+                              ><var:string label:value="Calendar" /></a>
                             </font>
                           </td>
                         </tr>
                   >
                     <tr>
                       <td>
-                        <font class="skydockfont">Misc</font>
+                        <font class="skydockfont"
+                        ><var:string label:value="Misc" /></font>
                       </td>
                     </tr>
                     <tr>
index e25b9d1c835a0f0070a27ac4972d3a61883f03a3..0ef40a91423fd784d9b87cfd1fec06bf01b42224 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-11  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.18
+
+       * UIxCalWeekOverview.wox: added AnaisUidSelector
+
+       * English.lproj/default.strings: more labels
+
 2004-08-11  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.17
index 4082bcaf6661af80de8ffb1f937812e814a4cac6..854f6c848d883e5fad7b3f13fb3a2b85ca144381 100644 (file)
 "this year"    = "this year";
 
 
+/* Menu */
+
+"Calendar"      = "Calendar";
+"Contacts"      = "Contacts";
+
+
 /* Misc */
 
 "new"           = "new";
 "printview"     = "printview";
 "proposal"      = "proposal";
-"Calendar"      = "Calendar";
 "Save"          = "Save";
 
 
index 9a8b42c8949769a08698b4518889f6c8fbb6bb55..38bcbfade5a46709d28a6fa10ade83046dbcba35 100644 (file)
   <td id="skywinbodycell" class="wincontent">
     <table border="0" cellpadding="0" cellspacing="0" width="100%">
     <tr bgcolor="#e8e8e0">
-    <td align="left" valign="middle" width="80%">TODO: controls</td><!-- 99% -->
+    <td align="left" valign="middle" width="80%">
+      <var:component className="AnaisUidSelector"
+                     calendarUIDs="clientObject.calendarUIDs"
+      />
+    </td><!-- 99% -->
     <td align="right">
     <var:component className="UIxCalBackForthNavView"
                    methodName="ownMethodName"