local statut = "en cours"
local isFavoris
+local lat = 0
+local lng = 0
+
local latitude = 0
local longitude = 0
local function initMap()
- local lat = 0
- local lng = 0
-
function string:split( inSplitPattern, outResults )
if not outResults then
network.request(url, "GET", updateCallback)
end
-local function onComplete( event )
-statut = "traite"
- update()
-
- if "clicked" == event.action then
- local i = event.index
-
- if 1 == i then
- -- Do nothing; dialog will simply dismiss
- elseif 2 == i then
- -- Open URL if "Learn More" (the 2nd button) was clicked
- system.openURL( "http://www.coronalabs.com" )
- end
- end
-
-
-end
-
local function onTraite(e)
local function onComplete( event )
local function onFavoris(e)
if (isFavoris) then
- statut = "en cours"
+ statut = "en%20cours"
else
- statut = "a faire"
+ statut = "a%20faire"
end
update()
end
oTicket.y = SY + 5
-- Type du ticket
- local tTicket = display.newText( data[""..1][3], SX + 15, oTicket.y + oTicket.height + 5, "Dosis-Book", 16 )
+ local tTicket = display.newText( data[""..1][3], SX + 15, oTicket.y + oTicket.height + 12, "Dosis-Book", 16 )
tTicket:setFillColor( 0,0,0 )
tTicket.anchorY = 0
tTicket.anchorX = 0
local function initButtons()
- local btnRetour = widget.newButton
+ local btnRetour = widget.newButton
{
- width = 100,
- height = 30,
- label = "< Retour liste tickets",
- labelColor = { default={ 1, 1, 1 } },
- onPress = onRetour,
+ shape = "rect",
+ width = 80,
+ height = details.border2.height,
+ label = "< Retour",
+ labelColor = { default = { 1, 1, 1, 1 }, over = { 1, 1, 1, 1 } },
+ fillColor = { default = { 0, 0, 0, .1 }, over = { 0, 0, 0, .08 } },
+ onRelease = onRetour,
font = "Dosis-Book"
}
- btnRetour.x, btnRetour.y = SX + 1/2 * btnRetour.width + 5, SY + VH - 1/2 * btnRetour.height - 5
+ btnRetour.x = details.border2.x + btnRetour.width/2
+ btnRetour.y = details.border2.y + btnRetour.height/2
+
+-- btnRetour.x, btnRetour.y = SX + 5, SY + VH - 1/2 * btnRetour.height
details:insert( btnRetour )
end
function details:disableListeners()
-
+ Runtime:removeEventListener( "location", locationHandler )
details.map:removeSelf()
details.map = nil
local btnTicketsEnCours = widget.newButton
{
+ shape = "rect",
width = 1/3 * VW,
height = 55,
- onPress = onListeEnCours
+ fillColor = { default = { 0, 0, 0, .01 }, over = { 0, 0, 0, .01 } },
+ onRelease = onListeEnCours
}
btnTicketsEnCours.anchorX = 0
local btnTicketsFavoris = widget.newButton
{
+ shape = "rect",
width = 1/3 * VW,
height = 55,
- onPress = onListeFavoris
+ fillColor = { default = { 0, 0, 0, .01 }, over = { 0, 0, 0, .01 } },
+ onRelease = onListeFavoris
}
btnTicketsFavoris.anchorX = 0
local btnLogout = widget.newButton
{
+ shape = "rect",
width = 1/3 * VW,
height = 55,
- onPress = onLogout
+ fillColor = { default = { 0, 0, 0, .01 }, over = { 0, 0, 0, .01 } },
+ onRelease = onLogout
}
btnLogout.anchorX = 0