überarbeitetet serviceworker
This commit is contained in:
parent
ee717318ee
commit
be36363e39
@ -14,7 +14,7 @@ if (empty($_POST) && empty(file_get_contents('php://input'))) {
|
|||||||
if ($_GET['controller'] == "Article"){
|
if ($_GET['controller'] == "Article"){
|
||||||
if ($_GET['action'] == "store") {
|
if ($_GET['action'] == "store") {
|
||||||
$json = file_get_contents('php://input');
|
$json = file_get_contents('php://input');
|
||||||
$file = fopen(__DIR__.'/data/test_articles.json','w');
|
$file = fopen(__DIR__.'/data/articles.json','w');
|
||||||
fwrite($file, $json);
|
fwrite($file, $json);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
echo "Artikel wurden gespeichert.";
|
echo "Artikel wurden gespeichert.";
|
||||||
|
|||||||
@ -57,7 +57,7 @@ var app = new Vue({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadArticles: function() {
|
loadArticles: function() {
|
||||||
this.$http.get('./data/test_articles.json')
|
this.$http.get('./data/articles.json')
|
||||||
.then(response => { return response.json();})
|
.then(response => { return response.json();})
|
||||||
.then(json => {
|
.then(json => {
|
||||||
json.forEach(element => {
|
json.forEach(element => {
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
var APP_SHELL_CACHE = "inventur_shell-v2";
|
var APP_SHELL_CACHE = "inventur_shell-v2";
|
||||||
var urlsToCache = [
|
var urlsToCache = [
|
||||||
'.',
|
|
||||||
'css/lib/materialize.min.css',
|
'css/lib/materialize.min.css',
|
||||||
'js/lib/materialize.min.js',
|
'js/lib/materialize.min.js',
|
||||||
'js/lib/accounting.min.js',
|
'js/lib/accounting.min.js',
|
||||||
@ -10,7 +9,7 @@ var urlsToCache = [
|
|||||||
'js/lib/vue.min.js',
|
'js/lib/vue.min.js',
|
||||||
'js/lib/vue-resource.min.js',
|
'js/lib/vue-resource.min.js',
|
||||||
'fonts/Roboto/*',
|
'fonts/Roboto/*',
|
||||||
//'js/model/inventory_article.js'
|
'data/articles.json'
|
||||||
];
|
];
|
||||||
|
|
||||||
self.addEventListener('install', function(event){
|
self.addEventListener('install', function(event){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user