Prepare release

This commit is contained in:
benweet 2014-01-13 01:39:28 +00:00
parent 86c58f4cf1
commit 498ec93a8c
10 changed files with 62 additions and 36 deletions

View File

@ -2,7 +2,7 @@
<html manifest="cache.manifest">
<head>
<title>StackEdit *smart* markdown editor</title>
<title>StackEdit *smart* markdown editor</title>
<link rel="canonical" href="https://stackedit.io/">
<link rel="icon" href="res-min/img/stackedit-32.ico" type="image/x-icon">
<link rel="shortcut icon" href="res-min/img/stackedit-32.ico" type="image/x-icon">

View File

@ -967,6 +967,9 @@ define([
$(".action-default-settings").click(function() {
storage.removeItem("settings");
storage.removeItem("theme");
if(!settings.dropboxFullAccess) {
storage.removeItem('dropbox.lastChangeId');
}
window.location.reload();
});

View File

@ -282,19 +282,24 @@ define([
// Set checkbox event listeners
$(documentListElt.querySelectorAll('[type=checkbox]')).change(doActiveButtons);
// Open root folder by default
$(documentListElt.querySelectorAll('.root-folder')).click();
}, 50);
documentManager.onFileCreated = refreshManager;
documentManager.onFileDeleted = refreshManager;
documentManager.onTitleChanged = refreshManager;
documentManager.onSyncExportSuccess = refreshManager;
documentManager.onSyncRemoved = refreshManager;
documentManager.onNewPublishSuccess = refreshManager;
documentManager.onPublishRemoved = refreshManager;
documentManager.onFoldersChanged = refreshManager;
documentManager.onTitleChanged = function(fileDesc) {
if(isVisible === false) {
return;
}
$(documentListElt).find('[data-file-index="' + fileDesc.fileIndex + '"] .name').html(fileDesc.composeTitle()).removeClass('hide');
$(documentListElt.querySelectorAll('.input-rename')).addClass('hide');
};
documentManager.onReady = function() {
modalElt = document.querySelector('.modal-document-manager');
documentListElt = modalElt.querySelector('.list-group.document-list');
@ -307,8 +312,13 @@ define([
$(modalElt).on('show.bs.modal', function() {
isVisible = true;
refreshManager();
// Open root folder
setTimeout(function() {
$(documentListElt.querySelectorAll('.root-folder')).click();
}, 250);
}).on('hide.bs.modal', function() {
isVisible = false;
documentListElt.innerHTML = '';
});
// Create folder action
@ -329,16 +339,18 @@ define([
eventMgr.onFoldersChanged();
// Edit the name when folder has just been created
var renameButtonElt = $(modalElt.querySelector('[data-folder-index="' + folderIndex + '"] .button-rename')).click();
modalElt.scrollTop += renameButtonElt.offset().top - 50;
setTimeout(function() {
var renameButtonElt = $(modalElt.querySelector('[data-folder-index="' + folderIndex + '"] .button-rename')).click();
modalElt.scrollTop += renameButtonElt.offset().top - 50;
}, 60);
});
// Selection dropdown menu actions
$(modalElt.querySelectorAll('.action-select-all')).click(function() {
$(documentListElt.querySelectorAll('input[type="checkbox"]')).prop('checked', true);
$(documentListElt.querySelectorAll('input[type="checkbox"]')).prop('checked', true).change();
});
$(modalElt.querySelectorAll('.action-unselect-all')).click(function() {
$(documentListElt.querySelectorAll('input[type="checkbox"]')).prop('checked', false);
$(documentListElt.querySelectorAll('input[type="checkbox"]')).prop('checked', false).change();
});
// Delete selection actions

View File

@ -19,7 +19,7 @@ define([
}
var title = fileDesc.title;
document.title = "StackEdit " + title;
document.title = "StackEdit " + title;
$fileTitleNavbar.html(fileDesc.composeTitle());
$(".file-title").text(title);
$(".input-file-title").val(title);

View File

@ -183,11 +183,12 @@ define([
lastPreviewScrollTop = previewScrollTop;
return;
}
$previewElt.stop(true).animate({
$previewElt.stop('scrollLinkFx', true).animate({
scrollTop: destScrollTop
}, {
easing: 'easeOutSine',
duration: 200,
queue: 'scrollLinkFx',
step: function(now) {
isPreviewMoving = true;
lastPreviewScrollTop = previewScrollTop + now;
@ -197,7 +198,7 @@ define([
isPreviewMoving = false;
});
},
});
}).dequeue('scrollLinkFx');
}
else if(isScrollPreview === true) {
if(Math.abs(previewScrollTop - lastPreviewScrollTop) <= 9) {
@ -227,11 +228,12 @@ define([
return;
}
if(window.lightMode) {
$textareaElt.stop(true).animate({
$textareaElt.stop('scrollLinkFx', true).animate({
scrollTop: destScrollTop
}, {
easing: 'easeOutSine',
duration: 200,
queue: 'scrollLinkFx',
step: function(now) {
isEditorMoving = true;
lastEditorScrollTop = editorScrollTop + now;
@ -241,14 +243,15 @@ define([
isEditorMoving = false;
});
},
});
}).dequeue('scrollLinkFx');
}
else {
scrollingHelper.stop(true).css('value', 0).animate({
scrollingHelper.stop('scrollLinkFx', true).css('value', 0).animate({
value: destScrollTop - editorScrollTop
}, {
easing: 'easeOutSine',
duration: 200,
queue: 'scrollLinkFx',
step: function(now) {
isEditorMoving = true;
lastEditorScrollTop = editorScrollTop + now;
@ -259,7 +262,7 @@ define([
isEditorMoving = false;
});
},
});
}).dequeue('scrollLinkFx');
}
}
}, 100);

View File

@ -33,7 +33,7 @@ define([
});
setTimeout(function() {
tooltip.tooltip('hide').removeClass('info-tooltip');
}, 30000);
}, 15000);
},
template: [
'<div class="popover tour">',

View File

@ -51,7 +51,9 @@ var MarkdownHighlightRules = function() {
token: "markup.heading.multi.2",
regex: "^\\-+(?=\\s*$)"
}, {
token : "constant.language.escape",
token : function(value) {
return "markup.heading." + value.length;
},
regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
next : "header"
},

View File

@ -38,15 +38,11 @@ define([
'<head>\n',
'<meta charset="utf-8">\n',
'<title><%= documentTitle %></title>\n',
'<link rel="stylesheet" href="',
constants.MAIN_URL,
'res-min/themes/base.css" />\n',
'<link rel="stylesheet" href="file:///app/stackedit/public/res-min/themes/base.css" />\n',
'<script type="text/x-mathjax-config">\n',
'MathJax.Hub.Config({ messageStyle: "none" });\n',
'</script>\n',
'<script type="text/javascript" src="',
constants.MAIN_URL,
'libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
'<script type="text/javascript" src="file:///app/stackedit/public/libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
'</head>\n',
'<body class="pdf"><%= documentHTML %></body>\n',
'</html>'

View File

@ -250,6 +250,16 @@ define([
version = "v16";
}
// Upgrade from v16 to v17
if(version == "v16") {
if(_.has(localStorage, 'settings')) {
settings = JSON.parse(localStorage.settings);
settings.pdfTemplate && (settings.pdfTemplate = settings.pdfTemplate.replace(/https:\/\/stackedit.io/g, 'file:///app/stackedit/public'));
localStorage.settings = JSON.stringify(settings);
}
version = "v17";
}
localStorage.version = version;
return localStorage;
});

View File

@ -18,44 +18,44 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url("../font/opensans-light-webfont.woff") format('woff');
src: local('Open Sans Light'), local('OpenSans-Light'), url("../font/OpenSans-Light-webfont.woff") format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url("../font/opensans-regular-webfont.woff") format('woff');
src: local('Open Sans'), local('OpenSans'), url("../font/OpenSans-Regular-webfont.woff") format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url("../font/opensans-bold-webfont.woff") format('woff');
src: local('Open Sans Bold'), local('OpenSans-Bold'), url("../font/OpenSans-Bold-webfont.woff") format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url("../font/opensans-lightitalic-webfont.woff") format('woff');
src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url("../font/OpenSans-LightItalic-webfont.woff") format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: local('Open Sans Italic'), local('OpenSans-Italic'), url("../font/opensans-italic-webfont.woff") format('woff');
src: local('Open Sans Italic'), local('OpenSans-Italic'), url("../font/OpenSans-Italic-webfont.woff") format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url("../font/opensans-bolditalic-webfont.woff") format('woff');
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url("../font/OpenSans-BoldItalic-webfont.woff") format('woff');
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url('../font/opensans-light-webfont.svg') format('svg');
src: local('Open Sans Light'), local('OpenSans-Light'), url('../font/OpenSans-Light-webfont.svg') format('svg');
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@ -63,7 +63,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url('../font/opensans-regular-webfont.svg') format('svg');
src: local('Open Sans'), local('OpenSans'), url('../font/OpenSans-Regular-webfont.svg') format('svg');
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@ -71,7 +71,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../font/opensans-bold-webfont.svg') format('svg');
src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../font/OpenSans-Bold-webfont.svg') format('svg');
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@ -79,7 +79,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url('../font/opensans-lightitalic-webfont.svg') format('svg');
src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url('../font/OpenSans-LightItalic-webfont.svg') format('svg');
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@ -87,7 +87,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: local('Open Sans Italic'), local('OpenSans-Italic'), url('../font/opensans-italic-webfont.svg') format('svg');
src: local('Open Sans Italic'), local('OpenSans-Italic'), url('../font/OpenSans-Italic-webfont.svg') format('svg');
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@ -95,7 +95,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('../font/opensans-bolditalic-webfont.svg') format('svg');
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('../font/OpenSans-BoldItalic-webfont.svg') format('svg');
}
}