From 9e365b7c12f6c002f3ee6d719108dcf3eb8e3ed4 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 2 Jul 2016 16:18:10 +0800 Subject: [PATCH] Update header toolbar menu to remove beta section and add extra section --- public/js/index.js | 21 +++++++++++---------- public/views/header.ejs | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 25bb6a991..25b94bd6e 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -596,10 +596,15 @@ var ui = { status: $(".ui-status"), new: $(".ui-new"), publish: $(".ui-publish"), + extra: { + revision: $(".ui-extra-revision"), + slide: $(".ui-extra-slide") + }, download: { markdown: $(".ui-download-markdown"), html: $(".ui-download-html"), - rawhtml: $(".ui-download-raw-html") + rawhtml: $(".ui-download-raw-html"), + pdf: $(".ui-download-pdf-beta"), }, export: { dropbox: $(".ui-save-dropbox"), @@ -614,10 +619,6 @@ var ui = { snippet: $(".ui-import-snippet"), clipboard: $(".ui-import-clipboard") }, - beta: { - pdf: $(".ui-beta-pdf"), - slide: $(".ui-beta-slide") - }, mode: $(".ui-mode"), edit: $(".ui-edit"), view: $(".ui-view"), @@ -1258,6 +1259,9 @@ if (GOOGLE_API_KEY && GOOGLE_CLIENT_ID) { //button actions //share ui.toolbar.publish.attr("href", noteurl + "/publish"); +// extra +//slide +ui.toolbar.extra.slide.attr("href", noteurl + "/slide"); //download //markdown ui.toolbar.download.markdown.click(function (e) { @@ -1282,6 +1286,8 @@ ui.toolbar.download.rawhtml.click(function (e) { e.stopPropagation(); exportToRawHTML(ui.area.markdown); }); +//pdf +ui.toolbar.download.pdf.attr("download", "").attr("href", noteurl + "/pdf"); //export to dropbox ui.toolbar.export.dropbox.click(function () { var filename = renderFilename(ui.area.markdown) + '.md'; @@ -1484,11 +1490,6 @@ ui.toolbar.uploadImage.bind('change', function (e) { ui.toc.dropdown.click(function (e) { e.stopPropagation(); }); -//beta -//pdf -ui.toolbar.beta.pdf.attr("download", "").attr("href", noteurl + "/pdf"); -//slide -ui.toolbar.beta.slide.attr("href", noteurl + "/slide"); //modal actions var revisions = []; diff --git a/public/views/header.ejs b/public/views/header.ejs index 2a4c3123a..61ec797b6 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -27,12 +27,10 @@
  • Publish
  • - -
  • Revision +
  • +
  • Revision
  • -
  • Export PDF -
  • -
  • Slide Mode +
  • Slide Mode
  • @@ -70,6 +68,8 @@
  • Raw HTML
  • +
  • PDF (Beta) +
  • Help
  • @@ -124,12 +124,10 @@ Menu