Added setting for PDF page size
This commit is contained in:
parent
fbb366c59e
commit
293aac30ed
@ -129,7 +129,9 @@ define([
|
|||||||
// Template
|
// Template
|
||||||
utils.setInputValue("#textarea-settings-publish-template", settings.template);
|
utils.setInputValue("#textarea-settings-publish-template", settings.template);
|
||||||
// PDF template
|
// PDF template
|
||||||
utils.setInputValue("#textarea-settings-publish-pdf-template", settings.pdfTemplate);
|
utils.setInputValue("#textarea-settings-pdf-template", settings.pdfTemplate);
|
||||||
|
// PDF page size
|
||||||
|
utils.setInputValue("#input-settings-pdf-page-size", settings.pdfPageSize);
|
||||||
// SSH proxy
|
// SSH proxy
|
||||||
utils.setInputValue("#input-settings-ssh-proxy", settings.sshProxy);
|
utils.setInputValue("#input-settings-ssh-proxy", settings.sshProxy);
|
||||||
|
|
||||||
@ -165,7 +167,9 @@ define([
|
|||||||
// Template
|
// Template
|
||||||
newSettings.template = utils.getInputTextValue("#textarea-settings-publish-template", event);
|
newSettings.template = utils.getInputTextValue("#textarea-settings-publish-template", event);
|
||||||
// PDF template
|
// PDF template
|
||||||
newSettings.pdfTemplate = utils.getInputTextValue("#textarea-settings-publish-pdf-template", event);
|
newSettings.pdfTemplate = utils.getInputTextValue("#textarea-settings-pdf-template", event);
|
||||||
|
// PDF page size
|
||||||
|
newSettings.pdfPageSize = utils.getInputValue("#input-settings-pdf-page-size");
|
||||||
// SSH proxy
|
// SSH proxy
|
||||||
newSettings.sshProxy = utils.checkUrl(utils.getInputTextValue("#input-settings-ssh-proxy", event), true);
|
newSettings.sshProxy = utils.checkUrl(utils.getInputTextValue("#input-settings-ssh-proxy", event), true);
|
||||||
|
|
||||||
|
@ -983,14 +983,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-4 control-label"
|
<label class="col-lg-4 control-label"
|
||||||
for="textarea-settings-publish-pdf-template">PDF
|
for="textarea-settings-pdf-template">PDF
|
||||||
template <a href="#" class="tooltip-template">(?)</a>
|
template <a href="#" class="tooltip-template">(?)</a>
|
||||||
</label>
|
</label>
|
||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<textarea id="textarea-settings-publish-pdf-template"
|
<textarea id="textarea-settings-pdf-template"
|
||||||
class="form-control"></textarea>
|
class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-4 control-label" for="input-settings-pdf-page-size">PDF page size</label>
|
||||||
|
<div class="col-lg-7">
|
||||||
|
<select id="input-settings-pdf-page-size" class="form-control">
|
||||||
|
<option value="A3">A3</option>
|
||||||
|
<option value="A4">A4</option>
|
||||||
|
<option value="Legal">Legal</option>
|
||||||
|
<option value="Letter">Letter</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-4 control-label"
|
<label class="col-lg-4 control-label"
|
||||||
for="input-settings-publish-commit-msg">GitHub commit message</label>
|
for="input-settings-publish-commit-msg">GitHub commit message</label>
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
<dt>About:</dt>
|
<dt>About:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a target="_blank" href="https://github.com/benweet/stackedit/">GitHub
|
<a target="_blank" href="https://github.com/benweet/stackedit/">GitHub
|
||||||
project</a>/
|
project</a> /
|
||||||
<a target="_blank" href="https://github.com/benweet/stackedit/issues">issue
|
<a target="_blank" href="https://github.com/benweet/stackedit/issues">issue
|
||||||
tracker</a>
|
tracker</a>
|
||||||
<br />
|
<br />
|
||||||
<a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg">Chrome
|
<a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg">Chrome
|
||||||
app</a>(thanks for your review!)
|
app</a> (thanks for your review!)
|
||||||
<br />
|
<br />
|
||||||
<a target="_blank" href="https://twitter.com/stackedit/">Follow on Twitter</a>
|
<a target="_blank" href="https://twitter.com/stackedit/">Follow on Twitter</a>
|
||||||
<br />
|
<br />
|
||||||
|
@ -336,6 +336,7 @@ define([
|
|||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', HTMLTOPDF_URL, true);
|
xhr.open('POST', HTMLTOPDF_URL, true);
|
||||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||||
|
xhr.setRequestHeader('page-size', settings.pdfPageSize);
|
||||||
xhr.responseType = 'blob';
|
xhr.responseType = 'blob';
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if(this.readyState == 4) {
|
if(this.readyState == 4) {
|
||||||
|
@ -48,6 +48,7 @@ define([
|
|||||||
'<body class="pdf"><%= documentHTML %></body>\n',
|
'<body class="pdf"><%= documentHTML %></body>\n',
|
||||||
'</html>'
|
'</html>'
|
||||||
].join(""),
|
].join(""),
|
||||||
|
pdfPageSize: 'A4',
|
||||||
sshProxy: SSH_PROXY_URL,
|
sshProxy: SSH_PROXY_URL,
|
||||||
shortcuts: {},
|
shortcuts: {},
|
||||||
extensionSettings: {}
|
extensionSettings: {}
|
||||||
|
@ -1217,14 +1217,13 @@ div.dropdown-menu textarea {
|
|||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
margin-right: 3px;
|
margin-right: 2px;
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
.file-title-navbar & {
|
.file-title-navbar & {
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
margin-left: -4px;
|
margin-left: -4px;
|
||||||
margin-right: 4px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user