From 8226c36e3e20c8fa3578b056d5af172c6458eb16 Mon Sep 17 00:00:00 2001 From: life Date: Wed, 23 Sep 2015 00:10:43 +0800 Subject: [PATCH] =?UTF-8?q?export=20pdf=E4=BC=98=E5=8C=96,=20=E5=8F=AF?= =?UTF-8?q?=E5=8F=96=E6=B6=88,=20=E5=8A=A0loading=20mockup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/version | 2 +- src/node_modules/api.js | 8 +++---- src/note.html | 10 +++++++++ src/public/js/common.js | 30 +++++++++++++++++++++++-- src/public/plugins/export_pdf/plugin.js | 21 ++++++++++++++++- src/public/themes/basic.less | 23 +++++++++++++++++++ src/public/themes/default.css | 18 +++++++++++++++ 7 files changed, 104 insertions(+), 8 deletions(-) diff --git a/src/data/version b/src/data/version index 87b0e046..1278ff12 100644 --- a/src/data/version +++ b/src/data/version @@ -1 +1 @@ -{"version":"0.6.3","updatedTime":"2015-05-23T07:11:51.505Z"} \ No newline at end of file +{"version":"0.6.4","updatedTime":"2015-09-22T07:11:51.505Z"} \ No newline at end of file diff --git a/src/node_modules/api.js b/src/node_modules/api.js index 9591b5db..cde3f505 100644 --- a/src/node_modules/api.js +++ b/src/node_modules/api.js @@ -670,7 +670,7 @@ var Api = { exportPdf: function(noteId, callback) { var me = this; - console.log(me.getUrl('note/exportPdf', {noteId: noteId})); + // console.log(me.getUrl('note/exportPdf', {noteId: noteId})); needle.get(me.getUrl('note/exportPdf', {noteId: noteId}), function(err, resp) { me.checkError(err, resp); if(err) { @@ -684,7 +684,7 @@ var Api = { 'content-type': 'image/png', date: 'Mon, 19 Jan 2015 15:01:47 GMT', */ - + var body = resp.body; if(typeof body == "object" && body.Msg === false) { return callback(false, "", body.Msg); @@ -695,8 +695,8 @@ var Api = { var imagePathAll = imagePath + '/' + filename; fs.writeFile(imagePathAll, resp.body, function(err) { if(err) { - log(err); - log('local save pdf failed 本地保存失败'); + // log(err); + // log('local save pdf failed 本地保存失败'); callback(false); } else { callback(imagePathAll, filename); diff --git a/src/note.html b/src/note.html index 38ecd0b3..a908a63f 100755 --- a/src/note.html +++ b/src/note.html @@ -594,9 +594,19 @@ function log(o) {