Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added fix for issues #112 & #113

  • Loading branch information...
commit 62d4c6050c3d1e4997c36f51d82199ecf122666f 1 parent 9cd55c3
@lattejed lattejed authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 Classes/ReportManager.m
View
11 Classes/ReportManager.m
@@ -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");
Please sign in to comment.
Something went wrong with that request. Please try again.