X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/e3cc953f09c067377e01d1e003927b969997edde..b12e3cd743360720e18e35f77ece2ba355d99d55:/project/static/js/models.js diff --git a/project/static/js/models.js b/project/static/js/models.js index 5d3fac49..b5b9c541 100644 --- a/project/static/js/models.js +++ b/project/static/js/models.js @@ -82,7 +82,7 @@ Editor.XMLModel = Editor.Model.extend({ $.ajax({ url: this.serverURL, - type: 'put', + type: 'post', dataType: 'json', data: payload, success: this.updatingSucceeded.bind(this), @@ -209,12 +209,12 @@ Editor.ImageGalleryModel = Editor.Model.extend({ alert('erroneous state:', this.get('state')); } - $.log('galleries:', data); + console.log('galleries:', data); - if (data.length == 0) + if (data.length === 0) { this.set('data', []); - else { - $.log('dupa'); + } else { + console.log('dupa'); this.set('data', data[0].pages); } @@ -319,7 +319,7 @@ Editor.DocumentModel = Editor.Model.extend({ this.contentModels[key].set('revision', this.data.user_revision); this.contentModels[key].set('state', 'empty'); } - } else if (xhr.status == 202) { // Wygenerowano PullRequest + } else if (xhr.status == 202) { // Wygenerowano PullRequest (tutaj?) } else if (xhr.status == 204) { // Nic nie zmieniono } else if (xhr.status == 409) { // Konflikt podczas operacji } @@ -351,7 +351,7 @@ Editor.DocumentModel = Editor.Model.extend({ this.contentModels[key].set('revision', this.data.user_revision); this.contentModels[key].set('state', 'empty'); } - } else if (xhr.status == 202) { // Wygenerowano PullRequest (tutaj?) + } else if (xhr.status == 202) { // Wygenerowano PullRequest } else if (xhr.status == 204) { // Nic nie zmieniono } else if (xhr.status == 409) { // Konflikt podczas operacji }