Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dave Griffiths
mongoose-2000
Commits
c713c3e0
Commit
c713c3e0
authored
Feb 02, 2015
by
dave griffiths
Browse files
pi merge
Merge branch 'starwisp_lib' of github.com:nebogeo/mongoose-web into starwisp_lib
parents
66be4ac7
396fca0b
Changes
5
Hide whitespace changes
Inline
Side-by-side
android/AndroidManifest.xml
View file @
c713c3e0
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"foam.mongoose"
android:versionCode=
"1
3
"
android:versionName=
"1.
0
"
>
android:versionCode=
"1
7
"
android:versionName=
"1.
2
"
>
<application
android:label=
"@string/app_name"
android:icon=
"@drawable/logo"
android:theme=
"@style/StarwispTheme"
...
...
android/assets/mongoose.scm
View file @
c713c3e0
...
...
@@ -627,7 +627,18 @@
(
cons
(
mbutton
(
string-append
"review-"
uid
)
(
string-append
type
(
if
time
(
string-append
"-"
time
)
""
))
(
string-append
type
(
cond
((
equal?
type
"pup-focal"
)
(
string-append
" on "
(
uid->name
db
(
ktv-get
entity
"id-focal-subject"
))))
((
equal?
type
"group-comp"
)
(
string-append
" on pack "
(
uid->name
db
(
ktv-get
entity
"pack"
))))
(
else
""
))
(
if
time
(
string-append
" at "
time
)
""
)
)
(
lambda
()
(
set-current!
'review-collection
uid
)
(
entity-init!
db
"stream"
type
(
get-entity-by-unique
db
"stream"
uid
))
...
...
@@ -640,7 +651,7 @@
(
cons
(
mbutton
(
string-append
"review-"
uid
)
(
string-append
type
(
if
time
(
string-append
"-"
time
)
""
))
(
string-append
type
(
if
time
(
string-append
"-"
time
)
""
)
" "
)
(
lambda
()
(
entity-init!
db
"stream"
type
(
get-entity-by-unique
db
"stream"
uid
))
(
list
(
start-activity
"review-item"
0
""
))))
...
...
@@ -665,7 +676,27 @@
(
uid
(
list-ref
data
1
)))
(
mbutton
(
string-append
"review-"
uid
)
(
string-append
type
(
if
time
(
string-append
"-"
time
)
""
))
(
string-append
type
(
cond
((
equal?
type
"group-comp-pup-assoc"
)
(
string-append
" between pup "
(
uid->name
db
(
ktv-get
entity
"id-mongoose"
))
" and "
(
uid->name
db
(
ktv-get
entity
"id-escort"
))))
((
equal?
type
"group-comp-mate-guard"
)
(
string-append
" between female "
(
uid->name
db
(
ktv-get
entity
"id-mongoose"
))
" and "
(
uid->name
db
(
ktv-get
entity
"id-escort"
))))
((
equal?
type
"group-comp-weight"
)
(
string-append
" for "
(
uid->name
db
(
ktv-get
entity
"id-mongoose"
))))
((
equal?
type
"pup-focal"
)
(
string-append
" on "
(
uid->name
db
(
ktv-get
entity
"id-focal-subject"
))))
((
equal?
type
"group-comp"
)
(
string-append
" on pack "
(
uid->name
db
(
ktv-get
entity
"pack"
))))
(
else
""
))
(
if
time
(
string-append
" at "
time
)
""
)
)
(
lambda
()
(
entity-init!
db
"stream"
type
(
get-entity-by-unique
db
"stream"
uid
))
(
list
(
start-activity
"review-item"
0
""
))))
...
...
@@ -729,6 +760,8 @@
(
lambda
(
v
)
(
cond
((
eqv?
v
1
)
(
set-current!
'parent-id
#f
)
(
set-current!
'pup-focal-id
#f
)
(
list
(
finish-activity
1
)))
(
else
(
set-current!
'timer-minutes
1
)
...
...
android/assets/starwisp.scm
View file @
c713c3e0
...
...
@@ -509,6 +509,11 @@
(
mbutton
"note-done"
"Done"
(
lambda
()
(
set-current!
'entity-type
"note"
)
;; parent is the current pup focal or group comp, or nothing
(
let
((
parent
(
get-current
'parent-id
#f
)))
(
if
parent
(
entity-set-value!
"parent"
"varchar"
parent
)
(
entity-set-value!
"parent"
"varchar"
"not-set"
)))
(
entity-record-values!
)
(
list
(
replace-fragment
(
get-id
"event-holder"
)
"events"
))))
(
mbutton
"note-cancel"
"Cancel"
...
...
@@ -994,7 +999,9 @@
(
entity-update-single-value!
(
ktv
"baby-byelim"
"varchar"
(
assemble-array
individuals
)))
(
list
)))
)
(
update-grid-selector-enabled
"gc-baby-byelim"
(
get-current
'gc-not-present
'
()))
(
update-grid-selector-enabled
"gc-baby-byelim"
(
invert-mongoose-selection
(
get-current
'gc-not-present
'
())))
(
update-grid-selector-checked
"gc-baby-byelim"
"baby-byelim"
)))
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
...
...
@@ -1011,6 +1018,7 @@
(
lambda
()
;; clean up...
(
get-current
'gc-not-present
'
())
(
set-current!
'parent-id
#f
)
(
set-current!
'group-composition-id
#f
)
(
list
(
finish-activity
0
))))))
(
lambda
(
fragment
arg
)
...
...
@@ -1160,7 +1168,9 @@
(
entity-init&save!
db
"stream"
"group-comp"
(
list
(
ktv
"pack"
"varchar"
(
ktv-get
(
get-current
'pack
())
"unique_id"
))
(
ktv
"group-comp-code"
"varchar"
""
)))))
(
ktv
"group-comp-code"
"varchar"
""
))))
(
set-current!
'parent-id
(
get-current
'group-composition-id
#f
))
)
(
list
(
start-activity
"group-composition"
2
""
))))
(
list
...
...
@@ -1183,6 +1193,7 @@
(
ktv-get
(
get-current
'pack
'
())
"unique_id"
))))
;; need to clear the current group comp
;; id here if we are changing the pack
(
set-current!
'parent-id
#f
)
(
set-current!
'group-composition-id
#f
))
(
set-current!
'pack
pack
)
'
()))))
...
...
@@ -1265,6 +1276,7 @@
(
cond
((
current-exists?
'individual
)
(
set-current!
'pup-focal-id
(
entity-record-values!
))
(
set-current!
'parent-id
(
get-current
'pup-focal-id
#f
))
(
set-current!
'timer-minutes
pf-length
)
(
set-current!
'timer-seconds
0
)
(
list
...
...
@@ -1332,6 +1344,8 @@
(
lambda
(
v
)
(
cond
((
eqv?
v
1
)
(
set-current!
'parent-id
#f
)
(
set-current!
'pup-focal-id
#f
)
(
list
(
finish-activity
1
)))
(
else
(
list
))))))))))
...
...
eavdb/entity-filter.ss
View file @
c713c3e0
...
...
@@ -94,7 +94,10 @@
"left join "
table
"_value_int "
"as d on d.entity_id = e.entity_id and d.attribute_id = 'deleted' "
)
filter
)
(
if
typed
"where e.entity_type = ? and (d.value = 0 or d.value is NULL) order by n.value"
(
if
(
not
(
equal?
typed
"*"
))
(
if
(
equal?
typed
"mongoose"
)
"where e.entity_type = ? and (d.value = 0 or d.value is NULL) order by substr(n.value,3)"
"where e.entity_type = ? and (d.value = 0 or d.value is NULL) order by n.value"
)
"order by n.value"
)))
(
define
(
build-query-inc-deleted
table
filter
)
...
...
@@ -119,7 +122,7 @@
filter
))
(
define
(
filter-entities
db
table
type
filter
)
(
let
((
q
(
build-query
table
filter
(
not
(
equal?
type
"*"
))
)))
(
let
((
q
(
build-query
table
filter
type
)))
(
let
((
s
(
apply
db-select
(
dbg
(
append
...
...
eavdb/entity-sync.ss
View file @
c713c3e0
...
...
@@ -89,7 +89,7 @@
"select e.entity_id, e.entity_type, e.unique_id, e.dirty, e.version from "
table
"_entity as e "
"left join stream_value_varchar "
"as p on p.entity_id = e.entity_id and p.attribute_id = 'parent' "
"where e.dirty = 1 and p.value is NULL"
))))
"where e.dirty = 1 and p.value is NULL
or p.value='not-set'
"
))))
(
if
(
null?
de
)
'
()
(
map
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment