From: helge Date: Tue, 22 Feb 2005 23:09:17 +0000 (+0000) Subject: work on tableview reloading DHTML X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb828df75176488ac5aead1a46e055880e9cc790;p=scalable-opengroupware.org work on tableview reloading DHTML git-svn-id: http://svn.opengroupware.org/SOGo/trunk@602 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Contacts/UIxContactsListView.m b/SOGo/UI/Contacts/UIxContactsListView.m index b50cd464..a028b42e 100644 --- a/SOGo/UI/Contacts/UIxContactsListView.m +++ b/SOGo/UI/Contacts/UIxContactsListView.m @@ -46,6 +46,8 @@ ASSIGNCOPY(self->searchText, _txt); } - (id)searchText { + if (self->searchText == nil) + [self setSearchText:[[[self context] request] formValueForKey:@"search"]]; return self->searchText; } @@ -56,6 +58,7 @@ if ([s length] == 0) return nil; + // TODO: just use qualifier vars qs = [NSString stringWithFormat: @"(sn isCaseInsensitiveLike: '%@*') OR " @"(givenname isCaseInsensitiveLike: '%@*') OR " @@ -92,7 +95,7 @@ NSArray *records; EOQualifier *q; - if (self->filteredRecords) + if (self->filteredRecords != nil) return self->filteredRecords; records = [[self clientObject] fetchCoreInfos]; diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index d6adc542..2228fc61 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,3 +1,8 @@ +2005-02-22 Helge Hess + + * UIxMailMainFrame.m: added ability not to generate the HTML frame + (v0.9.120) + 2005-02-20 Helge Hess * moved UIxMailSizeFormatter to MailPartViewers (v0.9.119) diff --git a/SOGo/UI/Mailer/UIxMailMainFrame.m b/SOGo/UI/Mailer/UIxMailMainFrame.m index 8bc55ebe..1917e7c4 100644 --- a/SOGo/UI/Mailer/UIxMailMainFrame.m +++ b/SOGo/UI/Mailer/UIxMailMainFrame.m @@ -27,7 +27,11 @@ NSString *rootURL; NSString *userRootURL; id item; - BOOL hideFolderTree; + struct { + int hideFolderTree:1; + int hideFrame:1; + int reserved:30; + } mmfFlags; } - (NSString *)rootURL; @@ -68,10 +72,17 @@ static NSString *treeRootClassName = nil; } - (void)setHideFolderTree:(BOOL)_flag { - self->hideFolderTree = _flag; + self->mmfFlags.hideFolderTree = _flag ? 1 : 0; } - (BOOL)hideFolderTree { - return self->hideFolderTree; + return self->mmfFlags.hideFolderTree ? YES : NO; +} + +- (void)setHideFrame:(BOOL)_flag { + self->mmfFlags.hideFrame = _flag ? 1 : 0; +} +- (BOOL)hideFrame { + return self->mmfFlags.hideFrame ? YES : NO; } - (void)setTitle:(NSString *)_value { diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index 2a7eccc4..e5c391c6 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=119 +SUBMINOR_VERSION:=120 # v0.9.100 requires libNGMime v4.5.213 # v0.9.99 requires libNGMime v4.5.212 diff --git a/SOGo/UI/Mailer/mailer.js b/SOGo/UI/Mailer/mailer.js index 5ded4a96..b97829f4 100644 --- a/SOGo/UI/Mailer/mailer.js +++ b/SOGo/UI/Mailer/mailer.js @@ -193,6 +193,18 @@ function clickedNewFilter(sender) { /* generic stuff */ +function ml_stripActionInURL(url) { + if (url[url.length - 1] != '/') { + var i; + + i = url.lastIndexOf("/"); + if (i != -1) url = url.substring(0, i); + } + if (url[url.length - 1] != '/') // ensure trailing slash + url = url + "/"; + return url; +} + function escapeHTML(s) { s = s.replace(/&/g, "&"); s = s.replace(/ + + * UIxMailContactList.m: hide frame if "noframe" query parameter is set + (v0.9.7) + 2005-02-18 Helge Hess * mailercontacts.js: added some function to allow inline editing of diff --git a/SOGo/UI/MailerContacts/GNUmakefile b/SOGo/UI/MailerContacts/GNUmakefile index c4c72cf1..87543a80 100644 --- a/SOGo/UI/MailerContacts/GNUmakefile +++ b/SOGo/UI/MailerContacts/GNUmakefile @@ -14,6 +14,7 @@ MailerContactsUI_OBJC_FILES += \ UIxMailContactList.m \ UIxMailContactEditor.m \ + MailerContactsUI_RESOURCE_FILES += \ Version \ product.plist \ diff --git a/SOGo/UI/MailerContacts/UIxMailContactList.m b/SOGo/UI/MailerContacts/UIxMailContactList.m index 16e65637..10a80e0b 100644 --- a/SOGo/UI/MailerContacts/UIxMailContactList.m +++ b/SOGo/UI/MailerContacts/UIxMailContactList.m @@ -33,6 +33,12 @@ @implementation UIxMailContactList +/* frame */ + +- (BOOL)hideFrame { + return [[[[self context] request] formValueForKey:@"noframe"] boolValue]; +} + /* title */ - (NSString *)objectTitle { diff --git a/SOGo/UI/MailerContacts/Version b/SOGo/UI/MailerContacts/Version index dacebf41..bf17f459 100644 --- a/SOGo/UI/MailerContacts/Version +++ b/SOGo/UI/MailerContacts/Version @@ -1,5 +1,5 @@ # version file -SUBMINOR_VERSION:=6 +SUBMINOR_VERSION:=7 # v0.9.5 requires MailerUI v0.9.116 diff --git a/SOGo/UI/MailerContacts/mailercontacts.js b/SOGo/UI/MailerContacts/mailercontacts.js index 536253cf..ac4f2e41 100644 --- a/SOGo/UI/MailerContacts/mailercontacts.js +++ b/SOGo/UI/MailerContacts/mailercontacts.js @@ -39,18 +39,6 @@ function cl_lowlight(sender) { /* edit field */ -function cl_stripActionInURL(url) { - if (url[url.length - 1] != '/') { - var i; - - i = url.lastIndexOf("/"); - if (i != -1) url = url.substring(0, i); - } - if (url[url.length - 1] != '/') // ensure trailing slash - url = url + "/"; - return url; -} - function cl_saveFieldValue(sender, keyName) { var http = createHTTPClient(); @@ -60,7 +48,7 @@ function cl_saveFieldValue(sender, keyName) { var url = window.location.href; var content; - url = cl_stripActionInURL(url); + url = ml_stripActionInURL(url); url = url + recordID + "/patchOneField"; // TODO: confuses SOPE?!: url = url + "?jsonly=1" diff --git a/SOGo/UI/MailerContacts/product.plist b/SOGo/UI/MailerContacts/product.plist index bf580387..f8d68b2e 100644 --- a/SOGo/UI/MailerContacts/product.plist +++ b/SOGo/UI/MailerContacts/product.plist @@ -39,6 +39,11 @@ protectedBy = "View"; pageName = "UIxMailContactList"; }; + "tb.tableview" = { /* same like above without the frame */ + protectedBy = "View"; + pageName = "UIxMailContactListPart"; + }; + "tb.compose" = { protectedBy = "View"; actionClass = "UIxMailEditorAction"; diff --git a/SOGo/UI/Templates/ChangeLog b/SOGo/UI/Templates/ChangeLog index a337a039..4ff3d346 100644 --- a/SOGo/UI/Templates/ChangeLog +++ b/SOGo/UI/Templates/ChangeLog @@ -1,3 +1,8 @@ +2005-02-22 Helge Hess + + * UIxMailMainFrame.wox: removed debug code, use new SOPE container tag + to allow for frameless pages + 2005-02-21 Marcus Mueller * UIxTimeDateControl.wox: disable time control on demand diff --git a/SOGo/UI/Templates/UIxMailToolbar.wox b/SOGo/UI/Templates/Mailer/UIxMailToolbar.wox similarity index 100% rename from SOGo/UI/Templates/UIxMailToolbar.wox rename to SOGo/UI/Templates/Mailer/UIxMailToolbar.wox diff --git a/SOGo/UI/Templates/UIxMailTree.wox b/SOGo/UI/Templates/Mailer/UIxMailTree.wox similarity index 100% rename from SOGo/UI/Templates/UIxMailTree.wox rename to SOGo/UI/Templates/Mailer/UIxMailTree.wox diff --git a/SOGo/UI/Templates/UIxMailContactList.wox b/SOGo/UI/Templates/UIxMailContactList.wox index cac769e3..daa1c0f7 100644 --- a/SOGo/UI/Templates/UIxMailContactList.wox +++ b/SOGo/UI/Templates/UIxMailContactList.wox @@ -8,6 +8,7 @@ xmlns:label="OGo:label" className="UIxMailMainFrame" title="panelTitle" + hideFrame="hideFrame" > +