Multiple fixes

This commit is contained in:
benweet 2014-05-28 00:36:37 +01:00
parent 580fd66b15
commit c64d32a1a3
6 changed files with 130 additions and 93 deletions

View File

@ -8,7 +8,7 @@
</head> </head>
<body><div class="container"><h1 id="stackedit-privacy-policy">StackEdit — Privacy Policy</h1> <body><div class="container"><h1 id="stackedit-privacy-policy">StackEdit — Privacy Policy</h1>
<p>This Privacy Policy governs the manner in which StackEdit collects, uses, maintains and discloses information collected from users (each, a “User”) of the stackedit.io website (“Site”). This privacy policy applies to the Site and all products and services offered by StackEdit.</p><div class="se-section-delimiter"></div> <p>This Privacy Policy governs the manner in which StackEdit collects, uses, maintains and discloses information collected from users (each, a “User”) of the stackedit.io website (“Site”). This privacy policy applies to the Site and all products and services offered by StackEdit.</p>
<h3 id="personal-identification-information">Personal identification information</h3> <h3 id="personal-identification-information">Personal identification information</h3>

View File

@ -769,20 +769,18 @@ define([
}); });
var action = function(action, options) { var action = function(action, options) {
options = options || {};
var textContent = getValue(); var textContent = getValue();
var selectionStart = options.start || selectionMgr.selectionStart; var min = Math.min(selectionMgr.selectionStart, selectionMgr.selectionEnd);
var selectionEnd = options.end || selectionMgr.selectionEnd; var max = Math.max(selectionMgr.selectionStart, selectionMgr.selectionEnd);
var state = { var state = {
selectionStart: selectionStart, selectionStart: min,
selectionEnd: selectionEnd, selectionEnd: max,
before: textContent.slice(0, selectionStart), before: textContent.slice(0, min),
after: textContent.slice(selectionEnd), after: textContent.slice(max),
selection: textContent.slice(selectionStart, selectionEnd) selection: textContent.slice(min, max)
}; };
actions[action](state, options); actions[action](state, options || {});
setValue(state.before + state.selection + state.after); setValue(state.before + state.selection + state.after);
selectionMgr.setSelectionStartEnd(state.selectionStart, state.selectionEnd); selectionMgr.setSelectionStartEnd(state.selectionStart, state.selectionEnd);
selectionMgr.updateSelectionRange(); selectionMgr.updateSelectionRange();

View File

@ -13,33 +13,13 @@ define([
var umlDiagrams = new Extension("umlDiagrams", "UML Diagrams", true); var umlDiagrams = new Extension("umlDiagrams", "UML Diagrams", true);
umlDiagrams.settingsBlock = umlDiagramsSettingsBlockHTML; umlDiagrams.settingsBlock = umlDiagramsSettingsBlockHTML;
var eventMgr; umlDiagrams.onPagedownConfigure = function(editor) {
umlDiagrams.onEventMgrCreated = function(eventMgrParameter) { var previewContentsElt = document.getElementById('preview-contents');
eventMgr = eventMgrParameter; editor.hooks.chain("onPreviewRefresh", function() {
}; _.each(previewContentsElt.querySelectorAll('.prettyprint > .language-sequence'), function(elt) {
var previewContentsElt;
umlDiagrams.onReady = function() {
previewContentsElt = document.getElementById('preview-contents');
};
var onAsyncPreview = function(cb) {
cb();
};
umlDiagrams.onAsyncPreview = function(cb) {
onAsyncPreview(cb);
};
umlDiagrams.onInit = function() {
var sequenceDiagramEltList, flowChartEltList;
function doSequenceDiagram(cb) {
if(sequenceDiagramEltList.length === 0) {
return cb();
}
var sequenceDiagramElt = sequenceDiagramEltList.pop();
try { try {
var diagram = sequenceDiagram.parse(sequenceDiagramElt.textContent); var diagram = sequenceDiagram.parse(elt.textContent);
var preElt = sequenceDiagramElt.parentNode; var preElt = elt.parentNode;
var containerElt = crel('div', { var containerElt = crel('div', {
class: 'sequence-diagram' class: 'sequence-diagram'
}); });
@ -50,17 +30,11 @@ define([
} }
catch(e) { catch(e) {
} }
_.delay(doSequenceDiagram, 0, cb); });
} _.each(previewContentsElt.querySelectorAll('.prettyprint > .language-flow'), function(elt) {
function doFlowChart(cb) {
if(flowChartEltList.length === 0) {
return cb();
}
var flowChartElt = flowChartEltList.pop();
try { try {
var chart = flowChart.parse(flowChartElt.textContent); var chart = flowChart.parse(elt.textContent);
var preElt = flowChartElt.parentNode; var preElt = elt.parentNode;
var containerElt = crel('div', { var containerElt = crel('div', {
class: 'flow-chart' class: 'flow-chart'
}); });
@ -71,21 +45,9 @@ define([
} }
catch(e) { catch(e) {
} }
_.delay(doFlowChart, 0, cb);
}
var afterDiagrams = onAsyncPreview;
onAsyncPreview = function(cb) {
sequenceDiagramEltList = Array.prototype.slice.call(previewContentsElt.querySelectorAll('.prettyprint > .language-sequence'));
flowChartEltList = Array.prototype.slice.call(previewContentsElt.querySelectorAll('.prettyprint > .language-flow'));
_.delay(doSequenceDiagram, 0, function() {
_.delay(doFlowChart, 0, function() {
afterDiagrams(cb);
}); });
}); });
}; };
};
return umlDiagrams; return umlDiagrams;
}); });

View File

@ -100,15 +100,6 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label"
for="input-markdownextra-diagrams">Diagrams <a href="#" class="tooltip-markdown-extra-diagrams">(?)</a></label>
<div class="col-sm-7">
<div class="checkbox">
<input type="checkbox" id="input-markdownextra-diagrams">
</div>
</div>
</div>
</div> </div>
<span class="help-block pull-right"><a target="_blank" <span class="help-block pull-right"><a target="_blank"
href="https://github.com/jmcmanus/pagedown-extra">More info</a></span> href="https://github.com/jmcmanus/pagedown-extra">More info</a></span>

View File

@ -1,8 +1,92 @@
@import "../bower-libs/bootstrap/less/bootstrap.less"; // Core variables and mixins
@import (less) "../bower-libs/google-code-prettify/src/prettify.css"; @import "../bower-libs/bootstrap/less/variables.less";
@import "../bower-libs/bootstrap/less/mixins.less";
// Reset
@import "../bower-libs/bootstrap/less/normalize.less";
// Core CSS
@import "../bower-libs/bootstrap/less/scaffolding.less";
@import "../bower-libs/bootstrap/less/type.less";
@import "../bower-libs/bootstrap/less/code.less";
@import "../bower-libs/bootstrap/less/grid.less";
@import "../bower-libs/bootstrap/less/tables.less";
@import "../bower-libs/bootstrap/less/forms.less";
@import "../bower-libs/bootstrap/less/buttons.less";
// Components
@import "../bower-libs/bootstrap/less/component-animations.less";
@import "../bower-libs/bootstrap/less/glyphicons.less";
@import "../bower-libs/bootstrap/less/dropdowns.less";
@import "../bower-libs/bootstrap/less/button-groups.less";
@import "../bower-libs/bootstrap/less/input-groups.less";
@import "../bower-libs/bootstrap/less/navs.less";
@import "../bower-libs/bootstrap/less/navbar.less";
@import "../bower-libs/bootstrap/less/breadcrumbs.less";
@import "../bower-libs/bootstrap/less/pagination.less";
@import "../bower-libs/bootstrap/less/pager.less";
@import "../bower-libs/bootstrap/less/labels.less";
@import "../bower-libs/bootstrap/less/badges.less";
@import "../bower-libs/bootstrap/less/jumbotron.less";
@import "../bower-libs/bootstrap/less/thumbnails.less";
@import "../bower-libs/bootstrap/less/alerts.less";
@import "../bower-libs/bootstrap/less/progress-bars.less";
@import "../bower-libs/bootstrap/less/media.less";
@import "../bower-libs/bootstrap/less/list-group.less";
@import "../bower-libs/bootstrap/less/panels.less";
@import "../bower-libs/bootstrap/less/wells.less";
@import "../bower-libs/bootstrap/less/close.less";
// Components w/ JavaScript
@import "../bower-libs/bootstrap/less/modals.less";
@import "../bower-libs/bootstrap/less/tooltip.less";
@import "../bower-libs/bootstrap/less/popovers.less";
// Utility classes
@import "../bower-libs/bootstrap/less/utilities.less";
@import (less) "../libs/highlight/styles/default.css"; @import (less) "../libs/highlight/styles/default.css";
@import (less) "../libs/fontello/css/fontello.css"; @import (less) "../libs/fontello/css/fontello.css";
/* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln { color: #000 } /* plain text */
.str { color: #080 } /* string content */
.kwd { color: #008 } /* a keyword */
.com { color: #800 } /* a comment */
.typ { color: #606 } /* a type name */
.lit { color: #066 } /* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun, .opn, .clo { color: #660 }
.tag { color: #008 } /* a markup tag name */
.atn { color: #606 } /* a markup attribute name */
.atv { color: #080 } /* a markup attribute value */
.dec, .var { color: #606 } /* a declaration; a variable name */
.fun { color: red } /* a function name */
/* Put a border around prettyprinted code snippets. */
pre.prettyprint { padding: 2px; border: 1px solid #888 }
/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: none }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 { background: #eee }
@body-bg: #fff; @body-bg: #fff;
@text-color: #000; @text-color: #000;
@kbd-color: #333; @kbd-color: #333;

View File

@ -1546,6 +1546,7 @@ div.jGrowl {
@media print { @media print {
html, body { html, body {
background: transparent !important;
overflow: visible !important; overflow: visible !important;
} }
@ -1561,6 +1562,7 @@ div.jGrowl {
.layout-wrapper-l3, .layout-wrapper-l3,
.preview-panel, .preview-panel,
.preview-container { .preview-container {
background: transparent !important;
display: block !important; display: block !important;
position: static !important; position: static !important;
overflow: visible !important; overflow: visible !important;