From d5590e2737a1514b852fd5e86c725cfc8a2caab6 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Fri, 7 Nov 2014 15:04:06 +0000 Subject: [PATCH] FINAL COMMIT --- BT Vendor/BT Vendor.xcodeproj/project.pbxproj | 4 ++-- BT Vendor/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate | Bin 278724 -> 0 bytes BT Vendor/BT Vendor.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------- BT Vendor/CommunicationProtocol.h | 3 +-- BT Vendor/CommunicationProtocol.m | 28 +++++----------------------- BT Vendor/DatePickerViewController.h | 7 ++++--- BT Vendor/DatePickerViewController.m | 13 +++++++++++++ BT Vendor/DateRangePickerViewController.h | 8 ++++---- BT Vendor/IncidentLog.h | 2 +- BT Vendor/MenuTableViewController.h | 1 - BT Vendor/MenuTableViewController.m | 83 ++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------- BT Vendor/NameChangerViewController.h | 7 ++++--- BT Vendor/NameChangerViewController.m | 11 +++++++++++ BT Vendor/PriceChangerViewController.h | 7 ++++--- BT Vendor/PriceChangerViewController.m | 11 +++++++++++ BT Vendor/SalesLog.h | 2 +- BT Vendor/Sensors.h | 2 +- BT Vendor/Stack.h | 2 +- BT Vendor/Stack.m | 2 +- TODO | 8 -------- btvendor_web/css/btvendor.css | 6 +++--- btvendor_web/js/vendorform.js | 13 +++++++++++++ 22 files changed, 221 insertions(+), 201 deletions(-) diff --git a/BT Vendor/BT Vendor.xcodeproj/project.pbxproj b/BT Vendor/BT Vendor.xcodeproj/project.pbxproj index 2efaecb..9984519 100644 --- a/BT Vendor/BT Vendor.xcodeproj/project.pbxproj +++ b/BT Vendor/BT Vendor.xcodeproj/project.pbxproj @@ -259,6 +259,7 @@ F98356E0192EC84700EA6821 /* MenuTableViewController.m */, F9A8EF7B192FE201009E7532 /* Stack.m */, F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */, + F95C3F2A19E87B8700C040C0 /* ChildViewController.m */, F933F80219B6819400521B90 /* DatePickerViewController.m */, F92F567719B75F5E00A1EACA /* PriceChangerViewController.m */, F92F568E19B763FD00A1EACA /* NameChangerViewController.m */, @@ -269,7 +270,6 @@ F989B60119BCE28C00657DD9 /* SalesLog.m */, F9B9100B19E5A0A1006D4D06 /* Incident.m */, F9B9100819E59773006D4D06 /* IncidentLog.m */, - F95C3F2A19E87B8700C040C0 /* ChildViewController.m */, ); name = "BT Vendor"; path = TestAppExample; @@ -379,6 +379,7 @@ F98356DF192EC84700EA6821 /* MenuTableViewController.h */, F98356D9192EAFD400EA6821 /* CommunicationProtocol.h */, F9A8EF7A192FE201009E7532 /* Stack.h */, + F95C3F2919E87B8700C040C0 /* ChildViewController.h */, F933F80119B6819400521B90 /* DatePickerViewController.h */, F92F567619B75F5E00A1EACA /* PriceChangerViewController.h */, F92F568D19B763FD00A1EACA /* NameChangerViewController.h */, @@ -388,7 +389,6 @@ F989B60019BCE28C00657DD9 /* SalesLog.h */, F9B9100A19E5A0A1006D4D06 /* Incident.h */, F9B9100719E59773006D4D06 /* IncidentLog.h */, - F95C3F2919E87B8700C040C0 /* ChildViewController.h */, ); name = Headers; sourceTree = ""; diff --git a/BT Vendor/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate b/BT Vendor/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate index fe25d99..c280f15 100644 Binary files a/BT Vendor/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate and b/BT Vendor/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/BT Vendor/BT Vendor.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/BT Vendor/BT Vendor.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index b08e8dc..375307f 100644 --- a/BT Vendor/BT Vendor.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/BT Vendor/BT Vendor.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -26,11 +26,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "992" - endingLineNumber = "992" + startingLineNumber = "988" + endingLineNumber = "988" landmarkName = "-tableView:didSelectRowAtIndexPath:" landmarkType = "5"> @@ -42,11 +42,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "737" - endingLineNumber = "737" + startingLineNumber = "734" + endingLineNumber = "734" landmarkName = "-toggleDropList:" landmarkType = "5"> @@ -58,11 +58,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "CommunicationProtocol.m" - timestampString = "434381762.875075" + timestampString = "437062910.396222" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "337" - endingLineNumber = "337" + startingLineNumber = "329" + endingLineNumber = "329" landmarkName = "-readIncidentLog::" landmarkType = "5"> @@ -74,11 +74,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "CommunicationProtocol.m" - timestampString = "434381762.875075" + timestampString = "437062910.396222" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "336" - endingLineNumber = "336" + startingLineNumber = "329" + endingLineNumber = "329" landmarkName = "-readIncidentLog::" landmarkType = "5"> @@ -90,11 +90,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "CommunicationProtocol.m" - timestampString = "434381762.875075" + timestampString = "437062910.396222" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "349" - endingLineNumber = "349" + startingLineNumber = "340" + endingLineNumber = "340" landmarkName = "-readIncidentLog::" landmarkType = "5"> @@ -170,11 +170,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1097" - endingLineNumber = "1097" + startingLineNumber = "1107" + endingLineNumber = "1107" landmarkName = "-tableView:didSelectRowAtIndexPath:" landmarkType = "5"> @@ -186,12 +186,12 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436465076.64059" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "214" - endingLineNumber = "214" - landmarkName = "-generateIncidentListNavLevel" + startingLineNumber = "220" + endingLineNumber = "220" + landmarkName = "-generateIncidentListNavLevel:" landmarkType = "5"> @@ -202,12 +202,12 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "863" - endingLineNumber = "863" - landmarkName = "-tableView:titleForHeaderInSection:" + startingLineNumber = "860" + endingLineNumber = "860" + landmarkName = "-tableView:numberOfRowsInSection:" landmarkType = "5"> @@ -218,11 +218,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1186" - endingLineNumber = "1186" + startingLineNumber = "1206" + endingLineNumber = "1206" landmarkName = "-numberOfSectionsInTableView:" landmarkType = "5"> @@ -234,13 +234,13 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1187" - endingLineNumber = "1187" - landmarkName = "-numberOfSectionsInTableView:" - landmarkType = "5"> + startingLineNumber = "1207" + endingLineNumber = "1207" + landmarkName = "@implementation MenuTableViewController" + landmarkType = "3"> @@ -282,12 +282,12 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "667" - endingLineNumber = "667" - landmarkName = "-didRotateFromInterfaceOrientation:" + startingLineNumber = "664" + endingLineNumber = "664" + landmarkName = "-willRotateToInterfaceOrientation:duration:" landmarkType = "5"> @@ -298,11 +298,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1391" - endingLineNumber = "1391" + startingLineNumber = "1409" + endingLineNumber = "1409" landmarkName = "-tableView:cellForRowAtIndexPath:" landmarkType = "5"> @@ -314,11 +314,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1383" - endingLineNumber = "1383" + startingLineNumber = "1401" + endingLineNumber = "1401" landmarkName = "-tableView:cellForRowAtIndexPath:" landmarkType = "5"> @@ -330,11 +330,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1178" - endingLineNumber = "1178" + startingLineNumber = "1198" + endingLineNumber = "1198" landmarkName = "-tableView:indentationLevelForRowAtIndexPath:" landmarkType = "5"> @@ -346,11 +346,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1176" - endingLineNumber = "1176" + startingLineNumber = "1196" + endingLineNumber = "1196" landmarkName = "-tableView:indentationLevelForRowAtIndexPath:" landmarkType = "5"> @@ -362,11 +362,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "PriceChangerViewController.m" - timestampString = "432259134.170788" + timestampString = "437062910.396222" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "48" - endingLineNumber = "48" + startingLineNumber = "58" + endingLineNumber = "58" landmarkName = "-dismissKeyboard" landmarkType = "5"> @@ -426,11 +426,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1507" - endingLineNumber = "1507" + startingLineNumber = "1525" + endingLineNumber = "1525" landmarkName = "-tableView:cellForRowAtIndexPath:" landmarkType = "5"> @@ -442,11 +442,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1492" - endingLineNumber = "1492" + startingLineNumber = "1510" + endingLineNumber = "1510" landmarkName = "-tableView:cellForRowAtIndexPath:" landmarkType = "5"> @@ -504,11 +504,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "629" - endingLineNumber = "629" + startingLineNumber = "626" + endingLineNumber = "626" landmarkName = "-viewDidLoad" landmarkType = "5"> @@ -516,32 +516,16 @@ - - - - @@ -568,11 +552,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "1164" - endingLineNumber = "1164" + startingLineNumber = "1184" + endingLineNumber = "1184" landmarkName = "-tableView:didSelectRowAtIndexPath:" landmarkType = "5"> @@ -584,11 +568,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "894" - endingLineNumber = "894" + startingLineNumber = "890" + endingLineNumber = "890" landmarkName = "-tableView:didSelectRowAtIndexPath:" landmarkType = "5"> @@ -600,11 +584,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "893" - endingLineNumber = "893" + startingLineNumber = "889" + endingLineNumber = "889" landmarkName = "-tableView:didSelectRowAtIndexPath:" landmarkType = "5"> @@ -616,11 +600,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436567273.012728" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "882" - endingLineNumber = "882" + startingLineNumber = "879" + endingLineNumber = "879" landmarkName = "-tableView:sectionForSectionIndexTitle:atIndex:" landmarkType = "5"> @@ -696,11 +680,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436467072.187571" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "550" - endingLineNumber = "550" + startingLineNumber = "547" + endingLineNumber = "547" landmarkName = "-handleOpenURL:" landmarkType = "5"> @@ -712,11 +696,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436467072.187571" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "557" - endingLineNumber = "557" + startingLineNumber = "554" + endingLineNumber = "554" landmarkName = "-handleOpenURL:" landmarkType = "5"> @@ -728,11 +712,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436467072.187571" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "534" - endingLineNumber = "534" + startingLineNumber = "531" + endingLineNumber = "531" landmarkName = "-handleOpenURL:" landmarkType = "5"> @@ -744,11 +728,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "MenuTableViewController.m" - timestampString = "436467072.187571" + timestampString = "437065369.601573" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "515" - endingLineNumber = "515" + startingLineNumber = "512" + endingLineNumber = "512" landmarkName = "-alertView:clickedButtonAtIndex:" landmarkType = "5"> diff --git a/BT Vendor/CommunicationProtocol.h b/BT Vendor/CommunicationProtocol.h index f69bb85..ad70ec8 100644 --- a/BT Vendor/CommunicationProtocol.h +++ b/BT Vendor/CommunicationProtocol.h @@ -25,7 +25,7 @@ #define REPORT_SERVER_URL @"http://seneca.upc.es:8090/machine" @protocol CommunicationProtocolDelegate -- (void)processMessage:(CommunicationProtocol*)protocol didFinishEnteringItem:(NSString*) response; +- (void) processMessage:(CommunicationProtocol*)protocol didFinishEnteringItem:(NSString*) response; - (void) reportProtocolError: (CommunicationProtocol*)protocol didFinishEnteringItem:(NSString*) error; @end @@ -43,7 +43,6 @@ -(void) readSensorData; -(void) readSalesLog: (NSDateComponents*) start : (NSDateComponents*) end; -(void) readIncidentLog: (NSDateComponents*) start : (NSDateComponents*) end; -//-(void) testA9 : (NSMutableString*) testString; +(id) sharedProtocol; @end diff --git a/BT Vendor/CommunicationProtocol.m b/BT Vendor/CommunicationProtocol.m index 47fa530..2477045 100644 --- a/BT Vendor/CommunicationProtocol.m +++ b/BT Vendor/CommunicationProtocol.m @@ -257,8 +257,7 @@ NSMutableString *command = [NSMutableString stringWithFormat: @"A5"]; NSInteger year = [date year]; year = year - (year/100)*100; - [command appendString:[NSString stringWithFormat:@"%02ld",(long)year]]; - [command appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)[date month],(long)[date day],(long)[date hour],(long)[date minute],(long)[date second]]]; + [command appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[date month],(long)[date day],(long)[date hour],(long)[date minute],(long)[date second]]]; [self writeMessage:command]; } @@ -282,8 +281,6 @@ { NSString *command = @"A4"; [self writeMessage:command]; - - /*NSMutableString *answer = [[NSMutableString alloc]initWithString:@"P4000150001500015000000010010030050020000010020101010100000000000000000000000000"];*/ } -(void) readSalesLog : (NSDateComponents*) start : (NSDateComponents*) end @@ -299,8 +296,7 @@ { NSInteger year = [start year]; year = year - (year/100)*100; - [startDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]]; - [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]]; + [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]]; } if(end == nil) { @@ -310,15 +306,12 @@ { NSInteger year = [end year]; year = year - (year/100)*100; - [endDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]]; - [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]]; + [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]]; } [command appendString:startDate]; [command appendString:@"-"]; [command appendString:endDate]; [self writeMessage:command]; - - //NSMutableString *answer = [[NSMutableString alloc]initWithString:@"P21408161036000001000000110450000001P21409012216000100000000220900000100P21409032307000000010502330800000000P21409070540000000020000440350000001P2P2"]; } -(void) readIncidentLog:(NSDateComponents *)start :(NSDateComponents *)end @@ -334,8 +327,7 @@ { NSInteger year = [start year]; year = year - (year/100)*100; - [startDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]]; - [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]]; + [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]]; } if(end == nil) { @@ -345,22 +337,12 @@ { NSInteger year = [end year]; year = year - (year/100)*100; - [endDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]]; - [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]]; + [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]]; } [command appendString:startDate]; [command appendString:@"-"]; [command appendString:endDate]; [self writeMessage:command]; - - //@"P3140816103600012222P3140910093600023333P3140921103600034444P3140927103600045555P3P3" } -/*-(void) testA9:(NSMutableString *)testString -{ - NSMutableString *messageA9 = [[NSMutableString alloc] initWithString:@"A9"]; - [messageA9 appendString:testString]; - [self writeMessage:messageA9]; -}*/ - @end diff --git a/BT Vendor/DatePickerViewController.h b/BT Vendor/DatePickerViewController.h index feaefe6..1d7adb6 100644 --- a/BT Vendor/DatePickerViewController.h +++ b/BT Vendor/DatePickerViewController.h @@ -11,19 +11,20 @@ #import #import #import "BTAppDelegate.h" +#import "ChildViewController.h" @protocol DatePickerViewControllerDelegate - (void)passDateViewController:(DatePickerViewController*)controller didFinishEnteringItem:(NSDate *)date; @end -@interface DatePickerViewController : UIViewController +@interface DatePickerViewController : ChildViewController @property (strong, nonatomic) IBOutlet UIView *datePickerView; @property (strong, nonatomic) IBOutlet UIDatePicker *datePicker; @property (nonatomic, strong) id delegate; -- (void)showInView:(UIView *)aView animated:(BOOL)animated; -- (IBAction)closePopup:(id)sender; +- (void) showInView:(UIView *)aView animated:(BOOL)animated; +- (IBAction) closePopup:(id)sender; @end diff --git a/BT Vendor/DatePickerViewController.m b/BT Vendor/DatePickerViewController.m index 2fcc189..bd6cf8c 100644 --- a/BT Vendor/DatePickerViewController.m +++ b/BT Vendor/DatePickerViewController.m @@ -23,6 +23,18 @@ return self; } + +- (void) parentViewControllerDidRotateWithOrientation: (UIDeviceOrientation) orientation +{ + NSLog(@"[DatePickerViewController.m]: Screen did rotate"); +} + +- (void) parentViewControllerWillRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration +{ + NSLog(@"[DatePickerViewController.m]: Screen will rotate"); +} + + - (void)viewDidLoad { self.view.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:.7]; @@ -69,6 +81,7 @@ - (IBAction)closePopup:(id)sender { [self.delegate passDateViewController:self didFinishEnteringItem:[[self datePicker] date]]; + [self.childDelegate removeChildFromParentController:self]; [self removeAnimate]; } diff --git a/BT Vendor/DateRangePickerViewController.h b/BT Vendor/DateRangePickerViewController.h index 909c2be..de5cc09 100644 --- a/BT Vendor/DateRangePickerViewController.h +++ b/BT Vendor/DateRangePickerViewController.h @@ -39,9 +39,9 @@ @property (strong, nonatomic) IBOutlet UIView *scrolledView; @property (nonatomic, strong) id delegate; -- (void)showInView:(UIView *)aView animated:(BOOL)animated; -- (IBAction)toggleFromDate:(id)sender; -- (IBAction)toggleToDate:(id)sender; -- (IBAction)closePopup:(id)sender; +- (void) showInView:(UIView *)aView animated:(BOOL)animated; +- (IBAction) toggleFromDate:(id)sender; +- (IBAction) toggleToDate:(id)sender; +- (IBAction) closePopup:(id)sender; @end diff --git a/BT Vendor/IncidentLog.h b/BT Vendor/IncidentLog.h index 42139c0..207a74c 100644 --- a/BT Vendor/IncidentLog.h +++ b/BT Vendor/IncidentLog.h @@ -16,6 +16,6 @@ @property (strong,nonatomic) NSMutableArray *incidents; - (id) init; -- (void) setResponseValue:(NSString *)response; +- (void) setResponseValue : (NSString *)response; @end diff --git a/BT Vendor/MenuTableViewController.h b/BT Vendor/MenuTableViewController.h index 1ac5929..9e632b3 100644 --- a/BT Vendor/MenuTableViewController.h +++ b/BT Vendor/MenuTableViewController.h @@ -86,7 +86,6 @@ enum { @interface MenuTableViewController : UITableViewController -- (void) navBack; - (void) handleOpenURL: (NSURL*) url; @end diff --git a/BT Vendor/MenuTableViewController.m b/BT Vendor/MenuTableViewController.m index e2ae349..5100034 100644 --- a/BT Vendor/MenuTableViewController.m +++ b/BT Vendor/MenuTableViewController.m @@ -45,6 +45,15 @@ @property (nonatomic,strong) const NSArray *cellIdentifiers; +//NAVIGATION LEVEL ATTRIBUTES +@property (strong,nonatomic) NSMutableArray *childViewControllers; +@property uint8_t currentNavLevel; +@property Boolean showIndexes; +@property (strong,nonatomic) NSString *currentCellIdentifier; +@property (strong,nonatomic) const NSMutableArray *currentElements; +@property (strong,nonatomic) const NSMutableArray *currentStructure; +@property (strong,nonatomic) const NSMutableArray *currentHeaders; + //GENERAL ATTRIBUTES @property (nonatomic,strong) CommunicationProtocol* protocol; @property (strong,nonatomic) NSString *machineMACAddr; @@ -52,7 +61,6 @@ @property (strong,nonatomic) Stack *parentLayout; @property (strong,nonatomic) NSTimer *timeoutTimer; @property (strong,nonatomic) NSMutableArray *batchCommands; - @property (strong,nonatomic) Sensors *sensorStatus; @property (strong,nonatomic) SalesLog *salesLog; @property (strong,nonatomic) Sale *currentSale; @@ -61,14 +69,7 @@ @property uint8_t requestedLog; @property uint8_t sentCommand; -@property (strong,nonatomic) NSMutableArray *childViewControllers; -@property uint8_t currentNavLevel; -@property Boolean showIndexes; -@property (strong,nonatomic) NSString *currentCellIdentifier; -@property (strong,nonatomic) const NSMutableArray *currentElements; -@property (strong,nonatomic) const NSMutableArray *currentStructure; -@property (strong,nonatomic) const NSMutableArray *currentHeaders; - +//CHILD VIEW CONTOLLERS @property (strong,nonatomic) DatePickerViewController *datePickerViewController; @property (strong,nonatomic) PriceChangerViewController *priceChangerViewController; @property (strong,nonatomic) NameChangerViewController *nameChangerViewController; @@ -105,9 +106,10 @@ [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; } -- (void) generateMaintenanceLevel +- (void) generateMaintenanceLevel : (NSString *) response { - //Initialize sensor status + [self setSensorStatus:[[Sensors alloc]init]]; + [[self sensorStatus] setResponseValue:response]; [self setMaintenanceElements:[[NSMutableArray alloc] initWithObjects:MAINTENANCE_ELEMENTS, nil]]; [self setMaintenanceStructure:[[NSMutableArray alloc] initWithObjects:MAINTENANCE_CELLS_PER_SECTION, nil]]; if([[self maintenanceStructure] count] > 1) @@ -120,8 +122,10 @@ } } -- (void) generateSaleListNavLevel +- (void) generateSaleListNavLevel : (NSString*) response { + [self setSalesLog:[[SalesLog alloc]init]]; + [[self salesLog] setResponseValue:response]; NSMutableArray *dateArray = [[NSMutableArray alloc] init]; NSMutableArray *dateHeaderArray = [[NSMutableArray alloc] init]; NSMutableArray *dateStructure = [[NSMutableArray alloc] init]; @@ -178,8 +182,10 @@ return TRUE; } -- (void) generateIncidentListNavLevel +- (void) generateIncidentListNavLevel : (NSString*) response { + [self setIncidentLog:[[IncidentLog alloc]init]]; + [[self incidentLog] setResponseValue:response]; NSMutableArray *dateArray = [[NSMutableArray alloc] init]; NSMutableArray *dateHeaderArray = [[NSMutableArray alloc] init]; NSMutableArray *dateStructure = [[NSMutableArray alloc] init]; @@ -237,7 +243,7 @@ - (void) changeNavLevel: (uint8_t) level : (BOOL) push { - NSLog(@"[MenuTableViewController.m]: navLevel is %d",level); + NSLog(@"[MenuTableViewController.m]: Changing to navLevel %d",level); self.showIndexes = FALSE; if(push) { @@ -304,10 +310,6 @@ [self setCurrentHeaders:[self configHeaders]]; } //AND SO ON... - NSLog(@"MenuTableViewController.m]: New elements: %@",[self currentElements]); - NSLog(@"MenuTableViewController.m]: New structure: %@",[self currentStructure]); - NSLog(@"MenuTableViewController.m]: New headers: %@",[self currentHeaders]); - NSLog(@"MenuTableViewController.m]: New cell identifier: %@",[self currentCellIdentifier]); [self reloadTable:UITableViewRowAnimationAutomatic]; } @@ -401,25 +403,19 @@ else if(self.sentCommand == A2 && [[response substringToIndex:2]isEqualToString:@"P2"]) { NSLog(@"[MenuTableViewController.m]: Received A2 answer"); - [self setSalesLog:[[SalesLog alloc]init]]; - [[self salesLog] setResponseValue:response]; - [self generateSaleListNavLevel]; + [self generateSaleListNavLevel : response]; [self changeNavLevel:SALE_LIST:TRUE]; } else if(self.sentCommand == A3 && [[response substringToIndex:2]isEqualToString:@"P3"]) { NSLog(@"[MenuTableViewController.m]: Received A3 answer"); - [self setIncidentLog:[[IncidentLog alloc]init]]; - [[self incidentLog] setResponseValue:response]; - [self generateIncidentListNavLevel]; + [self generateIncidentListNavLevel : response]; [self changeNavLevel:INCIDENT_LIST:TRUE]; } else if(self.sentCommand == A4 && [[response substringToIndex:2]isEqualToString:@"P4"]) { NSLog(@"[MenuTableViewController.m]: Received A4 answer"); - [self setSensorStatus:[[Sensors alloc]init]]; - [[self sensorStatus] setResponseValue:response]; - [self generateMaintenanceLevel]; + [self generateMaintenanceLevel : response]; [self changeNavLevel:MAINTENANCE:TRUE]; } else if(self.sentCommand == A5 && [[response substringToIndex:2]isEqualToString:@"P5"]) @@ -471,6 +467,7 @@ { self.sentCommand = NONE; } + return; } else { @@ -885,7 +882,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - NSLog(@"Section: %ld Row: %ld",(long)[indexPath section],(long)[indexPath row]); [tableView deselectRowAtIndexPath:indexPath animated:YES]; UITableViewCell *cell = [[self tableView] cellForRowAtIndexPath:indexPath]; NSString *cellName = [[cell textLabel]text]; @@ -1042,12 +1038,16 @@ { self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad_Landscape" bundle:nil]; self.datePickerViewController.delegate = self; + self.datePickerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count]; [self.datePickerViewController showInView:self.navigationController.view animated:YES]; } else { self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; self.datePickerViewController.delegate = self; + self.datePickerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count]; [self.datePickerViewController showInView:self.navigationController.view animated:YES]; } } @@ -1057,12 +1057,16 @@ { self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; self.datePickerViewController.delegate = self; + self.datePickerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count]; [self.datePickerViewController showInView:self.navigationController.view animated:YES]; } else { self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_Landscape" bundle:nil]; self.datePickerViewController.delegate = self; + self.datePickerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count]; [self.datePickerViewController showInView:self.navigationController.view animated:YES]; } } @@ -1079,12 +1083,16 @@ { self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController_iPad_Landscape" bundle:nil]; self.priceChangerViewController.delegate = self; + self.priceChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count]; [self.priceChangerViewController showInView:self.navigationController.view animated:YES]; } else { self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController_iPad" bundle:nil]; self.priceChangerViewController.delegate = self; + self.priceChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count]; [self.priceChangerViewController showInView:self.navigationController.view animated:YES]; } } @@ -1094,12 +1102,16 @@ { self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController" bundle:nil]; self.priceChangerViewController.delegate = self; + self.priceChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count]; [self.priceChangerViewController showInView:self.navigationController.view animated:YES]; } else { self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController_Landscape" bundle:nil]; self.priceChangerViewController.delegate = self; + self.priceChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count]; [self.priceChangerViewController showInView:self.navigationController.view animated:YES]; } } @@ -1116,12 +1128,16 @@ { self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController_iPad_Landscape" bundle:nil]; self.nameChangerViewController.delegate = self; + self.nameChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count]; [self.nameChangerViewController showInView:self.navigationController.view animated:YES]; } else { self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController_iPad" bundle:nil]; self.nameChangerViewController.delegate = self; + self.nameChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count]; [self.nameChangerViewController showInView:self.navigationController.view animated:YES]; } } @@ -1131,12 +1147,16 @@ { self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController_Landscape" bundle:nil]; self.nameChangerViewController.delegate = self; + self.nameChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count]; [self.nameChangerViewController showInView:self.navigationController.view animated:YES]; } else { self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController" bundle:nil]; self.nameChangerViewController.delegate = self; + self.nameChangerViewController.childDelegate = self; + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count]; [self.nameChangerViewController showInView:self.navigationController.view animated:YES]; } } @@ -1194,10 +1214,8 @@ //INSTANTIATE CELL IF NEEDED if (cell == nil) { - NSLog(@"[MenuTableViewController.m]: Initializing cell"); if([self currentNavLevel] == MAINTENANCE) { - NSLog(@"[MenuTableViewController.m]: Dispatching Maintenance-type cell"); cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; } else @@ -1620,7 +1638,6 @@ NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; NSDateComponents *components = [calendar components:units fromDate:date]; - NSLog(@"[MenuTableViewController.m]: %@", components); [_protocol updateTime: components]; [self setSentCommand:A5]; [self startTimeoutTimer]; @@ -1628,7 +1645,6 @@ - (void)passPriceViewController:(PriceChangerViewController *)controller didFinishEnteringItem:(NSArray *)data { - NSLog(@"[MenuTableViewController.m]: %@", data); //Channel,Code,Price NSString *channelString = [data objectAtIndex:0]; NSString *codeString = [data objectAtIndex:1]; @@ -1671,7 +1687,6 @@ - (void)passNameViewController:(PriceChangerViewController *)controller didFinishEnteringItem:(NSArray *)data { - NSLog(@"[MenuTableViewController.m]: %@", data); //Channel,Code,Name NSString *channelString = [data objectAtIndex:0]; NSString *codeString = [data objectAtIndex:1]; @@ -1712,7 +1727,6 @@ if([self requestedLog] == SALES_LOG) { NSLog(@"[MenuTableViewController.m]: Changing to navLevel: SALE_LIST"); - NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; NSDateComponents *componentsFrom = nil; @@ -1732,7 +1746,6 @@ else if([self requestedLog] == INCIDENT_LOG) { NSLog(@"[MenuTableViewController.m]: Changing to navLevel: INCIDENT_LIST"); - NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; NSDateComponents *componentsFrom = nil; diff --git a/BT Vendor/NameChangerViewController.h b/BT Vendor/NameChangerViewController.h index 0c21f59..804408a 100644 --- a/BT Vendor/NameChangerViewController.h +++ b/BT Vendor/NameChangerViewController.h @@ -11,6 +11,7 @@ #import #import #import "BTAppDelegate.h" +#import "ChildViewController.h" @protocol NameChangerViewControllerDelegate - (void)passNameViewController:(NameChangerViewController*)controller didFinishEnteringItem:(NSArray *)data; @@ -18,7 +19,7 @@ @end -@interface NameChangerViewController : UIViewController +@interface NameChangerViewController : ChildViewController @property (strong, nonatomic) IBOutlet UIView *nameChangerView; @property (strong, nonatomic) IBOutlet UITextField *name; @@ -26,8 +27,8 @@ @property (strong, nonatomic) IBOutlet UITextField *code; @property (nonatomic, strong) id delegate; -- (void)showInView:(UIView *)aView animated:(BOOL)animated; -- (IBAction)closePopup:(id)sender; +- (void) showInView:(UIView *)aView animated:(BOOL)animated; +- (IBAction) closePopup:(id)sender; @end \ No newline at end of file diff --git a/BT Vendor/NameChangerViewController.m b/BT Vendor/NameChangerViewController.m index 993b8a7..a1c14ee 100644 --- a/BT Vendor/NameChangerViewController.m +++ b/BT Vendor/NameChangerViewController.m @@ -23,6 +23,16 @@ return self; } +- (void) parentViewControllerDidRotateWithOrientation: (UIDeviceOrientation) orientation +{ + NSLog(@"[NameChangerViewController.m]: Screen did rotate"); +} + +- (void) parentViewControllerWillRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration +{ + NSLog(@"[NameChangerViewController.m]: Screen will rotate"); +} + - (void)viewDidLoad { self.nameChangerView.layer.cornerRadius = 5; @@ -88,6 +98,7 @@ { NSArray *data = [[NSArray alloc] initWithObjects:[[self channel] text],[[self code] text],[[self name] text], nil]; [self.delegate passNameViewController:self didFinishEnteringItem:data]; + [self.childDelegate removeChildFromParentController:self]; [self removeAnimate]; } diff --git a/BT Vendor/PriceChangerViewController.h b/BT Vendor/PriceChangerViewController.h index c12d175..6a16d83 100644 --- a/BT Vendor/PriceChangerViewController.h +++ b/BT Vendor/PriceChangerViewController.h @@ -11,6 +11,7 @@ #import #import #import "BTAppDelegate.h" +#import "ChildViewController.h" @protocol PriceChangerViewControllerDelegate - (void)passPriceViewController:(PriceChangerViewController*)controller didFinishEnteringItem:(NSArray *)data; @@ -18,7 +19,7 @@ @end -@interface PriceChangerViewController : UIViewController +@interface PriceChangerViewController : ChildViewController @property (strong, nonatomic) IBOutlet UIView *priceChangerView; @property (strong, nonatomic) IBOutlet UITextField *price; @@ -26,8 +27,8 @@ @property (strong, nonatomic) IBOutlet UITextField *code; @property (nonatomic, strong) id delegate; -- (void)showInView:(UIView *)aView animated:(BOOL)animated; -- (IBAction)closePopup:(id)sender; +- (void) showInView:(UIView *)aView animated:(BOOL)animated; +- (IBAction) closePopup:(id)sender; @end diff --git a/BT Vendor/PriceChangerViewController.m b/BT Vendor/PriceChangerViewController.m index 9a974e3..8314f67 100644 --- a/BT Vendor/PriceChangerViewController.m +++ b/BT Vendor/PriceChangerViewController.m @@ -23,6 +23,16 @@ return self; } +- (void) parentViewControllerDidRotateWithOrientation: (UIDeviceOrientation) orientation +{ + NSLog(@"[PriceChangerViewController.m]: Screen did rotate"); +} + +- (void) parentViewControllerWillRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration +{ + NSLog(@"[PriceChangerViewController.m]: Screen will rotate"); +} + - (void)viewDidLoad { self.priceChangerView.layer.cornerRadius = 5; @@ -105,6 +115,7 @@ [self formatPrice]; NSArray *data = [[NSArray alloc] initWithObjects:[[self channel] text],[[self code] text],[[self price] text], nil]; [self.delegate passPriceViewController:self didFinishEnteringItem:data]; + [self.childDelegate removeChildFromParentController:self]; [self removeAnimate]; } diff --git a/BT Vendor/SalesLog.h b/BT Vendor/SalesLog.h index ebb6785..9f80e1d 100644 --- a/BT Vendor/SalesLog.h +++ b/BT Vendor/SalesLog.h @@ -16,6 +16,6 @@ @property (strong,nonatomic) NSMutableArray *sales; - (id) init; -- (void) setResponseValue:(NSString *)response; +- (void) setResponseValue : (NSString *)response; @end diff --git a/BT Vendor/Sensors.h b/BT Vendor/Sensors.h index 081dd97..29dad0d 100644 --- a/BT Vendor/Sensors.h +++ b/BT Vendor/Sensors.h @@ -23,6 +23,6 @@ @property (strong,nonatomic) NSMutableArray *changeAvailable; - (id) init; -- (void) setResponseValue:(NSString *)response; +- (void) setResponseValue: (NSString *)response; @end diff --git a/BT Vendor/Stack.h b/BT Vendor/Stack.h index c0cbe1a..2afd7d1 100644 --- a/BT Vendor/Stack.h +++ b/BT Vendor/Stack.h @@ -11,7 +11,7 @@ @interface Stack : NSObject - (id) init; -- (void) push: (id) element; +- (void) push : (id) element; - (id) pop; - (NSInteger) count; - (void) clear; diff --git a/BT Vendor/Stack.m b/BT Vendor/Stack.m index 25d90b4..50d5978 100644 --- a/BT Vendor/Stack.m +++ b/BT Vendor/Stack.m @@ -24,7 +24,7 @@ return self; } -- (void) push: (id) element +- (void) push : (id) element { [[self dataArray] addObject:element]; [self setLastPosition: [self lastPosition] + 1]; diff --git a/TODO b/TODO index 94fc090..ae258aa 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,2 @@ -TESTS: -- A3 command -- Batch commands -- Localization - BUGS: - On date change, response is overwritten by previous query, trimming needed according to numBytes - -TODO: -- Refactor code diff --git a/btvendor_web/css/btvendor.css b/btvendor_web/css/btvendor.css index 01a66d0..560bd60 100644 --- a/btvendor_web/css/btvendor.css +++ b/btvendor_web/css/btvendor.css @@ -10,14 +10,14 @@ table.textinput border: 0px; } -#container +#container { height: 100%; width:100%; - ont-size: 0; + font-size: 0; } -#left, #right +#left, #right { display: inline-block; *display: inline; diff --git a/btvendor_web/js/vendorform.js b/btvendor_web/js/vendorform.js index f008ffd..da616a4 100644 --- a/btvendor_web/js/vendorform.js +++ b/btvendor_web/js/vendorform.js @@ -22,6 +22,18 @@ function processPrice(price) return euros + cents } +function clearInputs() +{ + $("input[type=radio]").prop('checked',false) + $("input[name=datepicker").val("") + $("input[name=channela6").val("") + $("input[name=producta6").val("") + $("input[name=price").val("") + $("input[name=channela7").val("") + $("input[name=producta7").val("") + $("input[name=productname").val("") +} + function addCommand() { command=$("input[name=command]:checked").val() @@ -89,6 +101,7 @@ function addCommand() $("select[name=commandlist]").append(new Option(command,command)) numCommands++ $("select[name=commandlist]").attr('size',numCommands) + clearInputs() } function removeCommand() -- libgit2 0.22.2