Commit 3efc283d authored by Andrew D'Abbraccio's avatar Andrew D'Abbraccio

merge fix

parents 99ee729b e77f2c01
No preview for this file type
......@@ -108,13 +108,10 @@
D9CA44201A8988EF002039E1 /* CaptuvoSDKDemo */ = {
isa = PBXGroup;
children = (
D9CA44501A8989C2002039E1 /* Frameworks */,
D9CA444B1A898965002039E1 /* Include */,
D9CA44261A8988EF002039E1 /* AppDelegate.m */,
EF321C8B1A9D19E100567A08 /* CaptuvoViewController.m */,
EF321C8E1A9D1A5600567A08 /* CaptuvoScannerController.m */,
EF321C911A9D1A8500567A08 /* CaptuvoOptionsController.m */,
D9CA444C1A89898D002039E1 /* Main.storyboard */,
D9CA444B1A898965002039E1 /* Include */,
EF6DFC431AC4C5A0003BB149 /* Source */,
D9CA44501A8989C2002039E1 /* Frameworks */,
D9CA442E1A8988EF002039E1 /* Images.xcassets */,
D9CA44301A8988EF002039E1 /* LaunchScreen.xib */,
D9CA44211A8988EF002039E1 /* Supporting Files */,
......@@ -170,6 +167,17 @@
name = Frameworks;
sourceTree = "<group>";
};
EF6DFC431AC4C5A0003BB149 /* Source */ = {
isa = PBXGroup;
children = (
D9CA44261A8988EF002039E1 /* AppDelegate.m */,
EF321C8B1A9D19E100567A08 /* CaptuvoViewController.m */,
EF321C8E1A9D1A5600567A08 /* CaptuvoScannerController.m */,
EF321C911A9D1A8500567A08 /* CaptuvoOptionsController.m */,
);
name = Source;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......
......@@ -13,4 +13,6 @@
@property (weak, nonatomic) IBOutlet UIStepper *sledSoundStepper;
@property (weak, nonatomic) IBOutlet UILabel *sledSoundLabel;
@end
......@@ -20,7 +20,6 @@ int sled_volume;
[super viewDidLoad];
// Do any additional setup after loading the view.
[[Captuvo sharedCaptuvoDevice] requestDecoderGoodReadBeeperVolumeStatus];
}
- (void)didReceiveMemoryWarning {
......@@ -86,6 +85,7 @@ int sled_volume;
}
}
/*
#pragma mark - Navigation
......
......@@ -11,5 +11,6 @@
@interface CaptuvoScannerController : CaptuvoViewController
@property (weak, nonatomic) IBOutlet UILabel *barcodeLabel;
@property (weak, nonatomic) IBOutlet UISwitch *contScanSwitch;
@end
......@@ -16,8 +16,9 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self initDecoder];
// Do any additional setup after loading the view, typically from a nib.
}
......@@ -27,6 +28,23 @@
}
- (void)beginContinuousDecoder
{
[[Captuvo sharedCaptuvoDevice] startDecoderScanning];
NSLog(@"beginContinuousDecoder");
}
- (IBAction)contScanning:(id)sender {
if (self.contScanSwitch.isOn) {
[[Captuvo sharedCaptuvoDevice] startDecoderHardware];
[[Captuvo sharedCaptuvoDevice] startDecoderScanning];
} else {
[[Captuvo sharedCaptuvoDevice] stopDecoderScanning];
[[Captuvo sharedCaptuvoDevice] stopDecoderHardware];
}
}
/**
@brief This method attempts to establish a connection to the Captuvo SL22 Enterprise Sled and start the decoder hardware. A UIAlertView prompts the user if a connection cannot be established. Additionally, this method adds the current class (self) as a CaptuvoDelegate.
......@@ -81,6 +99,8 @@
}
//[[Captuvo sharedCaptuvoDevice] requestBatteryVoltage] ;
//[[Captuvo sharedCaptuvoDevice] requestChargeStatus] ;
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadDelayInMilliSeconds:2000 persistSetting:YES];
}
......@@ -93,6 +113,7 @@
- (void) decoderDataReceived:(NSString *)data {
self.barcodeLabel.textAlignment = NSTextAlignmentLeft;
self.barcodeLabel.text = data;
[[Captuvo sharedCaptuvoDevice] startDecoderScanning];
}
/*
......
......@@ -11,4 +11,6 @@
@interface CaptuvoViewController : UIViewController<CaptuvoEventsProtocol>
@property bool contScanningEnabled;
@end
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>_XCCurrentVersionName</key>
<string>mPOS.xcdatamodel</string>
</dict>
</plist>
......@@ -485,6 +485,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS[arch=*]" = "TESTING=1";
INFOPLIST_FILE = WAMI/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
......@@ -562,6 +563,7 @@
EFDA4EF21ABFC128002B9CEC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EFDA4EF31ABFC128002B9CEC /* Build configuration list for PBXNativeTarget "WAMITests" */ = {
isa = XCConfigurationList;
......@@ -570,6 +572,7 @@
EFDA4EF51ABFC128002B9CEC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
......
......@@ -21,6 +21,14 @@
}
-(void) viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"switchOnOff"]) {
[[Captuvo sharedCaptuvoDevice] startDecoderScanning];
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadDelayInMilliSeconds:2000 persistSetting:NO];
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......@@ -61,14 +69,14 @@
}
//[[Captuvo sharedCaptuvoDevice] requestBatteryVoltage] ;
//[[Captuvo sharedCaptuvoDevice] requestChargeStatus] ;
Codabar *codabarOptions = [[Codabar alloc] init];
codabarOptions.enabled = TRUE;
codabarOptions.transmitStatStopChar = FALSE;
codabarOptions.checkCharStatus = CodabarCheckCharNoCheckChar;
codabarOptions.concatenationStatus = CodabarConcatenationOff;
codabarOptions.minMessageLength = 4;
codabarOptions.maxMessageLength = 60;
[[Captuvo sharedCaptuvoDevice] setDecoderCodabarConfiguration:codabarOptions persistSetting:NO];
// Codabar *codabarOptions = [[Codabar alloc] init];
// codabarOptions.enabled = TRUE;
// codabarOptions.transmitStatStopChar = FALSE;
// codabarOptions.checkCharStatus = CodabarCheckCharNoCheckChar;
// codabarOptions.concatenationStatus = CodabarConcatenationOff;
// codabarOptions.minMessageLength = 4;
// codabarOptions.maxMessageLength = 60;
// [[Captuvo sharedCaptuvoDevice] setDecoderCodabarConfiguration:codabarOptions persistSetting:NO];
}
......@@ -80,7 +88,6 @@
@param (NSString *)data - the scanned barcode (in text form)
*/
- (void) decoderDataReceived:(NSString *)data {
//self.txtBookID.textAlignment = NSTextAlignmentLeft;
self.txtBookID.text = data;
}
......
......@@ -19,5 +19,6 @@
@property(nonatomic, retain) UIWebView *web;
@property(nonatomic, assign) bool isInitialized;
+(GlobalWebController*) getInstance;
+(GlobalWebController*) resetInstance;
@end
......@@ -25,6 +25,15 @@ static GlobalWebController *instance = nil;
}
return instance;
}
+(GlobalWebController*) resetInstance
{
@synchronized(self)
{
instance = [GlobalWebController new];
instance.isInitialized = false;
}
return instance;
}
@end
......@@ -28,6 +28,8 @@
// Do any additional setup after loading the view.
[self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self.view action:@selector(endEditing:)]];
self.navigationItem.hidesBackButton = YES;
[self resetRTI];
}
- (void)didReceiveMemoryWarning {
......@@ -50,6 +52,34 @@
}
-(IBAction)unwind:(UIStoryboardSegue *)sender {
//reset UIWebView here
[self resetRTI];
}
-(void) resetRTI {
GlobalWebController *globalWeb = [GlobalWebController resetInstance];
self.webview = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
globalWeb.web = self.webview;
globalWeb.isInitialized = true;
#ifndef TESTING
NSURLRequest *rti = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://192.168.1.131/rti/"]];
[[NSURLCache sharedURLCache] removeCachedResponseForRequest:rti];
//Clean the cookie jar
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (NSHTTPCookie *cookie in [storage cookies]) {
[storage deleteCookie:cookie];
}
[[NSUserDefaults standardUserDefaults] synchronize];
[self.webview loadRequest:rti];
#else
// Test collection page on mac mini desktop
[self.webview loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"file:///Users/plucseniordesign/Desktop/response.html"]]];//RTISetup.html"]]];
#endif
[self.webview setDelegate:self];
}
/*
#pragma mark - Navigation
......@@ -122,12 +152,16 @@
// [loginAlert show];
//For testing
// if([self.txtUsername.text isEqualToString:@"circ_admin"] && [self.txtPassword.text isEqualToString:@"silver"]) {//check username and password
#ifdef TESTING
if([self.txtUsername.text isEqualToString:@"circ_admin"] && [self.txtPassword.text isEqualToString:@"silver"]) {//check username and password
[self performSegueWithIdentifier:@"segueLogIn" sender:nil];
// } else {
// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Incorrect login" message:@"Username or password incorrect" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
// [alert show];
// }
} else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Incorrect login" message:@"Username or password incorrect" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
}
#else
[self performSegueWithIdentifier:@"segueLogIn" sender:nil];
#endif
}
@end
This diff is collapsed.
......@@ -57,29 +57,28 @@ static int BOOK_ID_LENGTH = 14;
//For testing
//[self.webview loadRequest:[NSURLRequest requestWithURL: [NSURL
// URLWithString:@"file:///Users/plucseniordesign/Desktop/RTIScan2/RTIScan2.html"]]];
}
-(void) viewDidAppear:(BOOL)animated {
//NSLog(@"viewDidAppear, 2nd view controller");
//GlobalWebController *globalWeb = [GlobalWebController getInstance];
//self.webview = globalWeb.web;
//[self.test_view setDelegate:self];
//self.test_view = globalWeb.web;
//[self.view addSubview:self.webview];
//[self.view addSubview:self.test_view];
//[self.test_view setScalesPageToFit:YES];
#ifdef TESTING
[self.webview loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"file:///Users/plucseniordesign/Desktop/RTIScan2/RTIScan2.html"]]];
#endif
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[super webViewDidFinishLoad:webView];
#ifdef TESTING
// Get scanned codes - Testing GetScanned
NSString *getScanPath =
[[NSBundle mainBundle] pathForResource:@"GetScanned" ofType:@"js"];
NSString *getScan = [NSString stringWithContentsOfFile:getScanPath
encoding:NSUTF8StringEncoding
error:nil];
NSString *scanned =
[self.webview stringByEvaluatingJavaScriptFromString:getScan];
[self extractInformation:scanned];
#endif
NSURLRequest *currentRequest = [webView request];
NSURL *currentURL = [currentRequest URL];
NSLog(@"2: Current URL is %@", currentURL.absoluteString);
}
- (void)extractInformation:(NSString *)scannedBooks {
......@@ -96,7 +95,7 @@ static int BOOK_ID_LENGTH = 14;
NSString *idNum;
for(NSTextCheckingResult *range in rangeList) {
idNum = [scannedBooks substringWithRange:[range rangeAtIndex:1]];
NSLog(idNum);
NSLog(@"%@",idNum);
[self.idList addObject:idNum];
}
//Extract book call number
......@@ -105,7 +104,7 @@ static int BOOK_ID_LENGTH = 14;
NSString *callNum;
for(NSTextCheckingResult *range in rangeList) {
callNum = [scannedBooks substringWithRange:[range rangeAtIndex:1]];
NSLog(callNum);
NSLog(@"%@",callNum);
[self.callNumList addObject:callNum];
}
//Extract book title
......@@ -114,7 +113,7 @@ static int BOOK_ID_LENGTH = 14;
NSString *title;
for(NSTextCheckingResult *range in rangeList) {
title = [scannedBooks substringWithRange:[range rangeAtIndex:1]];
NSLog(title);
NSLog(@"%@",title);
[self.titleList addObject:[scannedBooks substringWithRange:[range rangeAtIndex:1]]];
}
......@@ -129,6 +128,10 @@ static int BOOK_ID_LENGTH = 14;
[self.scannedBookTableView reloadData];
}
-(IBAction)unwindFromSettings:(UIStoryboardSegue *)sender {
}
- (void)didReceiveMemoryWarning {
......@@ -195,9 +198,7 @@ static int BOOK_ID_LENGTH = 14;
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
if([segue.destinationViewController isKindOfClass:[SectionViewController class]]) {
// TELL OCI TO END SESSION aka exit out of page
}
}
......@@ -294,6 +295,7 @@ static int BOOK_ID_LENGTH = 14;
//UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Invalid Book ID" message:@"Book ID improper length" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
//[alert show];
}
}
//31172001492867
......@@ -304,34 +306,11 @@ static int BOOK_ID_LENGTH = 14;
- (void)decoderDataReceived:(NSString *)data {
[super decoderDataReceived:data];
[self barcodeTextChanged];
}
- (IBAction)clickedFinish:(id)sender {
NSString *path =
[[NSBundle mainBundle] pathForResource:@"WhatPage" ofType:@"js"];
NSString *content = [NSString stringWithContentsOfFile:path
encoding:NSUTF8StringEncoding
error:nil];
NSString *page =
[self.webview stringByEvaluatingJavaScriptFromString:content];
NSLog(@"PAGE NUMBER IS: %@\n", page);
// Test FinishScan
if ([page isEqual:@"2"]) { // Scan Page
NSString *finishPath =
[[NSBundle mainBundle] pathForResource:@"FinishScan" ofType:@"js"];
NSString *finish = [NSString stringWithContentsOfFile:finishPath
encoding:NSUTF8StringEncoding
error:nil];
NSString *isFinished =
[self.webview stringByEvaluatingJavaScriptFromString:finish];
if ([isFinished isEqual:@"-1"]) {
} else {
NSLog(@"FINISHED NOT FAILED\n");
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"switchOnOff"]) {
[[Captuvo sharedCaptuvoDevice] startDecoderScanning];
}
}
//- (void)decoderDataReceived:(NSString *)data {
......
......@@ -34,7 +34,9 @@
[self.tableView reloadData];
//For testing
//[self.webview loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"file:///Users/plucseniordesign/Desktop/RTISetup.html"]]];
#ifdef TESTING
[self.webview loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"file:///Users/plucseniordesign/Desktop/RTISetup.html"]]];
#endif
}
- (void)viewDidAppear:(BOOL)animated {
......@@ -163,60 +165,66 @@
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
NSIndexPath *path = [self.tableView indexPathForSelectedRow];
Session *session = [[Session alloc] init];
session.section = [self.sections objectAtIndex:path.row];
ScanBookViewController *destViewController = [segue destinationViewController];
destViewController.session = session;
//need to call AddCollection, then GetSelectedCollections
//AddCollection
NSString *addSelectedPath =
[[NSBundle mainBundle] pathForResource:@"AddCollection"
ofType:@"js"];
NSString *addSelected =
[NSString stringWithContentsOfFile:addSelectedPath
encoding:NSUTF8StringEncoding
error:nil];
[self.webview
stringByEvaluatingJavaScriptFromString:@"var selectedAdd = 49;"];
NSString *add =
[self.webview
stringByEvaluatingJavaScriptFromString:addSelected];
if ([add isEqual:nil]) {
NSLog(@"nil failed");
} else {
NSLog(@"NOT NILL UNFAILED");
}
//GetSelectedCollections
NSString *selectedPath =
[[NSBundle mainBundle] pathForResource:@"GetSelectedCollections"
ofType:@"js"];
NSString *selectedFunc =
[NSString stringWithContentsOfFile:selectedPath
encoding:NSUTF8StringEncoding
error:nil];
NSString *selected =
[self.webview stringByEvaluatingJavaScriptFromString:selectedFunc];
//UIAlertView *selectedAlert =
//[[UIAlertView alloc] initWithTitle:@"Collections Selected"
// message:selected
// delegate:self
// cancelButtonTitle:@"OK"
// otherButtonTitles:nil];
//[selectedAlert show];
//segue to scan
if ([segue.identifier isEqual: @"segueInventoryToScan"]) {
NSIndexPath *path = [self.tableView indexPathForSelectedRow];
Session *session = [[Session alloc] init];
session.section = [self.sections objectAtIndex:path.row];
ScanBookViewController *destViewController = [segue destinationViewController];
destViewController.session = session;
//need to call AddCollection, then GetSelectedCollections
//AddCollection
NSString *addSelectedPath =
[[NSBundle mainBundle] pathForResource:@"AddCollection"
ofType:@"js"];
NSString *addSelected =
[NSString stringWithContentsOfFile:addSelectedPath
encoding:NSUTF8StringEncoding
error:nil];
[self.webview
stringByEvaluatingJavaScriptFromString:@"var selectedAdd = 49;"];
NSString *add =
[self.webview
stringByEvaluatingJavaScriptFromString:addSelected];
if ([add isEqual:nil]) {
NSLog(@"nil failed");
} else {
NSLog(@"NOT NILL UNFAILED");
}
//GetSelectedCollections
NSString *selectedPath =
[[NSBundle mainBundle] pathForResource:@"GetSelectedCollections"
ofType:@"js"];
NSString *selectedFunc =
[NSString stringWithContentsOfFile:selectedPath
encoding:NSUTF8StringEncoding
error:nil];
NSString *selected =
[self.webview stringByEvaluatingJavaScriptFromString:selectedFunc];
//UIAlertView *selectedAlert =
//[[UIAlertView alloc] initWithTitle:@"Collections Selected"
// message:selected
// delegate:self
// cancelButtonTitle:@"OK"
// otherButtonTitles:nil];
//[selectedAlert show];
NSString *saveSetupPath =
[[NSBundle mainBundle] pathForResource:@"SaveSetup" ofType:@"js"];
NSString *saveSetup =
[NSString stringWithContentsOfFile:saveSetupPath
encoding:NSUTF8StringEncoding
error:nil];
encoding:NSUTF8StringEncoding
error:nil];
[self.webview stringByEvaluatingJavaScriptFromString:saveSetup];
} else { //segue back to log-in
}
}
......
......@@ -25,6 +25,8 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
[self.switchContScan setOn:[preferences boolForKey:@"switchOnOff"]];
}
......@@ -61,7 +63,10 @@
- (IBAction)switchContScanChange:(id)sender {
_contScan = _switchContScan.on;
//_contScan = _switchContScan.on;
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
[preferences setBool:self.switchContScan.isOn forKey:@"switchOnOff"];
[preferences synchronize];
}
......
......@@ -7,6 +7,7 @@
//
#import <UIKit/UIKit.h>
#import "GlobalWebController.h"
@interface WebViewController : UIViewController<UIWebViewDelegate>
......
......@@ -7,7 +7,6 @@
//
#import "WebViewController.h"
#import "GlobalWebController.h"
@interface WebViewController ()
@property NSString *page;
......@@ -23,34 +22,19 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
GlobalWebController *globalWeb = [GlobalWebController getInstance];
if (!globalWeb.isInitialized) {
self.webview = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
globalWeb.web = self.webview;
globalWeb.isInitialized = true;
NSURLRequest *rti = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://192.168.1.131/rti/"]];
[[NSURLCache sharedURLCache] removeCachedResponseForRequest:rti];
//Clean the cookie jar
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (NSHTTPCookie *cookie in [storage cookies]) {
[storage deleteCookie:cookie];
}
[[NSUserDefaults standardUserDefaults] synchronize];
[self.webview loadRequest:rti];
// Test collection page on mac mini desktop
//[self.webview loadRequest:[NSURLRequest requestWithURL: [NSURL
// URLWithString:@"file:///Users/plucseniordesign/Desktop/response.html"]]];//RTISetup.html"]]];
[self.webview setDelegate:self];
}
else {
self.webview = [GlobalWebController getInstance].web;
[self.view addSubview:self.webview];
[self.webview setDelegate:self];
}
// GlobalWebController *globalWeb = [GlobalWebController getInstance];
// else {
// self.webview = [GlobalWebController getInstance].web;
// //[self.view addSubview:self.webview];
// [self.webview setDelegate:self];
// }
self.webview = [GlobalWebController getInstance].web;
[self.webview setDelegate:self];
[self.view addSubview:self.webview];
}
-(void) viewWillAppear:(BOOL)animated {
[self.view addSubview:self.webview];
-(void) viewDidAppear:(BOOL)animated {
// [self.view addSubview:self.webview];
}
- (void)didReceiveMemoryWarning {
......@@ -114,86 +98,6 @@
}
}
- (IBAction)clickedSetup:(id)sender {
NSString *path =
[[NSBundle mainBundle] pathForResource:@"WhatPage" ofType:@"js"];
NSString *content = [NSString stringWithContentsOfFile:path
encoding:NSUTF8StringEncoding
error:nil];
NSString *page =
[self.webview stringByEvaluatingJavaScriptFromString:content];
NSLog(@"PAGE NUMBER IS: %@\n", page);
if ([page isEqual:@"1"]) {
// Get selected collections
NSString *selectedPath =
[[NSBundle mainBundle] pathForResource:@"GetSelectedCollections"
ofType:@"js"];
NSString *selectedFunc =
[NSString stringWithContentsOfFile:selectedPath
encoding:NSUTF8StringEncoding
error:nil];
NSString *selected =
[self.webview stringByEvaluatingJavaScriptFromString:selectedFunc];
UIAlertView *selectedAlert =
[[UIAlertView alloc] initWithTitle:@"Collections Selected"
message:selected
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[selectedAlert show];
// Testing AddCollection
// NSString *addSelectedPath =
// [[NSBundle mainBundle] pathForResource:@"AddCollection"
// ofType:@"js"];
// NSString *addSelected =
// [NSString stringWithContentsOfFile:addSelectedPath
// encoding:NSUTF8StringEncoding
// error:nil];
//
// [self.webview
// stringByEvaluatingJavaScriptFromString:@"var selectedAdd = 49;"];
// NSString *add =
// [self.webview
// stringByEvaluatingJavaScriptFromString:addSelected];
//
// if ([add isEqual:nil]) {
// NSLog(@"nil failed");
// } else {
// NSLog(@"NOT NILL UNFAILED");
// }
// Testing RemoveCollection
// NSString *removeSelectedPath =
// [[NSBundle mainBundle] pathForResource:@"RemoveCollection"
// ofType:@"js"];
// NSString *removeSelected =
// [NSString stringWithContentsOfFile:removeSelectedPath
// encoding:NSUTF8StringEncoding
// error:nil];
//
// [self.webview
// stringByEvaluatingJavaScriptFromString:@"var selectedRemove =
// 0;"];
// NSString *remove =
// [self.webview
// stringByEvaluatingJavaScriptFromString:removeSelected];
// // Testing Save SetUp
// NSString *saveSetupPath =
// [[NSBundle mainBundle] pathForResource:@"SaveSetup" ofType:@"js"];
// NSString *saveSetup =