Permalink
Browse files

Updated libraries and added css for base tables

  • Loading branch information...
mtancoigne committed Sep 2, 2016
1 parent 6600992 commit 222db471b50a3ea767a16a6b272727d308969e2e
@@ -232,4 +232,10 @@ Margin helpers
}
.margin-left-lg{
margin-left: $padding-large-horizontal;
}
.page-content table{
@extend .table;
@extend .table-condensed;
@extend .table-striped;
}
View

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -592,8 +592,12 @@
var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
var gutterW = display.gutters.offsetWidth, left = comp + "px";
for (var i = 0; i < view.length; i++) if (!view[i].hidden) {
if (cm.options.fixedGutter && view[i].gutter)
view[i].gutter.style.left = left;
if (cm.options.fixedGutter) {
if (view[i].gutter)
view[i].gutter.style.left = left;
if (view[i].gutterBackground)
view[i].gutterBackground.style.left = left;
}
var align = view[i].alignable;
if (align) for (var j = 0; j < align.length; j++)
align[j].style.left = left;
@@ -1149,7 +1153,7 @@
}
function handlePaste(e, cm) {
var pasted = e.clipboardData && e.clipboardData.getData("text/plain");
var pasted = e.clipboardData && e.clipboardData.getData("Text");
if (pasted) {
e.preventDefault();
if (!cm.isReadOnly() && !cm.options.disableInput)
@@ -1193,10 +1197,10 @@
return {text: text, ranges: ranges};
}
function disableBrowserMagic(field) {
function disableBrowserMagic(field, spellcheck) {
field.setAttribute("autocorrect", "off");
field.setAttribute("autocapitalize", "off");
field.setAttribute("spellcheck", "false");
field.setAttribute("spellcheck", !!spellcheck);
}
// TEXTAREA INPUT STYLE
@@ -1574,10 +1578,14 @@
init: function(display) {
var input = this, cm = input.cm;
var div = input.div = display.lineDiv;
disableBrowserMagic(div);
disableBrowserMagic(div, cm.options.spellcheck);
on(div, "paste", function(e) {
if (!signalDOMEvent(cm, e)) handlePaste(e, cm);
if (signalDOMEvent(cm, e) || handlePaste(e, cm)) return
// IE doesn't fire input events, so we schedule a read for the pasted content in this way
if (ie_version <= 11) setTimeout(operation(cm, function() {
if (!input.pollContent()) regChange(cm);
}), 20)
})
on(div, "compositionstart", function(e) {
@@ -1637,23 +1645,27 @@
});
}
}
// iOS exposes the clipboard API, but seems to discard content inserted into it
if (e.clipboardData && !ios) {
e.preventDefault();
if (e.clipboardData) {
e.clipboardData.clearData();
e.clipboardData.setData("text/plain", lastCopied.text.join("\n"));
} else {
// Old-fashioned briefly-focus-a-textarea hack
var kludge = hiddenTextarea(), te = kludge.firstChild;
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
te.value = lastCopied.text.join("\n");
var hadFocus = document.activeElement;
selectInput(te);
setTimeout(function() {
cm.display.lineSpace.removeChild(kludge);
hadFocus.focus();
}, 50);
var content = lastCopied.text.join("\n")
// iOS exposes the clipboard API, but seems to discard content inserted into it
e.clipboardData.setData("Text", content);
if (e.clipboardData.getData("Text") == content) {
e.preventDefault();
return
}
}
// Old-fashioned briefly-focus-a-textarea hack
var kludge = hiddenTextarea(), te = kludge.firstChild;
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
te.value = lastCopied.text.join("\n");
var hadFocus = document.activeElement;
selectInput(te);
setTimeout(function() {
cm.display.lineSpace.removeChild(kludge);
hadFocus.focus();
if (hadFocus == div) input.showPrimarySelection()
}, 50);
}
on(div, "copy", onCopyCut);
on(div, "cut", onCopyCut);
@@ -1961,7 +1973,7 @@
if (found)
return badPos(Pos(found.line, found.ch + dist), bad);
else
dist += after.textContent.length;
dist += before.textContent.length;
}
}
@@ -4948,7 +4960,10 @@
addOverlay: methodOp(function(spec, options) {
var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
if (mode.startState) throw new Error("Overlays may not be stateful.");
this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});
insertSorted(this.state.overlays,
{mode: mode, modeSpec: spec, opaque: options && options.opaque,
priority: (options && options.priority) || 0},
function(overlay) { return overlay.priority })
this.state.modeGen++;
regChange(this);
}),
@@ -5420,6 +5435,9 @@
option("inputStyle", mobile ? "contenteditable" : "textarea", function() {
throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME
}, true);
option("spellcheck", false, function(cm, val) {
cm.getInputField().spellcheck = val
}, true);
option("rtlMoveVisually", !windows);
option("wholeLineUpdateBefore", true);
@@ -5529,6 +5547,8 @@
spec.name = found.name;
} else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
return CodeMirror.resolveMode("application/xml");
} else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
return CodeMirror.resolveMode("application/json");
}
if (typeof spec == "string") return {name: spec};
else return spec || {name: "null"};
@@ -7958,7 +7978,7 @@
}
// Register a change in the history. Merges changes that are within
// a single operation, ore are close together with an origin that
// a single operation, or are close together with an origin that
// allows merging (starting with "+") into a single event.
function addChangeToHistory(doc, change, selAfter, opId) {
var hist = doc.history;
@@ -8361,6 +8381,12 @@
return out;
}
function insertSorted(array, value, score) {
var pos = 0, priority = score(value)
while (pos < array.length && score(array[pos]) <= priority) pos++
array.splice(pos, 0, value)
}
function nothing() {}
function createObj(base, props) {
@@ -8929,7 +8955,7 @@
// THE END
CodeMirror.version = "5.17.0";
CodeMirror.version = "5.18.2";
return CodeMirror;
});
@@ -102,8 +102,10 @@
}
CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
if (old && old != CodeMirror.Init)
if (old && old != CodeMirror.Init) {
cm.off("cursorActivity", doMatchBrackets);
if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}
}
if (val) {
cm.state.matchBrackets = typeof val == "object" ? val : {};
cm.on("cursorActivity", doMatchBrackets);

0 comments on commit 222db47

Please sign in to comment.