Skip to content

Commit

Permalink
dujia:修复组织架构UI问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dujia committed Sep 29, 2014
1 parent 0dc14e1 commit ba13d4f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 36 deletions.
44 changes: 22 additions & 22 deletions TeamTalk/DDOrganizationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,28 @@ - (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
}
}

- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
{
if ([item isKindOfClass:NSClassFromString(@"NSString")])
{
DepartmentEntity* department = [[DDDepartmentModule shareInstance] getDepartmentForID:item];
if (department)
{
return department.title;
}
else
{
return item;
}
}
else if ([item isKindOfClass:NSClassFromString(@"UserEntity")])
{
UserEntity* user = (UserEntity*)item;
return user.nick;
}
return nil;

}
//- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
//{
// if ([item isKindOfClass:NSClassFromString(@"NSString")])
// {
// DepartmentEntity* department = [[DDDepartmentModule shareInstance] getDepartmentForID:item];
// if (department)
// {
// return department.title;
// }
// else
// {
// return item;
// }
// }
// else if ([item isKindOfClass:NSClassFromString(@"UserEntity")])
// {
// UserEntity* user = (UserEntity*)item;
// return user.nick;
// }
// return nil;
//
//}

- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
Expand Down
4 changes: 2 additions & 2 deletions TeamTalk/DDOrganizationViewController.xib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1080" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
Expand All @@ -24,7 +24,7 @@
<rect key="frame" x="0.0" y="17" width="232" height="462"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="8Uu-ch-eyk" viewBased="YES" indentationPerLevel="16" outlineTableColumn="kfR-9B-IDi" id="wgk-zQ-x1V">
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="8Uu-ch-eyk" viewBased="YES" indentationPerLevel="16" autoresizesOutlineColumn="YES" outlineTableColumn="kfR-9B-IDi" id="wgk-zQ-x1V">
<rect key="frame" x="0.0" y="0.0" width="232" height="462"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
Expand Down
5 changes: 0 additions & 5 deletions TeamTalk/interface/chat/addChatGroup/DDAddChatGroupCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ - (void)drawRect:(NSRect)dirtyRect

- (void)setItem:(id)item
{

[self.avatar setWantsLayer:YES];
[self.avatar.layer setCornerRadius:3];
[self.avatar.layer setMasksToBounds:YES];

if ([item isKindOfClass:NSClassFromString(@"UserEntity")])
{
[self.avatar setUser:item];
Expand Down
5 changes: 1 addition & 4 deletions TeamTalk/modules/friendlist/DDUserlistModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ -(void)addUser:(UserEntity*)newUser
{
if (newUser.userUpdated == 0)
{
if (![[_allUsers allKeys] containsObject:newUser.userId])
{
[_allUsers setObject:newUser forKey:newUser.userId];
}
[_allUsers setObject:newUser forKey:newUser.userId];
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions TeamTalk/modules/session/DDAddGroupMemberDepartmentCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ - (id)initWithFrame:(NSRect)frame
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
self.imageView=nil;
[self setWantsLayer:YES];
// self.imageView=nil;
// [self setWantsLayer:YES];


// Drawing code here.
Expand Down
2 changes: 1 addition & 1 deletion TeamTalk/utilities/Constant/CONSTANT.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

#warning 可配置
#define SERVER_IP @"122.225.68.125"//
#define SERVER_PORT 9008//登录服务器端口
#define SERVER_PORT 18008//登录服务器端口

#define IMAGE_MARK_START @"&$#@~^@[{:"
#define IMAGE_MARK_END @":}]&$~@#@"
Expand Down

0 comments on commit ba13d4f

Please sign in to comment.