Update header toolbar menu to remove beta section and add extra section

This commit is contained in:
Wu Cheng-Han 2016-07-02 16:18:10 +08:00
parent e8f59c1df8
commit 9e365b7c12
2 changed files with 21 additions and 20 deletions

View File

@ -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 = [];

View File

@ -27,12 +27,10 @@
<li role="presentation"><a role="menuitem" class="ui-publish" tabindex="-1" href="#" target="_blank"><i class="fa fa-print fa-fw"></i> Publish</a>
</li>
<li class="divider"></li>
<li class="dropdown-header">Beta</li>
<li role="presentation"><a role="menuitem" class="ui-beta-revision" tabindex="-1" data-toggle="modal" data-target="#revisionModal"><i class="fa fa-history fa-fw"></i> Revision</a>
<li class="dropdown-header">Extra</li>
<li role="presentation"><a role="menuitem" class="ui-extra-revision" tabindex="-1" data-toggle="modal" data-target="#revisionModal"><i class="fa fa-history fa-fw"></i> Revision</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-beta-pdf" tabindex="-1" href="#" target="_self"><i class="fa fa-file-pdf-o fa-fw"></i> Export PDF</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-beta-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-tv fa-fw"></i> Slide Mode</a>
<li role="presentation"><a role="menuitem" class="ui-extra-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-tv fa-fw"></i> Slide Mode</a>
</li>
<li class="divider"></li>
<li class="dropdown-header">Export</li>
@ -70,6 +68,8 @@
</li>
<li role="presentation"><a role="menuitem" class="ui-download-raw-html" tabindex="-1" href="#" target="_self"><i class="fa fa-file-code-o fa-fw"></i> Raw HTML</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-download-pdf-beta" tabindex="-1" href="#" target="_self"><i class="fa fa-file-pdf-o fa-fw"></i> PDF (Beta)</a>
</li>
<li class="divider"></li>
<li role="presentation"><a role="menuitem" class="ui-help" href="#" data-toggle="modal" data-target=".help-modal"><i class="fa fa-question-circle fa-fw"></i> Help</a>
</li>
@ -124,12 +124,10 @@
Menu <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu">
<li class="dropdown-header">Beta</li>
<li role="presentation"><a role="menuitem" class="ui-beta-revision" tabindex="-1" data-toggle="modal" data-target="#revisionModal"><i class="fa fa-history fa-fw"></i> Revision</a>
<li class="dropdown-header">Extra</li>
<li role="presentation"><a role="menuitem" class="ui-extra-revision" tabindex="-1" data-toggle="modal" data-target="#revisionModal"><i class="fa fa-history fa-fw"></i> Revision</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-beta-pdf" tabindex="-1" href="#" target="_self"><i class="fa fa-file-pdf-o fa-fw"></i> Export PDF</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-beta-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-tv fa-fw"></i> Slide Mode</a>
<li role="presentation"><a role="menuitem" class="ui-extra-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-tv fa-fw"></i> Slide Mode</a>
</li>
<li class="divider"></li>
<li class="dropdown-header">Export</li>
@ -167,6 +165,8 @@
</li>
<li role="presentation"><a role="menuitem" class="ui-download-raw-html" tabindex="-1" href="#" target="_self"><i class="fa fa-file-code-o fa-fw"></i> Raw HTML</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-download-pdf-beta" tabindex="-1" href="#" target="_self"><i class="fa fa-file-pdf-o fa-fw"></i> PDF (Beta)</a>
</li>
</ul>
</li>
</ul>