- Timestamp:
- 01/09/10 12:45:03 (3 years ago)
- Location:
- apps/iphone/my.tel/trunk
- Files:
-
- 1 added
- 11 removed
- 8 modified
-
aKeywordView.xib (deleted)
-
background-proxy.png (deleted)
-
baKeywordView.xib (deleted)
-
biKeywordView.xib (deleted)
-
Classes/KeywordCell.h (modified) (1 diff)
-
Classes/KeywordCell.m (modified) (4 diffs)
-
Classes/KeywordEditController.h (modified) (1 diff)
-
Classes/KeywordEditController.m (modified) (5 diffs)
-
Classes/KeywordViewController.h (modified) (2 diffs)
-
Classes/KeywordViewController.m (modified) (15 diffs)
-
diKeywordView.xib (deleted)
-
English.lproj/KeywordTypesLongNames.plist (added)
-
English.lproj/KeywordTypes.plist (modified) (1 diff)
-
English.lproj/TabTxt.xib (deleted)
-
ftKeywordView.xib (deleted)
-
hiKeywordView.xib (deleted)
-
KeywordEditUnknownSubview.xib (deleted)
-
KeywordEdit.xib (deleted)
-
nKeywordView.xib (deleted)
-
VIP.tel.xcodeproj/project.pbxproj (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/my.tel/trunk/Classes/KeywordCell.h
r593 r622 13 13 IBOutlet UILabel *labelPrimaryType; 14 14 IBOutlet UILabel *labelPrimaryValue; 15 IBOutlet UI Label*labelSecondaryText;15 IBOutlet UITextView *labelSecondaryText; 16 16 } 17 18 + (UIFont *)labelFont; 17 19 18 20 @property (nonatomic, retain) UILabel *labelPrimaryType; 19 21 @property (nonatomic, retain) UILabel *labelPrimaryValue; 20 @property (nonatomic, retain) UI Label*labelSecondaryText;22 @property (nonatomic, retain) UITextView *labelSecondaryText; 21 23 22 24 @end -
apps/iphone/my.tel/trunk/Classes/KeywordCell.m
r593 r622 10 10 11 11 #define kKFontSize 14 12 #define kKCellMargin 5 12 13 13 14 @implementation KeywordCell … … 17 18 @synthesize labelSecondaryText; 18 19 20 + (UIFont *)labelFont { 21 return [UIFont systemFontOfSize:kKFontSize-2]; 22 } 23 19 24 - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 20 25 if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 21 26 // Initialization code 22 27 23 labelPrimaryType = nil; 24 labelPrimaryValue = nil; 25 labelSecondaryText = nil; 26 27 // TODO: Re-enable viewing keyword 28 //self.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; 29 28 self.labelPrimaryType = nil; 29 self.labelPrimaryValue = nil; 30 self.labelSecondaryText = nil; 31 30 32 UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; 31 33 label.backgroundColor = [UIColor clearColor]; … … 37 39 38 40 label = [[UILabel alloc] initWithFrame:CGRectZero]; 39 // label.backgroundColor = [UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:0.7];40 41 label.backgroundColor = [UIColor clearColor]; 41 42 label.font = [UIFont systemFontOfSize:kKFontSize-2]; 42 label.textColor = [UIColor blueColor];43 // label.textColor = [UIColor blueColor]; 43 44 self.labelPrimaryValue = label; 44 45 [self.contentView addSubview:label]; 45 46 [label release]; 46 47 47 label = [[UILabel alloc] initWithFrame:CGRectZero]; 48 label.backgroundColor = [UIColor clearColor]; 49 label.font = [UIFont systemFontOfSize:kKFontSize]; 50 self.labelSecondaryText = label; 51 [self.contentView addSubview:label]; 52 [label release]; 48 UITextView *textView = [[UITextView alloc] initWithFrame:CGRectZero]; 49 textView.backgroundColor = [UIColor clearColor]; 50 textView.font = [UIFont systemFontOfSize:kKFontSize-2]; 51 textView.textColor = [UIColor darkGrayColor]; 52 textView.editable = NO; 53 textView.scrollEnabled = NO; 54 textView.userInteractionEnabled = YES; 55 textView.exclusiveTouch = NO; 56 self.labelSecondaryText = textView; 57 [self.contentView addSubview:textView]; 58 [textView release]; 53 59 } 54 60 return self; … … 62 68 CGRect contentRect = self.contentView.bounds; 63 69 64 // position the text label in the content rect 70 // The 3 labels are one below the other. The lower label is going to be a multiline label 65 71 CGRect labelRect = contentRect; 66 labelRect.origin.x = contentRect.origin.x+36; 67 labelRect.origin.y = contentRect.origin.y+3; 72 labelRect.origin.x = contentRect.origin.x+kKCellMargin; 73 labelRect.origin.y = contentRect.origin.y+kKCellMargin; 74 labelRect.size.width = self.contentView.bounds.size.width-(kKCellMargin*2); 68 75 labelRect.size.height = labelPrimaryType.font.pointSize+2; 69 labelRect.size.width = 250;70 76 labelPrimaryType.frame = labelRect; 71 labelRect.origin.y = labelRect.origin.y+labelRect.size.height+4; 72 labelRect.size.height = contentRect.size.height - labelRect.origin.y - 4; 77 if ((labelPrimaryValue.text != nil) && ([labelPrimaryValue.text length] > 0)) { 78 labelRect.origin.y = labelRect.origin.y+labelRect.size.height+4; 79 labelRect.size.height = labelPrimaryValue.font.pointSize+2; 80 labelPrimaryValue.frame = labelRect; 81 } 82 // TextViews have additional built-in margins that need to be compensated for 83 labelRect.origin.x = labelRect.origin.x - 7; 84 labelRect.origin.y = labelRect.origin.y+labelRect.size.height+4 - 10; 85 labelRect.size.height = 5 * (labelSecondaryText.font.pointSize+2); // 5 == number of lines 86 labelRect.size.width = labelRect.size.width + 10; 73 87 labelSecondaryText.frame = labelRect; 74 labelRect.origin.y = labelPrimaryType.frame.origin.y;75 labelRect.size.height = labelPrimaryType.frame.size.height;76 labelRect.size.width = 120;77 labelRect.origin.x = contentRect.origin.x + contentRect.size.width - labelRect.size.width - 5;78 labelPrimaryValue.frame = labelRect;79 labelPrimaryValue.textAlignment = UITextAlignmentRight;80 88 } 81 89 -
apps/iphone/my.tel/trunk/Classes/KeywordEditController.h
r593 r622 8 8 9 9 #import <UIKit/UIKit.h> 10 #import <QuartzCore/QuartzCore.h>11 10 #import "MyTelConnect.h" 12 11 #import "Keyword.h" 13 #import "aKeywordView.h" 14 #import "baKeywordView.h" 15 #import "nKeywordView.h" 16 #import "ftKeywordView.h" 17 #import "hiKeywordView.h" 18 #import "diKeywordView.h" 19 #import "biKeywordView.h" 12 #import "HATextViewEditController.h" 13 14 enum kKKeywordEditTableViewSections { 15 kKKeywordEditTableViewSectionType, // Primary type 16 kKKeywordEditTableViewSectionValue, // Primary value 17 kKKeywordEditTableViewSectionSecondaries, // Array of secondaries 18 kKKeywordEditTableViewSectionsCount // Keep this last to get the count of sections 19 }; 20 20 21 21 @protocol KeywordEditDelegate <TelControllerDelegate> 22 23 - (void)didStoreKeyword:(NSDictionary *)aRec; 24 - (NSDictionary *)delegateKeywordTypes; 25 22 @required 23 - (NSString *)longNameForKeyword:(NSString *)shortName; 24 - (NSArray *)typesForKeyword:(NSString *)shortName; 26 25 @end 27 26 27 #define kKPrimaryValueMaxLength 255 // max length of value when keyword has secondaries 28 #define kKValueMaxLength 255 // max length of value when keyword doesn't have secondaries 28 29 29 @interface KeywordEditController : UIViewController <UITextFieldDelegate, UITextViewDelegate> { 30 IBOutlet UIBarButtonItem *barHeader; 31 IBOutlet UIBarButtonItem *barButtonSave; 32 IBOutlet UISegmentedControl *primaryKeywords; 33 IBOutlet UITextField *rValue; 34 IBOutlet UIActivityIndicatorView *saveIndicator; 30 31 @interface KeywordEditController : UITableViewController <UITableViewDelegate, 32 UITableViewDataSource, 33 HATextViewEditDelegate> { 35 34 36 IBOutlet UILabel *editKeywordType; // title for keyword being edited 37 IBOutlet UITextView *secondariesDescription; // description string for secondaries (no editing) 38 IBOutlet UIScrollView *secViewContainer; // view containing the secondary view 39 IBOutlet UIView *editSubview; // Subview with editing fields 40 35 NSString *keywordId; 36 NSString *primaryType; 37 NSString *primaryValue; 38 NSMutableArray *secondaryKeywords; 41 39 id <KeywordEditDelegate> delegate; 42 40 @private 43 41 NSMutableArray *tArrKey; 44 42 NSMutableArray *tArrVal; 45 NSMutableDictionary *theKeyword; 46 NSArray *arraySecondaryViews; 47 AbstractKeywordView *currentSecondaryView; 48 // Below for keyboard notification 49 UIView *activeField; 50 BOOL keyboardShown; 43 UIBarButtonItem *buttonSave; 44 BOOL isEditing; 51 45 } 52 46 53 - (void)presentViewForRecord:(NSDictionary *)aRec;54 - ( void)displaySecondaryViewAtIndex:(NSInteger)idx;55 - ( IBAction)keywordTypeDidChange:(UISegmentedControl *)sender;56 - ( IBAction)didClickCancel:(id)sender;57 - ( IBAction)didClickSave:(id)sender;47 + (KeywordEditController *)controllerForKeyword:(NSDictionary *)aRec; 48 - (KeywordEditController *)initWithKeyword:(NSDictionary *)aRec; 49 - (void)didClickCancel; 50 - (void)didClickSave; 51 - (NSMutableArray *)fillSecondaryKeywords:(NSArray *)secArray; 58 52 59 @property (nonatomic, retain) IBOutlet UIBarButtonItem *barHeader; 60 @property (nonatomic, retain) IBOutlet UIBarButtonItem *barButtonSave; 61 @property (nonatomic, retain) IBOutlet UISegmentedControl *primaryKeywords; 62 @property (nonatomic, retain) IBOutlet UITextField *rValue; 63 @property (nonatomic, retain) IBOutlet UILabel *editKeywordType; 64 @property (nonatomic, retain) IBOutlet UITextView *secondariesDescription; 65 @property (nonatomic, retain) IBOutlet UIScrollView *secViewContainer; 66 @property (nonatomic, retain) IBOutlet UIView *editSubview; 67 @property (nonatomic, retain) IBOutlet UIActivityIndicatorView *saveIndicator; 68 @property (retain) id delegate; 53 @property (nonatomic, retain) NSString *keywordId; 54 @property (nonatomic, retain) NSString *primaryType; 55 @property (nonatomic, retain) NSString *primaryValue; 56 @property (nonatomic, retain) NSMutableArray *secondaryKeywords; 57 @property (retain) id <KeywordEditDelegate> delegate; 58 @property (nonatomic, readonly) BOOL keywordHasSecondaries; 69 59 70 60 @end -
apps/iphone/my.tel/trunk/Classes/KeywordEditController.m
r593 r622 9 9 #import "KeywordEditController.h" 10 10 11 #define kKTransitionDuration 0.312 13 @interface KeywordEditController ()14 // Private methods15 // For keyboard notifications16 - (void)registerForKeyboardNotifications;17 - (void)keyboardWasShown:(NSNotification*)aNotification;18 - (void)keyboardWasHidden:(NSNotification*)aNotification;19 @end20 21 11 @implementation KeywordEditController 22 12 23 @synthesize barHeader; 24 @synthesize barButtonSave; 25 @synthesize rValue; 26 @synthesize editKeywordType; 27 @synthesize secondariesDescription; 28 @synthesize primaryKeywords; 29 @synthesize secViewContainer; 30 @synthesize editSubview; 31 @synthesize saveIndicator; 13 @synthesize keywordId; 14 @synthesize primaryType; 15 @synthesize primaryValue; 16 @synthesize secondaryKeywords; 32 17 @synthesize delegate; 33 34 #pragma mark ------ Transition methods 18 @dynamic keywordHasSecondaries; 35 19 36 20 #pragma mark ------ Calling methods 37 21 38 - (void)presentViewForRecord:(NSDictionary *)aRec { 39 if (!self.view) { 40 NSLog(@"Fatal error: keyword edit view wasn't properly loaded"); 41 return; 42 } 43 [theKeyword release]; 22 + (KeywordEditController *)controllerForKeyword:(NSDictionary *)aRec { 23 KeywordEditController *keyEC = [[[KeywordEditController alloc] initWithKeyword:aRec] autorelease]; 24 return keyEC; 25 } 26 27 - (KeywordEditController *)initWithKeyword:(NSDictionary *)aRec { 28 if (! [super initWithStyle:UITableViewStyleGrouped]) { 29 return nil; 30 } 44 31 if (!aRec) { // new 45 editSubview.hidden = YES; 46 theKeyword = [[NSMutableDictionary dictionaryWithCapacity:8] retain]; 47 barHeader.title = @"New Item"; 48 barButtonSave.enabled = TRUE; 49 rValue.text = @""; 50 rValue.textColor = [UIColor blackColor]; 51 [theKeyword setObject:@"0" forKey:@"primaryKeywordId"]; 52 [theKeyword setObject:[self.delegate domain] forKey:@"domain"]; 53 primaryKeywords.hidden = NO; 54 [self displaySecondaryViewAtIndex:primaryKeywords.selectedSegmentIndex]; 32 isEditing = NO; 33 self.keywordId = nil; 34 self.primaryType = @"nl"; // default to name 35 self.primaryValue = @""; 36 self.secondaryKeywords = [self fillSecondaryKeywords:nil]; 55 37 } else { // edit 56 // TODO: Allow editing of keywords 57 if (!aRec) { 58 NSLog(@"Missing record for KeywordEditController"); 59 return; 60 } 61 editSubview.hidden = NO; 62 theKeyword = [[NSMutableDictionary dictionaryWithCapacity:[aRec count]] retain]; 63 [theKeyword setDictionary:aRec]; 64 editKeywordType.text = [[delegate delegateKeywordTypes] objectForKey:[theKeyword objectForKey:@"field"]]; 65 barHeader.title = @"View Keyword"; 66 barButtonSave.enabled = FALSE; 67 [theKeyword setObject:[self.delegate domain] forKey:@"domain"]; 68 rValue.text = [theKeyword objectForKey:@"value"]; 69 rValue.textColor = [UIColor whiteColor]; 70 // Now generate a nice secondaries string 71 NSMutableString *secDesc = [NSMutableString stringWithCapacity:100]; 72 for (NSDictionary *sec in [theKeyword objectForKey:@"secondaryKeywords"]) { 73 [secDesc appendFormat:@"%@: %@\n", [[delegate delegateKeywordTypes] objectForKey:[sec objectForKey:@"field"]], 74 [sec objectForKey:@"value"]]; 75 } 76 secondariesDescription.text = secDesc; 77 primaryKeywords.hidden = YES; 78 79 // TODO: Enable keyword editing 80 //NSDictionary *validKeywordTypes = [[delegate delegateKeywordTypes] retain]; 81 } 82 83 [self viewWillAppear:YES]; 84 // Insert our view just at the top of the caller's subview stack 85 [[(UIViewController *)delegate view] addSubview:self.view]; 86 // Set up the animation 87 CATransition *animation = [CATransition animation]; 88 [animation setDelegate:self]; 89 90 [animation setType:kCATransitionMoveIn]; 91 [animation setSubtype:kCATransitionFromRight]; 92 93 // Set the duration and timing function of the transtion -- duration is passed in as a parameter, use ease in/ease out as the timing function 94 [animation setDuration:kKTransitionDuration]; 95 [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; 96 97 [[[(UIViewController *)delegate view] layer] addAnimation:animation forKey:@"kEditAnimation"]; 98 99 } 100 101 - (void)displaySecondaryViewAtIndex:(NSInteger)idx { 102 // Displays a secondary view and clears the previous view 103 // clear current 104 if (currentSecondaryView) { 105 [currentSecondaryView removeFromSuperview]; 106 [currentSecondaryView release]; 107 } 108 // load new one 109 currentSecondaryView = [[[NSBundle mainBundle] loadNibNamed:[arraySecondaryViews objectAtIndex:idx] 110 owner:self options:nil] objectAtIndex:0]; 111 [currentSecondaryView retain]; 112 secViewContainer.contentSize = CGSizeMake(currentSecondaryView.frame.size.width, currentSecondaryView.frame.size.height); 113 [secViewContainer addSubview:currentSecondaryView]; 114 } 115 116 117 #pragma mark ------ Standard View Methods 118 - (void)viewDidLoad { 119 [super viewDidLoad]; 120 121 tArrKey = [[NSMutableArray arrayWithCapacity:30] retain]; 122 tArrVal = [[NSMutableArray arrayWithCapacity:30] retain]; 123 arraySecondaryViews = [[NSArray arrayWithObjects:@"nKeywordView", @"aKeywordView", @"baKeywordView", 124 @"biKeywordView", @"diKeywordView", @"hiKeywordView", @"ftKeywordView",nil] retain]; 125 [self registerForKeyboardNotifications]; 126 } 127 128 - (void)viewWillAppear:(BOOL)animated { 129 38 // TODO: DISABLE SELECTION OF A DIFFERENT TYPE IF IN EDIT MODE 39 isEditing = YES; 40 self.keywordId = [aRec objectForKey:@"id"]; 41 self.primaryType = [aRec objectForKey:@"field"]; 42 self.primaryValue = [aRec objectForKey:@"value"]; 43 self.secondaryKeywords = [self fillSecondaryKeywords:[aRec objectForKey:@"secondaryKeywords"]]; 44 } 45 buttonSave = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(didClickSave)]; 46 [buttonSave retain]; 47 self.navigationItem.rightBarButtonItem = buttonSave; 48 return self; 130 49 } 131 50 … … 135 54 } 136 55 137 138 56 - (void)didReceiveMemoryWarning { 139 57 [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview … … 142 60 143 61 - (void)dealloc { 144 [[NSNotificationCenter defaultCenter] removeObserver:self]; 145 [tArrKey release]; 146 [tArrVal release]; 147 [theKeyword release]; 148 [arraySecondaryViews release]; 149 [currentSecondaryView release]; 62 [buttonSave release]; 150 63 [super dealloc]; 151 64 } 152 65 153 #pragma mark ------ Actions 154 155 - (IBAction)keywordTypeDidChange:(UISegmentedControl *)sender { 156 [self displaySecondaryViewAtIndex:[sender selectedSegmentIndex]]; 157 } 158 159 - (IBAction)didClickCancel:(id)sender { 66 #pragma mark - 67 #pragma mark Secondary Keywords methods 68 69 - (BOOL)keywordHasSecondaries { 70 if ([self.secondaryKeywords count] == 0) 71 return NO; 72 return YES; 73 } 74 75 - (NSMutableArray *)fillSecondaryKeywords:(NSArray *)secArray { 76 // jsonArray of {id: 15, field: "a1", value: "my street"} dicts 77 // Create the array of secondary keywords. The trick is to show empty values for those known secondary keywords 78 // that aren't filled by the user. Also we need to absolutely keep the original ordering of the secondaries that 79 // are in use, so that the known unused secondaries are at the end of the list 80 NSMutableArray *returnedArray; 81 if (secArray == nil) { // asked to use default known secondaries only 82 returnedArray = [NSMutableArray array]; 83 } else { 84 returnedArray = [NSMutableArray arrayWithArray:secArray]; 85 } 86 87 NSMutableArray *knownSecondaries = [NSMutableArray arrayWithArray:[delegate typesForKeyword:self.primaryType]]; 88 if (knownSecondaries == nil) { 89 // this is the case of a custom keyword that has secondary keywords 90 return returnedArray; 91 } else { 92 // this is a known keyword that may or may not have its secondaries filled in 93 for (NSDictionary *secDict in returnedArray) { 94 // first remove the used secondaries from the list of known ones 95 NSString *shortName = [secDict objectForKey:@"field"]; 96 [knownSecondaries removeObjectIdenticalTo:shortName]; 97 } 98 for (NSString *unusedSec in knownSecondaries) { 99 // then append the culled list to the list of used secondaries 100 NSDictionary *secDict = [NSDictionary dictionaryWithObjectsAndKeys: 101 @"", @"id", 102 unusedSec, @"field", 103 @"", @"value", 104 nil]; 105 [returnedArray addObject:secDict]; 106 } 107 // The end result is a full list of secondaries that includes at the bottom the unused ones 108 return returnedArray; 109 } 110 } 111 112 113 #pragma mark - 114 #pragma mark TableView methods 115 116 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 117 return kKKeywordEditTableViewSectionsCount; 118 } 119 120 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 121 if (section == kKKeywordEditTableViewSectionSecondaries) 122 return [self.secondaryKeywords count]; 123 return 1; 124 } 125 126 - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 127 NSString *returnedTitle = nil; 128 switch (section) { 129 case kKKeywordEditTableViewSectionType: 130 returnedTitle = @"Type"; 131 break; 132 case kKKeywordEditTableViewSectionValue: 133 returnedTitle = @"Value"; 134 break; 135 case kKKeywordEditTableViewSectionSecondaries: 136 if (self.keywordHasSecondaries) 137 returnedTitle = @"Content"; 138 break; 139 default: 140 break; 141 } 142 return returnedTitle; 143 } 144 145 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 146 static NSString *TypeCellIdentifier = @"TypeCell"; 147 static NSString *ValueCellIdentifier = @"ValueCell"; 148 static NSString *SecondaryCellIdentifier = @"SecondaryCell"; 149 150 UITableViewCell *cell = nil; 151 152 switch (indexPath.section) { 153 case kKKeywordEditTableViewSectionType: 154 cell = [tableView dequeueReusableCellWithIdentifier:TypeCellIdentifier]; 155 if (cell == nil) { 156 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 157 reuseIdentifier:TypeCellIdentifier] autorelease]; 158 } 159 cell.textLabel.text = [delegate longNameForKeyword:self.primaryType]; 160 if (isEditing) { 161 cell.accessoryType = UITableViewCellAccessoryNone; 162 cell.selectionStyle = UITableViewCellSelectionStyleNone; 163 } else { 164 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 165 cell.selectionStyle = UITableViewCellSelectionStyleBlue; 166 } 167 168 break; 169 case kKKeywordEditTableViewSectionValue: 170 cell = [tableView dequeueReusableCellWithIdentifier:ValueCellIdentifier]; 171 if (cell == nil) { 172 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 173 reuseIdentifier:ValueCellIdentifier] autorelease]; 174 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 175 cell.textLabel.font = [cell.textLabel.font fontWithSize:12.0f]; 176 cell.textLabel.lineBreakMode = UILineBreakModeWordWrap; 177 cell.textLabel.adjustsFontSizeToFitWidth = NO; 178 } 179 cell.textLabel.text = self.primaryValue; 180 break; 181 case kKKeywordEditTableViewSectionSecondaries: 182 cell = [tableView dequeueReusableCellWithIdentifier:SecondaryCellIdentifier]; 183 if (cell == nil) { 184 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 185 reuseIdentifier:SecondaryCellIdentifier] autorelease]; 186 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 187 } 188 NSDictionary *theSecondary = [self.secondaryKeywords objectAtIndex:indexPath.row]; 189 cell.textLabel.text = [delegate longNameForKeyword:[theSecondary objectForKey:@"field"]]; 190 cell.detailTextLabel.text = [theSecondary objectForKey:@"value"]; 191 break; 192 default: 193 break; 194 } 195 return cell; 196 } 197 198 - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { 199 // disable changing the type if we're in editing mode 200 if (indexPath.section == kKKeywordEditTableViewSectionType) { 201 if (isEditing) { 202 return nil; 203 } 204 } 205 return indexPath; 206 } 207 208 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 209 [tableView deselectRowAtIndexPath:indexPath animated:YES]; 210 211 if (indexPath.section == kKKeywordEditTableViewSectionType) { 212 // TODO: load an action sheet with a pickerview to choose from different primaries 213 } else if (indexPath.section == kKKeywordEditTableViewSectionValue) { 214 NSString *tvEditTitle = [delegate longNameForKeyword:self.primaryType]; 215 HATextViewEditController *teC = [HATextViewEditController controllerWithDelegate:self 216 title:tvEditTitle 217 prompt:nil]; 218 teC.textContent = self.primaryValue; 219 if (self.keywordHasSecondaries) { 220 teC.maxCharSize = kKPrimaryValueMaxLength; 221 } else { 222 teC.maxCharSize = kKValueMaxLength; 223 } 224 teC.returnKeyType = UIReturnKeyDone; 225 [self.navigationController pushViewController:teC animated:YES]; 226 } else if (indexPath.section == kKKeywordEditTableViewSectionSecondaries) { 227 // TODO: new view controller to manage a secondary type and value 228 } 229 } 230 231 #pragma mark - 232 #pragma mark Actions 233 234 - (void)didClickCancel { 160 235 [self.view removeFromSuperview]; 161 236 } 162 237 163 - ( IBAction)didClickSave:(id)sender{238 - (void)didClickSave { 164 239 // store all the keyword info 165 240 NSMutableDictionary *saveKeywordDict = [[NSMutableDictionary dictionaryWithCapacity:2] retain]; 166 241 [saveKeywordDict setObject:[self.delegate domain] forKey:@"domain"]; 242 if (isEditing) { 243 [saveKeywordDict setObject:self.keywordId forKey:@"primaryKeywordId"]; 244 } 167 245 NSMutableArray *saveSecKeywordArray = [[NSMutableArray arrayWithCapacity:8] retain]; 168 [saveSecKeywordArray addObject:[NSDictionary dictionaryWithObjectsAndKeys: 169 [currentSecondaryView primaryType], @"key", 170 [currentSecondaryView primaryLabelString], @"value", 171 nil]]; 172 NSUInteger i, count = [[currentSecondaryView secondaryKeywordTypes] count]; 173 for (i = 0; i < count; i++) { 174 [saveSecKeywordArray addObject:[NSDictionary dictionaryWithObjectsAndKeys: 175 [[currentSecondaryView secondaryKeywordTypes] objectAtIndex:i], @"key", 176 [[[currentSecondaryView secondaryKeywordLabels] objectAtIndex:i] text], @"value", 177 nil]]; 246 [saveSecKeywordArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:self.primaryType, @"key", self.primaryValue, @"value", nil]]; 247 for (NSDictionary *secDict in self.secondaryKeywords) { 248 NSString *secVal = [secDict objectForKey:@"value"]; 249 if (secVal != @"") { 250 NSString *secType = [secDict objectForKey:@"field"]; 251 [saveSecKeywordArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:secType, @"key", secVal, @"value", nil]]; 252 } 178 253 } 179 254 [saveKeywordDict setObject:saveSecKeywordArray forKey:@"keywords"]; … … 183 258 184 259 // Store the record 185 barButtonSave.enabled = NO; 186 [saveIndicator startAnimating]; 260 UIActivityIndicatorView *uiAIV = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 261 self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:uiAIV] autorelease]; 262 // yield to runloop for the activity indicator to display 263 [self performSelector:@selector(self) withObject:nil afterDelay:0.1]; 187 264 Keyword *conn = [[[Keyword alloc] init] autorelease]; 188 265 [conn setTheDelegate:self]; 189 266 [conn setActionSel:@selector(afterSaveAction:)]; 190 [conn setConnectionUrl:[conn urlFromAction:@"addkeywordstructure"]]; 267 if (isEditing) { 268 [conn setConnectionUrl:[conn urlFromAction:@"updatekeyword"]]; 269 } else { 270 [conn setConnectionUrl:[conn urlFromAction:@"addkeywordstructure"]]; 271 } 191 272 [conn setPayload:saveKeywordDict]; 192 273 [conn performLookup:TRUE]; … … 196 277 197 278 - (void)afterSaveAction:(NSDictionary *)parsedJson { 279 self.navigationItem.rightBarButtonItem = buttonSave; 198 280 if ([[parsedJson valueForKey:@"success"] integerValue] == 1) { 199 [delegate d idStoreKeyword:theKeyword];281 [delegate dataDidChangeInController:self]; 200 282 [self.view removeFromSuperview]; 201 283 } else { 202 284 [JsonConnection throwJsonErrorAlert:parsedJson]; 203 285 } 204 [saveIndicator stopAnimating]; 205 barButtonSave.enabled = YES; 206 } 207 208 #pragma mark ------ TextField/View delegate methods 209 - (void)textFieldDidBeginEditing:(UITextField *)textField { 210 // Set the active field to this text field, so that the keyboard notification handling knows about it 211 activeField = textField; 212 return; 213 } 214 - (BOOL)textFieldShouldEndEditing:(UITextField *)textField { 215 return YES; 216 } 217 - (BOOL)textFieldShouldReturn:(UITextField *)textField { 218 [textField resignFirstResponder]; 219 return YES; 220 } 221 - (void)textViewDidBeginEditing:(UITextView *)textView { 222 // Set the active field to this text field, so that the keyboard notification handling knows about it 223 activeField = textView; 224 return; 225 } 226 227 #pragma mark ------ Keyboard handling 228 229 - (void)registerForKeyboardNotifications 230 { 231 [[NSNotificationCenter defaultCenter] addObserver:self 232 selector:@selector(keyboardWasShown:) 233 name:UIKeyboardDidShowNotification object:nil]; 234 235 [[NSNotificationCenter defaultCenter] addObserver:self 236 selector:@selector(keyboardWasHidden:) 237 name:UIKeyboardWillHideNotification object:nil]; 238 } 239 240 // Called when the UIKeyboardDidShowNotification is sent. 241 - (void)keyboardWasShown:(NSNotification*)aNotification 242 { 243 if (keyboardShown) 244 return; 245 246 NSDictionary* info = [aNotification userInfo]; 247 248 // Get the size of the keyboard. 249 NSValue* aValue = [info objectForKey:UIKeyboardBoundsUserInfoKey]; 250 CGSize keyboardSize = [aValue CGRectValue].size; 251 252 // Resize the scroll view 253 CGRect viewFrame = secViewContainer.frame; 254 viewFrame.size.height -= (keyboardSize.height-45); 255 secViewContainer.frame = viewFrame; 256 257 // Scroll the active text field into view. 258 CGRect textFieldRect = activeField.frame; 259 [secViewContainer scrollRectToVisible:textFieldRect animated:YES]; 260 261 keyboardShown = YES; 262 } 263 264 265 // Called when the UIKeyboardWillHideNotification is sent 266 - (void)keyboardWasHidden:(NSNotification*)aNotification 267 { 268 NSDictionary* info = [aNotification userInfo]; 269 270 // Get the size of the keyboard. 271 NSValue* aValue = [info objectForKey:UIKeyboardBoundsUserInfoKey]; 272 CGSize keyboardSize = [aValue CGRectValue].size; 273 274 // Reset the height of the scroll view to its original value 275 CGRect viewFrame = secViewContainer.frame; 276 viewFrame.size.height += (keyboardSize.height-45); 277 secViewContainer.frame = viewFrame; 278 279 keyboardShown = NO; 286 } 287 288 #pragma mark - 289 #pragma mark HATextViewEditDelegate Methods 290 291 - (void)didChangeContentOfTextView:(UITextView *)textView { 292 self.primaryValue = textView.text; 293 NSIndexPath *primaryValueIndexPath = [NSIndexPath indexPathForRow:0 inSection:kKKeywordEditTableViewSectionValue]; 294 [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:primaryValueIndexPath] 295 withRowAnimation:UITableViewRowAnimationFade]; 296 } 297 298 - (void)didDismissTextView:(UITextView *)textView { 280 299 } 281 300 -
apps/iphone/my.tel/trunk/Classes/KeywordViewController.h
r593 r622 13 13 #import "KeywordEditController.h" 14 14 15 @interface KeywordViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, KeywordEditDelegate> { 16 NSMutableDictionary *validKeywordTypes; // Localized keyword types (fn -> First Name) 17 18 NSMutableArray *keywordsArray; // all the retrieved raw JSON data 19 NSMutableArray *uiArray; // the data to show in a UITable 20 21 CGFloat keywordTableHeight; // This should change based on the amount of text 22 23 IBOutlet UITableView *theTable; 24 IBOutlet UIBarButtonItem *buttonAdd; 25 IBOutlet UIBarButtonItem *buttonEdit; 26 IBOutlet UIBarButtonItem *buttonDone; 27 IBOutlet UINavigationBar *navBar; 28 IBOutlet KeywordEditController *editController; 15 @interface KeywordViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource, KeywordEditDelegate> { 16 NSMutableDictionary *keywordTypesNames; // Localized keyword types (fn -> First Name) 17 NSMutableDictionary *keywordTypes; // Keyword types structure (primaries+secondaries) 18 NSMutableArray *keywordsArray; // all the retrieved raw JSON data 19 NSMutableArray *uiArray; // the data to show in a UITable 20 CGFloat keywordTableHeight; // This should change based on the amount of text 29 21 id <TelControllerDelegate> delegate; 30 22 @private … … 36 28 - (void)updateUITableWithJson:(NSDictionary *)parsedJson; 37 29 - (NSMutableDictionary *)uiItemFromJsonItem:(NSDictionary *)jsonItem; 38 - (void)fill ValidKeywordsDict:(NSDictionary *)parsedJson;30 - (void)fillKeywordNamesDict:(NSDictionary *)parsedJson; 39 31 - (void)getKeywords; 40 - (void)storeKeyword:(NSDictionary *)aRec; // Could be a set of primary+secondaries41 32 - (void)deleteKeywords:(NSDictionary *)aRec; 42 33 - (void)getValidKeywords:(BOOL)fromNetwork; 43 34 44 @property (nonatomic, retain) NSMutableDictionary *validKeywordTypes;35 - (void)addRecord; 45 36 37 @property (nonatomic, readonly) NSDictionary *keywordTypesNames; 38 @property (nonatomic, readonly) NSDictionary *keywordTypes; 46 39 @property (nonatomic, retain) NSMutableArray *keywordsArray; 47 40 @property (nonatomic, retain) NSMutableArray *uiArray; 48 49 - (IBAction)addRecord:(id)sender; 50 - (IBAction)editTable:(id)sender; 51 - (IBAction)doneEditingTable:(id)sender; 52 53 @property (nonatomic, retain) IBOutlet UITableView *theTable; 54 @property (nonatomic, retain) IBOutlet UIBarButtonItem *buttonAdd; 55 @property (nonatomic, retain) IBOutlet UIBarButtonItem *buttonEdit; 56 @property (nonatomic, retain) IBOutlet UIBarButtonItem *buttonDone; 57 @property (nonatomic, retain) IBOutlet UINavigationBar *navBar; 58 @property (nonatomic, retain) IBOutlet KeywordEditController *editController; 59 @property (retain) id delegate; 41 @property (retain) id <TelControllerDelegate> delegate; 60 42 61 43 @end -
apps/iphone/my.tel/trunk/Classes/KeywordViewController.m
r593 r622 22 22 @implementation KeywordViewController 23 23 24 @synthesize validKeywordTypes; 24 @synthesize keywordTypesNames; 25 @synthesize keywordTypes; 25 26 26 27 @synthesize keywordsArray; 27 28 @synthesize uiArray; 28 29 29 @synthesize theTable;30 @synthesize buttonAdd;31 @synthesize buttonEdit;32 @synthesize buttonDone;33 @synthesize navBar;34 @synthesize editController;35 30 @synthesize delegate; 36 31 … … 39 34 40 35 + (KeywordViewController *)controllerWithDelegate:(id <TelControllerDelegate>)aDelegate preload:(BOOL)preload { 41 KeywordViewController *theC = [[[KeywordViewController alloc] initWith NibName:@"TabTxt" bundle:nil] autorelease];36 KeywordViewController *theC = [[[KeywordViewController alloc] initWithStyle:UITableViewStyleGrouped] autorelease]; 42 37 theC.delegate = aDelegate; 43 38 theC.keywordsArray = [NSMutableArray arrayWithCapacity:20]; … … 48 43 } 49 44 [theC setDidPreload:preload]; 45 theC.navigationItem.rightBarButtonItem = [theC editButtonItem]; 50 46 return theC; 51 47 } … … 60 56 [super viewDidLoad]; 61 57 keywordTableHeight = kKRowHeight; 58 self.title = @"Keywords"; 62 59 } 63 60 … … 74 71 75 72 - (void)dealloc { 76 [validKeywordTypes release]; 73 [keywordTypesNames release]; 74 [keywordTypes release]; 77 75 [super dealloc]; 78 76 } … … 104 102 if (cell == nil) { 105 103 cell = [[[KeywordCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:CellIdentifier] autorelease]; 104 cell.editingAccessoryType = UITableViewCellAccessoryNone; 105 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 106 106 } 107 NS MutableDictionary *uiItem = [[uiArray objectAtIndex:indexPath.row] retain];107 NSDictionary *uiItem = [[uiArray objectAtIndex:indexPath.row] retain]; 108 108 #ifdef DEBUG 109 109 NSLog(@"UI ITEM IS: %@", uiItem); 110 110 #endif 111 [cell.labelPrimaryType setText:[NSString stringWithFormat:@"%@", [uiItem objectForKey:@"primary"]]];112 if ([[uiItem objectForKey:@"secondar ies"] isEqualToString:@""]) {111 cell.labelPrimaryType.text = [uiItem objectForKey:@"primaryLongName"]; 112 if ([[uiItem objectForKey:@"secondaryString"] isEqualToString:@""]) { 113 113 // No secondaries, put the primary value in the larger secondary field 114 [cell.labelPrimaryValue setText:@""]; 115 [cell.labelSecondaryText setText:[NSString stringWithFormat:@"%@", [uiItem objectForKey:@"value"]]]; 116 } else { 117 [cell.labelPrimaryValue setText:[NSString stringWithFormat:@"%@", [uiItem objectForKey:@"value"]]]; 118 [cell.labelSecondaryText setText:[NSString stringWithFormat:@"%@", [uiItem objectForKey:@"secondaries"]]]; 119 } 120 114 cell.labelPrimaryValue.text = @""; 115 cell.labelSecondaryText.text = [uiItem objectForKey:@"value"]; 116 } else { 117 cell.labelPrimaryValue.text = [uiItem objectForKey:@"value"]; 118 cell.labelSecondaryText.text = [uiItem objectForKey:@"secondaryString"]; 119 } 121 120 [uiItem release]; 122 123 121 return cell; 124 122 } … … 126 124 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 127 125 [tableView deselectRowAtIndexPath:indexPath animated:NO]; 126 KeywordEditController *editC = [KeywordEditController controllerForKeyword:[uiArray objectAtIndex:indexPath.row]]; 127 editC.delegate = self; 128 [self.navigationController pushViewController:editC animated:YES]; 128 129 } 129 130 … … 138 139 [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 139 140 } 140 if (editingStyle == UITableViewCellEditingStyleInsert) {141 // Not supported here142 }143 }144 145 - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {146 // TODO: Present a nav controller with a tableview first to choose the type of keyword147 if (editController) {148 [editController release];149 }150 editController = [[KeywordEditController alloc]151 initWithNibName:@"KeywordEdit" bundle:[NSBundle mainBundle]];152 editController.delegate = self;153 NSDictionary *theKeyword = [self selectRecordInSetUsingId:[[uiArray objectAtIndex:indexPath.row]154 objectForKey:@"id"]];155 [editController presentViewForRecord:theKeyword];156 141 } 157 142 … … 166 151 } 167 152 153 - (void)setEditing:(BOOL)editing animated:(BOOL)animated { 154 [super setEditing:editing animated:animated]; 155 if (editing) { 156 self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd 157 target:self 158 action:@selector(addRecord)] autorelease]; 159 } else { 160 self.navigationItem.leftBarButtonItem = nil; 161 } 162 } 163 168 164 - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { 169 // Primary keywords cannot be reordered 170 // Secondary keywords can be reordered within a primary keyword 171 // but it's not useful to support this on the iPhone 165 // Primary keywords don't have an order 172 166 return NO; 173 167 } 174 168 175 169 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 176 // TODO: Make the keyword cell height dynamic using kKRowHeight + (num_lines)*kKRowLineHeightIncrease; 177 return keywordTableHeight; 170 // NSDictionary *uiItem = [[uiArray objectAtIndex:indexPath.row] retain]; 171 // NSString *secondaryString = [uiItem objectForKey:@"secondaryString"]; 172 // CGSize constrainedSize = CGSizeMake([UIScreen mainScreen].bounds.size.width - 40, 200); 173 // CGSize expectedSize = [secondaryString sizeWithFont:[UIFont systemFontOfSize:12] 174 // constrainedToSize:constrainedSize 175 // lineBreakMode:UILineBreakModeWordWrap]; 176 // return expectedSize.height+26; 177 CGFloat sizeForFiveLines = ([[KeywordCell labelFont] pointSize] + 4) * 7; 178 return sizeForFiveLines; 178 179 } 179 180 180 181 #pragma mark ------ KeywordEditDelegate Methods 181 182 182 - (void)d idStoreKeyword:(NSDictionary *)aRec{183 - (void)dataDidChangeInController:(UIViewController *)controller { 183 184 [self getKeywords]; 184 }185 186 - (NSDictionary *)delegateKeywordTypes {187 return validKeywordTypes;188 }189 190 - (void)dataDidChangeInController:(UIViewController *)controller {191 // TODO: fix this controller to conform to the new stuff192 185 } 193 186 … … 196 189 } 197 190 191 - (NSString *)longNameForKeyword:(NSString *)shortName { 192 // Try to get the mapped keyword type. If it fails, use the incoming string 193 if (shortName == nil) return nil; 194 NSString *longName = [keywordTypesNames objectForKey:shortName]; 195 if (longName) { 196 return longName; 197 } else { 198 return shortName; 199 } 200 } 201 202 - (NSArray *)typesForKeyword:(NSString *)shortName { 203 if (shortName == nil) return nil; 204 NSArray *secondaryTypes = [keywordTypes objectForKey:shortName]; 205 return secondaryTypes; 206 } 207 198 208 #pragma mark ------ UI Methods and Json Delegates 199 209 200 - (IBAction)addRecord:(id)sender { 201 if (editController) { 202 [editController release]; 203 } 204 editController = [[KeywordEditController alloc] 205 initWithNibName:@"KeywordEdit" bundle:[NSBundle mainBundle]]; 206 editController.delegate = self; 207 [editController presentViewForRecord:nil]; 208 } 209 210 - (IBAction)editTable:(id)sender { 211 navBar.topItem.rightBarButtonItem = buttonDone; 212 [theTable reloadData]; 213 [theTable setEditing:YES animated:YES]; 214 } 215 216 - (IBAction)doneEditingTable:(id)sender { 217 navBar.topItem.rightBarButtonItem = buttonEdit; 218 [theTable setEditing:NO animated:YES]; 219 //keywordTableHeight = kKRowHeight; 220 [theTable reloadData]; 221 } 210 - (void)addRecord { 211 KeywordEditController *editC = [KeywordEditController controllerForKeyword:nil]; 212 editC.delegate = self; 213 [self.navigationController pushViewController:editC animated:YES]; 214 } 222 215 223 216 - (NSDictionary *)selectRecordInSetUsingId:(NSString *)anId { … … 245 238 } 246 239 [self.delegate dataDidChangeInController:self]; 247 [self.t heTablereloadData];248 } else { 249 [self.t heTablereloadData];240 [self.tableView reloadData]; 241 } else { 242 [self.tableView reloadData]; 250 243 [Keyword throwJsonErrorAlert:parsedJson]; 251 244 } … … 261 254 // secondaryKeywords: [ {id: 15, field: "a1", value: "my street"}]} 262 255 263 #ifdef DEBUG264 NSLog(@"Naptr Rec in JSON: %@", [jsonItem descriptionInStringsFileFormat]);265 #endif266 256 //#ifdef DEBUG 257 // NSLog(@"Naptr Rec in JSON: %@", [jsonItem descriptionInStringsFileFormat]); 258 //#endif 259 267 260 NSMutableDictionary *uiItem; 268 261 if (!jsonItem) { 269 262 return NULL; 270 263 } 271 uiItem = [NSMutableDictionary dictionaryWithCapacity:7]; 272 273 // set id 274 [uiItem setObject:(NSString *)[jsonItem objectForKey:@"id"] forKey:@"id"]; 275 276 // set field string: Try to get the mapped keyword types, otherwise put in what's there 277 NSString *pFullText; 278 pFullText = [validKeywordTypes objectForKey:(NSString *)[jsonItem objectForKey:@"field"]]; 279 if (pFullText) { 280 [uiItem setObject:pFullText forKey:@"primary"]; 281 } else { 282 [uiItem setObject:(NSString *)[jsonItem objectForKey:@"field"] forKey:@"primary"]; 283 } 284 285 // set value 286 if ([jsonItem objectForKey:@"value"]) 287 [uiItem setObject:(NSString *)[jsonItem objectForKey:@"value"] forKey:@"value"]; 288 else 264 uiItem = [NSMutableDictionary dictionaryWithDictionary:jsonItem]; 265 266 // set field string 267 NSString *primaryLongName; 268 primaryLongName = [self longNameForKeyword:[jsonItem objectForKey:@"field"]]; 269 [uiItem setObject:primaryLongName forKey:@"primaryLongName"]; 270 271 // set value if nonexistent 272 if (![uiItem objectForKey:@"value"]) 289 273 [uiItem setObject:@"" forKey:@"value"]; 290 274 291 275 // Generate the basic display string 292 276 NSInteger i=0; 293 NSMutableString *theSecText = [NSMutableString stringWithCapacity: 100];277 NSMutableString *theSecText = [NSMutableString stringWithCapacity:300]; 294 278 NSDictionary *theSec; 295 for (theSec in [jsonItem objectForKey:@"secondaryKeywords"]) { 296 if (i == 0) 297 [theSecText appendString:(NSString *)[theSec objectForKey:@"value"]]; 298 else 299 [theSecText appendFormat:@", %@", (NSString *)[theSec objectForKey:@"value"]]; 279 for (theSec in [uiItem objectForKey:@"secondaryKeywords"]) { 280 if (i == 0) { 281 [theSecText appendFormat:@"%@: %@", [self longNameForKeyword:[theSec objectForKey:@"field"]], [theSec objectForKey:@"value"]]; 282 } else { 283 [theSecText appendFormat:@"\n%@: %@", [self longNameForKeyword:[theSec objectForKey:@"field"]], [theSec objectForKey:@"value"]]; 284 } 300 285 i++; 301 286 } 302 [uiItem setObject:theSecText forKey:@"secondar ies"];287 [uiItem setObject:theSecText forKey:@"secondaryString"]; 303 288 304 289 return uiItem; 305 290 } 306 291 307 - (void)fillValidKeywordsDict:(NSDictionary *)parsedJson { 308 if (!self.validKeywordTypes) { 309 self.validKeywordTypes = [[NSMutableDictionary dictionaryWithCapacity:20] retain]; 310 } else { 311 [self.validKeywordTypes removeAllObjects]; 312 } 292 - (void)fillKeywordNamesDict:(NSDictionary *)parsedJson { 293 // We'll both get the mappings and the keyword structures here 294 // Start by getting the short->long name mapping 295 if (keywordTypesNames) 296 [keywordTypesNames release]; 313 297 if (!parsedJson) { 314 298 // We're loading the data statically (not from the network) 315 self.validKeywordTypes = [NSMutableDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] 316 pathForResource:@"KeywordTypes" ofType:@"plist"]]; 317 } else { 299 keywordTypesNames = [[NSMutableDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] 300 pathForResource:@"KeywordTypesLongNames" 301 ofType:@"plist"]] retain]; 302 } else { 303 keywordTypesNames = [[NSMutableDictionary dictionaryWithCapacity:20] retain]; 318 304 if ([[parsedJson valueForKey:@"success"] integerValue] == 1) { 319 305 NSArray *keyTypeList = (NSArray *)[parsedJson valueForKey:@"validKeywordList"]; 320 306 NSDictionary *aKeyType; 321 307 for (aKeyType in keyTypeList) { 322 [ self.validKeywordTypes setObject:(NSString *)[aKeyType objectForKey:@"displayText"]308 [keywordTypesNames setObject:(NSString *)[aKeyType objectForKey:@"displayText"] 323 309 forKey:(NSString *)[aKeyType objectForKey:@"shortForm"]]; 324 310 } … … 327 313 } 328 314 } 315 316 // Now grab the keyword structure, which is loaded from a local plist 317 if (keywordTypes) 318 [keywordTypes release]; 319 keywordTypes = [[NSMutableDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] 320 pathForResource:@"KeywordTypes" 321 ofType:@"plist"]] retain]; 329 322 } 330 323 … … 361 354 } 362 355 363 - (void)storeKeyword:(NSDictionary *)aRec {364 // We actually have to distinguish between a new entry and an update365 // new entry is:366 // newKeyword = {367 // domain: "cartman.tel",368 // type: "tc",369 // value: "Dormtund"370 // };371 //372 // successResult = {373 // success: true,374 // actionMessages: ["keyword added",375 // "2nd message here"],376 // id: 27 /** the id assigned to the newly created keyword */377 // };378 379 // update is:380 // keywordData = {381 // domain: "cartman.tel",382 // primaryKeywordId: 42,383 // keywords: [{key: "aux", value: "Miscellaneous info"},384 // {key: "hi", value: "playing the mouse organ"},385 // {key: "sp", value: "NRW"}]386 // };387 //388 // successResult = {389 // success: true,390 // actionMessages: ["Keyword updated successfully.",391 // "2nd message here"],392 // newIdList: [66, 67, 68] /* the ids of the new keywords */393 // };394 395 // What we'll do is create a new primary if it's a new keyword396 // and update the existing or the new.397 398 if (!aRec)399 return;400 401 NSString *newId = NULL;402 if ([[aRec objectForKey:@"primaryKeywordId"] integerValue] == 0) {403 // new keyword404 // Get the primary, and create it. Then update the whole thing.405 Keyword *newConn = [[[Keyword alloc] init] autorelease];406 [newConn setTheDelegate:[MyTelConnect sharedInstance]];407 [newConn setActionSel:@selector(doNothing:)];408 NSDictionary *thePrimary = [[(NSArray *)[aRec objectForKey:@"keywords"] objectAtIndex:0] retain];409 [newConn setConnectionUrl:[newConn urlFromAction:@"addkeyword"]];410 NSMutableDictionary *newRequestData = [[NSMutableDictionary dictionaryWithObjectsAndKeys:411 [self.delegate domain], @"domain",412 [thePrimary objectForKey:@"key"], @"type",413 [thePrimary objectForKey:@"value"], @"value",414 nil] retain];415 [newConn setPayload:newRequestData];416 NSDictionary *newParsedJson = [newConn performLookup:FALSE];417 [newRequestData release];418 [thePrimary release];419 if ([[newParsedJson valueForKey:@"success"] integerValue] == 0) {420 [Keyword throwJsonErrorAlert:newParsedJson];421 return;422 }423 newId = [NSString stringWithString:[newParsedJson objectForKey:@"id"]];424 }425 // Now update the keyword, whether it's new or not426 Keyword *conn = [[[Keyword alloc] init] autorelease];427 [conn setTheDelegate:self];428 [conn setActionSel:@selector(getRecords)];429 [conn setConnectionUrl:[conn urlFromAction:@"updatekeyword"]];430 431 NSMutableDictionary *requestData = [[NSMutableDictionary dictionaryWithCapacity:3] retain];432 [requestData setObject:[self.delegate domain] forKey:@"domain"];433 [requestData setObject:[aRec objectForKey:@"keywords"] forKey:@"keywords"];434 if (newId) {435 // if it's new, use the newly-gotten primary keyword id436 [requestData setObject:newId forKey:@"primaryKeywordId"];437 } else {438 // if it's not new, use the passed-in key439 [requestData setObject:[aRec objectForKey:@"primaryKeywordId"] forKey:@"primaryKeywordId"];440 }441 442 [conn setPayload:requestData];443 [conn performLookup:TRUE];444 [requestData release];445 }446 447 356 - (void)deleteKeywords:(NSDictionary *)aRec { 448 357 // keywords = { … … 507 416 [conn setPayload:requestData]; 508 417 NSDictionary *parsedJson = [conn performLookup:FALSE]; 509 [self fill ValidKeywordsDict:parsedJson];418 [self fillKeywordNamesDict:parsedJson]; 510 419 [requestData release]; 511 420 } else { 512 [self fill ValidKeywordsDict:nil];421 [self fillKeywordNamesDict:nil]; 513 422 } 514 423 } -
apps/iphone/my.tel/trunk/English.lproj/KeywordTypes.plist
r427 r622 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 <!-- 4 KeywordTypes.plist 5 VIP.tel 6 7 Created by Henri Asseily on 1/29/09. 8 Copyright 2009 __MyCompanyName__. All rights reserved. 9 --> 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 10 3 <plist version="1.0"> 11 <dict> 12 <key>s</key> 13 <string>Salutation</string> 14 <key>nl</key> 15 <string>Name label</string> 16 <key>cn</key> 17 <string>Common name</string> 18 <key>fn</key> 19 <string>First name</string> 20 <key>ln</key> 21 <string>Last name</string> 22 <key>nn</key> 23 <string>Nick name</string> 24 <key>dob</key> 25 <string>Date of birth</string> 26 <key>g</key> 27 <string>Gender</string> 28 <key>ms</key> 29 <string>Marital status</string> 30 <key>pa</key> 31 <string>Postal address</string> 32 <key>a1</key> 33 <string>Address line 1</string> 34 <key>a2</key> 35 <string>Address line 2</string> 36 <key>a3</key> 37 <string>Address line 3</string> 38 <key>tc</key> 39 <string>Town / City</string> 40 <key>sp</key> 41 <string>State / Province</string> 42 <key>pc</key> 43 <string>Postal code</string> 44 <key>c</key> 45 <string>Country</string> 46 <key>ll</key> 47 <string>Latitude / Longitude</string> 48 <key>o</key> 49 <string>Organization</string> 50 <key>d</key> 51 <string>Department</string> 52 <key>jt</key> 53 <string>Job title</string> 54 <key>hi</key> 55 <string>Hobbies / Interests</string> 56 <key>ft</key> 57 <string>Free text</string> 58 <key>di</key> 59 <string>Directory information</string> 60 <key>bi</key> 61 <string>Business information</string> 62 <key>bpa</key> 63 <string>Business postal address</string> 64 <key>bn</key> 65 <string>Business name</string> 66 <key>bar</key> 67 <string>Business area</string> 68 <key>bsa</key> 69 <string>Business subarea</string> 70 <key>sa</key> 71 <string>Service area</string> 72 <key>aux</key> 73 <string>Auxiliary data</string> 74 </dict> 4 <dict> 5 <key>nl</key> 6 <array> 7 <string>s</string> 8 <string>fn</string> 9 <string>ln</string> 10 <string>nn</string> 11 </array> 12 <key>pa</key> 13 <array> 14 <string>a1</string> 15 <string>a2</string> 16 <string>a3</string> 17 <string>tc</string> 18 <string>sp</string> 19 <string>pc</string> 20 <string>c</string> 21 </array> 22 <key>bpa</key> 23 <array> 24 <string>a1</string> 25 <string>a2</string> 26 <string>a3</string> 27 <string>tc</string> 28 <string>sp</string> 29 <string>pc</string> 30 <string>c</string> 31 </array> 32 <key>bi</key> 33 <array> 34 <string>o</string> 35 <string>d</string> 36 <string>jt</string> 37 </array> 38 <key>di</key> 39 <array> 40 <string>bn</string> 41 <string>bar</string> 42 <string>bsa</string> 43 <string>sa</string> 44 </array> 45 <key>hi</key> 46 <array/> 47 <key>ft</key> 48 <array/> 49 </dict> 75 50 </plist> -
apps/iphone/my.tel/trunk/VIP.tel.xcodeproj/project.pbxproj
r620 r622 57 57 38435D3D0F2A148500F9D50C /* ProfileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 38435C780F28B40200F9D50C /* ProfileViewController.m */; }; 58 58 384E482E0ED95DCF00CC1CDB /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 384E482D0ED95DCF00CC1CDB /* Default.png */; }; 59 384E48300ED95DF300CC1CDB /* background-proxy.png in Resources */ = {isa = PBXBuildFile; fileRef = 384E482F0ED95DF300CC1CDB /* background-proxy.png */; };60 59 384E492B0ED9D17F00CC1CDB /* roundedRect.png in Resources */ = {isa = PBXBuildFile; fileRef = 384E492A0ED9D17F00CC1CDB /* roundedRect.png */; }; 61 60 38596F8B0EC969B8003B6329 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 38596F850EC969B8003B6329 /* libobjc.dylib */; }; … … 71 70 385970810EC99D99003B6329 /* MyTelConnect.m in Sources */ = {isa = PBXBuildFile; fileRef = 385970800EC99D99003B6329 /* MyTelConnect.m */; }; 72 71 385970B80ECA023A003B6329 /* TextHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 385970B70ECA023A003B6329 /* TextHeader.m */; }; 72 385F284A10F6136A00BCBB14 /* KeywordTypesLongNames.plist in Resources */ = {isa = PBXBuildFile; fileRef = 385F284810F6136900BCBB14 /* KeywordTypesLongNames.plist */; }; 73 73 3869983B0ED6C3BF00FD05D6 /* RecordEditController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3869983A0ED6C3BF00FD05D6 /* RecordEditController.m */; }; 74 74 386F7DE50F9A3A3E00E9FCCF /* LocationIndicators.plist in Resources */ = {isa = PBXBuildFile; fileRef = 386F7DE40F9A3A3E00E9FCCF /* LocationIndicators.plist */; }; … … 109 109 3884FD320EDEE72000359FC4 /* biKeywordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3884FD300EDEE72000359FC4 /* biKeywordView.m */; }; 110 110 3884FD4B0EDF296C00359FC4 /* AbstractKeywordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3884FD4A0EDF296C00359FC4 /* AbstractKeywordView.m */; }; 111 3884FEE20EDFC09800359FC4 /* ftKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEE10EDFC09800359FC4 /* ftKeywordView.xib */; };112 3884FEE40EDFC0A500359FC4 /* hiKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEE30EDFC0A500359FC4 /* hiKeywordView.xib */; };113 3884FEE60EDFC0AE00359FC4 /* diKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEE50EDFC0AE00359FC4 /* diKeywordView.xib */; };114 3884FEE80EDFC0B800359FC4 /* biKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEE70EDFC0B800359FC4 /* biKeywordView.xib */; };115 3884FEEA0EDFC0BF00359FC4 /* baKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEE90EDFC0BF00359FC4 /* baKeywordView.xib */; };116 3884FEEC0EDFC0C600359FC4 /* aKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEEB0EDFC0C600359FC4 /* aKeywordView.xib */; };117 3884FEEE0EDFC0DD00359FC4 /* nKeywordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FEED0EDFC0DD00359FC4 /* nKeywordView.xib */; };118 3884FF4F0EDFD9E100359FC4 /* KeywordEditUnknownSubview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FF4E0EDFD9E100359FC4 /* KeywordEditUnknownSubview.xib */; };119 3884FF5A0EDFF06100359FC4 /* KeywordEdit.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3884FF590EDFF06100359FC4 /* KeywordEdit.xib */; };120 111 3890207E0EDC0D8B00AEE3FB /* rounded-text-box.png in Resources */ = {isa = PBXBuildFile; fileRef = 3890207D0EDC0D8B00AEE3FB /* rounded-text-box.png */; }; 121 112 389020880EDC24ED00AEE3FB /* AlertRenameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 389020870EDC24ED00AEE3FB /* AlertRenameView.m */; }; … … 149 140 38D9D34210CFFB8000EC529B /* TabNaptr.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38D9D34110CFFB8000EC529B /* TabNaptr.xib */; }; 150 141 38D9D34410CFFB9A00EC529B /* TabLoc.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38D9D34310CFFB9A00EC529B /* TabLoc.xib */; }; 151 38D9D34610CFFBAD00EC529B /* TabTxt.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38D9D34510CFFBAD00EC529B /* TabTxt.xib */; };152 142 38D9D34810CFFBB200EC529B /* TabStatus.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38D9D34710CFFBB200EC529B /* TabStatus.xib */; }; 153 143 38DA3A4C107A30C600C4DF56 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38DA3A4B107A30C600C4DF56 /* MapKit.framework */; }; … … 244 234 38435C840F28C1F300F9D50C /* marker-tel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "marker-tel.png"; sourceTree = "<group>"; }; 245 235 384E482D0ED95DCF00CC1CDB /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Default.png; sourceTree = "<group>"; }; 246 384E482F0ED95DF300CC1CDB /* background-proxy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "background-proxy.png"; path = "../background-proxy.png"; sourceTree = "<group>"; };247 236 384E492A0ED9D17F00CC1CDB /* roundedRect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = roundedRect.png; path = ../roundedRect.png; sourceTree = "<group>"; }; 248 237 38596F850EC969B8003B6329 /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; }; … … 264 253 385970B60ECA023A003B6329 /* TextHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextHeader.h; path = "API Classes/TextHeader.h"; sourceTree = "<group>"; }; 265 254 385970B70ECA023A003B6329 /* TextHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TextHeader.m; path = "API Classes/TextHeader.m"; sourceTree = "<group>"; }; 255 385F284910F6136900BCBB14 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = English; path = English.lproj/KeywordTypesLongNames.plist; sourceTree = "<group>"; }; 266 256 386998390ED6C3BF00FD05D6 /* RecordEditController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordEditController.h; sourceTree = "<group>"; }; 267 257 3869983A0ED6C3BF00FD05D6 /* RecordEditController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecordEditController.m; sourceTree = "<group>"; }; … … 312 302 3884FD490EDF296C00359FC4 /* AbstractKeywordView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractKeywordView.h; sourceTree = "<group>"; }; 313 303 3884FD4A0EDF296C00359FC4 /* AbstractKeywordView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AbstractKeywordView.m; sourceTree = "<group>"; }; 314 3884FEE10EDFC09800359FC4 /* ftKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ftKeywordView.xib; sourceTree = "<group>"; };315 3884FEE30EDFC0A500359FC4 /* hiKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = hiKeywordView.xib; sourceTree = "<group>"; };316 3884FEE50EDFC0AE00359FC4 /* diKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = diKeywordView.xib; sourceTree = "<group>"; };317 3884FEE70EDFC0B800359FC4 /* biKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = biKeywordView.xib; sourceTree = "<group>"; };318 3884FEE90EDFC0BF00359FC4 /* baKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = baKeywordView.xib; sourceTree = "<group>"; };319 3884FEEB0EDFC0C600359FC4 /* aKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = aKeywordView.xib; sourceTree = "<group>"; };320 3884FEED0EDFC0DD00359FC4 /* nKeywordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = nKeywordView.xib; sourceTree = "<group>"; };321 3884FF4E0EDFD9E100359FC4 /* KeywordEditUnknownSubview.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KeywordEditUnknownSubview.xib; sourceTree = "<group>"; };322 3884FF590EDFF06100359FC4 /* KeywordEdit.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KeywordEdit.xib; sourceTree = "<group>"; };323 304 3884FF5D0EDFF08C00359FC4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/ChangeSubdomain.xib; sourceTree = "<group>"; }; 324 305 3890207D0EDC0D8B00AEE3FB /* rounded-text-box.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "rounded-text-box.png"; path = "../rounded-text-box.png"; sourceTree = "<group>"; }; … … 355 336 38D9D33110CFF80900EC529B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TabNaptr.xib; sourceTree = "<group>"; }; 356 337 38D9D33210CFF80900EC529B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TabLoc.xib; sourceTree = "<group>"; }; 357 38D9D33310CFF80900EC529B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TabTxt.xib; sourceTree = "<group>"; };358 338 38D9D33410CFF80900EC529B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TabStatus.xib; sourceTree = "<group>"; }; 359 339 38DA3A4B107A30C600C4DF56 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; … … 459 439 386F7DE40F9A3A3E00E9FCCF /* LocationIndicators.plist */, 460 440 386F7DE60F9A3A3E00E9FCCF /* KeywordTypes.plist */, 441 385F284810F6136900BCBB14 /* KeywordTypesLongNames.plist */, 461 442 386F7DE80F9A3A3E00E9FCCF /* ServiceTypes.plist */, 462 443 386F7DEA0F9A3A3E00E9FCCF /* NaptrValuePlaceholders.plist */, … … 670 651 sourceTree = "<group>"; 671 652 }; 672 387E49F60F67F1900070F99E /* Keywords Edit NIBs */ = {673 isa = PBXGroup;674 children = (675 3884FF590EDFF06100359FC4 /* KeywordEdit.xib */,676 3884FF4E0EDFD9E100359FC4 /* KeywordEditUnknownSubview.xib */,677 3884FEE10EDFC09800359FC4 /* ftKeywordView.xib */,678 3884FEE30EDFC0A500359FC4 /* hiKeywordView.xib */,679 3884FEE50EDFC0AE00359FC4 /* diKeywordView.xib */,680 3884FEE70EDFC0B800359FC4 /* biKeywordView.xib */,681 3884FEE90EDFC0BF00359FC4 /* baKeywordView.xib */,682 3884FEEB0EDFC0C600359FC4 /* aKeywordView.xib */,683 3884FEED0EDFC0DD00359FC4 /* nKeywordView.xib */,684 );685 name = "Keywords Edit NIBs";686 sourceTree = "<group>";687 };688 653 3884FC920EDEE23C00359FC4 /* Keyword Views */ = { 689 654 isa = PBXGroup; … … 716 681 38D9D34110CFFB8000EC529B /* TabNaptr.xib */, 717 682 38D9D34310CFFB9A00EC529B /* TabLoc.xib */, 718 38D9D34510CFFBAD00EC529B /* TabTxt.xib */,719 683 38D9D34710CFFBB200EC529B /* TabStatus.xib */, 720 684 38A33B06108F168A0067C20A /* ProfileRecords.xib */, … … 728 692 380A663210877F0F00205110 /* HATextViewEditController.xib */, 729 693 380A673B108AF2AC00205110 /* HATextFieldEditController.xib */, 730 387E49F60F67F1900070F99E /* Keywords Edit NIBs */,731 694 ); 732 695 name = NIBs; … … 748 711 3884FA290EDCEFFF00359FC4 /* navbar-bg.png */, 749 712 3890207D0EDC0D8B00AEE3FB /* rounded-text-box.png */, 750 384E482F0ED95DF300CC1CDB /* background-proxy.png */,751 713 3893FACF0ED21A8A00F713B5 /* dottel-logo-pin.png */, 752 714 384E492A0ED9D17F00CC1CDB /* roundedRect.png */, … … 857 819 3873F1210ED55256002A8892 /* voip.png in Resources */, 858 820 384E482E0ED95DCF00CC1CDB /* Default.png in Resources */, 859 384E48300ED95DF300CC1CDB /* background-proxy.png in Resources */,860 821 384E492B0ED9D17F00CC1CDB /* roundedRect.png in Resources */, 861 822 3890207E0EDC0D8B00AEE3FB /* rounded-text-box.png in Resources */, … … 867 828 3884FB0E0EDDC74600359FC4 /* tabicon-contact.png in Resources */, 868 829 38ACC4470F9A2B26004B5A31 /* Keyword Group Views.xib in Resources */, 869 3884FEE20EDFC09800359FC4 /* ftKeywordView.xib in Resources */,870 3884FEE40EDFC0A500359FC4 /* hiKeywordView.xib in Resources */,871 3884FEE60EDFC0AE00359FC4 /* diKeywordView.xib in Resources */,872 3884FEE80EDFC0B800359FC4 /* biKeywordView.xib in Resources */,873 3884FEEA0EDFC0BF00359FC4 /* baKeywordView.xib in Resources */,874 3884FEEC0EDFC0C600359FC4 /* aKeywordView.xib in Resources */,875 3884FEEE0EDFC0DD00359FC4 /* nKeywordView.xib in Resources */,876 3884FF4F0EDFD9E100359FC4 /* KeywordEditUnknownSubview.xib in Resources */,877 3884FF5A0EDFF06100359FC4 /* KeywordEdit.xib in Resources */,878 830 38ACC4490F9A2B26004B5A31 /* ChangeSubdomain.xib in Resources */, 879 831 386F7DE50F9A3A3E00E9FCCF /* LocationIndicators.plist in Resources */, … … 915 867 38D9D34210CFFB8000EC529B /* TabNaptr.xib in Resources */, 916 868 38D9D34410CFFB9A00EC529B /* TabLoc.xib in Resources */, 917 38D9D34610CFFBAD00EC529B /* TabTxt.xib in Resources */,918 869 38D9D34810CFFBB200EC529B /* TabStatus.xib in Resources */, 870 385F284A10F6136A00BCBB14 /* KeywordTypesLongNames.plist in Resources */, 919 871 ); 920 872 runOnlyForDeploymentPostprocessing = 0; … … 983 935 984 936 /* Begin PBXVariantGroup section */ 937 385F284810F6136900BCBB14 /* KeywordTypesLongNames.plist */ = { 938 isa = PBXVariantGroup; 939 children = ( 940 385F284910F6136900BCBB14 /* English */, 941 ); 942 name = KeywordTypesLongNames.plist; 943 sourceTree = "<group>"; 944 }; 985 945 386F7DE40F9A3A3E00E9FCCF /* LocationIndicators.plist */ = { 986 946 isa = PBXVariantGroup; … … 1109 1069 ); 1110 1070 name = TabLoc.xib; 1111 sourceTree = "<group>";1112 };1113 38D9D34510CFFBAD00EC529B /* TabTxt.xib */ = {1114 isa = PBXVariantGroup;1115 children = (1116 38D9D33310CFF80900EC529B /* English */,1117 );1118 name = TabTxt.xib;1119 1071 sourceTree = "<group>"; 1120 1072 };








