Skip to content

Commit 33ed609

Browse files
author
David Lenton
committed
Merged in fix-editor-entry-image-selection (pull request auth0#36)
Fix for duplicate entries being created
2 parents f304a64 + ce9e9b3 commit 33ed609

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

js/cledit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,7 @@ var TAWRAP = window.TAWRAP || {};
25412541
entry.url = s.quote.url;
25422542
entry.below_the_line = 1;
25432543
entry.type = 3;
2544+
entry.id = entryId;
25442545
if (entryId) {
25452546
CLEDIT.saveEntry(entry, function (err, result) {
25462547
CLEDIT.save(false, done);
@@ -2552,6 +2553,7 @@ var TAWRAP = window.TAWRAP || {};
25522553
entryId = ent.id;
25532554
if (entryId) {
25542555
if (document.getElementById('entry_id')) document.getElementById('entry_id').value = entryId;
2556+
entry.id = entryId;
25552557
CLEDIT.saveEntry(entry, function (err, result) {
25562558
CLEDIT.save(false, done);
25572559
// if (typeof done === 'function') return done(err);

js/upload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ var TCNDDU = TCNDDU || {};
223223
// TODO: Save the details of the entry back to the database so
224224
// that we can read them in again later
225225
if (entryId) {
226+
entry.id = entryId;
226227
entry.image.url = imageUrl;
227228
entry.image.size = 100;
228229
entry.meta.date = null;

public/js/cledit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,7 @@ var TAWRAP = window.TAWRAP || {};
25412541
entry.url = s.quote.url;
25422542
entry.below_the_line = 1;
25432543
entry.type = 3;
2544+
entry.id = entryId;
25442545
if (entryId) {
25452546
CLEDIT.saveEntry(entry, function (err, result) {
25462547
CLEDIT.save(false, done);
@@ -2552,6 +2553,7 @@ var TAWRAP = window.TAWRAP || {};
25522553
entryId = ent.id;
25532554
if (entryId) {
25542555
if (document.getElementById('entry_id')) document.getElementById('entry_id').value = entryId;
2556+
entry.id = entryId;
25552557
CLEDIT.saveEntry(entry, function (err, result) {
25562558
CLEDIT.save(false, done);
25572559
// if (typeof done === 'function') return done(err);

public/js/upload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ var TCNDDU = TCNDDU || {};
223223
// TODO: Save the details of the entry back to the database so
224224
// that we can read them in again later
225225
if (entryId) {
226+
entry.id = entryId;
226227
entry.image.url = imageUrl;
227228
entry.image.size = 100;
228229
entry.meta.date = null;

0 commit comments

Comments
 (0)