mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 11:47:40 +00:00
Merged branch RDB-Make-Detail-View-for-Listings-View into Rapid-Dev-Branch
This commit is contained in:
commit
8c39ce11c8
Binary file not shown.
@ -269,7 +269,7 @@
|
|||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "107"
|
startingLineNumber = "107"
|
||||||
endingLineNumber = "107"
|
endingLineNumber = "107"
|
||||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
landmarkName = "prepareForSegue(_:sender:)"
|
||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
@ -284,7 +284,9 @@
|
|||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "167"
|
startingLineNumber = "167"
|
||||||
endingLineNumber = "167">
|
endingLineNumber = "167"
|
||||||
|
landmarkName = "prepareForSegue(_:sender:)"
|
||||||
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
@ -299,8 +301,55 @@
|
|||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "51"
|
startingLineNumber = "51"
|
||||||
endingLineNumber = "51"
|
endingLineNumber = "51"
|
||||||
landmarkName = "viewDidLoad()"
|
landmarkName = "ListingPreviewViewController"
|
||||||
landmarkType = "5">
|
landmarkType = "3">
|
||||||
|
<Locations>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.(itemViewState in _9E3F545BDB11C848D37363B41A098E64).getter : Swift.String"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.928084"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "51"
|
||||||
|
endingLineNumber = "51"
|
||||||
|
offsetFromSymbolStart = "53">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.(itemViewState in _9E3F545BDB11C848D37363B41A098E64).setter : Swift.String"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.929415"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "51"
|
||||||
|
endingLineNumber = "51"
|
||||||
|
offsetFromSymbolStart = "95">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.init (coder : __ObjC.NSCoder) -> Swift.Optional<Vendoo.ListingPreviewViewController>"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.929859"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "51"
|
||||||
|
endingLineNumber = "51"
|
||||||
|
offsetFromSymbolStart = "1553">
|
||||||
|
</Location>
|
||||||
|
</Locations>
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
@ -477,6 +526,38 @@
|
|||||||
endingLineNumber = "402"
|
endingLineNumber = "402"
|
||||||
landmarkName = "publishItem(_:)"
|
landmarkName = "publishItem(_:)"
|
||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
|
<Locations>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #2)"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.960792"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "402"
|
||||||
|
endingLineNumber = "402"
|
||||||
|
offsetFromSymbolStart = "5443">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #2).(closure #1)"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.961124"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "402"
|
||||||
|
endingLineNumber = "402"
|
||||||
|
offsetFromSymbolStart = "43">
|
||||||
|
</Location>
|
||||||
|
</Locations>
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
@ -493,6 +574,38 @@
|
|||||||
endingLineNumber = "403"
|
endingLineNumber = "403"
|
||||||
landmarkName = "publishItem(_:)"
|
landmarkName = "publishItem(_:)"
|
||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
|
<Locations>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.publishItem (Swift.AnyObject) -> ()"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.96404"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "405"
|
||||||
|
endingLineNumber = "405"
|
||||||
|
offsetFromSymbolStart = "61703">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #2)"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||||
|
timestampString = "494945565.964294"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "405"
|
||||||
|
endingLineNumber = "405"
|
||||||
|
offsetFromSymbolStart = "5522">
|
||||||
|
</Location>
|
||||||
|
</Locations>
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
@ -527,5 +640,53 @@
|
|||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
|
timestampString = "494944875.724562"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "246"
|
||||||
|
endingLineNumber = "246"
|
||||||
|
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
|
timestampString = "494944938.299032"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "254"
|
||||||
|
endingLineNumber = "254"
|
||||||
|
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
|
timestampString = "494945222.220989"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "284"
|
||||||
|
endingLineNumber = "284"
|
||||||
|
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
|||||||
@ -281,7 +281,7 @@ extension EbayWebServiceManager {
|
|||||||
"<PaymentMethods>\(dict["payment"] as! String!)</PaymentMethods>" +
|
"<PaymentMethods>\(dict["payment"] as! String!)</PaymentMethods>" +
|
||||||
"<PayPalEmailAddress>\(dict["paypal_email"] as! String!)</PayPalEmailAddress><PictureDetails>"
|
"<PayPalEmailAddress>\(dict["paypal_email"] as! String!)</PayPalEmailAddress><PictureDetails>"
|
||||||
|
|
||||||
for i in 0...(imageUrls.count - 1) {
|
for i in 0...(0/*imageUrls.count - 1*/) { //will replace with actual count once everything is working with images
|
||||||
soapMessage = soapMessage +
|
soapMessage = soapMessage +
|
||||||
"<PictureURL>\(imageUrls[i].stringByReplacingOccurrencesOfString("&", withString: "&"))</PictureURL>"
|
"<PictureURL>\(imageUrls[i].stringByReplacingOccurrencesOfString("&", withString: "&"))</PictureURL>"
|
||||||
|
|
||||||
|
|||||||
@ -86,6 +86,7 @@ class HomeViewController: UITabBarController {
|
|||||||
self.userListings.append(
|
self.userListings.append(
|
||||||
Listing(itemTitle: (listingInfo!["listingTitle"] as? String)!,
|
Listing(itemTitle: (listingInfo!["listingTitle"] as? String)!,
|
||||||
itemCategory: listingInfo!["listingCategory"] as? String,
|
itemCategory: listingInfo!["listingCategory"] as? String,
|
||||||
|
itemQuantity: (listingInfo!["listingQuantity"] as? String)!,
|
||||||
itemPrice: listingInfo!["listingPrice"] as? String,
|
itemPrice: listingInfo!["listingPrice"] as? String,
|
||||||
itemDescription: listingInfo!["listingDescription"] as? String,
|
itemDescription: listingInfo!["listingDescription"] as? String,
|
||||||
itemImages: listingImages,
|
itemImages: listingImages,
|
||||||
|
|||||||
@ -443,6 +443,7 @@ extension ItemImagePickerViewController {
|
|||||||
"listingPrice": self.itemPrice.text,
|
"listingPrice": self.itemPrice.text,
|
||||||
"listingCategory": category,
|
"listingCategory": category,
|
||||||
"listingDescription": self.itemDescription.text,
|
"listingDescription": self.itemDescription.text,
|
||||||
|
"listingQuantity": self.itemQuantity.text!,
|
||||||
"numberOfSupportingImages" : counter,
|
"numberOfSupportingImages" : counter,
|
||||||
"isListingDraft": true,
|
"isListingDraft": true,
|
||||||
"networks": ["areNetworksChosen": false]]
|
"networks": ["areNetworksChosen": false]]
|
||||||
|
|||||||
@ -21,6 +21,7 @@ class ItemTableViewController: UIViewController {
|
|||||||
@IBOutlet weak var menuButton: UIBarButtonItem!
|
@IBOutlet weak var menuButton: UIBarButtonItem!
|
||||||
|
|
||||||
var loadingView: UIView!
|
var loadingView: UIView!
|
||||||
|
var selectedListing: Listing!
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
@ -87,6 +88,35 @@ extension ItemTableViewController {
|
|||||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
||||||
// Get the new view controller using segue.destinationViewController.
|
// Get the new view controller using segue.destinationViewController.
|
||||||
// Pass the selected object to the new view controller.
|
// Pass the selected object to the new view controller.
|
||||||
|
|
||||||
|
let des = segue.destinationViewController as! ListingPreviewViewController
|
||||||
|
var tempImages: [UIImageView] = []
|
||||||
|
for uiImage in self.selectedListing.images {
|
||||||
|
tempImages.append(UIImageView(image: uiImage))
|
||||||
|
}
|
||||||
|
let dict:[String:AnyObject] = [
|
||||||
|
"pictures": tempImages,
|
||||||
|
"title": self.selectedListing.title,
|
||||||
|
"description": self.selectedListing.desc,
|
||||||
|
"price": self.selectedListing.price,
|
||||||
|
"category": self.selectedListing.category,
|
||||||
|
"quantity": self.selectedListing.quantity
|
||||||
|
]
|
||||||
|
|
||||||
|
des.setDictionary(self.selectedListing.networks, itemdictionary: dict)
|
||||||
|
des.setManagers(
|
||||||
|
((self.tabBarController as? HomeViewController)?.fbGraphManager)!,
|
||||||
|
fireManager: ((self.tabBarController as? HomeViewController)?.firebaseManager)!,
|
||||||
|
ebayManager: ((self.tabBarController as? HomeViewController)?.ebayGraphManager)!,
|
||||||
|
etsyManager: ((self.tabBarController as? HomeViewController)?.etsyManager)!
|
||||||
|
)
|
||||||
|
|
||||||
|
if self.selectedListing.isDraft! {
|
||||||
|
des.setViewState("Editible")
|
||||||
|
}else {
|
||||||
|
des.setViewState("NonEditable")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +183,11 @@ extension ItemTableViewController: UITableViewDataSource{
|
|||||||
}
|
}
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
|
||||||
|
self.selectedListing = (self.tabBarController as? HomeViewController)?.userListings[indexPath.row]
|
||||||
|
self.performSegueWithIdentifier("ItemDetailSegue", sender: self)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,17 +15,19 @@ class Listing : NSObject {
|
|||||||
var category: String!
|
var category: String!
|
||||||
var price: String!
|
var price: String!
|
||||||
var desc: String!
|
var desc: String!
|
||||||
|
var quantity: String!
|
||||||
var isDraft: Bool!
|
var isDraft: Bool!
|
||||||
var images: [UIImage]!
|
var images: [UIImage]!
|
||||||
var key: String!
|
var key: String!
|
||||||
var networks: Dictionary<String, Bool>!
|
var networks: Dictionary<String, Bool>!
|
||||||
|
|
||||||
init(itemTitle:String, itemCategory: String!, itemPrice: String!, itemDescription: String!, itemImages: [UIImage], isDraftListing: Bool, itemKey: String, networksSellingOn: Dictionary<String, Bool>){
|
init(itemTitle:String, itemCategory: String!, itemQuantity: String!, itemPrice: String!, itemDescription: String!, itemImages: [UIImage], isDraftListing: Bool, itemKey: String, networksSellingOn: Dictionary<String, Bool>){
|
||||||
|
|
||||||
self.title = itemTitle
|
self.title = itemTitle
|
||||||
self.category = itemCategory
|
self.category = itemCategory
|
||||||
self.price = itemPrice
|
self.price = itemPrice
|
||||||
self.desc = itemDescription
|
self.desc = itemDescription
|
||||||
|
self.quantity = itemQuantity
|
||||||
self.isDraft = isDraftListing
|
self.isDraft = isDraftListing
|
||||||
self.images = itemImages
|
self.images = itemImages
|
||||||
self.key = itemKey
|
self.key = itemKey
|
||||||
|
|||||||
@ -33,6 +33,9 @@ class ListingPreviewViewController: UIViewController {
|
|||||||
@IBOutlet weak var itemPrice: UITextView!
|
@IBOutlet weak var itemPrice: UITextView!
|
||||||
@IBOutlet weak var itemCategory: UITextView!
|
@IBOutlet weak var itemCategory: UITextView!
|
||||||
@IBOutlet weak var networks: UICollectionView!
|
@IBOutlet weak var networks: UICollectionView!
|
||||||
|
@IBOutlet weak var publishBtn: UIButton!
|
||||||
|
@IBOutlet weak var edit_button: UIButton!
|
||||||
|
@IBOutlet weak var cancel_backBtn: UIButton!
|
||||||
|
|
||||||
//class variables
|
//class variables
|
||||||
private var networksDictionary: Dictionary<String, Bool> = Dictionary<String, Bool>()
|
private var networksDictionary: Dictionary<String, Bool> = Dictionary<String, Bool>()
|
||||||
@ -45,10 +48,25 @@ class ListingPreviewViewController: UIViewController {
|
|||||||
private var lastListingKey: String!
|
private var lastListingKey: String!
|
||||||
private var newInProgressListing: Dictionary<String,AnyObject> = Dictionary<String, AnyObject>()
|
private var newInProgressListing: Dictionary<String,AnyObject> = Dictionary<String, AnyObject>()
|
||||||
var loadingView: UIView!
|
var loadingView: UIView!
|
||||||
|
private var itemViewState = ""
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
|
if (self.itemViewState == "NonEditable") {
|
||||||
|
dispatch_async(dispatch_get_main_queue(), {
|
||||||
|
//self.cancel_backBtn.titleLabel?.text = "Back"
|
||||||
|
self.edit_button.hidden = true
|
||||||
|
self.edit_button.enabled = false
|
||||||
|
|
||||||
|
self.publishBtn.hidden = true
|
||||||
|
self.publishBtn.enabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/*else if (self.itemViewState == "Editable") {
|
||||||
|
//self.cancel_backBtn.titleLabel?.text = "Back"
|
||||||
|
|
||||||
|
}*/
|
||||||
// Do any additional setup after loading the view.
|
// Do any additional setup after loading the view.
|
||||||
|
|
||||||
// Initialization code
|
// Initialization code
|
||||||
@ -98,6 +116,10 @@ class ListingPreviewViewController: UIViewController {
|
|||||||
self.itemQuantity.text = self.itemListingDictionary["quantity"] as! String
|
self.itemQuantity.text = self.itemListingDictionary["quantity"] as! String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setViewState(state: String) {
|
||||||
|
self.itemViewState = state
|
||||||
|
}
|
||||||
|
|
||||||
func setDictionary(netdictionary:Dictionary<String, Bool>, itemdictionary: Dictionary<String, AnyObject!>){
|
func setDictionary(netdictionary:Dictionary<String, Bool>, itemdictionary: Dictionary<String, AnyObject!>){
|
||||||
self.networksDictionary = netdictionary
|
self.networksDictionary = netdictionary
|
||||||
self.itemListingDictionary = itemdictionary
|
self.itemListingDictionary = itemdictionary
|
||||||
@ -174,9 +196,15 @@ extension Dictionary {
|
|||||||
//MARK: - IBActions
|
//MARK: - IBActions
|
||||||
extension ListingPreviewViewController {
|
extension ListingPreviewViewController {
|
||||||
@IBAction func cancel(sender: AnyObject) {
|
@IBAction func cancel(sender: AnyObject) {
|
||||||
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
|
if self.itemViewState == "" {
|
||||||
let vc = storyboard.instantiateViewControllerWithIdentifier("Reveal View Controller") as! SWRevealViewController
|
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
|
||||||
self.presentViewController(vc, animated: true, completion: nil)
|
let vc = storyboard.instantiateViewControllerWithIdentifier("Reveal View Controller") as! SWRevealViewController
|
||||||
|
self.presentViewController(vc, animated: true, completion: nil)
|
||||||
|
}
|
||||||
|
else if self.itemViewState == "Editable" || self.itemViewState == "NonEditable"{
|
||||||
|
self.presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func publishItem(sender: AnyObject) {
|
@IBAction func publishItem(sender: AnyObject) {
|
||||||
@ -495,6 +523,7 @@ extension ListingPreviewViewController {
|
|||||||
"listingTitle": self.itemTitle.text,
|
"listingTitle": self.itemTitle.text,
|
||||||
"listingPrice": self.itemPrice.text,
|
"listingPrice": self.itemPrice.text,
|
||||||
"listingCategory": self.itemCategory.text,
|
"listingCategory": self.itemCategory.text,
|
||||||
|
"listingQuantity": self.itemQuantity.text,
|
||||||
"listingDescription": self.itemDescription.text,
|
"listingDescription": self.itemDescription.text,
|
||||||
"numberOfSupportingImages" : ((self.itemListingDictionary["pictures"] as? [UIImageView])?.count)! - 1,
|
"numberOfSupportingImages" : ((self.itemListingDictionary["pictures"] as? [UIImageView])?.count)! - 1,
|
||||||
"isListingDraft": false,
|
"isListingDraft": false,
|
||||||
@ -603,13 +632,6 @@ extension ListingPreviewViewController {
|
|||||||
//notify to save final listing to firebase
|
//notify to save final listing to firebase
|
||||||
dispatch_group_notify(postingGroup, dispatch_get_main_queue(), {
|
dispatch_group_notify(postingGroup, dispatch_get_main_queue(), {
|
||||||
newListingRef.setValue(self.newInProgressListing)
|
newListingRef.setValue(self.newInProgressListing)
|
||||||
// self.alert.title = "Listing saved with error"
|
|
||||||
// self.alert.message = "Your listing has been saved but something went wrong when trying to publish to facebook"
|
|
||||||
|
|
||||||
|
|
||||||
//let alert = UIAlertController(title: "Listing Published", message: "Your listing has been published", preferredStyle: .Alert)
|
|
||||||
|
|
||||||
// self.alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in self.alert.dismissViewControllerAnimated(true, completion: nil)}))
|
|
||||||
|
|
||||||
//register new listing id in global path of firebase root'
|
//register new listing id in global path of firebase root'
|
||||||
self.firManager.ref.child("Global_listings").child(newListingRef.key).setValue(newListingRef.key)
|
self.firManager.ref.child("Global_listings").child(newListingRef.key).setValue(newListingRef.key)
|
||||||
@ -626,14 +648,6 @@ extension ListingPreviewViewController {
|
|||||||
self.presentViewController(alert, animated: true, completion: nil)
|
self.presentViewController(alert, animated: true, completion: nil)
|
||||||
})
|
})
|
||||||
|
|
||||||
// self.alert.title = "Listing saved with error"
|
|
||||||
// self.alert.message = "Your listing has been saved but something went wrong when trying to publish to facebook"
|
|
||||||
|
|
||||||
|
|
||||||
//let alert = UIAlertController(title: "Listing Published", message: "Your listing has been published", preferredStyle: .Alert)
|
|
||||||
|
|
||||||
// self.alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in self.alert.dismissViewControllerAnimated(true, completion: nil)}))
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1006,7 +1006,7 @@
|
|||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<state key="normal" title="Edit"/>
|
<state key="normal" title="Edit"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="editListing:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="juI-UK-xEA"/>
|
<action selector="editListing:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="k1t-H6-5D9"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Networks:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nDO-rh-gjd">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Networks:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nDO-rh-gjd">
|
||||||
@ -1023,8 +1023,7 @@
|
|||||||
<color key="titleColor" red="1" green="0.44538913570442429" blue="0.4193885779602724" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="titleColor" red="1" green="0.44538913570442429" blue="0.4193885779602724" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
</state>
|
</state>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="cancel:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="a84-0e-3PX"/>
|
<action selector="cancel:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="fNB-wM-UHJ"/>
|
||||||
<action selector="editListing:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="yDN-99-lsc"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
@ -1035,7 +1034,9 @@
|
|||||||
<nil key="simulatedTopBarMetrics"/>
|
<nil key="simulatedTopBarMetrics"/>
|
||||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
|
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="cancel_backBtn" destination="EMt-PR-56K" id="q2U-Eg-eO4"/>
|
||||||
<outlet property="containerScrollView" destination="T3U-DI-Ome" id="gad-zv-hsO"/>
|
<outlet property="containerScrollView" destination="T3U-DI-Ome" id="gad-zv-hsO"/>
|
||||||
|
<outlet property="edit_button" destination="yzh-tr-u8D" id="f8q-TT-a2C"/>
|
||||||
<outlet property="itemCategory" destination="ije-TG-4S5" id="XGu-Uw-hLl"/>
|
<outlet property="itemCategory" destination="ije-TG-4S5" id="XGu-Uw-hLl"/>
|
||||||
<outlet property="itemDescription" destination="u7b-0N-xli" id="d1N-lw-6sw"/>
|
<outlet property="itemDescription" destination="u7b-0N-xli" id="d1N-lw-6sw"/>
|
||||||
<outlet property="itemPictureMain" destination="K0z-pp-hzH" id="cXG-P9-emv"/>
|
<outlet property="itemPictureMain" destination="K0z-pp-hzH" id="cXG-P9-emv"/>
|
||||||
@ -1047,6 +1048,7 @@
|
|||||||
<outlet property="itemQuantity" destination="shU-ew-26O" id="yNg-ov-7q5"/>
|
<outlet property="itemQuantity" destination="shU-ew-26O" id="yNg-ov-7q5"/>
|
||||||
<outlet property="itemTitle" destination="WuZ-2K-lz7" id="EkY-UX-lSj"/>
|
<outlet property="itemTitle" destination="WuZ-2K-lz7" id="EkY-UX-lSj"/>
|
||||||
<outlet property="networks" destination="MS3-nc-8va" id="duP-BL-Qp2"/>
|
<outlet property="networks" destination="MS3-nc-8va" id="duP-BL-Qp2"/>
|
||||||
|
<outlet property="publishBtn" destination="deQ-F0-uVB" id="pL6-Dz-Qqg"/>
|
||||||
<segue destination="0di-oP-cGQ" kind="modal" identifier="EditListingSegue" id="rkZ-c8-XJc"/>
|
<segue destination="0di-oP-cGQ" kind="modal" identifier="EditListingSegue" id="rkZ-c8-XJc"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
@ -1361,6 +1363,7 @@
|
|||||||
<outlet property="itemTable" destination="Thg-pb-lhN" id="u15-xE-hz6"/>
|
<outlet property="itemTable" destination="Thg-pb-lhN" id="u15-xE-hz6"/>
|
||||||
<outlet property="menuButton" destination="WjT-mo-4jm" id="1CT-vV-KLK"/>
|
<outlet property="menuButton" destination="WjT-mo-4jm" id="1CT-vV-KLK"/>
|
||||||
<outlet property="tableSegmentController" destination="X2D-np-ma4" id="DbB-DF-wEF"/>
|
<outlet property="tableSegmentController" destination="X2D-np-ma4" id="DbB-DF-wEF"/>
|
||||||
|
<segue destination="gfQ-Y2-Mqh" kind="modal" identifier="ItemDetailSegue" id="nUj-1v-ftF"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="rIQ-Hu-DM0" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="rIQ-Hu-DM0" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
@ -1612,7 +1615,7 @@
|
|||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="9G8-XI-ptI">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="9G8-XI-ptI">
|
||||||
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9G8-XI-ptI" id="r3f-6Q-p1g">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9G8-XI-ptI" id="r3f-6Q-p1g">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
|
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
|
||||||
@ -1629,7 +1632,7 @@
|
|||||||
</tableViewCellContentView>
|
</tableViewCellContentView>
|
||||||
</tableViewCell>
|
</tableViewCell>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="JJa-O7-kym">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="JJa-O7-kym">
|
||||||
<rect key="frame" x="0.0" y="136" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="72" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JJa-O7-kym" id="bCt-1V-IW1">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JJa-O7-kym" id="bCt-1V-IW1">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
|
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
|
||||||
@ -1690,7 +1693,7 @@
|
|||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Change_Pass_Cell" id="ceq-sl-ClT">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Change_Pass_Cell" id="ceq-sl-ClT">
|
||||||
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ceq-sl-ClT" id="Waq-fu-UxD">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ceq-sl-ClT" id="Waq-fu-UxD">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||||
@ -1707,7 +1710,7 @@
|
|||||||
</tableViewCellContentView>
|
</tableViewCellContentView>
|
||||||
</tableViewCell>
|
</tableViewCell>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Delete_Account_Cell" id="Lha-cf-Sfc">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Delete_Account_Cell" id="Lha-cf-Sfc">
|
||||||
<rect key="frame" x="0.0" y="136" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="72" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lha-cf-Sfc" id="kmF-Sb-d0c">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lha-cf-Sfc" id="kmF-Sb-d0c">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||||
@ -2467,9 +2470,10 @@
|
|||||||
<inferredMetricsTieBreakers>
|
<inferredMetricsTieBreakers>
|
||||||
<segue reference="syc-IR-LNQ"/>
|
<segue reference="syc-IR-LNQ"/>
|
||||||
<segue reference="nWA-7e-2Ec"/>
|
<segue reference="nWA-7e-2Ec"/>
|
||||||
<segue reference="Sz0-BH-2me"/>
|
<segue reference="nUj-1v-ftF"/>
|
||||||
<segue reference="eaI-bm-1aI"/>
|
<segue reference="NOz-ya-avj"/>
|
||||||
<segue reference="rkZ-c8-XJc"/>
|
<segue reference="rkZ-c8-XJc"/>
|
||||||
|
<segue reference="eaI-bm-1aI"/>
|
||||||
</inferredMetricsTieBreakers>
|
</inferredMetricsTieBreakers>
|
||||||
<color key="tintColor" red="0.2784313725" green="0.80392156859999997" blue="0.68235294120000001" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="tintColor" red="0.2784313725" green="0.80392156859999997" blue="0.68235294120000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user