Commit 9090da10 authored by Dave Griffiths's avatar Dave Griffiths
Browse files

village amenity fixes

parent 97a3674c
...@@ -470,20 +470,30 @@ ...@@ -470,20 +470,30 @@
50 (layout 'fill-parent 'wrap-content 1 'centre 5))) 50 (layout 'fill-parent 'wrap-content 1 'centre 5)))
(define (medit-text id type fn) (define (medit-text id type fn)
(vert (linear-layout
(text-view 0 (mtext-lookup id) (make-id (string-append (symbol->string id) "-container"))
30 (layout 'wrap-content 'wrap-content -1 'centre 0)) 'vertical
(edit-text (symbol->id id) "" 30 type (layout 'fill-parent 'wrap-content 1 'centre 20)
(layout 'fill-parent 'wrap-content -1 'centre 0) (list 0 0 0 0)
fn))) (list
(text-view 0 (mtext-lookup id)
30 (layout 'wrap-content 'wrap-content -1 'centre 0))
(edit-text (symbol->id id) "" 30 type
(layout 'fill-parent 'wrap-content -1 'centre 0)
fn))))
(define (medit-text-scale id type fn) (define (medit-text-scale id type fn)
(vert (linear-layout
(text-view 0 (mtext-lookup id) (make-id (string-append (symbol->string id) "-container"))
30 (layout 'wrap-content 'wrap-content 1 'centre 0)) 'vertical
(edit-text (symbol->id id) "" 30 type (layout 'fill-parent 'wrap-content 1 'centre 20)
(layout 'fill-parent 'wrap-content 1 'centre 0) (list 0 0 0 0)
fn))) (list
(text-view 0 (mtext-lookup id)
30 (layout 'wrap-content 'wrap-content 1 'centre 0))
(edit-text (symbol->id id) "" 30 type
(layout 'fill-parent 'wrap-content 1 'centre 0)
fn))))
(define (mspinner id types fn) (define (mspinner id types fn)
(vert (vert
......
...@@ -166,9 +166,9 @@ ...@@ -166,9 +166,9 @@
(append (append
(cond (cond
((get-current 'sync-on #f) ((get-current 'sync-on #f)
(when (zero? (random 10)) ; (when (zero? (random 10))
(msg "mangling...") ; (msg "mangling...")
(mangle-test! db "sync" entity-types)) ; (mangle-test! db "sync" entity-types))
(msg "one") (msg "one")
(set-current! 'upload 0) (set-current! 'upload 0)
(set-current! 'download 0) (set-current! 'download 0)
...@@ -529,9 +529,21 @@ ...@@ -529,9 +529,21 @@
(let ((id-text (symbol->string id))) (let ((id-text (symbol->string id)))
(horiz-colour (horiz-colour
(if shade colour-one colour-two) (if shade colour-one colour-two)
(mtoggle-button-scale (linear-layout
id (lambda (v) 0 'vertical (layout 200 'wrap-content -1 'left 0)
(entity-set-value! id-text "int" v) '())) (list 0 0 0 0)
(list
(text-view (symbol->id id)
(mtext-lookup id)
30 (layout 'wrap-content 'wrap-content -1 'left 0))
(mtoggle-button-scale
(string->symbol (string-append id-text "-in-village"))
(lambda (v)
(entity-set-value! id-text "int" v)
(list (update-widget
'edit-text
(get-id (string-append id-text "-closest-access-container"))
(if (eqv? v 1) 'hide 'show) 0))))))
(medit-text-scale (medit-text-scale
(string->symbol (string-append id-text "-closest-access")) (string->symbol (string-append id-text "-closest-access"))
"normal" (lambda (v) (entity-set-value! "normal" (lambda (v) (entity-set-value!
...@@ -550,10 +562,15 @@ ...@@ -550,10 +562,15 @@
(let ((id-text (symbol->string id))) (let ((id-text (symbol->string id)))
(append (append
(list (list
(mupdate 'toggle-button id id-text) (mupdate 'toggle-button (string->symbol (string-append id-text "-in-village")) id-text)
(mupdate 'edit-text (mupdate 'edit-text
(string->symbol (string-append id-text "-closest-access")) (string->symbol (string-append id-text "-closest-access"))
(string-append id-text "-closest-access"))) (string-append id-text "-closest-access"))
(update-widget
'edit-text
(get-id (string-append id-text "-closest-access-container"))
(if (eqv? (entity-get-value id-text) 1)
'hide 'show) 0))
(mupdate-gps (mupdate-gps
(string->symbol (string-append id-text "-gps")) (string->symbol (string-append id-text "-gps"))
(string-append id-text "-gps"))))) (string-append id-text "-gps")))))
......
test-num,1,1,1, test-num,1,1,1,
test-text, I am test text, I am test text, I am test text, test-text, I am test text, I am test text, I am test text,
one, one, ,, one, one, ,,
two, two, ,, two, two, ,,
three, three, ,, three, three, ,,
...@@ -10,17 +10,17 @@ individual, Individual, ,, ...@@ -10,17 +10,17 @@ individual, Individual, ,,
individuals, Individuals, ,, individuals, Individuals, ,,
add-item-to-list,0, ,, add-item-to-list,0, ,,
default-village-name, New village, ,, default-village-name, New village, ,,
title, Symbai, Symbai, Symbai, title, Symbai, Symbai, Symbai,
sync, Sync, Sync, Sync, sync, Sync, Sync, Sync,
languages, Choose language, Choose language, Choose language, languages, Choose language, Choose language, Choose language,
english, English, English, English, english, English, English, English,
khasi, Khasi, Khasi, Khasi, khasi, Khasi, Khasi, Khasi,
hindi, Hindi, Hindi, Hindi, hindi, Hindi, Hindi, Hindi,
user-id, Your user ID, User ID, User ID, user-id, Your user ID, User ID, User ID,
save, Save, Save, Save, save, Save, Save, Save,
back, Back, Back, Back, back, Back, Back, Back,
off, Off, Off, Off, off, Off, Off, Off,
villages, Villages, Villages, Villages, villages, Villages, Villages, Villages,
list-empty, List empty, ,, list-empty, List empty, ,,
delete, Delete, ,, delete, Delete, ,,
delete-are-you-sure, Are you sure you want to delete this?, ,, delete-are-you-sure, Are you sure you want to delete this?, ,,
...@@ -29,7 +29,7 @@ quick-name, New person name, ,, ...@@ -29,7 +29,7 @@ quick-name, New person name, ,,
quick-add, Quick add, ,, quick-add, Quick add, ,,
find-individual, Find individual, ,, find-individual, Find individual, ,,
filter, Filter, ,, filter, Filter, ,,
off, Off, Off, Off, off, Off, Off, Off,
name, Name, ,, name, Name, ,,
sync-all, Sync me!, ,, sync-all, Sync me!, ,,
sync-syncall, Sync everything, ,, sync-syncall, Sync everything, ,,
...@@ -40,9 +40,9 @@ email-local, Email local DB, ,, ...@@ -40,9 +40,9 @@ email-local, Email local DB, ,,
debug, Debug, ,, debug, Debug, ,,
sync-back, Back, ,, sync-back, Back, ,,
sync-prof, Profile, ,, sync-prof, Profile, ,,
village-name, Village name, Village name, Village name, village-name, Village name, Village name, Village name,
block, Block, Block, Block, block, Block, Block, Block,
district, District, District, District, district, District, District, District,
car, Accessible by car, ,, car, Accessible by car, ,,
household-list, Household list, ,, household-list, Household list, ,,
amenities, Amenities, ,, amenities, Amenities, ,,
...@@ -52,31 +52,31 @@ closest-access, Closest place of access, ,, ...@@ -52,31 +52,31 @@ closest-access, Closest place of access, ,,
house-gps, GPS, ,, house-gps, GPS, ,,
toilet-gps, GPS, ,, toilet-gps, GPS, ,,
school, School, ,, school, School, ,,
school-closest-access, Access, ,, school-closest-access, Closest access, ,,
school-gps, GPS, ,, school-gps, GPS, ,,
hospital, Hospital/Health care centre, ,, hospital, Hospital/Health care centre, ,,
hospital-closest-access, Access, ,, hospital-closest-access, Closest access, ,,
hospital-gps, GPS, ,, hospital-gps, GPS, ,,
post-office, Post Office, ,, post-office, Post Office, ,,
post-office-closest-access, Access, ,, post-office-closest-access, Closest access, ,,
post-office-gps, GPS, ,, post-office-gps, GPS, ,,
railway-station, Railway station, ,, railway-station, Railway station, ,,
railway-station-closest-access, Access, ,, railway-station-closest-access, Closest access, ,,
railway-station-gps, GPS, ,, railway-station-gps, GPS, ,,
state-bus-service, Inter-state bus service, ,, state-bus-service, Inter-state bus service, ,,
state-bus-service-closest-access, Access, ,, state-bus-service-closest-access, Closest access, ,,
state-bus-service-gps, GPS, ,, state-bus-service-gps, GPS, ,,
district-bus-service, Inter-village/district bus service, ,, district-bus-service, Inter-village/district bus service, ,,
district-bus-service-closest-access, Access, ,, district-bus-service-closest-access, Closest access, ,,
district-bus-service-gps, GPS, ,, district-bus-service-gps, GPS, ,,
panchayat, Village Panchayat Office, ,, panchayat, Village Panchayat Office, ,,
panchayat-closest-access, Access, ,, panchayat-closest-access, Closest access, ,,
panchayat-gps, GPS, ,, panchayat-gps, GPS, ,,
NGO, Presence of NGO's working with them, ,, NGO, Presence of NGO's working with them, ,,
NGO-closest-access, Access, ,, NGO-closest-access, Closest access, ,,
NGO-gps, GPS, ,, NGO-gps, GPS, ,,
market, Market, ,, market, Market, ,,
market-closest-access, Access, ,, market-closest-access, Closest access, ,,
market-gps, GPS, ,, market-gps, GPS, ,,
household-name, Household name, ,, household-name, Household name, ,,
default-household-name, A household, ,, default-household-name, A household, ,,
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
(list 'households (list "Households" "" )) (list 'households (list "Households" "" ))
(list 'individual (list "Individual" "" )) (list 'individual (list "Individual" "" ))
(list 'individuals (list "Individuals" "" )) (list 'individuals (list "Individuals" "" ))
(list 'add-item-to-list (list "+" "" )) (list 'add-item-to-list (list "0" "" ))
(list 'default-village-name (list "New village" "" )) (list 'default-village-name (list "New village" "" ))
(list 'title (list "Symbai" "Symbai" "Symbai" "" )) (list 'title (list "Symbai" "Symbai" "Symbai" "" ))
(list 'sync (list "Sync" "Sync" "Sync" "" )) (list 'sync (list "Sync" "Sync" "Sync" "" ))
...@@ -54,32 +54,41 @@ ...@@ -54,32 +54,41 @@
(list 'closest-access (list "Closest place of access" "" )) (list 'closest-access (list "Closest place of access" "" ))
(list 'house-gps (list "GPS" "" )) (list 'house-gps (list "GPS" "" ))
(list 'toilet-gps (list "GPS" "" )) (list 'toilet-gps (list "GPS" "" ))
(list 'school-in-village (list "In Village" ))
(list 'school (list "School" "" )) (list 'school (list "School" "" ))
(list 'school-closest-access (list "Access" "" )) (list 'school-closest-access (list "Closest access" "" ))
(list 'school-gps (list "GPS" "" )) (list 'school-gps (list "GPS" "" ))
(list 'hospital-in-village (list "In Village" ))
(list 'hospital (list "Hospital/Health care centre" "" )) (list 'hospital (list "Hospital/Health care centre" "" ))
(list 'hospital-closest-access (list "Access" "" )) (list 'hospital-closest-access (list "Closest access" "" ))
(list 'hospital-gps (list "GPS" "" )) (list 'hospital-gps (list "GPS" "" ))
(list 'Post-office-in-village (list "In Village" ))
(list 'post-office (list "Post Office" "" )) (list 'post-office (list "Post Office" "" ))
(list 'post-office-closest-access (list "Access" "" )) (list 'post-office-closest-access (list "Closest access" "" ))
(list 'post-office-gps (list "GPS" "" )) (list 'post-office-gps (list "GPS" "" ))
(list 'railway-station-in-village (list "In Village" ))
(list 'railway-station (list "Railway station" "" )) (list 'railway-station (list "Railway station" "" ))
(list 'railway-station-closest-access (list "Access" "" )) (list 'railway-station-closest-access (list "Closest access" "" ))
(list 'railway-station-gps (list "GPS" "" )) (list 'railway-station-gps (list "GPS" "" ))
(list 'State-bus-service-in-village (list "In Village" ))
(list 'state-bus-service (list "Inter-state bus service" "" )) (list 'state-bus-service (list "Inter-state bus service" "" ))
(list 'state-bus-service-closest-access (list "Access" "" )) (list 'state-bus-service-closest-access (list "Closest access" "" ))
(list 'state-bus-service-gps (list "GPS" "" )) (list 'state-bus-service-gps (list "GPS" "" ))
(list 'District-bus-service-in-village (list "In Village" ))
(list 'district-bus-service (list "Inter-village/district bus service" "" )) (list 'district-bus-service (list "Inter-village/district bus service" "" ))
(list 'district-bus-service-closest-access (list "Access" "" )) (list 'district-bus-service-closest-access (list "Closest access" "" ))
(list 'district-bus-service-gps (list "GPS" "" )) (list 'district-bus-service-gps (list "GPS" "" ))
(list 'Panchayat-in-village (list "In Village" ))
(list 'panchayat (list "Village Panchayat Office" "" )) (list 'panchayat (list "Village Panchayat Office" "" ))
(list 'panchayat-closest-access (list "Access" "" )) (list 'panchayat-closest-access (list "Closest access" "" ))
(list 'panchayat-gps (list "GPS" "" )) (list 'panchayat-gps (list "GPS" "" ))
(list 'NGO-in-village (list "In Village" ))
(list 'NGO (list "Presence of NGO's working with them" "" )) (list 'NGO (list "Presence of NGO's working with them" "" ))
(list 'NGO-closest-access (list "Access" "" )) (list 'NGO-closest-access (list "Closest access" "" ))
(list 'NGO-gps (list "GPS" "" )) (list 'NGO-gps (list "GPS" "" ))
(list 'market-in-village (list "In Village" ))
(list 'market (list "Market" "" )) (list 'market (list "Market" "" ))
(list 'market-closest-access (list "Access" "" )) (list 'market-closest-access (list "Closest access" "" ))
(list 'market-gps (list "GPS" "" )) (list 'market-gps (list "GPS" "" ))
(list 'household-name (list "Household name" "" )) (list 'household-name (list "Household name" "" ))
(list 'default-household-name (list "A household" "" )) (list 'default-household-name (list "A household" "" ))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"households"," Households"," ",, "households"," Households"," ",,
"individual"," Individual"," ",, "individual"," Individual"," ",,
"individuals"," Individuals"," ",, "individuals"," Individuals"," ",,
"add-item-to-list","+"," ",, "add-item-to-list",0," ",,
"default-village-name"," New village"," ",, "default-village-name"," New village"," ",,
"title"," Symbai"," Symbai"," Symbai"," " "title"," Symbai"," Symbai"," Symbai"," "
"sync"," Sync"," Sync"," Sync"," " "sync"," Sync"," Sync"," Sync"," "
...@@ -51,32 +51,41 @@ ...@@ -51,32 +51,41 @@
"closest-access"," Closest place of access"," ",, "closest-access"," Closest place of access"," ",,
"house-gps"," GPS"," ",, "house-gps"," GPS"," ",,
"toilet-gps"," GPS"," ",, "toilet-gps"," GPS"," ",,
"school-in-village","In Village",,,
"school"," School"," ",, "school"," School"," ",,
"school-closest-access"," Access"," ",, "school-closest-access"," Closest access"," ",,
"school-gps"," GPS"," ",, "school-gps"," GPS"," ",,
"hospital-in-village","In Village",,,
"hospital"," Hospital/Health care centre"," ",, "hospital"," Hospital/Health care centre"," ",,
"hospital-closest-access"," Access"," ",, "hospital-closest-access"," Closest access"," ",,
"hospital-gps"," GPS"," ",, "hospital-gps"," GPS"," ",,
"Post-office-in-village","In Village",,,
"post-office"," Post Office"," ",, "post-office"," Post Office"," ",,
"post-office-closest-access"," Access"," ",, "post-office-closest-access"," Closest access"," ",,
"post-office-gps"," GPS"," ",, "post-office-gps"," GPS"," ",,
"railway-station-in-village","In Village",,,
"railway-station"," Railway station"," ",, "railway-station"," Railway station"," ",,
"railway-station-closest-access"," Access"," ",, "railway-station-closest-access"," Closest access"," ",,
"railway-station-gps"," GPS"," ",, "railway-station-gps"," GPS"," ",,
"State-bus-service-in-village","In Village",,,
"state-bus-service"," Inter-state bus service"," ",, "state-bus-service"," Inter-state bus service"," ",,
"state-bus-service-closest-access"," Access"," ",, "state-bus-service-closest-access"," Closest access"," ",,
"state-bus-service-gps"," GPS"," ",, "state-bus-service-gps"," GPS"," ",,
"District-bus-service-in-village","In Village",,,
"district-bus-service"," Inter-village/district bus service"," ",, "district-bus-service"," Inter-village/district bus service"," ",,
"district-bus-service-closest-access"," Access"," ",, "district-bus-service-closest-access"," Closest access"," ",,
"district-bus-service-gps"," GPS"," ",, "district-bus-service-gps"," GPS"," ",,
"Panchayat-in-village","In Village",,,
"panchayat"," Village Panchayat Office"," ",, "panchayat"," Village Panchayat Office"," ",,
"panchayat-closest-access"," Access"," ",, "panchayat-closest-access"," Closest access"," ",,
"panchayat-gps"," GPS"," ",, "panchayat-gps"," GPS"," ",,
"NGO-in-village","In Village",,,
"NGO"," Presence of NGO's working with them"," ",, "NGO"," Presence of NGO's working with them"," ",,
"NGO-closest-access"," Access"," ",, "NGO-closest-access"," Closest access"," ",,
"NGO-gps"," GPS"," ",, "NGO-gps"," GPS"," ",,
"market-in-village","In Village",,,
"market"," Market"," ",, "market"," Market"," ",,
"market-closest-access"," Access"," ",, "market-closest-access"," Closest access"," ",,
"market-gps"," GPS"," ",, "market-gps"," GPS"," ",,
"household-name"," Household name"," ",, "household-name"," Household name"," ",,
"default-household-name"," A household"," ",, "default-household-name"," A household"," ",,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment