Permalink
Browse files

Added fix for issues #112 & #113

  • Loading branch information...
1 parent 9cd55c3 commit 62d4c6050c3d1e4997c36f51d82199ecf122666f @lattejed lattejed committed Jun 22, 2011
Showing with 6 additions and 5 deletions.
  1. +6 −5 Classes/ReportManager.m
View
@@ -383,12 +383,13 @@ - (void)fetchReportsWithUserInfo:(NSDictionary *)userInfo
}
- viewState = parseViewState(salesPage);
+ viewState = parseViewState(salesPage);
NSString *dailyName = [salesPage stringByMatching:@"theForm:j_id_jsp_[0-9]*_6"];
- NSString *weeklyName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_22"];
- NSString *ajaxName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_2"];
- NSString *daySelectName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_43"];
- NSString *weekSelectName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_48"];
+ NSRange lastTwoChars = NSMakeRange([dailyName length] - 2, 2);
+ NSString *weeklyName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_22" options:0 range:lastTwoChars];
+ NSString *ajaxName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_2" options:0 range:lastTwoChars];
+ NSString *daySelectName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_43" options:0 range:lastTwoChars];
+ NSString *weekSelectName = [dailyName stringByReplacingOccurrencesOfString:@"_6" withString:@"_48" options:0 range:lastTwoChars];
// parse days available
NSMutableArray *availableDays = extractFormOptions(salesPage, @"theForm:datePickerSourceSelectElement");

0 comments on commit 62d4c60

Please sign in to comment.