From 1699cecff094ab32ab11402ab08899ca41089c69 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 14 Jul 2013 18:56:47 +0000 Subject: [PATCH] cosmetic changes --- static/js/pandora/textPanel.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/textPanel.js b/static/js/pandora/textPanel.js index bff3bd12..2938adcd 100644 --- a/static/js/pandora/textPanel.js +++ b/static/js/pandora/textPanel.js @@ -149,7 +149,7 @@ pandora.ui.textPanel = function() { }) .bindEvent({ click: function(data) { - if(data.files.length) { + if (data.files.length) { pandora.$ui.uploadPDFDialog = pandora.ui.uploadPDFDialog({ file: data.files[0], id: pandora.user.ui.text @@ -339,7 +339,7 @@ pandora.ui.textPDF = function(text) { width: '100%' }) .onMessage(function(event, data) { - if(event == 'edit') { + if (event == 'edit') { pandora.ui.insertEmbedDialog(data.src, function(url) { data.src = url; var embed = text.embeds.filter(function(embed) { @@ -347,9 +347,8 @@ pandora.ui.textPDF = function(text) { && embed.type == data.type && embed.page == data.page; })[0]; - if(embed) { + if (embed) { embed.src = url; - } else { text.embeds.push(data); //fixme sort embeds by page/id