Merge additions to common from Sailfish UI
This commit is contained in:
parent
2f291673ab
commit
c1f8db5500
2 changed files with 15 additions and 0 deletions
|
@ -31,3 +31,14 @@ function updateModelFrom(model, data) {
|
|||
model.remove(model.count-1);
|
||||
}
|
||||
}
|
||||
|
||||
function updateModelWith(model, key, value, update) {
|
||||
for (var row=0; row<model.count; row++) {
|
||||
var current = model.get(row);
|
||||
if (current[key] == value) {
|
||||
for (var key in update) {
|
||||
model.setProperty(row, key, update[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue