printView display the parentView by default
parent
2b119c63e0
commit
6b58e034f3
|
@ -24,6 +24,7 @@
|
|||
@interface UIxCalViewPrint : UIxComponent
|
||||
{
|
||||
id item;
|
||||
SOGoUserSettings *us;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
|
||||
#import <UIxCalViewPrint.h>
|
||||
|
||||
static NSArray *layoutItems = nil;
|
||||
|
@ -73,10 +76,29 @@ static NSArray *layoutItems = nil;
|
|||
return [self labelForKey: [NSString stringWithFormat: item]];
|
||||
}
|
||||
|
||||
- (NSString *) layoutSelectedByUser
|
||||
- (NSString *) parentPrintLayout
|
||||
{
|
||||
return nil;
|
||||
// The objective here is to return the parent view layout and select the print layout corresponding. Default print view: list view
|
||||
SOGoUser *activeUser;
|
||||
NSString *parentView;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
us = [activeUser userSettings];
|
||||
parentView = [[us objectForKey:@"Calendar"] objectForKey:@"View" ];
|
||||
|
||||
if ([parentView isEqualToString:@"dayview"])
|
||||
return @"Daily";
|
||||
|
||||
else if ([parentView isEqualToString:@"weekview"])
|
||||
return @"Weekly";
|
||||
|
||||
else if ([parentView isEqualToString:@"multicolumndayview"])
|
||||
return @"Multi-Columns";
|
||||
|
||||
else
|
||||
return @"LIST";
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
/* */
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
<td>
|
||||
<var:popup list="printLayoutList" item="item"
|
||||
const:id="printLayoutList"
|
||||
string="itemPrintLayoutText" /></td>
|
||||
string="itemPrintLayoutText" selection="parentPrintLayout" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- What to print -->
|
||||
<span class="caption"><var:string label:value="What to Print" /></span>
|
||||
<table class="frame">
|
||||
|
|
|
@ -130,6 +130,9 @@ function addCalendarsColor () {
|
|||
if (allCalendars.children[i].down("input").checked){
|
||||
folderName = allCalendars.children[i].getAttribute("id").substr(1);
|
||||
color = allColors["sogo1:Calendar/" + folderName];
|
||||
if (!color) {
|
||||
color = "#AAAAAA";
|
||||
}
|
||||
appendStyleElement(folderName, color);
|
||||
}
|
||||
}
|
||||
|
@ -210,11 +213,11 @@ function refreshEventsCallback(http) {
|
|||
$("rightFrameEvents").innerHTML = "";
|
||||
if ($("printLayoutList").value == "0" && eventsBlocks.length > 0) {
|
||||
_drawEventsCells(eventsBlocks);
|
||||
adjustFrames();
|
||||
}
|
||||
else {
|
||||
updateDisplayView(null, currentPreview);
|
||||
}
|
||||
adjustFrames();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue