From e74f7d2971d4cc481b1545a8f081f709c60e2c21 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Wed, 12 Mar 2014 17:34:25 -0400 Subject: [PATCH 1/4] Fix exception that happens when optional image doesn't have image uploaded --- plugins/image/config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/image/config.js b/plugins/image/config.js index 5a95a0b..2f6b68a 100644 --- a/plugins/image/config.js +++ b/plugins/image/config.js @@ -20,6 +20,7 @@ module.exports = { return callback([]); } + if (!parsed_data) return callcack(null); var file_id = parsed_data.file_id; models.files.find({ where: { id: file_id } }) From fbb8d5d6e8940902a835255920936125a35b75f6 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Wed, 12 Mar 2014 18:18:52 -0400 Subject: [PATCH 2/4] Fix image_list plugin to load images on edit --- plugins/image_list/template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/image_list/template.html b/plugins/image_list/template.html index d686fcf..de66d34 100644 --- a/plugins/image_list/template.html +++ b/plugins/image_list/template.html @@ -11,7 +11,7 @@ (function() { try { - var files = {{ item[field.name]|json_encode|raw }}; + var files = {{ item.data[field.name]|json_encode|raw }}; } catch(e) { return; } From 326662cbbfdae5f4d607c5d1bd23d2c8573a0a8c Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Wed, 12 Mar 2014 18:22:05 -0400 Subject: [PATCH 3/4] Fix tabs vs spaces --- plugins/image/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/image/config.js b/plugins/image/config.js index 2f6b68a..e0d19bd 100644 --- a/plugins/image/config.js +++ b/plugins/image/config.js @@ -20,7 +20,7 @@ module.exports = { return callback([]); } - if (!parsed_data) return callcack(null); + if (!parsed_data) return callcack(null); var file_id = parsed_data.file_id; models.files.find({ where: { id: file_id } }) From ba4aa51b89e074bf9d8ee5bc401645f68a97e3b0 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Wed, 12 Mar 2014 18:52:09 -0400 Subject: [PATCH 4/4] Fix typo --- plugins/image/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/image/config.js b/plugins/image/config.js index e0d19bd..f0dba13 100644 --- a/plugins/image/config.js +++ b/plugins/image/config.js @@ -20,7 +20,7 @@ module.exports = { return callback([]); } - if (!parsed_data) return callcack(null); + if (!parsed_data) return callback(null); var file_id = parsed_data.file_id; models.files.find({ where: { id: file_id } })