mirror of https://github.com/status-im/codimd.git
Update header toolbar menu to remove beta section and add extra section
This commit is contained in:
parent
e8f59c1df8
commit
9e365b7c12
|
@ -596,10 +596,15 @@ var ui = {
|
||||||
status: $(".ui-status"),
|
status: $(".ui-status"),
|
||||||
new: $(".ui-new"),
|
new: $(".ui-new"),
|
||||||
publish: $(".ui-publish"),
|
publish: $(".ui-publish"),
|
||||||
|
extra: {
|
||||||
|
revision: $(".ui-extra-revision"),
|
||||||
|
slide: $(".ui-extra-slide")
|
||||||
|
},
|
||||||
download: {
|
download: {
|
||||||
markdown: $(".ui-download-markdown"),
|
markdown: $(".ui-download-markdown"),
|
||||||
html: $(".ui-download-html"),
|
html: $(".ui-download-html"),
|
||||||
rawhtml: $(".ui-download-raw-html")
|
rawhtml: $(".ui-download-raw-html"),
|
||||||
|
pdf: $(".ui-download-pdf-beta"),
|
||||||
},
|
},
|
||||||
export: {
|
export: {
|
||||||
dropbox: $(".ui-save-dropbox"),
|
dropbox: $(".ui-save-dropbox"),
|
||||||
|
@ -614,10 +619,6 @@ var ui = {
|
||||||
snippet: $(".ui-import-snippet"),
|
snippet: $(".ui-import-snippet"),
|
||||||
clipboard: $(".ui-import-clipboard")
|
clipboard: $(".ui-import-clipboard")
|
||||||
},
|
},
|
||||||
beta: {
|
|
||||||
pdf: $(".ui-beta-pdf"),
|
|
||||||
slide: $(".ui-beta-slide")
|
|
||||||
},
|
|
||||||
mode: $(".ui-mode"),
|
mode: $(".ui-mode"),
|
||||||
edit: $(".ui-edit"),
|
edit: $(".ui-edit"),
|
||||||
view: $(".ui-view"),
|
view: $(".ui-view"),
|
||||||
|
@ -1258,6 +1259,9 @@ if (GOOGLE_API_KEY && GOOGLE_CLIENT_ID) {
|
||||||
//button actions
|
//button actions
|
||||||
//share
|
//share
|
||||||
ui.toolbar.publish.attr("href", noteurl + "/publish");
|
ui.toolbar.publish.attr("href", noteurl + "/publish");
|
||||||
|
// extra
|
||||||
|
//slide
|
||||||
|
ui.toolbar.extra.slide.attr("href", noteurl + "/slide");
|
||||||
//download
|
//download
|
||||||
//markdown
|
//markdown
|
||||||
ui.toolbar.download.markdown.click(function (e) {
|
ui.toolbar.download.markdown.click(function (e) {
|
||||||
|
@ -1282,6 +1286,8 @@ ui.toolbar.download.rawhtml.click(function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
exportToRawHTML(ui.area.markdown);
|
exportToRawHTML(ui.area.markdown);
|
||||||
});
|
});
|
||||||
|
//pdf
|
||||||
|
ui.toolbar.download.pdf.attr("download", "").attr("href", noteurl + "/pdf");
|
||||||
//export to dropbox
|
//export to dropbox
|
||||||
ui.toolbar.export.dropbox.click(function () {
|
ui.toolbar.export.dropbox.click(function () {
|
||||||
var filename = renderFilename(ui.area.markdown) + '.md';
|
var filename = renderFilename(ui.area.markdown) + '.md';
|
||||||
|
@ -1484,11 +1490,6 @@ ui.toolbar.uploadImage.bind('change', function (e) {
|
||||||
ui.toc.dropdown.click(function (e) {
|
ui.toc.dropdown.click(function (e) {
|
||||||
e.stopPropagation();
|
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
|
//modal actions
|
||||||
var revisions = [];
|
var revisions = [];
|
||||||
|
|
|
@ -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 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>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li class="dropdown-header">Beta</li>
|
<li class="dropdown-header">Extra</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 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>
|
||||||
<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 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 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>
|
</li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li class="dropdown-header">Export</li>
|
<li class="dropdown-header">Export</li>
|
||||||
|
@ -70,6 +68,8 @@
|
||||||
</li>
|
</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 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>
|
||||||
|
<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 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 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>
|
</li>
|
||||||
|
@ -124,12 +124,10 @@
|
||||||
Menu <i class="fa fa-caret-down"></i>
|
Menu <i class="fa fa-caret-down"></i>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu">
|
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu">
|
||||||
<li class="dropdown-header">Beta</li>
|
<li class="dropdown-header">Extra</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 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>
|
||||||
<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 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 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>
|
</li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li class="dropdown-header">Export</li>
|
<li class="dropdown-header">Export</li>
|
||||||
|
@ -167,6 +165,8 @@
|
||||||
</li>
|
</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 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>
|
||||||
|
<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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue