Revision 53baaec8
Von Sven Schöling vor mehr als 3 Jahren hinzugefügt
js/kivi.FileDB.js | ||
---|---|---|
75 | 75 |
}); |
76 | 76 |
}; |
77 | 77 |
|
78 |
ns.delete_all= function() { |
|
79 |
ns.retrieve_all_keys((keys) => { |
|
80 |
keys.forEach((key) => ns.delete_key(key)); |
|
78 |
ns.delete_all = function(success) { |
|
79 |
ns.open_rw_store((store) => { |
|
80 |
let request = store.clear(); |
|
81 |
request.onsuccess = success; |
|
82 |
request.onerror = ns.error; |
|
81 | 83 |
}); |
82 | 84 |
}; |
83 | 85 |
|
84 |
ns.delete_key= function(key, success) { |
|
86 |
ns.delete_key = function(key, success) {
|
|
85 | 87 |
ns.open_rw_store((store) => { |
86 | 88 |
let request = store.delete(key); |
87 | 89 |
request.onsuccess = (event) => { if (success) success(event.target.result); }; |
Auch abrufbar als: Unified diff
Image Upload: progress bar, success und error flash