Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PLUC Inventory - Senior Design
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Andrew D'Abbraccio
PLUC Inventory - Senior Design
Commits
8dd8b580
Commit
8dd8b580
authored
Mar 25, 2015
by
Alex Moore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on segue unwinds
parent
9812db36
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
138 additions
and
97 deletions
+138
-97
WAMI/WAMI/.DS_Store
WAMI/WAMI/.DS_Store
+0
-0
WAMI/WAMI/LogInViewController.m
WAMI/WAMI/LogInViewController.m
+4
-0
WAMI/WAMI/Main.storyboard
WAMI/WAMI/Main.storyboard
+75
-46
WAMI/WAMI/ScanBookViewController.m
WAMI/WAMI/ScanBookViewController.m
+5
-3
WAMI/WAMI/SectionViewController.m
WAMI/WAMI/SectionViewController.m
+54
-48
No files found.
WAMI/WAMI/.DS_Store
0 → 100644
View file @
8dd8b580
File added
WAMI/WAMI/LogInViewController.m
View file @
8dd8b580
...
...
@@ -50,6 +50,10 @@
}
-
(
IBAction
)
unwind
:(
UIStoryboardSegue
*
)
sender
{
//reset UIWebView here
}
/*
#pragma mark - Navigation
...
...
WAMI/WAMI/Main.storyboard
View file @
8dd8b580
This diff is collapsed.
Click to expand it.
WAMI/WAMI/ScanBookViewController.m
View file @
8dd8b580
...
...
@@ -129,6 +129,10 @@ static int BOOK_ID_LENGTH = 14;
[
self
.
scannedBookTableView
reloadData
];
}
-
(
IBAction
)
unwindFromSettings
:(
UIStoryboardSegue
*
)
sender
{
}
-
(
void
)
didReceiveMemoryWarning
{
...
...
@@ -195,9 +199,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
}
}
...
...
WAMI/WAMI/SectionViewController.m
View file @
8dd8b580
...
...
@@ -163,60 +163,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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment