Created
May 24, 2016 12:10
-
-
Save rakhimoni/4d12e43fc3c2d94948fee7ee5a8370ef to your computer and use it in GitHub Desktop.
Listview sample app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var date = new Date(); | |
| Ti.API.info('populateList end' + date.getTime()); | |
| var performanceData = []; | |
| for(var i=0,j=2; i<j; i++){ | |
| performanceData.push({ | |
| "template" : "performance", | |
| "codeLabel" : { | |
| "text" : "P1" | |
| }, | |
| "nameLabel" : { | |
| "text" : "Setup P1" | |
| }, | |
| "rightCaret" : { | |
| "text" : "?" | |
| }, | |
| "properties" : { | |
| "searchableText" : "Setup P1 Travel Acceleration Guiding Speed Curves Max Travel Speeds Free Ranging Guided Speeds Forks First PUF Seat @ Fwd. PUF Seat @ Side Escape Center Home Forks First PUF Load Handler Raise Speed Lower Speed Pivot Speed Traverse Speed Telescopic Fork Speed", | |
| "height" : 64, | |
| "backgroundColor" : "#5e5d60", | |
| "selectionStyle" : null, | |
| "_meta" : { | |
| "name" : "Setup P1", | |
| "code" : "P1", | |
| "favorited" : false, | |
| "subcodes" : [{ | |
| "name" : "Travel Acceleration", | |
| "code" : "P1.1", | |
| "description" : "Adjusts the acceleration (the time for the truck to go from stop to top speed). The range is 1 for the longest acceleration time to 9 for the shortest acceleration time. The default value is set to 9 for the P1 performance level, 7 for the P2 performance level, and 5 for the P3 performance level.", | |
| "favorited" : false, | |
| "proTip" : "", | |
| "subcodes" : [], | |
| "models" : [], | |
| "units" : "", | |
| "min" : 1, | |
| "max" : 9, | |
| "default" : 9 | |
| }, { | |
| "name" : "Guiding Speed Curves", | |
| "code" : "P1.2", | |
| "description" : "Adjusts when the truck linear speed starts to decrease as the platform raises during wire guidance travel. The range is 1 (the truck starts to decrease speed at a lower height) to 9 (the truck starts to decrease speed at a higher height). The default value is set to 7 for the P1 and P2 performance levels, and 3 for the P3 performance level.", | |
| "favorited" : false, | |
| "proTip" : "", | |
| "subcodes" : [], | |
| "models" : [], | |
| "units" : "", | |
| "min" : 1, | |
| "max" : 9, | |
| "default" : 7 | |
| }, { | |
| "name" : "Max Travel Speeds", | |
| "code" : "P1.3", | |
| "description" : "Adjusts the travel speed limits in a number of conditions.", | |
| "favorited" : false, | |
| "proTip" : "", | |
| "subcodes" : [{ | |
| "name" : "Free Ranging", | |
| "code" : "P1.3.1", | |
| "description" : "The speed is kph (the F2 MEASUREMENT menu is set to METRIC) or mph (the F2 MEASUREMENT menu is set to ENGLISH). The menu adjusts the travel speed limit when you operate the truck out of the range of a guide aisle. The minimum value is 1.6 kph (1 mph), and the maximum value is 8.9 kph (5.5 mph). The default value is set to 8.9 kph (5.5 mph) for the P1 and P2 performance levels, and 7.2 kph (4.5 mph) for the P3 performance level. To put in the speed: Push the up and down arrows to go through the digits and then push ENTER. Do the last step on digit at a time from the left side to the right side until the correct speed is set. ACCESS 1 goes out of the P1.3.1, or P3.3.1 FREE RANGING menu.", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [], | |
| "default" : 5.5, | |
| "min" : 1, | |
| "max" : 5.5 | |
| }, { | |
| "name" : "Guided Speeds", | |
| "code" : "P1.3.2", | |
| "description" : "Adjusts the travel speed limit when you operate the truck in a guide aisle.", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [{ | |
| "name" : "Forks First", | |
| "code" : "P1.3.2.1", | |
| "description" : "The speed is set in kph (the F2 MEASUREMENT menu is set to METRIC) or mph (the F2 MEASUREMENT menu is set to ENGLISH). This menu adjusts the travel speed limit in a guide aisle in the forks first direction. The minimum value is 1.6 kph (1 mph), and the maximum value is 10.4 kph (6.5 mph). The default value is set to 10.4 kph (6.5 mph) for the P1 and P2 performance levels, and 8 kph (5 mph) for the P3 performance level. To put in the speed: Push the up and down arrows to go through the digits and then push ENTER. Do the last step one digit at a time from the left side to the right side until the correct speed is set. ACCESS 1 goes out of the P1.3.2.1, P2.3.2.1, or P3.3.2.1 FORKS FIRST menu.", | |
| "units" : "mph", | |
| "default" : 6.5, | |
| "min" : 1, | |
| "max" : 6.5, | |
| "proTip" : 0 | |
| }, { | |
| "name" : "PUF Seat @ Fwd.", | |
| "code" : "P1.3.2.2", | |
| "description" : "The speed is in kph (the F2 MEASUREMENT menu is set to METRIC) or mph (the F2 MEASUREMENT menu is set to ENGLISH). This menu adjusts the travel speed limit in a guide aisle in the power unit first direction with the operator seat forward or at the 20 degree position. The minimum value is 1.6 kph (1 mph), and the maximum value is 9.7 kph (6 mph) for the P1 and P2 performance levels, and 7.2 kph (4.5 mph) for the P3 performance level. To put in the speed: Push the up and down arrows to go through the digits and then push ENTER. Do the last step one digit at a time from the left side to the right side until the correct speed is set. ACCESS 1 goes out of the P1.3.2.2, P2.3.2.2, or P3.3.2.2 PUF SEATFWD menu.", | |
| "units" : "mph", | |
| "default" : 6, | |
| "min" : 1, | |
| "max" : 6, | |
| "proTip" : 0 | |
| }, { | |
| "name" : "PUF Seat @ Side", | |
| "code" : "P1.3.2.3", | |
| "description" : "The speed is in kph (the F2 MEASUREMENT menu is set to ENGLISH). This menu adjusts the travel speed limit in a guide aisle in the power unit first direction with the operator seat at the 270 or 315 degree position. The minimum value is 1.6 kph (1 mph), and the maximum value is 12 kph (7.5 mph). The default value is set to 12 kph (7.5 mph) for the P1 and P2 performance levels, and 9.7 kph (6 mph) for the P3 performance level. To put in the speed: Push the up and down arrows to go through the digits and then push ENTER. Do the last step one digit at a time from the left side to the right side until the correct speed is set. ACCESS 1 goes out of the P1.3.2.3, P2.3.2.3, or P3.3.2.3 PUF SEATSID menu.", | |
| "units" : "mph", | |
| "default" : 7.5, | |
| "min" : 1, | |
| "max" : 7.5, | |
| "proTip" : 0 | |
| }, { | |
| "name" : "Escape", | |
| "code" : "P99", | |
| "description" : "Goes to the P1.3.1, P2.3.2, or P3.3.2 GUIDED SPEEDS menu." | |
| }] | |
| }, { | |
| "name" : "Center Home", | |
| "code" : "P1.3.3", | |
| "description" : "This menu shows as (NOT AVAILABLE) if the F25.1 CNTR HOME TRVL menu is set to DISABLE. This menu adjusts the travel speed limit when you operate the truck with the auxiliary mast and fork carriage in the center of the platform. How you set the F10.1 TRAVERSE FRAME WIDTH and F14 PALLET WIDTH menus has an effect on the travel speed limit for the P1.3.3.1, P2.3.3.1, and P3.3.3.1 FF CH TRVL menus. Subtract the pallet width from the frame width: If the result is equal to or more than 356 mm (14 in), you can set the P1.3.3.1, P2.3.3.1 and P3.3.3.1 FF CH TRVL menus to a maximum of 8.8 kph (5.5 mph). If the result is less than 356 mm (14 in), you can set the P1.3.3.1, P2.3.3.1, and P3.3.3.1 FF CH TRVL menus to a maximum of 4.8 kph (3 mph).", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [{ | |
| "name" : "Forks First", | |
| "code" : "P1.3.3.1", | |
| "description" : "The speed is set in kph (the F2 MEASUREMENT menu is set to METRIC) or mph (the F2 MEASUREMENT menu is set to ENGLISH). This menu adjusts the travel speed limit in a guide aisle in the forks first direction. The minimum value is 1.6 kph (1 mph), and the maximum value is 10.4 kph (6.5 mph). The default value is set to 10.4 kph (6.5 mph) for the P1 and P2 performance levels, and 8 kph (5 mph) for the P3 performance level. To put in the speed: Push the up and down arrows to go through the digits and then push ENTER. Do the last step one digit at a time from the left side to the right side until the correct speed is set. ACCESS 1 goes out of the P1.3.2.1, P2.3.2.1, or P3.3.2.1 FORKS FIRST menu.", | |
| "units" : "mph", | |
| "default" : 5.5, | |
| "min" : 1, | |
| "max" : 5.5, | |
| "proTip" : 0 | |
| }, { | |
| "name" : "PUF", | |
| "code" : "P1.3.3.2", | |
| "description" : "The speed is in kph (the F2 MEASUREMENT menu is set to METRIC) or mph (the F2 MEASUREMENT menu is set to ENGLISH). This menu adjusts the travel speed limit in the power unit first direction when you operate the truck with eh auxiliary mast and fork carriage in the center of the platform. The minimum value is 2.4 kph (1.5 mph), and the maximum value is 9.7 kph (6 mph). The default value is set to 9.7 kph (6 mph) for the P1 and P2 performance levels, and 8 kph (5 mph) for the P3 performance level. To put in the speed: Push the up and down arrows to go through the digits and then push ENTER. Do the last step one digit at a time from the left side to the right side until the correct speed is set. ACCESS 1 goes out of the P1.3.3.2, P2.3.3.2, or P3.3.3.2 PUF CH TRVL menu.", | |
| "units" : "mph", | |
| "default" : 6, | |
| "min" : 1, | |
| "max" : 6, | |
| "proTip" : 0 | |
| }] | |
| }], | |
| "models" : [], | |
| "units" : "", | |
| "min" : 0, | |
| "max" : 0, | |
| "default" : 0 | |
| }, { | |
| "name" : "Load Handler", | |
| "code" : "P1.4", | |
| "description" : "Adjusts the operation of the auxiliary mast and fork carriage functions.", | |
| "favorited" : false, | |
| "proTip" : "", | |
| "subcodes" : [{ | |
| "name" : "Raise Speed", | |
| "code" : "P1.4.1", | |
| "description" : "Adjusts the speed of the fork carriage raise system. The range is 1 for the slowest speed to 9 for the fastest speed. The default value is set to 9 for the P1 performance level, 7 for the P2 performance level, and 5 for the P3 performance level.", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [], | |
| "default" : 5, | |
| "min" : 1, | |
| "max" : 9 | |
| }, { | |
| "name" : "Lower Speed", | |
| "code" : "P1.4.2", | |
| "description" : "Adjusts the speed of the fork carriage lower system. The range is 1 for the slowest speed to 9 for the fastest speed. The default value is set to 9 for the P1 and P2 performance levels, and 5 for the P3 performance level.", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [], | |
| "default" : 9, | |
| "min" : 1, | |
| "max" : 9 | |
| }, { | |
| "name" : "Pivot Speed", | |
| "code" : "P1.4.3", | |
| "description" : "Adjusts the pivot speed of the fork carriage. The range is 1 for the slowest speed to 9 for the fastest speed. The default value is set to 7 for the P1 and P2 performance levels, and 3 for the P3 performance level.", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [], | |
| "default" : 5, | |
| "min" : 1, | |
| "max" : 9 | |
| }, { | |
| "name" : "Traverse Speed", | |
| "code" : "P1.4.4", | |
| "description" : "Adjusts how quickly the fork carriage moves from one traverse home position to the other. The range is 1 for the slowest speed to 9 for the fastest speed. The default value is set to 7 for the P1 and P2 performance levels, and 3 for the P3 performance level.", | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [], | |
| "default" : 5, | |
| "min" : 1, | |
| "max" : 9 | |
| }, { | |
| "name" : "Telescopic Fork Speed", | |
| "code" : "P1.4.5", | |
| "description" : 0, | |
| "proTip" : "", | |
| "models" : [], | |
| "subcodes" : [], | |
| "default" : 3, | |
| "min" : 1, | |
| "max" : 9 | |
| }], | |
| "models" : [], | |
| "units" : "", | |
| "min" : 0, | |
| "max" : 0, | |
| "default" : 0 | |
| }] | |
| }, | |
| "searchTerms" : [{ | |
| "code" : "P1", | |
| "name" : "Setup P1" | |
| }, { | |
| "code" : "P1.1", | |
| "name" : "Travel Acceleration" | |
| }, { | |
| "code" : "P1.2", | |
| "name" : "Guiding Speed Curves" | |
| }, { | |
| "code" : "P1.3", | |
| "name" : "Max Travel Speeds" | |
| }, { | |
| "code" : "P1.3.1", | |
| "name" : "Free Ranging" | |
| }, { | |
| "code" : "P1.3.2", | |
| "name" : "Guided Speeds" | |
| }, { | |
| "code" : "P1.3.2.1", | |
| "name" : "Forks First" | |
| }, { | |
| "code" : "P1.3.2.2", | |
| "name" : "PUF Seat @ Fwd." | |
| }, { | |
| "code" : "P1.3.2.3", | |
| "name" : "PUF Seat @ Side" | |
| }, { | |
| "code" : "P99", | |
| "name" : "Escape" | |
| }, { | |
| "code" : "P1.3.3", | |
| "name" : "Center Home" | |
| }, { | |
| "code" : "P1.3.3.1", | |
| "name" : "Forks First" | |
| }, { | |
| "code" : "P1.3.3.2", | |
| "name" : "PUF" | |
| }, { | |
| "code" : "P1.4", | |
| "name" : "Load Handler" | |
| }, { | |
| "code" : "P1.4.1", | |
| "name" : "Raise Speed" | |
| }, { | |
| "code" : "P1.4.2", | |
| "name" : "Lower Speed" | |
| }, { | |
| "code" : "P1.4.3", | |
| "name" : "Pivot Speed" | |
| }, { | |
| "code" : "P1.4.4", | |
| "name" : "Traverse Speed" | |
| }, { | |
| "code" : "P1.4.5", | |
| "name" : "Telescopic Fork Speed" | |
| }] | |
| } | |
| }); | |
| } | |
| $.list.appendSection(Ti.UI.createListSection({ | |
| items : performanceData | |
| })); | |
| $.list.appendSection(Ti.UI.createListSection({ | |
| items : performanceData | |
| })); | |
| var date = new Date(); | |
| Ti.API.info('populateList end' + date.getTime()); | |
| $.index.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Alloy> | |
| <Window backgroundColor="white"> | |
| <ListView id='list' > | |
| <Templates> | |
| <ItemTemplate name='favorite'> | |
| <Label id='perfCode' class='white bold' bindId='codeLabel'/> | |
| <Label id='favoriteStar' class='icon' bindId='favoriteStar'/> | |
| <Label id='favoriteLabel' class='bold white' bindId='mainLabel'/> | |
| <Label class='rightCaret icon' bindId='rightCaret'/> | |
| </ItemTemplate> | |
| <!-- performance and features are the same, but we'll call it performance --> | |
| <ItemTemplate name='performance'> | |
| <Label id='perfCode' class='white bold' bindId='codeLabel'/> | |
| <Label id='perfName' bindId='nameLabel'/> | |
| <Label class='rightCaret icon' bindId='rightCaret'/> | |
| </ItemTemplate> | |
| </Templates> | |
| </ListView> | |
| </Window> | |
| </Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment