code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function iterateBidiSections(order, from, to, f) {
if (!order) return f(from, to, "ltr");
var found = false;
for (var i = 0; i < order.length; ++i) {
var part = order[i];
if (part.from < to && part.to > from || from == to && part.to == from) {
f(Math.max(part.from, from), Math.min(part.t... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | iterateBidiSections | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function lineRight(line) {
var order = getOrder(line);
if (!order) return line.text.length;
return bidiRight(lst(order));
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | lineRight | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function lineStart(cm, lineN) {
var line = getLine(cm.doc, lineN);
var visual = visualLine(line);
if (visual != line) lineN = lineNo(visual);
var order = getOrder(visual);
var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
return Pos(lineN, ch);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | lineStart | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function lineEnd(cm, lineN) {
var merged, line = getLine(cm.doc, lineN);
while (merged = collapsedSpanAtEnd(line)) {
line = merged.find(1, true).line;
lineN = null;
}
var order = getOrder(line);
var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | lineEnd | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function lineStartSmart(cm, pos) {
var start = lineStart(cm, pos.line);
var line = getLine(cm.doc, start.line);
var order = getOrder(line);
if (!order || order[0].level == 0) {
var firstNonWS = Math.max(0, line.text.search(/\S/));
var inWS = pos.line == start.line && pos.ch <= firstNonWS && ... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | lineStartSmart | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function compareBidiLevel(order, a, b) {
var linedir = order[0].level;
if (a == linedir) return true;
if (b == linedir) return false;
return a < b;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | compareBidiLevel | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function getBidiPartAt(order, pos) {
bidiOther = null;
for (var i = 0, found; i < order.length; ++i) {
var cur = order[i];
if (cur.from < pos && cur.to > pos) return i;
if ((cur.from == pos || cur.to == pos)) {
if (found == null) {
found = i;
} else if (compareBidiLev... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | getBidiPartAt | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function moveInLine(line, pos, dir, byUnit) {
if (!byUnit) return pos + dir;
do pos += dir;
while (pos > 0 && isExtendingChar(line.text.charAt(pos)));
return pos;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | moveInLine | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function moveVisually(line, start, dir, byUnit) {
var bidi = getOrder(line);
if (!bidi) return moveLogically(line, start, dir, byUnit);
var pos = getBidiPartAt(bidi, start), part = bidi[pos];
var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);
for (;;) {
if (target > pa... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | moveVisually | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function moveLogically(line, start, dir, byUnit) {
var target = start + dir;
if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;
return target < 0 || target > line.text.length ? null : target;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | moveLogically | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function charType(code) {
if (code <= 0xf7) return lowTypes.charAt(code);
else if (0x590 <= code && code <= 0x5f4) return "R";
else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600);
else if (0x6ee <= code && code <= 0x8ac) return "r";
else if (0x2000 <= code && c... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | charType | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function BidiSpan(level, from, to) {
this.level = level;
this.from = from; this.to = to;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | BidiSpan | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function blankLine(state) {
state.code = false;
return null;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | blankLine | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function getMode(name) {
if (CodeMirror.findModeByName) {
var found = CodeMirror.findModeByName(name);
if (found) name = found.mime || found.mimes[0];
}
var mode = CodeMirror.getMode(cmCfg, name);
return mode.name == "null" ? null : mode;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | getMode | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function switchInline(stream, state, f) {
state.f = state.inline = f;
return f(stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | switchInline | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function switchBlock(stream, state, f) {
state.f = state.block = f;
return f(stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | switchBlock | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function lineIsEmpty(line) {
return !line || !/\S/.test(line.string)
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | lineIsEmpty | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function blankLine(state) {
// Reset linkTitle state
state.linkTitle = false;
// Reset EM state
state.em = false;
// Reset STRONG state
state.strong = false;
// Reset strikethrough state
state.strikethrough = false;
// Reset state.quote
state.quote = 0;
// Reset state.indente... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | blankLine | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function blockNormal(stream, state) {
var sol = stream.sol();
var prevLineIsList = state.list !== false,
prevLineIsIndentedCode = state.indentedCode;
state.indentedCode = false;
if (prevLineIsList) {
if (state.indentationDiff >= 0) { // Continued list
if (state.indentationDiff ... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | blockNormal | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function htmlBlock(stream, state) {
var style = htmlMode.token(stream, state.htmlState);
if (!htmlModeMissing) {
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
(!inner.state.context && inner.state.tokenize.isIn... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | htmlBlock | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function local(stream, state) {
if (state.fencedChars && stream.match(state.fencedChars, false)) {
state.localMode = state.localState = null;
state.f = state.block = leavingLocal;
return null;
} else if (state.localMode) {
return state.localMode.token(stream, state.localState);
} els... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | local | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function leavingLocal(stream, state) {
stream.match(state.fencedChars);
state.block = blockNormal;
state.f = inlineNormal;
state.fencedChars = null;
if (modeCfg.highlightFormatting) state.formatting = "code-block";
state.code = 1
var returnType = getType(state);
state.code = 0
return... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | leavingLocal | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function getType(state) {
var styles = [];
if (state.formatting) {
styles.push(tokenTypes.formatting);
if (typeof state.formatting === "string") state.formatting = [state.formatting];
for (var i = 0; i < state.formatting.length; i++) {
styles.push(tokenTypes.formatting + "-" + state... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | getType | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function handleText(stream, state) {
if (stream.match(textRE, true)) {
return getType(state);
}
return undefined;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | handleText | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function inlineNormal(stream, state) {
var style = state.text(stream, state);
if (typeof style !== 'undefined')
return style;
if (state.list) { // List marker (*, +, -, 1., etc)
state.list = null;
return getType(state);
}
if (state.taskList) {
var taskOpen = stream.match(ta... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | inlineNormal | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function linkInline(stream, state) {
var ch = stream.next();
if (ch === ">") {
state.f = state.inline = inlineNormal;
if (modeCfg.highlightFormatting) state.formatting = "link";
var type = getType(state);
if (type){
type += " ";
} else {
type = "";
}
re... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | linkInline | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function linkHref(stream, state) {
// Check if space, and return NULL if so (to avoid marking the space)
if(stream.eatSpace()){
return null;
}
var ch = stream.next();
if (ch === '(' || ch === '[') {
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]", 0);
if (modeCfg.... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | linkHref | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function getLinkHrefInside(endChar) {
return function(stream, state) {
var ch = stream.next();
if (ch === endChar) {
state.f = state.inline = inlineNormal;
if (modeCfg.highlightFormatting) state.formatting = "link-string";
var returnState = getType(state);
state.linkHref... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | getLinkHrefInside | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function footnoteLink(stream, state) {
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
state.f = footnoteLinkInside;
stream.next(); // Consume [
if (modeCfg.highlightFormatting) state.formatting = "link";
state.linkText = true;
return getType(state);
}
return switchInline(stre... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | footnoteLink | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function footnoteLinkInside(stream, state) {
if (stream.match(/^\]:/, true)) {
state.f = state.inline = footnoteUrl;
if (modeCfg.highlightFormatting) state.formatting = "link";
var returnType = getType(state);
state.linkText = false;
return returnType;
}
stream.match(/^([^\]\\... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | footnoteLinkInside | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function footnoteUrl(stream, state) {
// Check if space, and return NULL if so (to avoid marking the space)
if(stream.eatSpace()){
return null;
}
// Match URL
stream.match(/^[^\s]+/, true);
// Check for link title
if (stream.peek() === undefined) { // End of line, set flag to check nex... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | footnoteUrl | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function inText(stream, state) {
function chain(parser) {
state.tokenize = parser;
return parser(stream, state);
}
var ch = stream.next();
if (ch == "<") {
if (stream.eat("!")) {
if (stream.eat("[")) {
if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | inText | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function chain(parser) {
state.tokenize = parser;
return parser(stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | chain | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function inTag(stream, state) {
var ch = stream.next();
if (ch == ">" || (ch == "/" && stream.eat(">"))) {
state.tokenize = inText;
type = ch == ">" ? "endTag" : "selfcloseTag";
return "tag bracket";
} else if (ch == "=") {
type = "equals";
return null;
} else if (ch == "<"... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | inTag | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function inAttribute(quote) {
var closure = function(stream, state) {
while (!stream.eol()) {
if (stream.next() == quote) {
state.tokenize = inTag;
break;
}
}
return "string";
};
closure.isInAttribute = true;
return closure;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | inAttribute | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
closure = function(stream, state) {
while (!stream.eol()) {
if (stream.next() == quote) {
state.tokenize = inTag;
break;
}
}
return "string";
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | closure | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function inBlock(style, terminator) {
return function(stream, state) {
while (!stream.eol()) {
if (stream.match(terminator)) {
state.tokenize = inText;
break;
}
stream.next();
}
return style;
};
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | inBlock | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function doctype(depth) {
return function(stream, state) {
var ch;
while ((ch = stream.next()) != null) {
if (ch == "<") {
state.tokenize = doctype(depth + 1);
return state.tokenize(stream, state);
} else if (ch == ">") {
if (depth == 1) {
state.... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | doctype | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function Context(state, tagName, startOfLine) {
this.prev = state.context;
this.tagName = tagName;
this.indent = state.indented;
this.startOfLine = startOfLine;
if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
this.noIndent = true;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | Context | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function popContext(state) {
if (state.context) state.context = state.context.prev;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | popContext | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function maybePopContext(state, nextTagName) {
var parentTagName;
while (true) {
if (!state.context) {
return;
}
parentTagName = state.context.tagName;
if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
!config.contextGrabbers[parentTagName].hasOwnProperty(nex... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | maybePopContext | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function baseState(type, stream, state) {
if (type == "openTag") {
state.tagStart = stream.column();
return tagNameState;
} else if (type == "closeTag") {
return closeTagNameState;
} else {
return baseState;
}
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | baseState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function tagNameState(type, stream, state) {
if (type == "word") {
state.tagName = stream.current();
setStyle = "tag";
return attrState;
} else {
setStyle = "error";
return tagNameState;
}
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | tagNameState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function closeTagNameState(type, stream, state) {
if (type == "word") {
var tagName = stream.current();
if (state.context && state.context.tagName != tagName &&
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
popContext(state);
if ((state.context && state.context.t... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | closeTagNameState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function closeState(type, _stream, state) {
if (type != "endTag") {
setStyle = "error";
return closeState;
}
popContext(state);
return baseState;
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | closeState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function closeStateErr(type, stream, state) {
setStyle = "error";
return closeState(type, stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | closeStateErr | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function attrState(type, _stream, state) {
if (type == "word") {
setStyle = "attribute";
return attrEqState;
} else if (type == "endTag" || type == "selfcloseTag") {
var tagName = state.tagName, tagStart = state.tagStart;
state.tagName = state.tagStart = null;
if (type == "selfclos... | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | attrState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function attrEqState(type, stream, state) {
if (type == "equals") return attrValueState;
if (!config.allowMissing) setStyle = "error";
return attrState(type, stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | attrEqState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function attrValueState(type, stream, state) {
if (type == "string") return attrContinuedState;
if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
setStyle = "error";
return attrState(type, stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | attrValueState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function attrContinuedState(type, stream, state) {
if (type == "string") return attrContinuedState;
return attrState(type, stream, state);
} | Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | attrContinuedState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function addWord(word, rules) {
// Some dictionaries will list the same word multiple times with different rule sets.
if (!(word in dictionaryTable) || typeof dictionaryTable[word] != 'object') {
dictionaryTable[word] = [];
}
dictionaryTable[word].push(rules);
} | Parses the words out from the .dic file.
@param {String} data The data from the dictionary file.
@returns object The lookup table containing all of the words and
word forms from the dictionary. | addWord | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function fixShortcut(name) {
if(isMac) {
name = name.replace("Ctrl", "Cmd");
} else {
name = name.replace("Cmd", "Ctrl");
}
return name;
} | Fix shortcut. Mac use Command, others use Ctrl. | fixShortcut | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function getState(cm, pos) {
pos = pos || cm.getCursor("start");
var stat = cm.getTokenAt(pos);
if(!stat.type) return {};
var types = stat.type.split(" ");
var ret = {},
data, text;
for(var i = 0; i < types.length; i++) {
data = types[i];
if(data === "strong") {
ret.bold = true;
} else if(data === "v... | The state of CodeMirror at the given position. | getState | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function toggleFullScreen(editor) {
// Set fullscreen
var cm = editor.codemirror;
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
// Prevent scrolling on body during fullscreen active
if(cm.getOption("fullScreen")) {
saved_overflow = document.body.style.overflow;
document.body.style.overflow = "hidd... | Toggle full screen of the editor. | toggleFullScreen | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function toggleHeadingSmaller(editor) {
var cm = editor.codemirror;
_toggleHeading(cm, "smaller");
} | Action for toggling heading size: normal -> h1 -> h2 -> h3 -> h4 -> h5 -> h6 -> normal | toggleHeadingSmaller | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function toggleHeadingBigger(editor) {
var cm = editor.codemirror;
_toggleHeading(cm, "bigger");
} | Action for toggling heading size: normal -> h6 -> h5 -> h4 -> h3 -> h2 -> h1 -> normal | toggleHeadingBigger | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function cleanBlock(editor) {
var cm = editor.codemirror;
_cleanBlock(cm);
} | Action for clean block (remove headline, list, blockquote code, markers) | cleanBlock | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function isLocalStorageAvailable() {
if(typeof localStorage === "object") {
try {
localStorage.setItem("smde_localStorage", 1);
localStorage.removeItem("smde_localStorage");
} catch(e) {
return false;
}
} else {
return false;
}
return true;
} | Render editor to the given element. | isLocalStorageAvailable | javascript | sparksuite/simplemde-markdown-editor | debug/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.js | MIT |
function fixShortcut(name) {
if(isMac) {
name = name.replace("Ctrl", "Cmd");
} else {
name = name.replace("Cmd", "Ctrl");
}
return name;
} | Fix shortcut. Mac use Command, others use Ctrl. | fixShortcut | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
function getState(cm, pos) {
pos = pos || cm.getCursor("start");
var stat = cm.getTokenAt(pos);
if(!stat.type) return {};
var types = stat.type.split(" ");
var ret = {},
data, text;
for(var i = 0; i < types.length; i++) {
data = types[i];
if(data === "strong") {
ret.bold = true;
} else if(data === "v... | The state of CodeMirror at the given position. | getState | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
function toggleFullScreen(editor) {
// Set fullscreen
var cm = editor.codemirror;
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
// Prevent scrolling on body during fullscreen active
if(cm.getOption("fullScreen")) {
saved_overflow = document.body.style.overflow;
document.body.style.overflow = "hidd... | Toggle full screen of the editor. | toggleFullScreen | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
function toggleHeadingSmaller(editor) {
var cm = editor.codemirror;
_toggleHeading(cm, "smaller");
} | Action for toggling heading size: normal -> h1 -> h2 -> h3 -> h4 -> h5 -> h6 -> normal | toggleHeadingSmaller | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
function toggleHeadingBigger(editor) {
var cm = editor.codemirror;
_toggleHeading(cm, "bigger");
} | Action for toggling heading size: normal -> h6 -> h5 -> h4 -> h3 -> h2 -> h1 -> normal | toggleHeadingBigger | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
function cleanBlock(editor) {
var cm = editor.codemirror;
_cleanBlock(cm);
} | Action for clean block (remove headline, list, blockquote code, markers) | cleanBlock | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
function isLocalStorageAvailable() {
if(typeof localStorage === "object") {
try {
localStorage.setItem("smde_localStorage", 1);
localStorage.removeItem("smde_localStorage");
} catch(e) {
return false;
}
} else {
return false;
}
return true;
} | Render editor to the given element. | isLocalStorageAvailable | javascript | sparksuite/simplemde-markdown-editor | src/js/simplemde.js | https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js | MIT |
App = (props) => {
const listsByPath = require('../utils/lists').listsByPath;
let children = props.children;
// If we're on either a list or an item view
let currentList, currentSection;
if (props.params.listId) {
currentList = listsByPath[props.params.listId];
// If we're on a list path that doesn't exist (e.... | The App component is the component that is rendered around all views, and
contains common things like navigation, footer, etc. | App | javascript | keystonejs/keystone-classic | admin/client/App/App.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/App.js | MIT |
App = (props) => {
const listsByPath = require('../utils/lists').listsByPath;
let children = props.children;
// If we're on either a list or an item view
let currentList, currentSection;
if (props.params.listId) {
currentList = listsByPath[props.params.listId];
// If we're on a list path that doesn't exist (e.... | The App component is the component that is rendered around all views, and
contains common things like navigation, footer, etc. | App | javascript | keystonejs/keystone-classic | admin/client/App/App.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/App.js | MIT |
renderUser() {
const { User, user } = this.props;
if (!user) return null;
return (
<span>
<span> Signed in as </span>
<a
href={`${Keystone.adminPath}/${User.path}/${user.id}`}
tabIndex="-1"
className={css(classes.link)}
>
{user.name}
</a>
<span>.</span>
</span>
);
... | The global Footer, displays a link to the website and the current Keystone
version in use | renderUser | javascript | keystonejs/keystone-classic | admin/client/App/components/Footer/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Footer/index.js | MIT |
render() {
const { backUrl, brand, appversion, version } = this.props;
return (
<footer className={css(classes.footer)} data-keystone-footer>
<Container>
<a href={backUrl} tabIndex="-1" className={css(classes.link)}>
{brand + (appversion ? " " + appversion : "")}
</a>
<span> powered by ... | The global Footer, displays a link to the website and the current Keystone
version in use | render | javascript | keystonejs/keystone-classic | admin/client/App/components/Footer/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Footer/index.js | MIT |
getInitialState () {
return {
barIsVisible: false,
};
} | The mobile navigation, displayed on screens < 768px | getInitialState | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
componentDidMount () {
this.handleResize();
window.addEventListener('resize', this.handleResize);
} | The mobile navigation, displayed on screens < 768px | componentDidMount | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
componentWillUnmount () {
window.removeEventListener('resize', this.handleResize);
} | The mobile navigation, displayed on screens < 768px | componentWillUnmount | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
handleResize () {
this.setState({
barIsVisible: window.innerWidth < 768,
});
} | The mobile navigation, displayed on screens < 768px | handleResize | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
toggleMenu () {
this[this.state.menuIsVisible ? 'hideMenu' : 'showMenu']();
} | The mobile navigation, displayed on screens < 768px | toggleMenu | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
showMenu () {
this.setState({
menuIsVisible: true,
});
// Make the body unscrollable, so you can only scroll in the menu
document.body.style.overflow = 'hidden';
document.body.addEventListener('keyup', this.handleEscapeKey, false);
} | The mobile navigation, displayed on screens < 768px | showMenu | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
hideMenu () {
this.setState({
menuIsVisible: false,
});
// Make the body scrollable again
document.body.style.overflow = null;
document.body.removeEventListener('keyup', this.handleEscapeKey, false);
} | The mobile navigation, displayed on screens < 768px | hideMenu | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
handleEscapeKey (event) {
if (event.which === ESCAPE_KEY_CODE) {
this.hideMenu();
}
} | The mobile navigation, displayed on screens < 768px | handleEscapeKey | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
renderNavigation () {
if (!this.props.sections || !this.props.sections.length) return null;
return this.props.sections.map((section) => {
// Get the link and the classname
const href = section.lists[0].external ? section.lists[0].path : `${Keystone.adminPath}/${section.lists[0].path}`;
const className = (... | The mobile navigation, displayed on screens < 768px | renderNavigation | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
renderBlockout () {
if (!this.state.menuIsVisible) return null;
return <div className="MobileNavigation__blockout" onClick={this.toggleMenu} />;
} | The mobile navigation, displayed on screens < 768px | renderBlockout | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
renderMenu () {
if (!this.state.menuIsVisible) return null;
return (
<nav className="MobileNavigation__menu">
<div className="MobileNavigation__sections">
{this.renderNavigation()}
</div>
</nav>
);
} | The mobile navigation, displayed on screens < 768px | renderMenu | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
render () {
if (!this.state.barIsVisible) return null;
return (
<div className="MobileNavigation">
<div className="MobileNavigation__bar">
<button
type="button"
onClick={this.toggleMenu}
className="MobileNavigation__bar__button MobileNavigation__bar__button--menu"
>
<span c... | The mobile navigation, displayed on screens < 768px | render | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/index.js | MIT |
render () {
return (
<Link
className={this.props.className}
to={this.props.href}
onClick={this.props.onClick}
tabIndex="-1"
>
{this.props.children}
</Link>
);
} | A list item of the mobile navigation | render | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Mobile/ListItem.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Mobile/ListItem.js | MIT |
getInitialState () {
return {};
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | getInitialState | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
componentDidMount () {
this.handleResize();
window.addEventListener('resize', this.handleResize);
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | componentDidMount | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
componentWillUnmount () {
window.removeEventListener('resize', this.handleResize);
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | componentWillUnmount | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
handleResize () {
this.setState({
navIsVisible: window.innerWidth >= 768,
});
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | handleResize | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
renderSignout () {
if (!this.props.signoutUrl) return null;
return (
<PrimaryNavItem
label="octicon-sign-out"
href={this.props.signoutUrl}
title="Sign Out"
>
<span className="octicon octicon-sign-out" />
</PrimaryNavItem>
);
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | renderSignout | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
renderBackButton () {
if (!Keystone.backUrl) return null;
return (
<PrimaryNavItem
label="octicon-globe"
href={Keystone.backUrl}
title={'Front page - ' + this.props.brand}
>
<span className="octicon octicon-globe" />
</PrimaryNavItem>
);
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | renderBackButton | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
renderFrontLink () {
return (
<ul className="app-nav app-nav--primary app-nav--right">
{this.renderBackButton()}
{this.renderSignout()}
</ul>
);
} | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | renderFrontLink | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
renderBrand () {
// TODO: support navbarLogo from keystone config
const { brand, currentSectionKey } = this.props;
const className = currentSectionKey === 'dashboard' ? 'primary-navbar__brand primary-navbar__item--active' : 'primary-navbar__brand';
return (
<PrimaryNavItem
className={className}
lab... | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | renderBrand | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
renderNavigation () {
if (!this.props.sections || !this.props.sections.length) return null;
return this.props.sections.map((section) => {
// Get the link and the class name
const to = !section.lists[0].external && `${Keystone.adminPath}/${section.lists[0].path}`;
const href = section.lists[0].external && ... | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | renderNavigation | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
render () {
if (!this.state.navIsVisible) return null;
return (
<nav className="primary-navbar">
<Container clearFloatingChildren>
<ul className="app-nav app-nav--primary app-nav--left">
{this.renderBrand()}
{this.renderNavigation()}
</ul>
{this.renderFrontLink()}
</Container>... | The primary (i.e. uppermost) navigation on desktop. Renders all sections and
the home-, website- and signout buttons. | render | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/index.js | MIT |
PrimaryNavItem = ({ children, className, href, label, title, to, active }) => {
const itemClassName = classnames('primary-navbar__item', className);
const Button = to ? (
<Link
className="primary-navbar__link"
key={title}
tabIndex="-1"
title={title}
to={to}
// Block clicks on active link
onCli... | A item in the primary navigation. If it has a "to" prop it'll render a
react-router "Link", if it has a "href" prop it'll render a simple "a" tag | PrimaryNavItem | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/NavItem.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/NavItem.js | MIT |
PrimaryNavItem = ({ children, className, href, label, title, to, active }) => {
const itemClassName = classnames('primary-navbar__item', className);
const Button = to ? (
<Link
className="primary-navbar__link"
key={title}
tabIndex="-1"
title={title}
to={to}
// Block clicks on active link
onCli... | A item in the primary navigation. If it has a "to" prop it'll render a
react-router "Link", if it has a "href" prop it'll render a simple "a" tag | PrimaryNavItem | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Primary/NavItem.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Primary/NavItem.js | MIT |
getInitialState () {
return {};
} | The secondary navigation links to inidvidual lists of a section | getInitialState | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Secondary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Secondary/index.js | MIT |
componentDidMount () {
this.handleResize();
window.addEventListener('resize', this.handleResize);
} | The secondary navigation links to inidvidual lists of a section | componentDidMount | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Secondary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Secondary/index.js | MIT |
componentWillUnmount () {
window.removeEventListener('resize', this.handleResize);
} | The secondary navigation links to inidvidual lists of a section | componentWillUnmount | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Secondary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Secondary/index.js | MIT |
handleResize () {
this.setState({
navIsVisible: this.props.lists && Object.keys(this.props.lists).length > 0 && window.innerWidth >= 768,
});
} | The secondary navigation links to inidvidual lists of a section | handleResize | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Secondary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Secondary/index.js | MIT |
renderNavigation (lists) {
const navigation = Object.keys(lists).map((key) => {
const list = lists[key];
// Get the link and the classname
const href = list.external ? list.path : `${Keystone.adminPath}/${list.path}`;
const isActive = this.props.currentListKey && this.props.currentListKey === list.path;
... | The secondary navigation links to inidvidual lists of a section | renderNavigation | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Secondary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Secondary/index.js | MIT |
onClick = (evt) => {
// If it's the currently active navigation item and we're not on the item view,
// clear the query params on click
if (isActive && !this.props.itemId) {
evt.preventDefault();
this.props.dispatch(
setActiveList(this.props.currentList, this.props.currentListKey)
);
... | The secondary navigation links to inidvidual lists of a section | onClick | javascript | keystonejs/keystone-classic | admin/client/App/components/Navigation/Secondary/index.js | https://github.com/keystonejs/keystone-classic/blob/master/admin/client/App/components/Navigation/Secondary/index.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.