Удаление помойки из прошлого

This commit is contained in:
Konstantin
2026-05-30 11:23:38 +03:00
parent a7cbc801a4
commit 640af8f4d9
99 changed files with 0 additions and 40804 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

File diff suppressed because it is too large Load Diff
@@ -1,832 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("css", function(config, parserConfig) {
var inline = parserConfig.inline
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
var indentUnit = config.indentUnit,
tokenHooks = parserConfig.tokenHooks,
documentTypes = parserConfig.documentTypes || {},
mediaTypes = parserConfig.mediaTypes || {},
mediaFeatures = parserConfig.mediaFeatures || {},
mediaValueKeywords = parserConfig.mediaValueKeywords || {},
propertyKeywords = parserConfig.propertyKeywords || {},
nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
fontProperties = parserConfig.fontProperties || {},
counterDescriptors = parserConfig.counterDescriptors || {},
colorKeywords = parserConfig.colorKeywords || {},
valueKeywords = parserConfig.valueKeywords || {},
allowNested = parserConfig.allowNested,
lineComment = parserConfig.lineComment,
supportsAtComponent = parserConfig.supportsAtComponent === true;
var type, override;
function ret(style, tp) { type = tp; return style; }
// Tokenizers
function tokenBase(stream, state) {
var ch = stream.next();
if (tokenHooks[ch]) {
var result = tokenHooks[ch](stream, state);
if (result !== false) return result;
}
if (ch == "@") {
stream.eatWhile(/[\w\\\-]/);
return ret("def", stream.current());
} else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
return ret(null, "compare");
} else if (ch == "\"" || ch == "'") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
} else if (ch == "#") {
stream.eatWhile(/[\w\\\-]/);
return ret("atom", "hash");
} else if (ch == "!") {
stream.match(/^\s*\w*/);
return ret("keyword", "important");
} else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
stream.eatWhile(/[\w.%]/);
return ret("number", "unit");
} else if (ch === "-") {
if (/[\d.]/.test(stream.peek())) {
stream.eatWhile(/[\w.%]/);
return ret("number", "unit");
} else if (stream.match(/^-[\w\\\-]+/)) {
stream.eatWhile(/[\w\\\-]/);
if (stream.match(/^\s*:/, false))
return ret("variable-2", "variable-definition");
return ret("variable-2", "variable");
} else if (stream.match(/^\w+-/)) {
return ret("meta", "meta");
}
} else if (/[,+>*\/]/.test(ch)) {
return ret(null, "select-op");
} else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
return ret("qualifier", "qualifier");
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
return ret(null, ch);
} else if (((ch == "u" || ch == "U") && stream.match(/rl(-prefix)?\(/i)) ||
((ch == "d" || ch == "D") && stream.match("omain(", true, true)) ||
((ch == "r" || ch == "R") && stream.match("egexp(", true, true))) {
stream.backUp(1);
state.tokenize = tokenParenthesized;
return ret("property", "word");
} else if (/[\w\\\-]/.test(ch)) {
stream.eatWhile(/[\w\\\-]/);
return ret("property", "word");
} else {
return ret(null, null);
}
}
function tokenString(quote) {
return function(stream, state) {
var escaped = false, ch;
while ((ch = stream.next()) != null) {
if (ch == quote && !escaped) {
if (quote == ")") stream.backUp(1);
break;
}
escaped = !escaped && ch == "\\";
}
if (ch == quote || !escaped && quote != ")") state.tokenize = null;
return ret("string", "string");
};
}
function tokenParenthesized(stream, state) {
stream.next(); // Must be '('
if (!stream.match(/\s*[\"\')]/, false))
state.tokenize = tokenString(")");
else
state.tokenize = null;
return ret(null, "(");
}
// Context management
function Context(type, indent, prev) {
this.type = type;
this.indent = indent;
this.prev = prev;
}
function pushContext(state, stream, type, indent) {
state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
return type;
}
function popContext(state) {
if (state.context.prev)
state.context = state.context.prev;
return state.context.type;
}
function pass(type, stream, state) {
return states[state.context.type](type, stream, state);
}
function popAndPass(type, stream, state, n) {
for (var i = n || 1; i > 0; i--)
state.context = state.context.prev;
return pass(type, stream, state);
}
// Parser
function wordAsValue(stream) {
var word = stream.current().toLowerCase();
if (valueKeywords.hasOwnProperty(word))
override = "atom";
else if (colorKeywords.hasOwnProperty(word))
override = "keyword";
else
override = "variable";
}
var states = {};
states.top = function(type, stream, state) {
if (type == "{") {
return pushContext(state, stream, "block");
} else if (type == "}" && state.context.prev) {
return popContext(state);
} else if (supportsAtComponent && /@component/i.test(type)) {
return pushContext(state, stream, "atComponentBlock");
} else if (/^@(-moz-)?document$/i.test(type)) {
return pushContext(state, stream, "documentTypes");
} else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
return pushContext(state, stream, "atBlock");
} else if (/^@(font-face|counter-style)/i.test(type)) {
state.stateArg = type;
return "restricted_atBlock_before";
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
return "keyframes";
} else if (type && type.charAt(0) == "@") {
return pushContext(state, stream, "at");
} else if (type == "hash") {
override = "builtin";
} else if (type == "word") {
override = "tag";
} else if (type == "variable-definition") {
return "maybeprop";
} else if (type == "interpolation") {
return pushContext(state, stream, "interpolation");
} else if (type == ":") {
return "pseudo";
} else if (allowNested && type == "(") {
return pushContext(state, stream, "parens");
}
return state.context.type;
};
states.block = function(type, stream, state) {
if (type == "word") {
var word = stream.current().toLowerCase();
if (propertyKeywords.hasOwnProperty(word)) {
override = "property";
return "maybeprop";
} else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
override = "string-2";
return "maybeprop";
} else if (allowNested) {
override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
return "block";
} else {
override += " error";
return "maybeprop";
}
} else if (type == "meta") {
return "block";
} else if (!allowNested && (type == "hash" || type == "qualifier")) {
override = "error";
return "block";
} else {
return states.top(type, stream, state);
}
};
states.maybeprop = function(type, stream, state) {
if (type == ":") return pushContext(state, stream, "prop");
return pass(type, stream, state);
};
states.prop = function(type, stream, state) {
if (type == ";") return popContext(state);
if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
if (type == "}" || type == "{") return popAndPass(type, stream, state);
if (type == "(") return pushContext(state, stream, "parens");
if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
override += " error";
} else if (type == "word") {
wordAsValue(stream);
} else if (type == "interpolation") {
return pushContext(state, stream, "interpolation");
}
return "prop";
};
states.propBlock = function(type, _stream, state) {
if (type == "}") return popContext(state);
if (type == "word") { override = "property"; return "maybeprop"; }
return state.context.type;
};
states.parens = function(type, stream, state) {
if (type == "{" || type == "}") return popAndPass(type, stream, state);
if (type == ")") return popContext(state);
if (type == "(") return pushContext(state, stream, "parens");
if (type == "interpolation") return pushContext(state, stream, "interpolation");
if (type == "word") wordAsValue(stream);
return "parens";
};
states.pseudo = function(type, stream, state) {
if (type == "meta") return "pseudo";
if (type == "word") {
override = "variable-3";
return state.context.type;
}
return pass(type, stream, state);
};
states.documentTypes = function(type, stream, state) {
if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
override = "tag";
return state.context.type;
} else {
return states.atBlock(type, stream, state);
}
};
states.atBlock = function(type, stream, state) {
if (type == "(") return pushContext(state, stream, "atBlock_parens");
if (type == "}" || type == ";") return popAndPass(type, stream, state);
if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
if (type == "interpolation") return pushContext(state, stream, "interpolation");
if (type == "word") {
var word = stream.current().toLowerCase();
if (word == "only" || word == "not" || word == "and" || word == "or")
override = "keyword";
else if (mediaTypes.hasOwnProperty(word))
override = "attribute";
else if (mediaFeatures.hasOwnProperty(word))
override = "property";
else if (mediaValueKeywords.hasOwnProperty(word))
override = "keyword";
else if (propertyKeywords.hasOwnProperty(word))
override = "property";
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
override = "string-2";
else if (valueKeywords.hasOwnProperty(word))
override = "atom";
else if (colorKeywords.hasOwnProperty(word))
override = "keyword";
else
override = "error";
}
return state.context.type;
};
states.atComponentBlock = function(type, stream, state) {
if (type == "}")
return popAndPass(type, stream, state);
if (type == "{")
return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
if (type == "word")
override = "error";
return state.context.type;
};
states.atBlock_parens = function(type, stream, state) {
if (type == ")") return popContext(state);
if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
return states.atBlock(type, stream, state);
};
states.restricted_atBlock_before = function(type, stream, state) {
if (type == "{")
return pushContext(state, stream, "restricted_atBlock");
if (type == "word" && state.stateArg == "@counter-style") {
override = "variable";
return "restricted_atBlock_before";
}
return pass(type, stream, state);
};
states.restricted_atBlock = function(type, stream, state) {
if (type == "}") {
state.stateArg = null;
return popContext(state);
}
if (type == "word") {
if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
(state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
override = "error";
else
override = "property";
return "maybeprop";
}
return "restricted_atBlock";
};
states.keyframes = function(type, stream, state) {
if (type == "word") { override = "variable"; return "keyframes"; }
if (type == "{") return pushContext(state, stream, "top");
return pass(type, stream, state);
};
states.at = function(type, stream, state) {
if (type == ";") return popContext(state);
if (type == "{" || type == "}") return popAndPass(type, stream, state);
if (type == "word") override = "tag";
else if (type == "hash") override = "builtin";
return "at";
};
states.interpolation = function(type, stream, state) {
if (type == "}") return popContext(state);
if (type == "{" || type == ";") return popAndPass(type, stream, state);
if (type == "word") override = "variable";
else if (type != "variable" && type != "(" && type != ")") override = "error";
return "interpolation";
};
return {
startState: function(base) {
return {tokenize: null,
state: inline ? "block" : "top",
stateArg: null,
context: new Context(inline ? "block" : "top", base || 0, null)};
},
token: function(stream, state) {
if (!state.tokenize && stream.eatSpace()) return null;
var style = (state.tokenize || tokenBase)(stream, state);
if (style && typeof style == "object") {
type = style[1];
style = style[0];
}
override = style;
if (type != "comment")
state.state = states[state.state](type, stream, state);
return override;
},
indent: function(state, textAfter) {
var cx = state.context, ch = textAfter && textAfter.charAt(0);
var indent = cx.indent;
if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
if (cx.prev) {
if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
// Resume indentation from parent context.
cx = cx.prev;
indent = cx.indent;
} else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
// Dedent relative to current context.
indent = Math.max(0, cx.indent - indentUnit);
}
}
return indent;
},
electricChars: "}",
blockCommentStart: "/*",
blockCommentEnd: "*/",
blockCommentContinue: " * ",
lineComment: lineComment,
fold: "brace"
};
});
function keySet(array) {
var keys = {};
for (var i = 0; i < array.length; ++i) {
keys[array[i].toLowerCase()] = true;
}
return keys;
}
var documentTypes_ = [
"domain", "regexp", "url", "url-prefix"
], documentTypes = keySet(documentTypes_);
var mediaTypes_ = [
"all", "aural", "braille", "handheld", "print", "projection", "screen",
"tty", "tv", "embossed"
], mediaTypes = keySet(mediaTypes_);
var mediaFeatures_ = [
"width", "min-width", "max-width", "height", "min-height", "max-height",
"device-width", "min-device-width", "max-device-width", "device-height",
"min-device-height", "max-device-height", "aspect-ratio",
"min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
"min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
"max-color", "color-index", "min-color-index", "max-color-index",
"monochrome", "min-monochrome", "max-monochrome", "resolution",
"min-resolution", "max-resolution", "scan", "grid", "orientation",
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
"pointer", "any-pointer", "hover", "any-hover"
], mediaFeatures = keySet(mediaFeatures_);
var mediaValueKeywords_ = [
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
"interlace", "progressive"
], mediaValueKeywords = keySet(mediaValueKeywords_);
var propertyKeywords_ = [
"align-content", "align-items", "align-self", "alignment-adjust",
"alignment-baseline", "anchor-point", "animation", "animation-delay",
"animation-direction", "animation-duration", "animation-fill-mode",
"animation-iteration-count", "animation-name", "animation-play-state",
"animation-timing-function", "appearance", "azimuth", "backface-visibility",
"background", "background-attachment", "background-blend-mode", "background-clip",
"background-color", "background-image", "background-origin", "background-position",
"background-repeat", "background-size", "baseline-shift", "binding",
"bleed", "bookmark-label", "bookmark-level", "bookmark-state",
"bookmark-target", "border", "border-bottom", "border-bottom-color",
"border-bottom-left-radius", "border-bottom-right-radius",
"border-bottom-style", "border-bottom-width", "border-collapse",
"border-color", "border-image", "border-image-outset",
"border-image-repeat", "border-image-slice", "border-image-source",
"border-image-width", "border-left", "border-left-color",
"border-left-style", "border-left-width", "border-radius", "border-right",
"border-right-color", "border-right-style", "border-right-width",
"border-spacing", "border-style", "border-top", "border-top-color",
"border-top-left-radius", "border-top-right-radius", "border-top-style",
"border-top-width", "border-width", "bottom", "box-decoration-break",
"box-shadow", "box-sizing", "break-after", "break-before", "break-inside",
"caption-side", "caret-color", "clear", "clip", "color", "color-profile", "column-count",
"column-fill", "column-gap", "column-rule", "column-rule-color",
"column-rule-style", "column-rule-width", "column-span", "column-width",
"columns", "content", "counter-increment", "counter-reset", "crop", "cue",
"cue-after", "cue-before", "cursor", "direction", "display",
"dominant-baseline", "drop-initial-after-adjust",
"drop-initial-after-align", "drop-initial-before-adjust",
"drop-initial-before-align", "drop-initial-size", "drop-initial-value",
"elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis",
"flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap",
"float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings",
"font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust",
"font-stretch", "font-style", "font-synthesis", "font-variant",
"font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
"font-variant-ligatures", "font-variant-numeric", "font-variant-position",
"font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
"grid-auto-rows", "grid-column", "grid-column-end", "grid-column-gap",
"grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-gap",
"grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns",
"grid-template-rows", "hanging-punctuation", "height", "hyphens",
"icon", "image-orientation", "image-rendering", "image-resolution",
"inline-box-align", "justify-content", "justify-items", "justify-self", "left", "letter-spacing",
"line-break", "line-height", "line-stacking", "line-stacking-ruby",
"line-stacking-shift", "line-stacking-strategy", "list-style",
"list-style-image", "list-style-position", "list-style-type", "margin",
"margin-bottom", "margin-left", "margin-right", "margin-top",
"marks", "marquee-direction", "marquee-loop",
"marquee-play-count", "marquee-speed", "marquee-style", "max-height",
"max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index",
"nav-left", "nav-right", "nav-up", "object-fit", "object-position",
"opacity", "order", "orphans", "outline",
"outline-color", "outline-offset", "outline-style", "outline-width",
"overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y",
"padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
"page", "page-break-after", "page-break-before", "page-break-inside",
"page-policy", "pause", "pause-after", "pause-before", "perspective",
"perspective-origin", "pitch", "pitch-range", "place-content", "place-items", "place-self", "play-during", "position",
"presentation-level", "punctuation-trim", "quotes", "region-break-after",
"region-break-before", "region-break-inside", "region-fragment",
"rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness",
"right", "rotation", "rotation-point", "ruby-align", "ruby-overhang",
"ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin",
"shape-outside", "size", "speak", "speak-as", "speak-header",
"speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set",
"tab-size", "table-layout", "target", "target-name", "target-new",
"target-position", "text-align", "text-align-last", "text-decoration",
"text-decoration-color", "text-decoration-line", "text-decoration-skip",
"text-decoration-style", "text-emphasis", "text-emphasis-color",
"text-emphasis-position", "text-emphasis-style", "text-height",
"text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow",
"text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position",
"text-wrap", "top", "transform", "transform-origin", "transform-style",
"transition", "transition-delay", "transition-duration",
"transition-property", "transition-timing-function", "unicode-bidi",
"user-select", "vertical-align", "visibility", "voice-balance", "voice-duration",
"voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress",
"voice-volume", "volume", "white-space", "widows", "width", "will-change", "word-break",
"word-spacing", "word-wrap", "z-index",
// SVG-specific
"clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
"color-interpolation", "color-interpolation-filters",
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
"marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
"glyph-orientation-vertical", "text-anchor", "writing-mode"
], propertyKeywords = keySet(propertyKeywords_);
var nonStandardPropertyKeywords_ = [
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
"scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
"scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside",
"searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
"searchfield-results-decoration", "zoom"
], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
var fontProperties_ = [
"font-family", "src", "unicode-range", "font-variant", "font-feature-settings",
"font-stretch", "font-weight", "font-style"
], fontProperties = keySet(fontProperties_);
var counterDescriptors_ = [
"additive-symbols", "fallback", "negative", "pad", "prefix", "range",
"speak-as", "suffix", "symbols", "system"
], counterDescriptors = keySet(counterDescriptors_);
var colorKeywords_ = [
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
"whitesmoke", "yellow", "yellowgreen"
], colorKeywords = keySet(colorKeywords_);
var valueKeywords_ = [
"above", "absolute", "activeborder", "additive", "activecaption", "afar",
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
"avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
"col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
"compact", "condensed", "contain", "content", "contents",
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
"dot-dash", "dot-dot-dash",
"dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
"ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
"ethiopic-halehame-gez", "ethiopic-halehame-om-et",
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
"inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
"katakana", "katakana-iroha", "keep-all", "khmer",
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
"landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "match", "matrix", "matrix3d",
"media-controls-background", "media-current-time-display",
"media-fullscreen-button", "media-mute-button", "media-play-button",
"media-return-to-realtime-button", "media-rewind-button",
"media-seek-back-button", "media-seek-forward-button", "media-slider",
"media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
"menu", "menulist", "menulist-button", "menulist-text",
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
"mix", "mongolian", "monospace", "move", "multiple", "multiply", "myanmar", "n-resize",
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
"painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
"progress", "push-button", "radial-gradient", "radio", "read-only",
"read-write", "read-write-plaintext-only", "rectangle", "region",
"relative", "repeat", "repeating-linear-gradient",
"repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
"s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
"scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
"searchfield-cancel-button", "searchfield-decoration",
"searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
"semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
"simp-chinese-formal", "simp-chinese-informal", "single",
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
"square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
"subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
"table-caption", "table-cell", "table-column", "table-column-group",
"table-footer-group", "table-header-group", "table-row", "table-row-group",
"tamil",
"telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
"thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
"threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
"trad-chinese-formal", "trad-chinese-informal", "transform",
"translate", "translate3d", "translateX", "translateY", "translateZ",
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unset", "up",
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
"var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
"xx-large", "xx-small"
], valueKeywords = keySet(valueKeywords_);
var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
.concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
.concat(valueKeywords_);
CodeMirror.registerHelper("hintWords", "css", allWords);
function tokenCComment(stream, state) {
var maybeEnd = false, ch;
while ((ch = stream.next()) != null) {
if (maybeEnd && ch == "/") {
state.tokenize = null;
break;
}
maybeEnd = (ch == "*");
}
return ["comment", "comment"];
}
CodeMirror.defineMIME("text/css", {
documentTypes: documentTypes,
mediaTypes: mediaTypes,
mediaFeatures: mediaFeatures,
mediaValueKeywords: mediaValueKeywords,
propertyKeywords: propertyKeywords,
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
fontProperties: fontProperties,
counterDescriptors: counterDescriptors,
colorKeywords: colorKeywords,
valueKeywords: valueKeywords,
tokenHooks: {
"/": function(stream, state) {
if (!stream.eat("*")) return false;
state.tokenize = tokenCComment;
return tokenCComment(stream, state);
}
},
name: "css"
});
CodeMirror.defineMIME("text/x-scss", {
mediaTypes: mediaTypes,
mediaFeatures: mediaFeatures,
mediaValueKeywords: mediaValueKeywords,
propertyKeywords: propertyKeywords,
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
colorKeywords: colorKeywords,
valueKeywords: valueKeywords,
fontProperties: fontProperties,
allowNested: true,
lineComment: "//",
tokenHooks: {
"/": function(stream, state) {
if (stream.eat("/")) {
stream.skipToEnd();
return ["comment", "comment"];
} else if (stream.eat("*")) {
state.tokenize = tokenCComment;
return tokenCComment(stream, state);
} else {
return ["operator", "operator"];
}
},
":": function(stream) {
if (stream.match(/\s*\{/, false))
return [null, null]
return false;
},
"$": function(stream) {
stream.match(/^[\w-]+/);
if (stream.match(/^\s*:/, false))
return ["variable-2", "variable-definition"];
return ["variable-2", "variable"];
},
"#": function(stream) {
if (!stream.eat("{")) return false;
return [null, "interpolation"];
}
},
name: "css",
helperType: "scss"
});
CodeMirror.defineMIME("text/x-less", {
mediaTypes: mediaTypes,
mediaFeatures: mediaFeatures,
mediaValueKeywords: mediaValueKeywords,
propertyKeywords: propertyKeywords,
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
colorKeywords: colorKeywords,
valueKeywords: valueKeywords,
fontProperties: fontProperties,
allowNested: true,
lineComment: "//",
tokenHooks: {
"/": function(stream, state) {
if (stream.eat("/")) {
stream.skipToEnd();
return ["comment", "comment"];
} else if (stream.eat("*")) {
state.tokenize = tokenCComment;
return tokenCComment(stream, state);
} else {
return ["operator", "operator"];
}
},
"@": function(stream) {
if (stream.eat("{")) return [null, "interpolation"];
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
stream.eatWhile(/[\w\\\-]/);
if (stream.match(/^\s*:/, false))
return ["variable-2", "variable-definition"];
return ["variable-2", "variable"];
},
"&": function() {
return ["atom", "atom"];
}
},
name: "css",
helperType: "less"
});
CodeMirror.defineMIME("text/x-gss", {
documentTypes: documentTypes,
mediaTypes: mediaTypes,
mediaFeatures: mediaFeatures,
propertyKeywords: propertyKeywords,
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
fontProperties: fontProperties,
counterDescriptors: counterDescriptors,
colorKeywords: colorKeywords,
valueKeywords: valueKeywords,
supportsAtComponent: true,
tokenHooks: {
"/": function(stream, state) {
if (!stream.eat("*")) return false;
state.tokenize = tokenCComment;
return tokenCComment(stream, state);
}
},
name: "css",
helperType: "gss"
});
});
@@ -1,103 +0,0 @@
<!doctype html>
<title>CodeMirror: Closure Stylesheets (GSS) mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../addon/hint/show-hint.css">
<script src="../../lib/codemirror.js"></script>
<script src="css.js"></script>
<script src="../../addon/hint/show-hint.js"></script>
<script src="../../addon/hint/css-hint.js"></script>
<style>.CodeMirror {background: #f8f8f8;}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">Closure Stylesheets (GSS)</a>
</ul>
</div>
<article>
<h2>Closure Stylesheets (GSS) mode</h2>
<form><textarea id="code" name="code">
/* Some example Closure Stylesheets */
@provide 'some.styles';
@require 'other.styles';
@component {
@def FONT_FAMILY "Times New Roman", Georgia, Serif;
@def FONT_SIZE_NORMAL 15px;
@def FONT_NORMAL normal FONT_SIZE_NORMAL FONT_FAMILY;
@def BG_COLOR rgb(235, 239, 249);
@def DIALOG_BORDER_COLOR rgb(107, 144, 218);
@def DIALOG_BG_COLOR BG_COLOR;
@def LEFT_HAND_NAV_WIDTH 180px;
@def LEFT_HAND_NAV_PADDING 3px;
@defmixin size(WIDTH, HEIGHT) {
width: WIDTH;
height: HEIGHT;
}
body {
background-color: BG_COLOR;
margin: 0;
padding: 3em 6em;
font: FONT_NORMAL;
color: #000;
}
#navigation a {
font-weight: bold;
text-decoration: none !important;
}
.dialog {
background-color: DIALOG_BG_COLOR;
border: 1px solid DIALOG_BORDER_COLOR;
}
.content {
position: absolute;
margin-left: add(LEFT_HAND_NAV_PADDING, /* padding left */
LEFT_HAND_NAV_WIDTH,
LEFT_HAND_NAV_PADDING); /* padding right */
}
.logo {
@mixin size(150px, 55px);
background-image: url('http://www.google.com/images/logo_sm.gif');
}
}
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
extraKeys: {"Ctrl-Space": "autocomplete"},
lineNumbers: true,
matchBrackets: "text/x-less",
mode: "text/x-gss"
});
</script>
<p>A mode for <a href="https://github.com/google/closure-stylesheets">Closure Stylesheets</a> (GSS).</p>
<p><strong>MIME type defined:</strong> <code>text/x-gss</code>.</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#gss_*">normal</a>, <a href="../../test/index.html#verbose,gss_*">verbose</a>.</p>
</article>
@@ -1,17 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
"use strict";
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); }
MT("atComponent",
"[def @component] {",
"[tag foo] {",
" [property color]: [keyword black];",
"}",
"}");
})();
@@ -1,75 +0,0 @@
<!doctype html>
<title>CodeMirror: CSS mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../addon/hint/show-hint.css">
<script src="../../lib/codemirror.js"></script>
<script src="css.js"></script>
<script src="../../addon/hint/show-hint.js"></script>
<script src="../../addon/hint/css-hint.js"></script>
<style>.CodeMirror {background: #f8f8f8;}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">CSS</a>
</ul>
</div>
<article>
<h2>CSS mode</h2>
<form><textarea id="code" name="code">
/* Some example CSS */
@import url("something.css");
body {
margin: 0;
padding: 3em 6em;
font-family: tahoma, arial, sans-serif;
color: #000;
}
#navigation a {
font-weight: bold;
text-decoration: none !important;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.7em;
}
h1:before, h2:before {
content: "::";
}
code {
font-family: courier, monospace;
font-size: 80%;
color: #418A8A;
}
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
extraKeys: {"Ctrl-Space": "autocomplete"}
});
</script>
<p><strong>MIME types defined:</strong> <code>text/css</code>, <code>text/x-scss</code> (<a href="scss.html">demo</a>), <code>text/x-less</code> (<a href="less.html">demo</a>).</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#css_*">normal</a>, <a href="../../test/index.html#verbose,css_*">verbose</a>.</p>
</article>
@@ -1,152 +0,0 @@
<!doctype html>
<title>CodeMirror: LESS mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="css.js"></script>
<style>.CodeMirror {border: 1px solid #ddd; line-height: 1.2;}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">LESS</a>
</ul>
</div>
<article>
<h2>LESS mode</h2>
<form><textarea id="code" name="code">@media screen and (device-aspect-ratio: 16/9) { … }
@media screen and (device-aspect-ratio: 1280/720) { … }
@media screen and (device-aspect-ratio: 2560/1440) { … }
html:lang(fr-be)
tr:nth-child(2n+1) /* represents every odd row of an HTML table */
img:nth-of-type(2n+1) { float: right; }
img:nth-of-type(2n) { float: left; }
body > h2:not(:first-of-type):not(:last-of-type)
html|*:not(:link):not(:visited)
*|*:not(:hover)
p::first-line { text-transform: uppercase }
@namespace foo url(http://www.example.com);
foo|h1 { color: blue } /* first rule */
span[hello="Ocean"][goodbye="Land"]
E[foo]{
padding:65px;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
}
button::-moz-focus-inner,
input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
padding: 0;
border: 0;
}
.btn {
// reset here as of 2.0.3 due to Recess property order
border-color: #ccc;
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
}
fieldset span button, fieldset span input[type="file"] {
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
}
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
}
@import url("something.css");
@light-blue: hsl(190, 50%, 65%);
#menu {
position: absolute;
width: 100%;
z-index: 3;
clear: both;
display: block;
background-color: @blue;
height: 42px;
border-top: 2px solid lighten(@alpha-blue, 20%);
border-bottom: 2px solid darken(@alpha-blue, 25%);
.box-shadow(0, 1px, 8px, 0.6);
-moz-box-shadow: 0 0 0 #000; // Because firefox sucks.
&.docked {
background-color: hsla(210, 60%, 40%, 0.4);
}
&:hover {
background-color: @blue;
}
#dropdown {
margin: 0 0 0 117px;
padding: 0;
padding-top: 5px;
display: none;
width: 190px;
border-top: 2px solid @medium;
color: @highlight;
border: 2px solid darken(@medium, 25%);
border-left-color: darken(@medium, 15%);
border-right-color: darken(@medium, 15%);
border-top-width: 0;
background-color: darken(@medium, 10%);
ul {
padding: 0px;
}
li {
font-size: 14px;
display: block;
text-align: left;
padding: 0;
border: 0;
a {
display: block;
padding: 0px 15px;
text-decoration: none;
color: white;
&:hover {
background-color: darken(@medium, 15%);
text-decoration: none;
}
}
}
.border-radius(5px, bottom);
.box-shadow(0, 6px, 8px, 0.5);
}
}
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers : true,
matchBrackets : true,
mode: "text/x-less"
});
</script>
<p>The LESS mode is a sub-mode of the <a href="index.html">CSS mode</a> (defined in <code>css.js</code>).</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#less_*">normal</a>, <a href="../../test/index.html#verbose,less_*">verbose</a>.</p>
</article>
@@ -1,54 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
"use strict";
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); }
MT("variable",
"[variable-2 @base]: [atom #f04615];",
"[qualifier .class] {",
" [property width]: [variable percentage]([number 0.5]); [comment // returns `50%`]",
" [property color]: [variable saturate]([variable-2 @base], [number 5%]);",
"}");
MT("amp",
"[qualifier .child], [qualifier .sibling] {",
" [qualifier .parent] [atom &] {",
" [property color]: [keyword black];",
" }",
" [atom &] + [atom &] {",
" [property color]: [keyword red];",
" }",
"}");
MT("mixin",
"[qualifier .mixin] ([variable dark]; [variable-2 @color]) {",
" [property color]: [atom darken]([variable-2 @color], [number 10%]);",
"}",
"[qualifier .mixin] ([variable light]; [variable-2 @color]) {",
" [property color]: [atom lighten]([variable-2 @color], [number 10%]);",
"}",
"[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {",
" [property display]: [atom block];",
"}",
"[variable-2 @switch]: [variable light];",
"[qualifier .class] {",
" [qualifier .mixin]([variable-2 @switch]; [atom #888]);",
"}");
MT("nest",
"[qualifier .one] {",
" [def @media] ([property width]: [number 400px]) {",
" [property font-size]: [number 1.2em];",
" [def @media] [attribute print] [keyword and] [property color] {",
" [property color]: [keyword blue];",
" }",
" }",
"}");
MT("interpolation", ".@{[variable foo]} { [property font-weight]: [atom bold]; }");
})();
@@ -1,157 +0,0 @@
<!doctype html>
<title>CodeMirror: SCSS mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="css.js"></script>
<style>.CodeMirror {background: #f8f8f8;}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">SCSS</a>
</ul>
</div>
<article>
<h2>SCSS mode</h2>
<form><textarea id="code" name="code">
/* Some example SCSS */
@import "compass/css3";
$variable: #333;
$blue: #3bbfce;
$margin: 16px;
.content-navigation {
#nested {
background-color: black;
}
border-color: $blue;
color:
darken($blue, 9%);
}
.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
}
@mixin table-base {
th {
text-align: center;
font-weight: bold;
}
td, th {padding: 2px}
}
table.hl {
margin: 2em 0;
td.ln {
text-align: right;
}
}
li {
font: {
family: serif;
weight: bold;
size: 1.2em;
}
}
@mixin left($dist) {
float: left;
margin-left: $dist;
}
#data {
@include left(10px);
@include table-base;
}
.source {
@include flow-into(target);
border: 10px solid green;
margin: 20px;
width: 200px; }
.new-container {
@include flow-from(target);
border: 10px solid red;
margin: 20px;
width: 200px; }
body {
margin: 0;
padding: 3em 6em;
font-family: tahoma, arial, sans-serif;
color: #000;
}
@mixin yellow() {
background: yellow;
}
.big {
font-size: 14px;
}
.nested {
@include border-radius(3px);
@extend .big;
p {
background: whitesmoke;
a {
color: red;
}
}
}
#navigation a {
font-weight: bold;
text-decoration: none !important;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.7em;
}
h1:before, h2:before {
content: "::";
}
code {
font-family: courier, monospace;
font-size: 80%;
color: #418A8A;
}
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
mode: "text/x-scss"
});
</script>
<p>The SCSS mode is a sub-mode of the <a href="index.html">CSS mode</a> (defined in <code>css.js</code>).</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#scss_*">normal</a>, <a href="../../test/index.html#verbose,scss_*">verbose</a>.</p>
</article>
@@ -1,110 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-scss");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); }
MT('url_with_quotation',
"[tag foo] { [property background]:[atom url]([string test.jpg]) }");
MT('url_with_double_quotes',
"[tag foo] { [property background]:[atom url]([string \"test.jpg\"]) }");
MT('url_with_single_quotes',
"[tag foo] { [property background]:[atom url]([string \'test.jpg\']) }");
MT('string',
"[def @import] [string \"compass/css3\"]");
MT('important_keyword',
"[tag foo] { [property background]:[atom url]([string \'test.jpg\']) [keyword !important] }");
MT('variable',
"[variable-2 $blue]:[atom #333]");
MT('variable_as_attribute',
"[tag foo] { [property color]:[variable-2 $blue] }");
MT('numbers',
"[tag foo] { [property padding]:[number 10px] [number 10] [number 10em] [number 8in] }");
MT('number_percentage',
"[tag foo] { [property width]:[number 80%] }");
MT('selector',
"[builtin #hello][qualifier .world]{}");
MT('singleline_comment',
"[comment // this is a comment]");
MT('multiline_comment',
"[comment /*foobar*/]");
MT('attribute_with_hyphen',
"[tag foo] { [property font-size]:[number 10px] }");
MT('string_after_attribute',
"[tag foo] { [property content]:[string \"::\"] }");
MT('directives',
"[def @include] [qualifier .mixin]");
MT('basic_structure',
"[tag p] { [property background]:[keyword red]; }");
MT('nested_structure',
"[tag p] { [tag a] { [property color]:[keyword red]; } }");
MT('mixin',
"[def @mixin] [tag table-base] {}");
MT('number_without_semicolon',
"[tag p] {[property width]:[number 12]}",
"[tag a] {[property color]:[keyword red];}");
MT('atom_in_nested_block',
"[tag p] { [tag a] { [property color]:[atom #000]; } }");
MT('interpolation_in_property',
"[tag foo] { #{[variable-2 $hello]}:[number 2]; }");
MT('interpolation_in_selector',
"[tag foo]#{[variable-2 $hello]} { [property color]:[atom #000]; }");
MT('interpolation_error',
"[tag foo]#{[variable foo]} { [property color]:[atom #000]; }");
MT("divide_operator",
"[tag foo] { [property width]:[number 4] [operator /] [number 2] }");
MT('nested_structure_with_id_selector',
"[tag p] { [builtin #hello] { [property color]:[keyword red]; } }");
MT('indent_mixin',
"[def @mixin] [tag container] (",
" [variable-2 $a]: [number 10],",
" [variable-2 $b]: [number 10])",
"{}");
MT('indent_nested',
"[tag foo] {",
" [tag bar] {",
" }",
"}");
MT('indent_parentheses',
"[tag foo] {",
" [property color]: [atom darken]([variable-2 $blue],",
" [number 9%]);",
"}");
MT('indent_vardef',
"[variable-2 $name]:",
" [string 'val'];",
"[tag tag] {",
" [tag inner] {",
" [property margin]: [number 3px];",
" }",
"}");
})();
@@ -1,209 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "css");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Error, because "foobarhello" is neither a known type or property, but
// property was expected (after "and"), and it should be in parentheses.
MT("atMediaUnknownType",
"[def @media] [attribute screen] [keyword and] [error foobarhello] { }");
// Soft error, because "foobarhello" is not a known property or type.
MT("atMediaUnknownProperty",
"[def @media] [attribute screen] [keyword and] ([error foobarhello]) { }");
// Make sure nesting works with media queries
MT("atMediaMaxWidthNested",
"[def @media] [attribute screen] [keyword and] ([property max-width]: [number 25px]) { [tag foo] { } }");
MT("atMediaFeatureValueKeyword",
"[def @media] ([property orientation]: [keyword landscape]) { }");
MT("atMediaUnknownFeatureValueKeyword",
"[def @media] ([property orientation]: [error upsidedown]) { }");
MT("atMediaUppercase",
"[def @MEDIA] ([property orienTAtion]: [keyword landScape]) { }");
MT("tagSelector",
"[tag foo] { }");
MT("classSelector",
"[qualifier .foo-bar_hello] { }");
MT("idSelector",
"[builtin #foo] { [error #foo] }");
MT("tagSelectorUnclosed",
"[tag foo] { [property margin]: [number 0] } [tag bar] { }");
MT("tagStringNoQuotes",
"[tag foo] { [property font-family]: [variable hello] [variable world]; }");
MT("tagStringDouble",
"[tag foo] { [property font-family]: [string \"hello world\"]; }");
MT("tagStringSingle",
"[tag foo] { [property font-family]: [string 'hello world']; }");
MT("tagColorKeyword",
"[tag foo] {",
" [property color]: [keyword black];",
" [property color]: [keyword navy];",
" [property color]: [keyword yellow];",
"}");
MT("tagColorHex3",
"[tag foo] { [property background]: [atom #fff]; }");
MT("tagColorHex4",
"[tag foo] { [property background]: [atom #ffff]; }");
MT("tagColorHex6",
"[tag foo] { [property background]: [atom #ffffff]; }");
MT("tagColorHex8",
"[tag foo] { [property background]: [atom #ffffffff]; }");
MT("tagColorHex5Invalid",
"[tag foo] { [property background]: [atom&error #fffff]; }");
MT("tagColorHexInvalid",
"[tag foo] { [property background]: [atom&error #ffg]; }");
MT("tagNegativeNumber",
"[tag foo] { [property margin]: [number -5px]; }");
MT("tagPositiveNumber",
"[tag foo] { [property padding]: [number 5px]; }");
MT("tagVendor",
"[tag foo] { [meta -foo-][property box-sizing]: [meta -foo-][atom border-box]; }");
MT("tagBogusProperty",
"[tag foo] { [property&error barhelloworld]: [number 0]; }");
MT("tagTwoProperties",
"[tag foo] { [property margin]: [number 0]; [property padding]: [number 0]; }");
MT("tagTwoPropertiesURL",
"[tag foo] { [property background]: [atom url]([string //example.com/foo.png]); [property padding]: [number 0]; }");
MT("indent_tagSelector",
"[tag strong], [tag em] {",
" [property background]: [atom rgba](",
" [number 255], [number 255], [number 0], [number .2]",
" );",
"}");
MT("indent_atMedia",
"[def @media] {",
" [tag foo] {",
" [property color]:",
" [keyword yellow];",
" }",
"}");
MT("indent_comma",
"[tag foo] {",
" [property font-family]: [variable verdana],",
" [atom sans-serif];",
"}");
MT("indent_parentheses",
"[tag foo]:[variable-3 before] {",
" [property background]: [atom url](",
"[string blahblah]",
"[string etc]",
"[string ]) [keyword !important];",
"}");
MT("font_face",
"[def @font-face] {",
" [property font-family]: [string 'myfont'];",
" [error nonsense]: [string 'abc'];",
" [property src]: [atom url]([string http://blah]),",
" [atom url]([string http://foo]);",
"}");
MT("empty_url",
"[def @import] [atom url]() [attribute screen];");
MT("parens",
"[qualifier .foo] {",
" [property background-image]: [variable fade]([atom #000], [number 20%]);",
" [property border-image]: [atom linear-gradient](",
" [atom to] [atom bottom],",
" [variable fade]([atom #000], [number 20%]) [number 0%],",
" [variable fade]([atom #000], [number 20%]) [number 100%]",
" );",
"}");
MT("css_variable",
":[variable-3 root] {",
" [variable-2 --main-color]: [atom #06c];",
"}",
"[tag h1][builtin #foo] {",
" [property color]: [atom var]([variable-2 --main-color]);",
"}");
MT("supports",
"[def @supports] ([keyword not] (([property text-align-last]: [atom justify]) [keyword or] ([meta -moz-][property text-align-last]: [atom justify])) {",
" [property text-align-last]: [atom justify];",
"}");
MT("document",
"[def @document] [tag url]([string http://blah]),",
" [tag url-prefix]([string https://]),",
" [tag domain]([string blah.com]),",
" [tag regexp]([string \".*blah.+\"]) {",
" [builtin #id] {",
" [property background-color]: [keyword white];",
" }",
" [tag foo] {",
" [property font-family]: [variable Verdana], [atom sans-serif];",
" }",
"}");
MT("document_url",
"[def @document] [tag url]([string http://blah]) { [qualifier .class] { } }");
MT("document_urlPrefix",
"[def @document] [tag url-prefix]([string https://]) { [builtin #id] { } }");
MT("document_domain",
"[def @document] [tag domain]([string blah.com]) { [tag foo] { } }");
MT("document_regexp",
"[def @document] [tag regexp]([string \".*blah.+\"]) { [builtin #id] { } }");
MT("counter-style",
"[def @counter-style] [variable binary] {",
" [property system]: [atom numeric];",
" [property symbols]: [number 0] [number 1];",
" [property suffix]: [string \".\"];",
" [property range]: [atom infinite];",
" [property speak-as]: [atom numeric];",
"}");
MT("counter-style-additive-symbols",
"[def @counter-style] [variable simple-roman] {",
" [property system]: [atom additive];",
" [property additive-symbols]: [number 10] [variable X], [number 5] [variable V], [number 1] [variable I];",
" [property range]: [number 1] [number 49];",
"}");
MT("counter-style-use",
"[tag ol][qualifier .roman] { [property list-style]: [variable simple-roman]; }");
MT("counter-style-symbols",
"[tag ol] { [property list-style]: [atom symbols]([atom cyclic] [string \"*\"] [string \"\\2020\"] [string \"\\2021\"] [string \"\\A7\"]); }");
MT("comment-does-not-disrupt",
"[def @font-face] [comment /* foo */] {",
" [property src]: [atom url]([string x]);",
" [property font-family]: [variable One];",
"}")
})();
@@ -1,114 +0,0 @@
<!doctype html>
<title>CodeMirror: JavaScript mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="../../addon/comment/continuecomment.js"></script>
<script src="../../addon/comment/comment.js"></script>
<script src="javascript.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">JavaScript</a>
</ul>
</div>
<article>
<h2>JavaScript mode</h2>
<div><textarea id="code" name="code">
// Demo code (the actual new parser character stream implementation)
function StringStream(string) {
this.pos = 0;
this.string = string;
}
StringStream.prototype = {
done: function() {return this.pos >= this.string.length;},
peek: function() {return this.string.charAt(this.pos);},
next: function() {
if (this.pos &lt; this.string.length)
return this.string.charAt(this.pos++);
},
eat: function(match) {
var ch = this.string.charAt(this.pos);
if (typeof match == "string") var ok = ch == match;
else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
if (ok) {this.pos++; return ch;}
},
eatWhile: function(match) {
var start = this.pos;
while (this.eat(match));
if (this.pos > start) return this.string.slice(start, this.pos);
},
backUp: function(n) {this.pos -= n;},
column: function() {return this.pos;},
eatSpace: function() {
var start = this.pos;
while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
return this.pos - start;
},
match: function(pattern, consume, caseInsensitive) {
if (typeof pattern == "string") {
function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
if (consume !== false) this.pos += str.length;
return true;
}
}
else {
var match = this.string.slice(this.pos).match(pattern);
if (match &amp;&amp; consume !== false) this.pos += match[0].length;
return match;
}
}
};
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
continueComments: "Enter",
extraKeys: {"Ctrl-Q": "toggleComment"}
});
</script>
<p>
JavaScript mode supports several configuration options:
<ul>
<li><code>json</code> which will set the mode to expect JSON
data rather than a JavaScript program.</li>
<li><code>jsonld</code> which will set the mode to expect
<a href="http://json-ld.org">JSON-LD</a> linked data rather
than a JavaScript program (<a href="json-ld.html">demo</a>).</li>
<li><code>typescript</code> which will activate additional
syntax highlighting and some other things for TypeScript code
(<a href="typescript.html">demo</a>).</li>
<li><code>statementIndent</code> which (given a number) will
determine the amount of indentation to use for statements
continued on a new line.</li>
<li><code>wordCharacters</code>, a regexp that indicates which
characters should be considered part of an identifier.
Defaults to <code>/[\w$]/</code>, which does not handle
non-ASCII identifiers. Can be set to something more elaborate
to improve Unicode support.</li>
</ul>
</p>
<p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>, <code>application/ld+json</code>, <code>text/typescript</code>, <code>application/typescript</code>.</p>
</article>
@@ -1,896 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("javascript", function(config, parserConfig) {
var indentUnit = config.indentUnit;
var statementIndent = parserConfig.statementIndent;
var jsonldMode = parserConfig.jsonld;
var jsonMode = parserConfig.json || jsonldMode;
var isTS = parserConfig.typescript;
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
// Tokenizer
var keywords = function(){
function kw(type) {return {type: type, style: "keyword"};}
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
return {
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
"return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
"debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
"function": kw("function"), "catch": kw("catch"),
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
"in": operator, "typeof": operator, "instanceof": operator,
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
"await": C
};
}();
var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
function readRegexp(stream) {
var escaped = false, next, inSet = false;
while ((next = stream.next()) != null) {
if (!escaped) {
if (next == "/" && !inSet) return;
if (next == "[") inSet = true;
else if (inSet && next == "]") inSet = false;
}
escaped = !escaped && next == "\\";
}
}
// Used as scratch variables to communicate multiple values without
// consing up tons of objects.
var type, content;
function ret(tp, style, cont) {
type = tp; content = cont;
return style;
}
function tokenBase(stream, state) {
var ch = stream.next();
if (ch == '"' || ch == "'") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
} else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
return ret("number", "number");
} else if (ch == "." && stream.match("..")) {
return ret("spread", "meta");
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
return ret(ch);
} else if (ch == "=" && stream.eat(">")) {
return ret("=>", "operator");
} else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
return ret("number", "number");
} else if (/\d/.test(ch)) {
stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
return ret("number", "number");
} else if (ch == "/") {
if (stream.eat("*")) {
state.tokenize = tokenComment;
return tokenComment(stream, state);
} else if (stream.eat("/")) {
stream.skipToEnd();
return ret("comment", "comment");
} else if (expressionAllowed(stream, state, 1)) {
readRegexp(stream);
stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
return ret("regexp", "string-2");
} else {
stream.eat("=");
return ret("operator", "operator", stream.current());
}
} else if (ch == "`") {
state.tokenize = tokenQuasi;
return tokenQuasi(stream, state);
} else if (ch == "#") {
stream.skipToEnd();
return ret("error", "error");
} else if (isOperatorChar.test(ch)) {
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
if (stream.eat("=")) {
if (ch == "!" || ch == "=") stream.eat("=")
} else if (/[<>*+\-]/.test(ch)) {
stream.eat(ch)
if (ch == ">") stream.eat(ch)
}
}
return ret("operator", "operator", stream.current());
} else if (wordRE.test(ch)) {
stream.eatWhile(wordRE);
var word = stream.current()
if (state.lastType != ".") {
if (keywords.propertyIsEnumerable(word)) {
var kw = keywords[word]
return ret(kw.type, kw.style, word)
}
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
return ret("async", "keyword", word)
}
return ret("variable", "variable", word)
}
}
function tokenString(quote) {
return function(stream, state) {
var escaped = false, next;
if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
state.tokenize = tokenBase;
return ret("jsonld-keyword", "meta");
}
while ((next = stream.next()) != null) {
if (next == quote && !escaped) break;
escaped = !escaped && next == "\\";
}
if (!escaped) state.tokenize = tokenBase;
return ret("string", "string");
};
}
function tokenComment(stream, state) {
var maybeEnd = false, ch;
while (ch = stream.next()) {
if (ch == "/" && maybeEnd) {
state.tokenize = tokenBase;
break;
}
maybeEnd = (ch == "*");
}
return ret("comment", "comment");
}
function tokenQuasi(stream, state) {
var escaped = false, next;
while ((next = stream.next()) != null) {
if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
state.tokenize = tokenBase;
break;
}
escaped = !escaped && next == "\\";
}
return ret("quasi", "string-2", stream.current());
}
var brackets = "([{}])";
// This is a crude lookahead trick to try and notice that we're
// parsing the argument patterns for a fat-arrow function before we
// actually hit the arrow token. It only works if the arrow is on
// the same line as the arguments and there's no strange noise
// (comments) in between. Fallback is to only notice when we hit the
// arrow, and not declare the arguments as locals for the arrow
// body.
function findFatArrow(stream, state) {
if (state.fatArrowAt) state.fatArrowAt = null;
var arrow = stream.string.indexOf("=>", stream.start);
if (arrow < 0) return;
if (isTS) { // Try to skip TypeScript return type declarations after the arguments
var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
if (m) arrow = m.index
}
var depth = 0, sawSomething = false;
for (var pos = arrow - 1; pos >= 0; --pos) {
var ch = stream.string.charAt(pos);
var bracket = brackets.indexOf(ch);
if (bracket >= 0 && bracket < 3) {
if (!depth) { ++pos; break; }
if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
} else if (bracket >= 3 && bracket < 6) {
++depth;
} else if (wordRE.test(ch)) {
sawSomething = true;
} else if (/["'\/]/.test(ch)) {
return;
} else if (sawSomething && !depth) {
++pos;
break;
}
}
if (sawSomething && !depth) state.fatArrowAt = pos;
}
// Parser
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
function JSLexical(indented, column, type, align, prev, info) {
this.indented = indented;
this.column = column;
this.type = type;
this.prev = prev;
this.info = info;
if (align != null) this.align = align;
}
function inScope(state, varname) {
for (var v = state.localVars; v; v = v.next)
if (v.name == varname) return true;
for (var cx = state.context; cx; cx = cx.prev) {
for (var v = cx.vars; v; v = v.next)
if (v.name == varname) return true;
}
}
function parseJS(state, style, type, content, stream) {
var cc = state.cc;
// Communicate our context to the combinators.
// (Less wasteful than consing up a hundred closures on every call.)
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
if (!state.lexical.hasOwnProperty("align"))
state.lexical.align = true;
while(true) {
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
if (combinator(type, content)) {
while(cc.length && cc[cc.length - 1].lex)
cc.pop()();
if (cx.marked) return cx.marked;
if (type == "variable" && inScope(state, content)) return "variable-2";
return style;
}
}
}
// Combinator utils
var cx = {state: null, column: null, marked: null, cc: null};
function pass() {
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
}
function cont() {
pass.apply(null, arguments);
return true;
}
function inList(name, list) {
for (var v = list; v; v = v.next) if (v.name == name) return true
return false;
}
function register(varname) {
var state = cx.state;
cx.marked = "def";
if (state.context) {
if (state.lexical.info == "var" && state.context && state.context.block) {
// FIXME function decls are also not block scoped
var newContext = registerVarScoped(varname, state.context)
if (newContext != null) {
state.context = newContext
return
}
} else if (!inList(varname, state.localVars)) {
state.localVars = new Var(varname, state.localVars)
return
}
}
// Fall through means this is global
if (parserConfig.globalVars && !inList(varname, state.globalVars))
state.globalVars = new Var(varname, state.globalVars)
}
function registerVarScoped(varname, context) {
if (!context) {
return null
} else if (context.block) {
var inner = registerVarScoped(varname, context.prev)
if (!inner) return null
if (inner == context.prev) return context
return new Context(inner, context.vars, true)
} else if (inList(varname, context.vars)) {
return context
} else {
return new Context(context.prev, new Var(varname, context.vars), false)
}
}
function isModifier(name) {
return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
}
// Combinators
function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
function Var(name, next) { this.name = name; this.next = next }
var defaultVars = new Var("this", new Var("arguments", null))
function pushcontext() {
cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
cx.state.localVars = defaultVars
}
function pushblockcontext() {
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
cx.state.localVars = null
}
function popcontext() {
cx.state.localVars = cx.state.context.vars
cx.state.context = cx.state.context.prev
}
popcontext.lex = true
function pushlex(type, info) {
var result = function() {
var state = cx.state, indent = state.indented;
if (state.lexical.type == "stat") indent = state.lexical.indented;
else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
indent = outer.indented;
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
};
result.lex = true;
return result;
}
function poplex() {
var state = cx.state;
if (state.lexical.prev) {
if (state.lexical.type == ")")
state.indented = state.lexical.indented;
state.lexical = state.lexical.prev;
}
}
poplex.lex = true;
function expect(wanted) {
function exp(type) {
if (type == wanted) return cont();
else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
else return cont(exp);
};
return exp;
}
function statement(type, value) {
if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
if (type == "debugger") return cont(expect(";"));
if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
if (type == ";") return cont();
if (type == "if") {
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
cx.state.cc.pop()();
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
}
if (type == "function") return cont(functiondef);
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
if (type == "variable") {
if (isTS && value == "declare") {
cx.marked = "keyword"
return cont(statement)
} else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
cx.marked = "keyword"
if (value == "enum") return cont(enumdef);
else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
} else if (isTS && value == "namespace") {
cx.marked = "keyword"
return cont(pushlex("form"), expression, block, poplex)
} else if (isTS && value == "abstract") {
cx.marked = "keyword"
return cont(statement)
} else {
return cont(pushlex("stat"), maybelabel);
}
}
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
block, poplex, poplex, popcontext);
if (type == "case") return cont(expression, expect(":"));
if (type == "default") return cont(expect(":"));
if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
if (type == "async") return cont(statement)
if (value == "@") return cont(expression, statement)
return pass(pushlex("stat"), expression, expect(";"), poplex);
}
function maybeCatchBinding(type) {
if (type == "(") return cont(funarg, expect(")"))
}
function expression(type, value) {
return expressionInner(type, value, false);
}
function expressionNoComma(type, value) {
return expressionInner(type, value, true);
}
function parenExpr(type) {
if (type != "(") return pass()
return cont(pushlex(")"), expression, expect(")"), poplex)
}
function expressionInner(type, value, noComma) {
if (cx.state.fatArrowAt == cx.stream.start) {
var body = noComma ? arrowBodyNoComma : arrowBody;
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
}
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
if (type == "function") return cont(functiondef, maybeop);
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
if (type == "quasi") return pass(quasi, maybeop);
if (type == "new") return cont(maybeTarget(noComma));
if (type == "import") return cont(expression);
return cont();
}
function maybeexpression(type) {
if (type.match(/[;\}\)\],]/)) return pass();
return pass(expression);
}
function maybeoperatorComma(type, value) {
if (type == ",") return cont(expression);
return maybeoperatorNoComma(type, value, false);
}
function maybeoperatorNoComma(type, value, noComma) {
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
var expr = noComma == false ? expression : expressionNoComma;
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
if (type == "operator") {
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false))
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
if (value == "?") return cont(expression, expect(":"), expr);
return cont(expr);
}
if (type == "quasi") { return pass(quasi, me); }
if (type == ";") return;
if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
if (type == ".") return cont(property, me);
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
if (type == "regexp") {
cx.state.lastType = cx.marked = "operator"
cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
return cont(expr)
}
}
function quasi(type, value) {
if (type != "quasi") return pass();
if (value.slice(value.length - 2) != "${") return cont(quasi);
return cont(expression, continueQuasi);
}
function continueQuasi(type) {
if (type == "}") {
cx.marked = "string-2";
cx.state.tokenize = tokenQuasi;
return cont(quasi);
}
}
function arrowBody(type) {
findFatArrow(cx.stream, cx.state);
return pass(type == "{" ? statement : expression);
}
function arrowBodyNoComma(type) {
findFatArrow(cx.stream, cx.state);
return pass(type == "{" ? statement : expressionNoComma);
}
function maybeTarget(noComma) {
return function(type) {
if (type == ".") return cont(noComma ? targetNoComma : target);
else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
else return pass(noComma ? expressionNoComma : expression);
};
}
function target(_, value) {
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
}
function targetNoComma(_, value) {
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
}
function maybelabel(type) {
if (type == ":") return cont(poplex, statement);
return pass(maybeoperatorComma, expect(";"), poplex);
}
function property(type) {
if (type == "variable") {cx.marked = "property"; return cont();}
}
function objprop(type, value) {
if (type == "async") {
cx.marked = "property";
return cont(objprop);
} else if (type == "variable" || cx.style == "keyword") {
cx.marked = "property";
if (value == "get" || value == "set") return cont(getterSetter);
var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
cx.state.fatArrowAt = cx.stream.pos + m[0].length
return cont(afterprop);
} else if (type == "number" || type == "string") {
cx.marked = jsonldMode ? "property" : (cx.style + " property");
return cont(afterprop);
} else if (type == "jsonld-keyword") {
return cont(afterprop);
} else if (isTS && isModifier(value)) {
cx.marked = "keyword"
return cont(objprop)
} else if (type == "[") {
return cont(expression, maybetype, expect("]"), afterprop);
} else if (type == "spread") {
return cont(expressionNoComma, afterprop);
} else if (value == "*") {
cx.marked = "keyword";
return cont(objprop);
} else if (type == ":") {
return pass(afterprop)
}
}
function getterSetter(type) {
if (type != "variable") return pass(afterprop);
cx.marked = "property";
return cont(functiondef);
}
function afterprop(type) {
if (type == ":") return cont(expressionNoComma);
if (type == "(") return pass(functiondef);
}
function commasep(what, end, sep) {
function proceed(type, value) {
if (sep ? sep.indexOf(type) > -1 : type == ",") {
var lex = cx.state.lexical;
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
return cont(function(type, value) {
if (type == end || value == end) return pass()
return pass(what)
}, proceed);
}
if (type == end || value == end) return cont();
return cont(expect(end));
}
return function(type, value) {
if (type == end || value == end) return cont();
return pass(what, proceed);
};
}
function contCommasep(what, end, info) {
for (var i = 3; i < arguments.length; i++)
cx.cc.push(arguments[i]);
return cont(pushlex(end, info), commasep(what, end), poplex);
}
function block(type) {
if (type == "}") return cont();
return pass(statement, block);
}
function maybetype(type, value) {
if (isTS) {
if (type == ":") return cont(typeexpr);
if (value == "?") return cont(maybetype);
}
}
function mayberettype(type) {
if (isTS && type == ":") {
if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
else return cont(typeexpr)
}
}
function isKW(_, value) {
if (value == "is") {
cx.marked = "keyword"
return cont()
}
}
function typeexpr(type, value) {
if (value == "keyof" || value == "typeof") {
cx.marked = "keyword"
return cont(value == "keyof" ? typeexpr : expressionNoComma)
}
if (type == "variable" || value == "void") {
cx.marked = "type"
return cont(afterType)
}
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
}
function maybeReturnType(type) {
if (type == "=>") return cont(typeexpr)
}
function typeprop(type, value) {
if (type == "variable" || cx.style == "keyword") {
cx.marked = "property"
return cont(typeprop)
} else if (value == "?") {
return cont(typeprop)
} else if (type == ":") {
return cont(typeexpr)
} else if (type == "[") {
return cont(expression, maybetype, expect("]"), typeprop)
}
}
function typearg(type, value) {
if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
if (type == ":") return cont(typeexpr)
return pass(typeexpr)
}
function afterType(type, value) {
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
if (value == "|" || type == "." || value == "&") return cont(typeexpr)
if (type == "[") return cont(expect("]"), afterType)
if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
}
function maybeTypeArgs(_, value) {
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
}
function typeparam() {
return pass(typeexpr, maybeTypeDefault)
}
function maybeTypeDefault(_, value) {
if (value == "=") return cont(typeexpr)
}
function vardef(_, value) {
if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
return pass(pattern, maybetype, maybeAssign, vardefCont);
}
function pattern(type, value) {
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
if (type == "variable") { register(value); return cont(); }
if (type == "spread") return cont(pattern);
if (type == "[") return contCommasep(pattern, "]");
if (type == "{") return contCommasep(proppattern, "}");
}
function proppattern(type, value) {
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
register(value);
return cont(maybeAssign);
}
if (type == "variable") cx.marked = "property";
if (type == "spread") return cont(pattern);
if (type == "}") return pass();
return cont(expect(":"), pattern, maybeAssign);
}
function maybeAssign(_type, value) {
if (value == "=") return cont(expressionNoComma);
}
function vardefCont(type) {
if (type == ",") return cont(vardef);
}
function maybeelse(type, value) {
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
}
function forspec(type, value) {
if (value == "await") return cont(forspec);
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
}
function forspec1(type) {
if (type == "var") return cont(vardef, expect(";"), forspec2);
if (type == ";") return cont(forspec2);
if (type == "variable") return cont(formaybeinof);
return pass(expression, expect(";"), forspec2);
}
function formaybeinof(_type, value) {
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
return cont(maybeoperatorComma, forspec2);
}
function forspec2(type, value) {
if (type == ";") return cont(forspec3);
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
return pass(expression, expect(";"), forspec3);
}
function forspec3(type) {
if (type != ")") cont(expression);
}
function functiondef(type, value) {
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
if (type == "variable") {register(value); return cont(functiondef);}
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
}
function funarg(type, value) {
if (value == "@") cont(expression, funarg)
if (type == "spread") return cont(funarg);
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
return pass(pattern, maybetype, maybeAssign);
}
function classExpression(type, value) {
// Class expressions may have an optional name.
if (type == "variable") return className(type, value);
return classNameAfter(type, value);
}
function className(type, value) {
if (type == "variable") {register(value); return cont(classNameAfter);}
}
function classNameAfter(type, value) {
if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
if (value == "extends" || value == "implements" || (isTS && type == ",")) {
if (value == "implements") cx.marked = "keyword";
return cont(isTS ? typeexpr : expression, classNameAfter);
}
if (type == "{") return cont(pushlex("}"), classBody, poplex);
}
function classBody(type, value) {
if (type == "async" ||
(type == "variable" &&
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
cx.marked = "keyword";
return cont(classBody);
}
if (type == "variable" || cx.style == "keyword") {
cx.marked = "property";
return cont(isTS ? classfield : functiondef, classBody);
}
if (type == "[")
return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody)
if (value == "*") {
cx.marked = "keyword";
return cont(classBody);
}
if (type == ";") return cont(classBody);
if (type == "}") return cont();
if (value == "@") return cont(expression, classBody)
}
function classfield(type, value) {
if (value == "?") return cont(classfield)
if (type == ":") return cont(typeexpr, maybeAssign)
if (value == "=") return cont(expressionNoComma)
return pass(functiondef)
}
function afterExport(type, value) {
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
return pass(statement);
}
function exportField(type, value) {
if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
if (type == "variable") return pass(expressionNoComma, exportField);
}
function afterImport(type) {
if (type == "string") return cont();
if (type == "(") return pass(expression);
return pass(importSpec, maybeMoreImports, maybeFrom);
}
function importSpec(type, value) {
if (type == "{") return contCommasep(importSpec, "}");
if (type == "variable") register(value);
if (value == "*") cx.marked = "keyword";
return cont(maybeAs);
}
function maybeMoreImports(type) {
if (type == ",") return cont(importSpec, maybeMoreImports)
}
function maybeAs(_type, value) {
if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
}
function maybeFrom(_type, value) {
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
}
function arrayLiteral(type) {
if (type == "]") return cont();
return pass(commasep(expressionNoComma, "]"));
}
function enumdef() {
return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
}
function enummember() {
return pass(pattern, maybeAssign);
}
function isContinuedStatement(state, textAfter) {
return state.lastType == "operator" || state.lastType == "," ||
isOperatorChar.test(textAfter.charAt(0)) ||
/[,.]/.test(textAfter.charAt(0));
}
function expressionAllowed(stream, state, backUp) {
return state.tokenize == tokenBase &&
/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
}
// Interface
return {
startState: function(basecolumn) {
var state = {
tokenize: tokenBase,
lastType: "sof",
cc: [],
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
localVars: parserConfig.localVars,
context: parserConfig.localVars && new Context(null, null, false),
indented: basecolumn || 0
};
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
state.globalVars = parserConfig.globalVars;
return state;
},
token: function(stream, state) {
if (stream.sol()) {
if (!state.lexical.hasOwnProperty("align"))
state.lexical.align = false;
state.indented = stream.indentation();
findFatArrow(stream, state);
}
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
var style = state.tokenize(stream, state);
if (type == "comment") return style;
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
return parseJS(state, style, type, content, stream);
},
indent: function(state, textAfter) {
if (state.tokenize == tokenComment) return CodeMirror.Pass;
if (state.tokenize != tokenBase) return 0;
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
// Kludge to prevent 'maybelse' from blocking lexical scope pops
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
var c = state.cc[i];
if (c == poplex) lexical = lexical.prev;
else if (c != maybeelse) break;
}
while ((lexical.type == "stat" || lexical.type == "form") &&
(firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
(top == maybeoperatorComma || top == maybeoperatorNoComma) &&
!/^[,\.=+\-*:?[\(]/.test(textAfter))))
lexical = lexical.prev;
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
lexical = lexical.prev;
var type = lexical.type, closing = firstChar == type;
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
else if (type == "form" && firstChar == "{") return lexical.indented;
else if (type == "form") return lexical.indented + indentUnit;
else if (type == "stat")
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
else return lexical.indented + (closing ? 0 : indentUnit);
},
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
blockCommentStart: jsonMode ? null : "/*",
blockCommentEnd: jsonMode ? null : "*/",
blockCommentContinue: jsonMode ? null : " * ",
lineComment: jsonMode ? null : "//",
fold: "brace",
closeBrackets: "()[]{}''\"\"``",
helperType: jsonMode ? "json" : "javascript",
jsonldMode: jsonldMode,
jsonMode: jsonMode,
expressionAllowed: expressionAllowed,
skipExpression: function(state) {
var top = state.cc[state.cc.length - 1]
if (top == expression || top == expressionNoComma) state.cc.pop()
}
};
});
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
CodeMirror.defineMIME("text/javascript", "javascript");
CodeMirror.defineMIME("text/ecmascript", "javascript");
CodeMirror.defineMIME("application/javascript", "javascript");
CodeMirror.defineMIME("application/x-javascript", "javascript");
CodeMirror.defineMIME("application/ecmascript", "javascript");
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
});
@@ -1,72 +0,0 @@
<!doctype html>
<title>CodeMirror: JSON-LD mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="../../addon/comment/continuecomment.js"></script>
<script src="../../addon/comment/comment.js"></script>
<script src="javascript.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id="nav">
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"/></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">JSON-LD</a>
</ul>
</div>
<article>
<h2>JSON-LD mode</h2>
<div><textarea id="code" name="code">
{
"@context": {
"name": "http://schema.org/name",
"description": "http://schema.org/description",
"image": {
"@id": "http://schema.org/image",
"@type": "@id"
},
"geo": "http://schema.org/geo",
"latitude": {
"@id": "http://schema.org/latitude",
"@type": "xsd:float"
},
"longitude": {
"@id": "http://schema.org/longitude",
"@type": "xsd:float"
},
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"name": "The Empire State Building",
"description": "The Empire State Building is a 102-story landmark in New York City.",
"image": "http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg",
"geo": {
"latitude": "40.75",
"longitude": "73.98"
}
}
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
matchBrackets: true,
autoCloseBrackets: true,
mode: "application/ld+json",
lineWrapping: true
});
</script>
<p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
</article>
@@ -1,482 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("locals",
"[keyword function] [def foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }");
MT("comma-and-binop",
"[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }");
MT("destructuring",
"([keyword function]([def a], [[[def b], [def c] ]]) {",
" [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);",
" [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];",
"})();");
MT("destructure_trailing_comma",
"[keyword let] {[def a], [def b],} [operator =] [variable foo];",
"[keyword let] [def c];"); // Parser still in good state?
MT("class_body",
"[keyword class] [def Foo] {",
" [property constructor]() {}",
" [property sayName]() {",
" [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];",
" }",
"}");
MT("class",
"[keyword class] [def Point] [keyword extends] [variable SuperThing] {",
" [keyword get] [property prop]() { [keyword return] [number 24]; }",
" [property constructor]([def x], [def y]) {",
" [keyword super]([string 'something']);",
" [keyword this].[property x] [operator =] [variable-2 x];",
" }",
"}");
MT("anonymous_class_expression",
"[keyword const] [def Adder] [operator =] [keyword class] [keyword extends] [variable Arithmetic] {",
" [property add]([def a], [def b]) {}",
"};");
MT("named_class_expression",
"[keyword const] [def Subber] [operator =] [keyword class] [def Subtract] {",
" [property sub]([def a], [def b]) {}",
"};");
MT("class_async_method",
"[keyword class] [def Foo] {",
" [property sayName1]() {}",
" [keyword async] [property sayName2]() {}",
"}");
MT("import",
"[keyword function] [def foo]() {",
" [keyword import] [def $] [keyword from] [string 'jquery'];",
" [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
"}");
MT("import_trailing_comma",
"[keyword import] {[def foo], [def bar],} [keyword from] [string 'baz']")
MT("import_dynamic",
"[keyword import]([string 'baz']).[property then]")
MT("import_dynamic",
"[keyword const] [def t] [operator =] [keyword import]([string 'baz']).[property then]")
MT("const",
"[keyword function] [def f]() {",
" [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];",
"}");
MT("for/of",
"[keyword for]([keyword let] [def of] [keyword of] [variable something]) {}");
MT("for await",
"[keyword for] [keyword await]([keyword let] [def of] [keyword of] [variable something]) {}");
MT("generator",
"[keyword function*] [def repeat]([def n]) {",
" [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])",
" [keyword yield] [variable-2 i];",
"}");
MT("let_scoping",
"[keyword function] [def scoped]([def n]) {",
" { [keyword var] [def i]; } [variable-2 i];",
" { [keyword let] [def j]; [variable-2 j]; } [variable j];",
" [keyword if] ([atom true]) { [keyword const] [def k]; [variable-2 k]; } [variable k];",
"}");
MT("switch_scoping",
"[keyword switch] ([variable x]) {",
" [keyword default]:",
" [keyword let] [def j];",
" [keyword return] [variable-2 j]",
"}",
"[variable j];")
MT("leaving_scope",
"[keyword function] [def a]() {",
" {",
" [keyword const] [def x] [operator =] [number 1]",
" [keyword if] ([atom true]) {",
" [keyword let] [def y] [operator =] [number 2]",
" [keyword var] [def z] [operator =] [number 3]",
" [variable console].[property log]([variable-2 x], [variable-2 y], [variable-2 z])",
" }",
" [variable console].[property log]([variable-2 x], [variable y], [variable-2 z])",
" }",
" [variable console].[property log]([variable x], [variable y], [variable-2 z])",
"}")
MT("quotedStringAddition",
"[keyword let] [def f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];");
MT("quotedFatArrow",
"[keyword let] [def f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];");
MT("fatArrow",
"[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);",
"[variable a];", // No longer in scope
"[keyword let] [def f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];",
"[variable c];");
MT("spread",
"[keyword function] [def f]([def a], [meta ...][def b]) {",
" [variable something]([variable-2 a], [meta ...][variable-2 b]);",
"}");
MT("quasi",
"[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
MT("quasi_no_function",
"[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
MT("indent_statement",
"[keyword var] [def x] [operator =] [number 10]",
"[variable x] [operator +=] [variable y] [operator +]",
" [atom Infinity]",
"[keyword debugger];");
MT("indent_if",
"[keyword if] ([number 1])",
" [keyword break];",
"[keyword else] [keyword if] ([number 2])",
" [keyword continue];",
"[keyword else]",
" [number 10];",
"[keyword if] ([number 1]) {",
" [keyword break];",
"} [keyword else] [keyword if] ([number 2]) {",
" [keyword continue];",
"} [keyword else] {",
" [number 10];",
"}");
MT("indent_for",
"[keyword for] ([keyword var] [def i] [operator =] [number 0];",
" [variable i] [operator <] [number 100];",
" [variable i][operator ++])",
" [variable doSomething]([variable i]);",
"[keyword debugger];");
MT("indent_c_style",
"[keyword function] [def foo]()",
"{",
" [keyword debugger];",
"}");
MT("indent_else",
"[keyword for] (;;)",
" [keyword if] ([variable foo])",
" [keyword if] ([variable bar])",
" [number 1];",
" [keyword else]",
" [number 2];",
" [keyword else]",
" [number 3];");
MT("indent_funarg",
"[variable foo]([number 10000],",
" [keyword function]([def a]) {",
" [keyword debugger];",
"};");
MT("indent_below_if",
"[keyword for] (;;)",
" [keyword if] ([variable foo])",
" [number 1];",
"[number 2];");
MT("indent_semicolonless_if",
"[keyword function] [def foo]() {",
" [keyword if] ([variable x])",
" [variable foo]()",
"}")
MT("indent_semicolonless_if_with_statement",
"[keyword function] [def foo]() {",
" [keyword if] ([variable x])",
" [variable foo]()",
" [variable bar]()",
"}")
MT("multilinestring",
"[keyword var] [def x] [operator =] [string 'foo\\]",
"[string bar'];");
MT("scary_regexp",
"[string-2 /foo[[/]]bar/];");
MT("indent_strange_array",
"[keyword var] [def x] [operator =] [[",
" [number 1],,",
" [number 2],",
"]];",
"[number 10];");
MT("param_default",
"[keyword function] [def foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {",
" [keyword return] [variable-2 x];",
"}");
MT("new_target",
"[keyword function] [def F]([def target]) {",
" [keyword if] ([variable-2 target] [operator &&] [keyword new].[keyword target].[property name]) {",
" [keyword return] [keyword new]",
" .[keyword target];",
" }",
"}");
MT("async",
"[keyword async] [keyword function] [def foo]([def args]) { [keyword return] [atom true]; }");
MT("async_assignment",
"[keyword const] [def foo] [operator =] [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; };");
MT("async_object",
"[keyword let] [def obj] [operator =] { [property async]: [atom false] };");
// async be highlighet as keyword and foo as def, but it requires potentially expensive look-ahead. See #4173
MT("async_object_function",
"[keyword let] [def obj] [operator =] { [property async] [property foo]([def args]) { [keyword return] [atom true]; } };");
MT("async_object_properties",
"[keyword let] [def obj] [operator =] {",
" [property prop1]: [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; },",
" [property prop2]: [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; },",
" [property prop3]: [keyword async] [keyword function] [def prop3]([def args]) { [keyword return] [atom true]; },",
"};");
MT("async_arrow",
"[keyword const] [def foo] [operator =] [keyword async] ([def args]) [operator =>] { [keyword return] [atom true]; };");
MT("async_jquery",
"[variable $].[property ajax]({",
" [property url]: [variable url],",
" [property async]: [atom true],",
" [property method]: [string 'GET']",
"});");
MT("async_variable",
"[keyword const] [def async] [operator =] {[property a]: [number 1]};",
"[keyword const] [def foo] [operator =] [string-2 `bar ${][variable async].[property a][string-2 }`];")
MT("bigint", "[number 1n] [operator +] [number 0x1afn] [operator +] [number 0o064n] [operator +] [number 0b100n];")
MT("async_comment",
"[keyword async] [comment /**/] [keyword function] [def foo]([def args]) { [keyword return] [atom true]; }");
MT("indent_switch",
"[keyword switch] ([variable x]) {",
" [keyword default]:",
" [keyword return] [number 2]",
"}")
MT("regexp_corner_case",
"[operator +]{} [operator /] [atom undefined];",
"[[[meta ...][string-2 /\\//] ]];",
"[keyword void] [string-2 /\\//];",
"[keyword do] [string-2 /\\//]; [keyword while] ([number 0]);",
"[keyword if] ([number 0]) {} [keyword else] [string-2 /\\//];",
"[string-2 `${][variable async][operator ++][string-2 }//`];",
"[string-2 `${]{} [operator /] [string-2 /\\//}`];")
MT("return_eol",
"[keyword return]",
"{} [string-2 /5/]")
var ts_mode = CodeMirror.getMode({indentUnit: 2}, "application/typescript")
function TS(name) {
test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1))
}
TS("typescript_extend_type",
"[keyword class] [def Foo] [keyword extends] [type Some][operator <][type Type][operator >] {}")
TS("typescript_arrow_type",
"[keyword let] [def x]: ([variable arg]: [type Type]) [operator =>] [type ReturnType]")
TS("typescript_class",
"[keyword class] [def Foo] {",
" [keyword public] [keyword static] [property main]() {}",
" [keyword private] [property _foo]: [type string];",
"}")
TS("typescript_literal_types",
"[keyword import] [keyword *] [keyword as] [def Sequelize] [keyword from] [string 'sequelize'];",
"[keyword interface] [def MyAttributes] {",
" [property truthy]: [string 'true'] [operator |] [number 1] [operator |] [atom true];",
" [property falsy]: [string 'false'] [operator |] [number 0] [operator |] [atom false];",
"}",
"[keyword interface] [def MyInstance] [keyword extends] [type Sequelize].[type Instance] [operator <] [type MyAttributes] [operator >] {",
" [property rawAttributes]: [type MyAttributes];",
" [property truthy]: [string 'true'] [operator |] [number 1] [operator |] [atom true];",
" [property falsy]: [string 'false'] [operator |] [number 0] [operator |] [atom false];",
"}")
TS("typescript_extend_operators",
"[keyword export] [keyword interface] [def UserModel] [keyword extends]",
" [type Sequelize].[type Model] [operator <] [type UserInstance], [type UserAttributes] [operator >] {",
" [property findById]: (",
" [variable userId]: [type number]",
" ) [operator =>] [type Promise] [operator <] [type Array] [operator <] { [property id], [property name] } [operator >>];",
" [property updateById]: (",
" [variable userId]: [type number],",
" [variable isActive]: [type boolean]",
" ) [operator =>] [type Promise] [operator <] [type AccountHolderNotificationPreferenceInstance] [operator >];",
" }")
TS("typescript_interface_with_const",
"[keyword const] [def hello]: {",
" [property prop1][operator ?]: [type string];",
" [property prop2][operator ?]: [type string];",
"} [operator =] {};")
TS("typescript_double_extend",
"[keyword export] [keyword interface] [def UserAttributes] {",
" [property id][operator ?]: [type number];",
" [property createdAt][operator ?]: [type Date];",
"}",
"[keyword export] [keyword interface] [def UserInstance] [keyword extends] [type Sequelize].[type Instance][operator <][type UserAttributes][operator >], [type UserAttributes] {",
" [property id]: [type number];",
" [property createdAt]: [type Date];",
"}");
TS("typescript_index_signature",
"[keyword interface] [def A] {",
" [[ [variable prop]: [type string] ]]: [type any];",
" [property prop1]: [type any];",
"}");
TS("typescript_generic_class",
"[keyword class] [def Foo][operator <][type T][operator >] {",
" [property bar]() {}",
" [property foo](): [type Foo] {}",
"}")
TS("typescript_type_when_keyword",
"[keyword export] [keyword type] [type AB] [operator =] [type A] [operator |] [type B];",
"[keyword type] [type Flags] [operator =] {",
" [property p1]: [type string];",
" [property p2]: [type boolean];",
"};")
TS("typescript_type_when_not_keyword",
"[keyword class] [def HasType] {",
" [property type]: [type string];",
" [property constructor]([def type]: [type string]) {",
" [keyword this].[property type] [operator =] [variable-2 type];",
" }",
" [property setType]({ [def type] }: { [property type]: [type string]; }) {",
" [keyword this].[property type] [operator =] [variable-2 type];",
" }",
"}")
TS("typescript_function_generics",
"[keyword function] [def a]() {}",
"[keyword function] [def b][operator <][type IA] [keyword extends] [type object], [type IB] [keyword extends] [type object][operator >]() {}",
"[keyword function] [def c]() {}")
TS("typescript_complex_return_type",
"[keyword function] [def A]() {",
" [keyword return] [keyword this].[property property];",
"}",
"[keyword function] [def B](): [type Promise][operator <]{ [[ [variable key]: [type string] ]]: [type any] } [operator |] [atom null][operator >] {",
" [keyword return] [keyword this].[property property];",
"}")
TS("typescript_complex_type_casting",
"[keyword const] [def giftpay] [operator =] [variable config].[property get]([string 'giftpay']) [keyword as] { [[ [variable platformUuid]: [type string] ]]: { [property version]: [type number]; [property apiCode]: [type string]; } };")
TS("typescript_keyof",
"[keyword function] [def x][operator <][type T] [keyword extends] [keyword keyof] [type X][operator >]([def a]: [type T]) {",
" [keyword return]")
TS("typescript_new_typeargs",
"[keyword let] [def x] [operator =] [keyword new] [variable Map][operator <][type string], [type Date][operator >]([string-2 `foo${][variable bar][string-2 }`])")
TS("modifiers",
"[keyword class] [def Foo] {",
" [keyword public] [keyword abstract] [property bar]() {}",
" [property constructor]([keyword readonly] [keyword private] [def x]) {}",
"}")
TS("arrow prop",
"({[property a]: [def p] [operator =>] [variable-2 p]})")
TS("generic in function call",
"[keyword this].[property a][operator <][type Type][operator >]([variable foo]);",
"[keyword this].[property a][operator <][variable Type][operator >][variable foo];")
TS("type guard",
"[keyword class] [def Appler] {",
" [keyword static] [property assertApple]([def fruit]: [type Fruit]): [variable-2 fruit] [keyword is] [type Apple] {",
" [keyword if] ([operator !]([variable-2 fruit] [keyword instanceof] [variable Apple]))",
" [keyword throw] [keyword new] [variable Error]();",
" }",
"}")
TS("type as variable",
"[variable type] [operator =] [variable x] [keyword as] [type Bar];");
TS("enum body",
"[keyword export] [keyword const] [keyword enum] [def CodeInspectionResultType] {",
" [def ERROR] [operator =] [string 'problem_type_error'],",
" [def WARNING] [operator =] [string 'problem_type_warning'],",
" [def META],",
"}")
TS("parenthesized type",
"[keyword class] [def Foo] {",
" [property x] [operator =] [keyword new] [variable A][operator <][type B], [type string][operator |](() [operator =>] [type void])[operator >]();",
" [keyword private] [property bar]();",
"}")
TS("abstract class",
"[keyword export] [keyword abstract] [keyword class] [def Foo] {}")
var jsonld_mode = CodeMirror.getMode(
{indentUnit: 2},
{name: "javascript", jsonld: true}
);
function LD(name) {
test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));
}
LD("json_ld_keywords",
'{',
' [meta "@context"]: {',
' [meta "@base"]: [string "http://example.com"],',
' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],',
' [property "likesFlavor"]: {',
' [meta "@container"]: [meta "@list"]',
' [meta "@reverse"]: [string "@beFavoriteOf"]',
' },',
' [property "nick"]: { [meta "@container"]: [meta "@set"] },',
' [property "nick"]: { [meta "@container"]: [meta "@index"] }',
' },',
' [meta "@graph"]: [[ {',
' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],',
' [property "name"]: [string "John Lennon"],',
' [property "modified"]: {',
' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],',
' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]',
' }',
' } ]]',
'}');
LD("json_ld_fake",
'{',
' [property "@fake"]: [string "@fake"],',
' [property "@contextual"]: [string "@identifier"],',
' [property "user@domain.com"]: [string "@graphical"],',
' [property "@ID"]: [string "@@ID"]',
'}');
})();
@@ -1,61 +0,0 @@
<!doctype html>
<title>CodeMirror: TypeScript mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="javascript.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">TypeScript</a>
</ul>
</div>
<article>
<h2>TypeScript mode</h2>
<div><textarea id="code" name="code">
class Greeter {
greeting: string;
constructor (message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
var greeter = new Greeter("world");
var button = document.createElement('button')
button.innerText = "Say Hello"
button.onclick = function() {
alert(greeter.greet())
}
document.body.appendChild(button)
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
mode: "text/typescript"
});
</script>
<p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
</article>
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -1,346 +0,0 @@
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
direction: ltr;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */
.CodeMirror-cursor {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0 !important;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-fat-cursor-mark {
background-color: rgba(20, 255, 20, 0.5);
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@-moz-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@-webkit-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror-overwrite .CodeMirror-cursor {}
.cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-rulers {
position: absolute;
left: 0; right: 0; top: -50px; bottom: -20px;
overflow: hidden;
}
.CodeMirror-ruler {
border-left: 1px solid #ccc;
top: 0; bottom: 0;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
.CodeMirror-composing { border-bottom: 2px solid; }
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actual scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
min-height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
vertical-align: top;
margin-bottom: -30px;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0; bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
-webkit-font-variant-ligatures: contextual;
font-variant-ligatures: contextual;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
padding: 0.1px; /* Force widget margins to stay inside of the container */
}
.CodeMirror-widget {}
.CodeMirror-rtl pre { direction: rtl; }
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-cursor {
position: absolute;
pointer-events: none;
}
.CodeMirror-measure pre { position: static; }
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
div.CodeMirror-dragcursors {
visibility: visible;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
.cm-searching {
background-color: #ffa;
background-color: rgba(255, 255, 0, .4);
}
/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
@@ -1,41 +0,0 @@
/* Based on Sublime Text's Monokai theme */
.cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2; }
.cm-s-monokai div.CodeMirror-selected { background: #49483E; }
.cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px; }
.cm-s-monokai .CodeMirror-guttermarker { color: white; }
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
.cm-s-monokai span.cm-comment { color: #75715e; }
.cm-s-monokai span.cm-atom { color: #ae81ff; }
.cm-s-monokai span.cm-number { color: #ae81ff; }
.cm-s-monokai span.cm-comment.cm-attribute { color: #97b757; }
.cm-s-monokai span.cm-comment.cm-def { color: #bc9262; }
.cm-s-monokai span.cm-comment.cm-tag { color: #bc6283; }
.cm-s-monokai span.cm-comment.cm-type { color: #5998a6; }
.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; }
.cm-s-monokai span.cm-keyword { color: #f92672; }
.cm-s-monokai span.cm-builtin { color: #66d9ef; }
.cm-s-monokai span.cm-string { color: #e6db74; }
.cm-s-monokai span.cm-variable { color: #f8f8f2; }
.cm-s-monokai span.cm-variable-2 { color: #9effff; }
.cm-s-monokai span.cm-variable-3, .cm-s-monokai span.cm-type { color: #66d9ef; }
.cm-s-monokai span.cm-def { color: #fd971f; }
.cm-s-monokai span.cm-bracket { color: #f8f8f2; }
.cm-s-monokai span.cm-tag { color: #f92672; }
.cm-s-monokai span.cm-header { color: #ae81ff; }
.cm-s-monokai span.cm-link { color: #ae81ff; }
.cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0; }
.cm-s-monokai .CodeMirror-activeline-background { background: #373831; }
.cm-s-monokai .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
@@ -1,28 +0,0 @@
#menu > li .fa.lightshop:before {
content: '';
display: block;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAAByCAYAAACP3YV9AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAAKhklEQVR42u2dfbBWRR3HP1zNSkUoelGzt9myKccaw42pkCFNQGY2yvKNRm1EMSLB8N0wGhQmTU1q4rVGNCXGuL2t4AVmGgZxHGYbCkzDyU0CMpksUMZEwaY/9jx2eXnus3te9pxzOd+ZO/c89/72d37nfJ49Z993AI1SSxt7EvAB4P3AycDxvT6fABxX0KlfA9YBv1BSzAcYUPbNqIu0sUOBTwGnAacApwIDy44LmKSkmH9k2VFUUdrYo4AxwHDg08nPEWXH1UafBxqQLWljz8aBOwv4bNnxBGg4HOaPVm3saOBM4MuAKDueDDr2sMuR2tgBwDeACbj3XX/QKYcNyOTRqYCryo6lAO3o9yC1saOAC4DLyo6lQA3s1yC1sXcC15QdRxvt6XX8EvCuDL76J0ht7ARgDnBMxNP+HdgCbE2Onwd2ALuSn53Ai8nxq0qKvUmsY4HlGc99TL8CmbwHr8SVQovSc8Am4E/AH4GNwNMtMIHx5gERgH4DUht7CXBfAa7XAo/jmsTWKyn+mVO8uUEEBvULkNrY24Hrc3L3EtAN9ABaSfFKAfHmCRHoBzlSG7sIuDwHV0uAXyopuguON3eIUHOQ2tj7gYszuLC4QtECJcVrEeItBCJwRG1BamOXABelTP4k8D0lxQMR4y0KIsDrtQSZ5MQ0ELcCtygp7o8cb1qIY4EVPoa1A6mN/SnpHqczlBQzS4g3C8QNnrYvd8W+sCzSxt5DeFPb74GxdYOopHgkwH5fbXKkNnYGMDUw2SIlxcSS4s0D4iDfRLXIkdrY8cB3A5PdUXOIAEd7pnux8iCTZrcHA5PNVFLcUFK8eT5OfXPkfyoPErgl0H62kmJGGYEW8E4c7Jm+2jlSGzsfOCMgyUPArJJiLaJgM9jTR3VBamOn4HoyQnQ+cK821vfdklesRZVOfR6te5UUuysJMhkUNSdl8qgwC65ivNPDzw6obqn1xozpo8CMUE880cPmX1BBkNrY6cDIHFwVCjNSZf8kD5vnoGIgtbFjgFtzdFkIzIgtNu/1sLFQMZDAtAJ85gozIkTwA7kFKgRSG3s5cLan+aOB7nOBGROiNnYwcKyH6RaoEEjgBwG2swlvd80EM3JOBDc9z0fPQkVAamNn4fftA7heSdGjpPghkWCWABHgw5521QCZjAS/2dN8jZLi+60PGWDOC4ivDIgAn/Cw2aWk2AkVAIkbzu+rOw78Q0qYl2hjx3UyKhEi+M0Oe7p1UCrIpLrh21E8u93NSQlzeIfYyoQIfjnyidZB2TnywgDbm5MurUMqBcx17f5RJkRt7Hht7Crgox7mG1sHpU10TaCsSpF0lJJidR9+p9C5nfZHSoopbdJHh5jcizOBicDbA5KOUFI8CuXmyNEp063KmDPnVgVikvtW4r7QNxIGEWB966DMHPnfjOdPkzPnKikmt7GPAjH5En4Ol/uGZLj+DUqKoa0PpYDUxk4EFuTgqhPMcbhCzXuAdUqKuW3sCoeojb0IuJT0T6IDtd+XsiyQBjg9J3d9wvSIpTCISe4bict978jpelsar6T4eetDdJBJA8DKnN2mglkURG3shbjcNybn62ypW0nxld5/KGNc6/DsLg7SKm1sEMy8ISa5bwRueIpPz36odgJ/w70iDlrQoowcuRn4SEHuvWDmCVEbewEu951T0DX9BliipHioL6OoIAPqjt24wlAR9cxcICYFtpnAuwu4VX8AfgYsbrWldlLsR6vvY3WpkmJ18j4Nhdn2MZszxDxK3b21E1gMrFRSBJchYoOUHjZ7lBTLADLAHAnsBzLnd2Ke73mvR2cnVTFHLuv9ISXM/c5TQOl0a8b78ARwLwGPzk6KBlIb+3H81jc96MalgPlGg3hBVYx1QZ6cXsbBW5FT78h+itnW+hlPu55D/TF5543ySL9cSfFtKK6eqKTowZVS/xLgc4GS4qoiIEJckEM9bDYrKf7d7p8eMJcDk6D4ZrcE5hnArzz9TtPGGm1sIdWUmCA/5mHTcap1HzAfBr6upNgWqwFcSbFDSXEu8BPPJKcDK7SxN6WIrU/FBOnTUfpXH0e9YN4GrAFuU1IoJcX2MvoTlRRX4Eb2+Wq2Nra71R2njX1TmvP2VpQGAW3scbgF9TrpvFbVI+V5Sh2ekbJ+uR4YlvxeiytIrVJS7AlxEitH+kxGAbeqYiqVDRFASbEQVwj6c0CyYb1+X4erV76ijf1WyLljgfRdizQVyCpAbCkpBI3ggPpwCt0dAjMWyKM87V4NdVwliC0pKV5QUpwHLMroyrsFKRZI30UNdoc4rSLE3kpWFckyFf4pX8NYIH0X7Huzr8OqQ2xJSTEdN0IgjbxbkGKB9F3z9C0+RnWB2JKSYhEB0xQSXRvSCxIL5C5Pu459e3WDmMS8kKTFyVPLlBR3hZwjFsjtnnbv63BD6ghxMXBFQJLthEEHIoFUUjyP33uybX9l3SBqY9+mjV2KGwYSoslKihdCzxeziW6Th82pbW5K3SCOAR4jbKYZwF1Kit+mOWdMkD5rjx401a2GECfh+lR92pZ7a46S4tq0540J0qsondyI1nHdIM4B5qZIukhJcXWWc8cc6rHG024SMK9OEJNH6Q2kWx+o7XyUEMUeDvkkfv2SX8K/w7a3yoB4DXBnyuRtp/eFKvbgq278QFYeYpILp5J+WsCtSorv5BVPbJCh6+P4KjbE6WRboWtqMo8zN5UxZWA5bgX9vBQNojb2YuB23Nb0abQdt0v5w3nHVsYkngXkBzIKxGR+x3X4DSBrp+U4iNuKiLGs+ZG/5hB1xkAVDlEbeykwGb8R8n3px0qKbxYZa1nbRcwjG8jCIGpjB+H2Yb6abFPDW7oyGQJSqMpcQ+AmwkaetXSukiJNqbavWLpwK2J9gfT7bR2olcDdSoo0M8qCVdajNeuGX48BC7PscaWNHYLbBX0c8MWcL3G6kiLqIvlllFrz3LXtddzA5E24ttxtuL2N9+J6W44G3opbDOIEXKP8h4DTgJMLuLweXJtpT2ZPgYrdslPk1ntlajcwTUnhO+I8d0UD2Y8hzkrG5ZSqWCPN+yPE+3ATVKMUZjqpcJD9EOKDwANlvAf7UqEgM0C8DNev5zWqLpLuwU1STb04U5EqDGQGiOe0vu3a2LmkGIiUozbgOn3nlxiDlwoBmQfEXr5G49Z1/Vqke2KBpcDaqrz/fJQ7yDwhHuD3OGACbkDTMG+vnbUbNwxlNfCIkmJz3vckhnIFWRTEQ5xnCHAWbpLLUOCT+L1Pd+GmvD2F23v5cSXFRo90lVduIGNB7OP8J+LmYQ7k/1tP7MPluJ3AP/pan6DuygVk2RAb5QCygVgNZQLZQKyOUoNsIFZLqUA2EKunYJANxGoqCGQDsbryBtlArLa8QDYQq6+OIBuI9VCfIBuI9VFbkA3EeumQIBuI9dNBIBuI9dR+IBuI9dUbIBuI9dYAyARxTJpdYxrlrwHJ4KY0OaqBWCF1Eb5qITQQK6cu4IOBaRqIFVQX8GyAfQOxouoCfudp20CssLpwQ/I7bXnXQKy4WtWPI3GzjM4/hE0DsQbqAlBS7AO+itvj6Znkf8/gtrltINZV2tjjy46hUZj+B5qgiCysjCLXAAAAAElFTkSuQmCC');
width: 18px;
height: 18px;
background-size: 100%;
background-repeat: no-repeat;
margin-bottom: -3px;
}
#menu > li.active .fa.lightshop:before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAAByCAYAAACP3YV9AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAAKi0lEQVR42u2de9BWRR3HP6B520SMbl66zFQ21biNYTEVMqQJyIxRljcatRHFiGQN74bRoDBp3rYmrjWiKTEGXQW5zDQM4jiMDcWahJOkAZpMFgSzI4pZf+x53h7gfd5nz233nJfznXnmfZ7n/e3v/M75PHvO3ncAjUqV0OYw4PjkNbjt/ZGJydHAUb0k3QX8F3gT+Hfy2p2k3WSV3NFuPCD2idZdQpuTgfcD7wNOAd7d9vkEYFBJh34dWAf83Co5twGZQkKbocCngNOAjwGnAsfGjguYdHjsCKoqoc0RwBhgOPDp5HVY7Lg66PNNjmyT0OZsHLizgM/GjieFdhzyIIU2o4EzgS8DH4gdT1YdkiCFNgOAbwATcM+72uuQApncOs8Fro4dS9E6JEAKbUYBFwKXx46lLPV7kEKbu4BrY8fRQXvb3u8G3pnVUb8FKbSZAGhABDzsi8ALwNbk/cvADlwrzS5gJ66FZhfwmlVyXxLrWGBZngP3O5DJc/AqXCm0LL0EGOBPwB+BjcCzLTAp480NEfoZSKHNpcADJbheCzyJaxJbb5X8R0HxFgIR+hFIoc0dwA0FudsNLAVWAL+1Sr5aQryFQYR+AlJoswC4ogBXi4BfWCWXlhxvoRChH4AU2jwIXJLDxRZcoWieVfL1APEWDhFqDlJoswi4OGPyZ4DvWSUfChhvKRABatv7keTELBC3ArdaJR8MHG9WiGOB5d2MaglSaPMTst1Op1slZ0SINw/EDT6GA0OfVF4Jbe4jfVPb74GxdYNolXzM17hWOVJoMx1QKZMtsEpOjBRvERCP80lQmxwptBkPfDdlsjtrDhHgGJ9EtQCZNLs9nDLZDKvkjZHiLfJ22q9y5K0p7WdZJafHCLSEZ+Jgn8SVBym0mQuckSLJI8DMSLGWUbAZ7OOg0iCFNlNwPRlpdAFwv9DG69lSYKxllU59bq37KgsyGRSlMyYPCrPkKsY7PPzsqCxI4Kac6YPADFBPPNHD5p+VBCm0mQaMLMBVqTADVfZP9rB5qXIghTZjgNsKdFkKzFAtNsB7PGy2VA4kMLUEn4XCDAgR/EC+UCmQQpsrgLM9zR9P6b4QmCEhCm0GA2/1MK0WSODeFLazSN/umgtm4JwIbnqej56vDEihzUz8fn0AN1glV1glf0AgmBEgAnzI064aIJOR4Ld4mq+xSn6/9SEHzDkp4osBEeDjHja7rJI7KwESN5zfV3ce+EVGmJcKbcZ1M4oIEfxmhz0LFWiiS6obvh3FszpdnIwwh3eJLSZE8MuRT0MFQAIXpbC9JenS6lUZYK7r9I+YEIU244U2q4CPeJhvhMij6BIoqzIkHWWVXN2H3yl0b6f9oVVySof0wSEm1+JMYCLwthRJR1glH4+dI0dnTLcqZ86cXRWISe5biftB30Q6iADrIX6OfDNnDFly5myr5OQO9kEgJj/Cz+Fy35Ac57/BKjkUIoIU2kwE5hXgqhvMcbhCzUnAOqvk7A52pUMU2lwMXEb2O9GB6vlRxgT5FHB6Qe76hOkRS2kQk9w3Epf73l7Q+bY03ir5M4gEMmkAWFmw20wwy4IotLkIl/vGFHyeLS21Sn6l9SHWuNbh+V0cpFVCm1Qwi4aY5L4RuOEpPj37abUT+BvuEbHfghaxcuRm4MMlufeCWSREoc2FuNx3Tknn9GtgkVXykU4GwUGmqDsuxRWGyqhnFgIxKbDNAN5VwqX6A/BTYKFVcmc34xi3Vt/b6mKr5OrkeZoWZsfbbMEQiyh1t2snsBBYaZVMVYaIAfKTHjZ7rZJLAHLAHAnsB7LgZ2KRz/mut85uqmqOXNL+ISPM/Y5TQul0a87r8DRwP563zm4KClJoI/Fb3/SgC5cBZk+DeElVjHWpPCWngYO3vKDekR6Fbmv9jKfdil6vgnvmjfJIv8wq+W0or55olVyBK6X+JYXPeVbJq4uGCOFBDvWw2WyV/Fenf3rAXAZMgvKb3RKYZwC/9PQ7VWjzlNCm8GpKaJAf9bDpOtW6D5iPAl+3Sm4L1QBuldxhlTwP+LFnktOB5UKbmzPE1lGhQfp0lP7Vx1EbzNuBNcDtVslzrZLbY/QnWiWvxI3s89Usoc3SVnec0OYtWY7bUrAGAaHNINyCet10fqvqkfE4UYdnZKxfrgeGJX/X4gpSq6ySe30dhMyRPpNRwK2qmEmxIQJYJefjCkF/TpFsWNvf63H1yleFNt/ydRASpO9apJlAVgFiS0khaAQH1Icz6B5fmCFBHuFp91pax1WC2JJV8hWr5PnAgpyuvFqQQoL0WtQA2JPGaRUhtitZVSTPVPhNPkYhQfou2Hekp13lIbZklZyGGyGQRV4tSCFB+q55epSPUV0gtmSVXECKaQqJrvPtBQkJcpenXde+vbpBTGKeT9Li5KklVsm7fY1DgtzuaffeLhekjhAXAlemSLKddNDDgbRKvozfc7Jjf2XdIAptjhfaLMYNA0mjyVbJV9IkCN1EZzxsTu1wUeoGcQzwBOlmmgHcbZX8TdrjhQbps/boQVPdaghxEq5P1adtuV3aKnldlmOGBulVlE4uROt93SBqYHaGpAusktdkPW7ooR5rPO0mAXPqBDG5ld5ItvWBOs5H8VWM4ZDP4Ncv+SX8O2zbFQPitcBdGZN3nN6XRjEGXy3FD2TlISa5UJF9WsBtVsnvFBFLDJBp18fxVWiI08i3QpdK5nEWolhTBpbhVtAvSsEgCm0uAe7AbU2fRduBSVbJR4uMK9YknnkUBzIIxGR+x/X4DSDrpGU4iNuKji/m/Mhf0UudMaVKhyi0uQyYjN8I+b70I6vkN8uKM+Z2EXPIB7I0iEKb43D7MF9DvqnhLV2VDAEpTbHXELiZdCPPWjrPKpmlVNtXLANxK2J9gez7bR2olcA9VsksM8pSKeatNe+GX08A8/PscSW0GYLbBX0c8MWCT3GaVTLYIvmxSq1F7tr2H9zAZINry92G29t4H6635RjgaNxiECfgGuU/CJwGnFLC6a3AtZmuyO0phWK07JS29V5k7QGmWiV9R5wXqqAg+zHEmcm4nGgKOdK8P0J8ADdBtfTCTDcFAdkPIT4MPBT6OdiXSgeZA+LluH49r1F1gXQfbpJq5sWZylKpIHNAPKf1axfazCblQKSCtQHX6Ts3YgxdVRrIIiC2+RqNW9f1a4GuyxZgMbC2Cs8/H5UCskiIB/gdBEzADWga5u21u/bghqGsBh6zSm4u47qUqcJBlgWxl+MMAc7CTXIZCnwCv+fpLtyUt024vZeftEpuLPo6hFahIENB7OP4J+LmYR7L/7eeeAOX43YCf+9rfYI6qzCQsSEe6ioEZAMxvnKDbCBWQ7lANhCro8wgG4jVUiaQDcTqKTXIBmI1lQpkA7G68gbZQKy2vEA2EKuvriAbiPVQnyAbiPVRR5ANxHqpV5ANxPrpIJANxHpqP5ANxPqqB2QOiGPS7hrTqHgNgJ7BTVlyVAOxImqts5N21UJoIFZKA4Q2J+G/4F9LDcSKaaBV8kXg+RRpGogVVOvW+jtP+wZiRdUCOQnotuVdA7HCaq9+HI6bZXRBL3YNxIqrZ3VIq+QbwFdxezw9l3z9HG6b2wZixfU/3vyHwyWaeT4AAAAASUVORK5CYII=');
}
/* fix collapse1 bug */
#menu-lightshop > ul > li:first-child {
display: none;
}
#menu-lightshop .badge {
font-weight: normal;
margin: -2px 0 0 5px;
background: transparent;
box-shadow: 0 0 0 1px inset;
color: inherit;
line-height: 9px;
height: 13px;
padding: 2px 5px;
font-size: 10px;
}
@@ -1,601 +0,0 @@
/* custom inclusion of right, left and below tabs */
.tabs-below > .nav-tabs,
.tabs-right > .nav-tabs,
.tabs-left > .nav-tabs {
border-bottom: 0;
}
.tab-content > .tab-pane,
.pill-content > .pill-pane {
display: none;
}
.tab-content > .active,
.pill-content > .active {
display: block;
}
.tabs-below > .nav-tabs {
border-top: 1px solid #ddd;
}
.tabs-below > .nav-tabs > li {
margin-top: -1px;
margin-bottom: 0;
}
.tabs-below > .nav-tabs > li > a {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.tabs-below > .nav-tabs > li > a:hover,
.tabs-below > .nav-tabs > li > a:focus {
border-top-color: #ddd;
border-bottom-color: transparent;
}
.tabs-below > .nav-tabs > .active > a,
.tabs-below > .nav-tabs > .active > a:hover,
.tabs-below > .nav-tabs > .active > a:focus {
border-color: transparent #ddd #ddd #ddd;
}
.tabs-left > .nav-tabs > li,
.tabs-right > .nav-tabs > li {
float: none;
}
.tabs-left > .nav-tabs > li > a,
.tabs-right > .nav-tabs > li > a {
min-width: 74px;
margin-right: 0;
margin-bottom: 3px;
}
.tabs-left > .nav-tabs {
float: left;
border-right: 1px solid #ddd;
width: 200px;
margin-bottom: -15px;
padding-bottom: 25px;
}
.tabs-left > .nav-tabs > li > a {
margin-right: -1px;
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.tabs-left > .nav-tabs > li > a:hover,
.tabs-left > .nav-tabs > li > a:focus {
border-color: #eeeeee #dddddd #eeeeee #eeeeee;
}
.tabs-left > .nav-tabs .active > a,
.tabs-left > .nav-tabs .active > a:hover,
.tabs-left > .nav-tabs .active > a:focus {
border-color: #ddd transparent #ddd #ddd;
*border-right-color: #ffffff;
}
.tabs-right > .nav-tabs {
float: right;
margin-left: 19px;
border-left: 1px solid #ddd;
}
.tabs-right > .nav-tabs > li > a {
margin-left: -1px;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.tabs-right > .nav-tabs > li > a:hover,
.tabs-right > .nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #eeeeee #dddddd;
}
.tabs-right > .nav-tabs .active > a,
.tabs-right > .nav-tabs .active > a:hover,
.tabs-right > .nav-tabs .active > a:focus {
border-color: #ddd #ddd #ddd transparent;
*border-left-color: #ffffff;
}
.tabs-left > .tab-content {
float: right;
width: calc(100% - 199px);
border-left: 1px solid #ddd;
margin-left: -1px;
padding-left: 15px;
padding-right: 0;
margin-bottom: -15px;
}
.form-group {
margin-left: 0 !important;
margin-right: 0 !important;
}
.code{
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
.btn-default.btn-on.active {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn.btn-default.btn-on,
.btn.btn-default.btn-off
{
width: 50%;
}
.btn-group.on-off {
width: 100%;
}
.radio, .checkbox {
position: relative;
padding-left: 20px;
margin-bottom: 0;
vertical-align: middle;
font-weight: normal;
cursor: pointer;
}
.radio input[type="radio"] {
vertical-align: top;
}
.thumbnail {
display: inline-block;
margin-bottom: 0;
margin-right: 30px;
}
.thumbnail p {
margin: 0;
text-align: center;
}
.panel-default {
border-color: #ddd;
}
.panel-default > .panel-heading {
color: #333333;
background-color: #f5f5f5;
border-color: #ddd;
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #ddd;
}
.panel-default > .panel-heading .badge {
color: #f5f5f5;
background-color: #333333;
}
.panel-default > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #ddd;
}
.panel-primary {
border-color: #337ab7;
}
.panel-primary > .panel-heading {
color: #fff;
background-color: #337ab7;
border-color: #337ab7;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #337ab7;
}
.panel-primary > .panel-heading .badge {
color: #337ab7;
background-color: #fff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #337ab7;
}
.panel-success {
border-color: #d6e9c6;
}
.panel-success > .panel-heading {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #d6e9c6;
}
.panel-success > .panel-heading .badge {
color: #dff0d8;
background-color: #3c763d;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #d6e9c6;
}
.panel-info {
border-color: #bce8f1;
}
.panel-info > .panel-heading {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #bce8f1;
}
.panel-info > .panel-heading .badge {
color: #d9edf7;
background-color: #31708f;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #bce8f1;
}
.panel-warning {
border-color: #faebcc;
}
.panel-warning > .panel-heading {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.panel-warning > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #faebcc;
}
.panel-warning > .panel-heading .badge {
color: #fcf8e3;
background-color: #8a6d3b;
}
.panel-warning > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #faebcc;
}
.panel-danger {
border-color: #ebccd1;
}
.panel-danger > .panel-heading {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.panel-danger > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #ebccd1;
}
.panel-danger > .panel-heading .badge {
color: #f2dede;
background-color: #a94442;
}
.panel-danger > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #ebccd1;
}
.social-extension a.list-group-item {
float: left;
margin-right: -1px;
padding: 0;
width: 36px;
height: 36px;
text-align: center;
line-height: 45px;
}
.social-extension .list-group-item:first-child {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.social-extension .list-group-item:last-child {
margin-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.social-extension .icon{
width: 20px;
height: 20px;
fill: #444;
}
.social-extension .list-group-item.active .icon {
fill: #fff;
}
.social-extension .list-group-item span {
display: none;
}
.social-extension .list-group {
height: 71px;
overflow: auto;
margin: 0;
}
.well-table {
margin-top: 10px;
}
.well-table .well {
margin-bottom: 0;
min-height: 70px;
overflow: auto;
max-height: 150px;
background-color: #eeeeee;
border: 1px solid #dddddd;
}
.input-group label {
margin: 0;
cursor: pointer;
}
input[type="radio"], input[type="checkbox"] {
margin-bottom: -2px;
}
.theme-color {
width: calc(100% + 20px);
height: 140px;
margin: 10px 0px 0 -20px;
}
.main-color,.secondary-color {
height: 65px;
border: 0;
width: 100%;
text-align: center;
line-height: 30px;
outline: 0;
}
.color-0 .main-color {
background: #2a77ed;
}
.color-0 .secondary-color {
background: #5e96eb;
}
.color-1 .main-color {
background: #e09d3d;
}
.color-1 .secondary-color {
background: #e4ad5e;
}
.color-2 .main-color {
background: #a8cf4b;
}
.color-2 .secondary-color {
background: #bede70;
}
.color-3 .main-color {
background: #8e6048;
}
.color-3 .secondary-color {
background: #a38c76;
}
.color-4 .main-color {
background: #5b5d84;
}
.color-4 .secondary-color {
background: #c8c9e3;
}
.color-5 .main-color {
background: #343434;
}
.color-5 .secondary-color {
background: #a38c76;
}
.four-colors .main-color {
width: 50%;
float: left;
}
.four-colors .secondary-color {
width: 50%;
float: left;
}
.four-colors .main-color--1 {
background: #343434;
}
.four-colors .main-color--2 {
background: #ededed;
}
.four-colors .secondary-color--1 {
background: #2f2f2f;
}
.four-colors .secondary-color--2 {
background: #f6f6f6;
}
.about-info.thumbnail {
display: block;
margin: 40px 0px 50px 0;
padding: 0 15px 15px 15px;
background: #fff;
border-radius: 0;
border: 0;
color: #343434;
box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.1);
}
.about-info .lightshop-logo {
text-align: center;
margin: 0 -15px;
padding: 40px 0 37px 0;
border-bottom: 1px solid #f2f2f0;
background: #fff;
}
.about-info a,.about-info a:hover {
border-bottom: 1px solid rgba(52, 52, 52, 0.25);
color: #343434;
}
.about-info .form-group + .form-group {
border-top: 1px solid #fff;
}
.inline-text {
margin-bottom: 0;
padding-top: 9px;
}
.license-agreement {
overflow: auto;
height: 200px;
background: #f2f2f0;
border-radius: 0;
padding: 15px;
width: 100%;
border: 0;
outline: none;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
resize: none;
}
fieldset legend {
padding: 15px;
background: #f9f9f9;
border: 0;
font-size: 15px;
text-transform: uppercase;
}
fieldset {
padding: 0;
margin: 0;
border: 0;
min-width: 0;
border-bottom: 1px solid #ededed;
margin-bottom: 30px;
}
.about-info .label-success {
padding: 5px 10px;
display: inline-block;
margin: 0 15px 0;
background-color: #2a77ed;
border-radius: 0;
font-weight: normal;
letter-spacing: .5px;
position: absolute;
}
a.tab-new:after {
position: absolute;
content: '';
background-color: #2a77ed;
padding: 4px;
border-radius: 10px;
right: 5px;
top: 5px;
}
.nav-pills-btn {
text-align: left;
box-shadow: none;
color: #333;
}
.tooltip-custom {
border-bottom: 1px dashed rgba(51, 51, 51, 0.4);
cursor: pointer;
margin-right: 15px;
}
.tooltip-custom:after {
position: absolute;
}
.tooltip-custom + .tooltip .tooltip-inner {
max-width: 300px;
}
.tooltip-custom + .tooltip a {
color: #fff;
text-decoration: underline;
}
@media screen and (max-width: 992px) {
.input-group-addon.code {
display: none;
}
}
@media screen and (max-width: 767px) {
.tabs-left > .nav-tabs {
float: none;
border-right: 0;
width: 100%;
margin-bottom: -15px;
padding-bottom: 25px;
}
.tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover, .tabs-left > .nav-tabs .active > a:focus {
border-color: #ddd;
background: #fff;
}
.tabs-left > .nav-tabs > li > a {
margin-right: 0;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background: #eee;
}
.tabs-left > .tab-content {
float: right;
width: 100%;
border-left: 0;
margin-left: 0;
padding-left: 0;
padding-right: 0;
margin-bottom: 0;
}
.table .table {
min-width: 125vw;
}
}
@media screen and (max-width: 480px) {
.table .table {
min-width: 150vw;
}
}
.nav-pills {
margin-bottom: 15px;
}
.is-expired span {
color: #e3503e;
font-weight: bold;
}
.new-version span {
color: #2a77ed;
font-weight: bold;
}
@@ -1,47 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-module" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-module" class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="module_category_status" id="input-status" class="form-control">
{% if module_lighthop_status %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,78 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-callback" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ heading_title }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-callback" class="form-horizontal">
<div class="form-group required">
<label class="col-sm-2 control-label">{{ text_id }}</label>
<div class="col-sm-10">
<input type="text" name="call_id" value="{{ callback_id }}" placeholder="{{ callback_id }}" id="callback_id" class="form-control" disabled />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_name }}</label>
<div class="col-sm-10">
<input type="text" name="name" value="{{ name }}" placeholder="{{ name }}" id="name" class="form-control" disabled />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_telephone }}</label>
<div class="col-sm-10">
<input type="text" name="telephone" value="{{ telephone }}" placeholder="{{ telephone }}" id="telephone" class="form-control" disabled />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_comment }}</label>
<div class="col-sm-10">
<textarea name="comment" rows="5" placeholder="Код share кнопок" id="input-comment" class="form-control">{{ comment }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_status }}</label>
<div class="col-sm-10">
<select name="status_id" class="form-control">
{% if (status_id == '0') %}
<option value="0" selected="selected">{{ status_wait }}</option>
<option value="1" >{{ status_done }}</option>
{% else %}
<option value="0" >{{ status_wait }}</option>
<option value="1" selected="selected">{{ status_done }}</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_added }}</label>
<div class="col-sm-10">
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ date_added }}" id="date_added" class="form-control" disabled />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_modified }}</label>
<div class="col-sm-10">
<input type="text" name="date_modified" value="{{ date_modified }}" placeholder="{{ date_modified }}" id="date_modified" class="form-control" disabled />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,98 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button onclick="$('#form').attr('action', '{{ update }}'); $('#form').submit();" data-toggle="tooltip" title="{{ status_done }}" class="btn btn-success"><i class="fa fa-refresh"></i></button>
<a onclick="$('form').submit();" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger"><i class="fa fa-trash-o"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> Заявки</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'call_id') %}
<a href="{{ sort_call_id }}" class="{{ (order)|lower }}">{{ "Номер" }}</a>
{% else %}
<a href="{{ sort_call_id }}">{{ "Номер" }}</a>
{% endif %}</td>
<td class="text-left">{% if (sort == 'name') %}
<a href="{{ sort_name }}" class="{{ (order)|lower }}">{{ column_name }}</a>
{% else %}
<a href="{{ sort_name }}">{{ column_name }}</a>
{% endif %}</td>
<td class="text-right">{% if (sort == 'telephone') %}
<a href="{{ sort_telephone }}" class="{{ (order)|lower }}">{{ column_telephone }}</a>
{% else %}
<a href="{{ sort_telephone }}">{{ column_telephone }}</a>
{% endif %}</td>
<td class="text-left">{{ text_comment }}</td>
<td class="text-right">{{ text_status }}</td>
<td class="text-right">{{ text_added }}</td>
<td class="text-right">{{ text_modified }}</td>
<td class="text-right">{{ text_action }}</td>
</tr>
</thead>
<tbody>
{% if (callbacks) %}
{% for callback in callbacks %}
<tr {% if (callback['status'] != status_done) %}class="warning"{% endif %}>
<td class="text-center">{% if (callback['selected']) %}
<input type="checkbox" name="selected[]" value="{{ callback['callback_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ callback['callback_id'] }}" />
{% endif %}</td>
<td class="text-left">{{ callback['callback_id'] }}</td>
<td class="text-left">{{ callback['name'] }}</td>
<td class="text-right">{{ callback['telephone'] }}</td>
<td class="text-left">{{ callback['comment'] }}</td>
<td class="text-right">{{ callback['status'] }}</td>
<td class="text-right">{{ callback['date_added'] }}</td>
<td class="text-right">{{ callback['date_modified'] }}</td>
<td class="text-right">
<a href="{{ callback['action'] }}" data-toggle="tooltip" title="{{ text_edit }}</a>" class="btn btn-primary"><i class="fa fa-pencil"></i></a>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="9">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{# echo $results; #}</div>
</div>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,344 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-blog" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-blog" class="form-horizontal">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-general">
<ul class="nav nav-tabs" id="language">
{% for language in languages %}
<li><a href="#language{{ language['language_id'] }}" data-toggle="tab"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}" /> {{ language['name'] }}</a></li>
{% endfor %}
</ul>
<div class="tab-content">
{% for language in languages %}
<div class="tab-pane" id="language{{ language['language_id'] }}">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-title{{ language['language_id'] }}">{{ entry_title }}</label>
<div class="col-sm-10">
<input type="text" name="blog_description[{{ language['language_id'] }}][title]" value="{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['title'] : '' }}" placeholder="{{ entry_title }}" id="input-title{{ language['language_id'] }}" class="form-control" />
{% if (error_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-description{{ language['language_id'] }}">{{ entry_description }}</label>
<div class="col-sm-10">
<textarea name="blog_description[{{ language['language_id'] }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language['language_id'] }}" data-lang="{{ lang }}" class="form-control" data-toggle="summernote" data-lang="{{ summernote }}">{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['description'] : '' }}</textarea>
{% if (error_description[language['language_id']] is defined) %}
<div class="text-danger">{{ error_description[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-title{{ language['language_id'] }}">{{ entry_meta_title }}</label>
<div class="col-sm-10">
<input type="text" name="blog_description[{{ language['language_id'] }}][meta_title]" value="{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['meta_title'] : '' }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language['language_id'] }}" class="form-control" />
{% if (error_meta_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_meta_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-h1{{ language['language_id'] }}">{{ entry_meta_h1 }}</label>
<div class="col-sm-10">
<input type="text" name="blog_description[{{ language['language_id'] }}][meta_h1]" value="{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['meta_h1'] : '' }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language['language_id'] }}" class="form-control" />
{% if (error_meta_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_meta_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-description{{ language['language_id'] }}">{{ entry_meta_description }}</label>
<div class="col-sm-10">
<textarea name="blog_description[{{ language['language_id'] }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language['language_id'] }}" class="form-control">{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['meta_description'] : '' }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language['language_id'] }}">{{ entry_meta_keyword }}</label>
<div class="col-sm-10">
<textarea name="blog_description[{{ language['language_id'] }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language['language_id'] }}" class="form-control">{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['meta_keyword'] : '' }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-tag{{ language['language_id'] }}">{{ entry_tag }}</label>
<div class="col-sm-10">
<input type="text" name="blog_description[{{ language['language_id'] }}][tag]" value="{{ blog_description[language['language_id']] is defined ? blog_description[language['language_id']]['tag'] : '' }}" placeholder="{{ entry_tag }}" id="input-tag{{ language['language_id'] }}" class="form-control" />
{% if (error_tag[language['language_id']] is defined) %}
<div class="text-danger">{{ error_tag[language['language_id']] }}</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="tab-pane" id="tab-data">
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_store }}</label>
<div class="col-sm-10">
<div class="well well-sm" style="height: 150px; overflow: auto;">
{% for store in stores %}
<div class="checkbox">
<label> {% if store.store_id in blog_store %}
<input type="checkbox" name="blog_store[]" value="{{ store.store_id }}" checked="checked" />
{{ store.name }}
{% else %}
<input type="checkbox" name="blog_store[]" value="{{ store.store_id }}" />
{{ store.name }}
{% endif %}</label>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-category">{{ entry_main_category }}</label>
<div class="col-sm-10">
<select id="main_category_id" name="main_category_id" class="form-control">
<option value="0" selected="selected">{{ text_none }}</option>
{% for category in categories %}
{% if (category['category_id'] == main_category_id) %}
<option value="{{ category['category_id'] }}" selected="selected">{{ category['name'] }}</option>
{% else %}
<option value="{{ category['category_id'] }}">{{ category['name'] }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-date"><span data-toggle="tooltip" title="{{ help_date_added }}">{{ entry_date_added }}</span></label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD" id="input-date-available" class="form-control" />
<span class="input-group-btn">
<button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related }}</span></label>
<div class="col-sm-10">
<input type="text" name="related" value="" placeholder="{{ entry_related }}" id="input-related" class="form-control" />
<div id="blog-related" class="well well-sm" style="height: 150px; overflow: auto;">
{% for blog_related in blog_relateds %}
<div id="blog-related{{ blog_related['blog_id'] }}"><i class="fa fa-minus-circle"></i> {{ blog_related['name'] }}
<input type="hidden" name="blog_related[]" value="{{ blog_related['blog_id'] }}" />
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-related-products"><span data-toggle="tooltip" title="{{ help_related_products }}">{{ entry_related_products }}</span></label>
<div class="col-sm-10">
<input type="text" name="related-products" value="" placeholder="{{ entry_related_products }}" id="input-related-products" class="form-control" />
<div id="product-related" class="well well-sm" style="height: 150px; overflow: auto;">
{% for product_related in product_relateds %}
<div id="product-related{{ product_related['product_id'] }}"><i class="fa fa-minus-circle"></i> {{ product_related['name'] }}
<input type="hidden" name="product_related[]" value="{{ product_related['product_id'] }}" />
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_image }}</label>
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if (status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</div>
<div class="tab-pane" id="tab-seo">
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ help_keyword }} </div>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ entry_store }}</td>
<td class="text-left">{{ entry_keyword }}</td>
</tr>
</thead>
<tbody>
{% for store in stores %}
<tr>
<td class="text-left">{{ store.name }}</td>
<td class="text-left">{% for language in languages %}
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
<input type="text" name="blog_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if blog_seo_url[store.store_id][language.language_id] %}{{ blog_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
</div>
{% if error_keyword[store.store_id][language.language_id] %}
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
{% endif %}
{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="tab-design">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ entry_store }}</td>
<td class="text-left">{{ entry_layout }}</td>
</tr>
</thead>
<tbody>
{% for store in stores %}
<tr>
<td class="text-left">{{ store.name }}</td>
<td class="text-left"><select name="blog_layout[{{ store.store_id }}]" class="form-control">
<option value=""></option>
{% for layout in layouts %}
{% if blog_layout[store.store_id] and blog_layout[store.store_id] == layout.layout_id %}
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
{% else %}
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
{% endif %}
{% endfor %}
</select></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
{% if (ckeditor) %}
{% for language in languages %}
ckeditorInit('input-description{{ language['language_id'] }}', getURLVar('user_token'));
{% endfor %}
{% endif %}
//--></script>
<script type="text/javascript"><!--
$('#language a:first').tab('show');
$('.date').datetimepicker({
pickTime: false
});
// Related
$('input[name=\'related\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=extension/module/lightshop/lightshop_blog/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['blog_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'related\']').val('');
$('#blog-related' + item['value']).remove();
$('#blog-related').append('<div id="blog-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="blog_related[]" value="' + item['value'] + '" /></div>');
}
});
$('#blog-related').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
// Related products
$('input[name=\'related-products\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['product_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'related-products\']').val('');
$('#product-related' + item['value']).remove();
$('#product-related').append('<div id="product-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product_related[]" value="' + item['value'] + '" /></div>');
}
});
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
//--></script></div>
{{ footer }}
@@ -1,85 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-blog').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-blog">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left" class="text-center" style="width: 130px;">{{ column_image }}</td>
<td class="text-left">{% if (sort == 'id.title') %}
<a href="{{ sort_title }}" class="{{ (order)|lower }}">{{ column_title }}</a>
{% else %}
<a href="{{ sort_title }}">{{ column_title }}</a>
{% endif %}</td>
<td class="text-right">{% if (sort == 'i.date_added') %}
<a href="{{ sort_date_added }}" class="{{ (order)|lower }}">{{ column_date_added }}</a>
{% else %}
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
{% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (blogs) %}
{% for blog in blogs %}
<tr>
<td class="text-center">{% if blog['blog_id'] in selected %}
<input type="checkbox" name="selected[]" value="{{ blog['blog_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ blog['blog_id'] }}" />
{% endif %}</td>
<td class="text-center"><img src="{{ blog['image'] }}" alt="" title="" class="img-thumbnail" style="width: 50px;"></td>
<td class="text-left">{{ blog['title'] }}</td>
<td class="text-right">{{ blog['date_added'] }}</td>
<td class="text-right"><a href="{{ blog['edit'] }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="4">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,263 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-news" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-news" class="form-horizontal">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-general">
<ul class="nav nav-tabs" id="language">
{% for language in languages %}
<li><a href="#language{{ language['language_id'] }}" data-toggle="tab"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}" /> {{ language['name'] }}</a></li>
{% endfor %}
</ul>
<div class="tab-content">
{% for language in languages %}
<div class="tab-pane" id="language{{ language['language_id'] }}">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-title{{ language['language_id'] }}">{{ entry_title }}</label>
<div class="col-sm-10">
<input type="text" name="news_description[{{ language['language_id'] }}][title]" value="{{ news_description[language['language_id']] is defined ? news_description[language['language_id']]['title'] : '' }}" placeholder="{{ entry_title }}" id="input-title{{ language['language_id'] }}" class="form-control" />
{% if (error_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-description{{ language['language_id'] }}">{{ entry_description }}</label>
<div class="col-sm-10">
<textarea name="news_description[{{ language['language_id'] }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language['language_id'] }}" data-lang="{{ lang }}" class="form-control" data-toggle="summernote" data-lang="{{ summernote }}">{{ news_description[language['language_id']] is defined ? news_description[language['language_id']]['description'] : '' }}</textarea>
{% if (error_description[language['language_id']] is defined) %}
<div class="text-danger">{{ error_description[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-title{{ language['language_id'] }}">{{ entry_meta_title }}</label>
<div class="col-sm-10">
<input type="text" name="news_description[{{ language['language_id'] }}][meta_title]" value="{{ news_description[language['language_id']] is defined ? news_description[language['language_id']]['meta_title'] : '' }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language['language_id'] }}" class="form-control" />
{% if (error_meta_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_meta_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-h1{{ language['language_id'] }}">{{ entry_meta_h1 }}</label>
<div class="col-sm-10">
<input type="text" name="news_description[{{ language['language_id'] }}][meta_h1]" value="{{ news_description[language['language_id']] is defined ? news_description[language['language_id']]['meta_h1'] : '' }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language['language_id'] }}" class="form-control" />
{% if (error_meta_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_meta_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-description{{ language['language_id'] }}">{{ entry_meta_description }}</label>
<div class="col-sm-10">
<textarea name="news_description[{{ language['language_id'] }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language['language_id'] }}" class="form-control">{{ news_description[language['language_id']] is defined ? news_description[language['language_id']]['meta_description'] : '' }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language['language_id'] }}">{{ entry_meta_keyword }}</label>
<div class="col-sm-10">
<textarea name="news_description[{{ language['language_id'] }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language['language_id'] }}" class="form-control">{{ news_description[language['language_id']] is defined ? news_description[language['language_id']]['meta_keyword'] : '' }}</textarea>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="tab-pane" id="tab-data">
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_store }}</label>
<div class="col-sm-10">
<div class="well well-sm" style="height: 150px; overflow: auto;">
{% for store in stores %}
<div class="checkbox">
<label> {% if store.store_id in news_store %}
<input type="checkbox" name="news_store[]" value="{{ store.store_id }}" checked="checked" />
{{ store.name }}
{% else %}
<input type="checkbox" name="news_store[]" value="{{ store.store_id }}" />
{{ store.name }}
{% endif %}</label>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-date"><span data-toggle="tooltip" title="{{ help_date_added }}">{{ entry_date_added }}</span></label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD" id="input-date-available" class="form-control" />
<span class="input-group-btn">
<button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related }}</span></label>
<div class="col-sm-10">
<input type="text" name="related" value="" placeholder="{{ entry_related }}" id="input-related" class="form-control" />
<div id="product-related" class="well well-sm" style="height: 150px; overflow: auto;">
{% for product_related in product_relateds %}
<div id="product-related{{ product_related['product_id'] }}"><i class="fa fa-minus-circle"></i> {{ product_related['name'] }}
<input type="hidden" name="product_related[]" value="{{ product_related['product_id'] }}" />
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if (status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</div>
<div class="tab-pane" id="tab-seo">
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ help_keyword }}</div>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ entry_store }}</td>
<td class="text-left">{{ entry_keyword }}</td>
</tr>
</thead>
<tbody>
{% for store in stores %}
<tr>
<td class="text-left">{{ store.name }}</td>
<td class="text-left">{% for language in languages %}
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
<input type="text" name="news_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if news_seo_url[store.store_id][language.language_id] %}{{ news_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
</div>
{% if error_keyword[store.store_id][language.language_id] %}
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
{% endif %}
{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="tab-design">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ entry_store }}</td>
<td class="text-left">{{ entry_layout }}</td>
</tr>
</thead>
<tbody>
{% for store in stores %}
<tr>
<td class="text-left">{{ store.name }}</td>
<td class="text-left"><select name="news_layout[{{ store.store_id }}]" class="form-control">
<option value=""></option>
{% for layout in layouts %}
{% if news_layout[store.store_id] and news_layout[store.store_id] == layout.layout_id %}
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
{% else %}
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
{% endif %}
{% endfor %}
</select></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
{% if (ckeditor) %}
{% for language in languages %}
ckeditorInit('input-description{{ language['language_id'] }}', getURLVar('user_token'));
{% endfor %}
{% endif %}
//--></script>
<script type="text/javascript"><!--
$('#language a:first').tab('show');
$('.date').datetimepicker({
pickTime: false
});
// Related
$('input[name=\'related\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['product_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'related\']').val('');
$('#product-related' + item['value']).remove();
$('#product-related').append('<div id="product-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product_related[]" value="' + item['value'] + '" /></div>');
}
});
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
//--></script></div>
{{ footer }}
@@ -1,84 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-news').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-news">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'id.title') %}
<a href="{{ sort_title }}" class="{{ (order)|lower }}">{{ column_title }}</a>
{% else %}
<a href="{{ sort_title }}">{{ column_title }}</a>
{% endif %}</td>
<td class="text-right">{% if (sort == 'i.date_added') %}
<a href="{{ sort_date_added }}" class="{{ (order)|lower }}">{{ column_date_added }}</a>
{% else %}
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
{% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (newss) %}
{% for news in newss %}
<tr>
<td class="text-center">{% if news['news_id'] in selected %}
<input type="checkbox" name="selected[]" value="{{ news['news_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ news['news_id'] }}" />
{% endif %}</td>
<td class="text-left">{{ news['title'] }}</td>
<td class="text-right">{{ news['date_added'] }}</td>
<td class="text-right"><a href="{{ news['edit'] }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="4">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,249 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-set" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-set" class="form-horizontal">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-general">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-theme_lightshop_set_name">{{ text_name }}</label>
<div class="col-sm-10">
{% for language in languages %}
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}" /></span>
<input type="text" name="set_description[{{ language['language_id'] }}][title]" value="{{ set_description[language['language_id']] is defined ? set_description[language['language_id']]['title'] : '' }}" placeholder="{{ entry_title }}" id="input-title{{ language['language_id'] }}" class="form-control" />
</div>
{% endfor %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-mode">{{ entry_mode }}</label>
<div class="col-sm-10">
<select name="mode" id="input-mode" class="form-control">
{% if (mode) %}
<option value="1" selected="selected">{{ text_percent }}</option>
<option value="0">{{ text_fix }}</option>
{% else %}
<option value="1">{{ text_percent }}</option>
<option value="0" selected="selected">{{ text_fix }}</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ text_discount }}</label>
<div class="col-sm-2">
<input type="text" name="discount" value="{{ discount }}" placeholder="{{ entry_title }}" class="form-control" />
</div>
</div>
<table id="products" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<td class="text-left"><span data-toggle="tooltip" data-container="#tab-general" title="{{ entry_product_info }}">{{ entry_product }}</span></td>
<td class="text-left">{{ entry_product_qty }}</td>
<td class="text-right">{{ entry_sort_order }}</td>
<td></td>
</tr>
</thead>
<tbody>
{% set product_row = 0 %}
{% for product in products %}
<tr id="product-row-{{ product_row }}">
<td class="text-left">
<input type="text" name="product[{{ product_row }}][name]" value="" placeholder="{{ entry_product }}" id="input-set-{{ product_row }}" class="product_input form-control" />
<div id="setproductsrow-{{ product_row }}" class="well well-sm" style="overflow: auto;">
{% set addsrow = 0 %}
{% for id,product2row in product['products'] %}
<div id="set_row-{{ product_row }}-product-{{ id }}"><i class="fa fa-minus-circle"></i>{{ product2row['name'] }}<input type="hidden" name="product[{{ product_row }}][items][{{ product2row['product_id'] }}][id]; ?>]" value="{{ product2row['product_id'] }}"></div>
{% set addsrow = addsrow + 1 %}
{% endfor %}
</div>
</td>
<td class="text-right"><input type="text" name="product[{{ product_row }}][qty]" value="{{ product['qty'] }}" placeholder="{{ entry_sort_order }}" class="form-control" /></td>
<td class="text-right"><input type="text" name="product[{{ product_row }}][sort_order]" value="{{ product['sort_order'] }}" placeholder="{{ entry_sort_order }}" class="form-control" /></td>
<td class="text-left"><button type="button" onclick="$('#product-row-{{ product_row }}').remove();" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
</tr>
{% set product_row = product_row + 1 %}
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td class="text-left"><button type="button" onclick="addProduct();" data-toggle="tooltip" title="{{ text_add_product }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
</tr>
</tfoot>
</table>
</div>
<div class="tab-pane" id="tab-data">
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_store }}</label>
<div class="col-sm-10">
<div class="well well-sm" style="height: 150px; overflow: auto;">
<div class="checkbox">
<label>
{% if 0 in set_store %}
<input type="checkbox" name="set_store[]" value="0" checked="checked" />
{{ text_default }}
{% else %}
<input type="checkbox" name="set_store[]" value="0" />
{{ text_default }}
{% endif %}
</label>
</div>
{% for store in stores %}
<div class="checkbox">
<label>
{% if store['store_id'] in set_store %}
<input type="checkbox" name="set_store[]" value="{{ store['store_id'] }}" checked="checked" />
{{ store['name'] }}
{% else %}
<input type="checkbox" name="set_store[]" value="{{ store['store_id'] }}" />
{{ store['name'] }}
{% endif %}
</label>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if (status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
{% if (ckeditor) %}
{% for language in languages %}
ckeditorInit('input-description{{ language['language_id'] }}', getURLVar('user_token'));
{% endfor %}
{% endif %}
//--></script>
<script type="text/javascript"><!--
$('#language a:first').tab('show');
$('.date').datetimepicker({
pickTime: false
});
function addAutocomplete() {
$('.product_input').autocomplete({
'source': function(request, response) {
var row = $(this).prop("id");
$.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['product_id'],
rowid: row
}
}));
}
});
},
'select': function(item) {
var sel = '#'+item['rowid'];
console.log(sel);
$(sel).val(item['label']);
$(sel).siblings('.product_data').val(item['value']);
var row = $(this).attr('id');
var rownum = row.split('-');
rownum = rownum[2];
$(this).val('');
$('#setproductsrow-'+rownum).append('<div id="set_row-'+rownum+'-product-' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product['+rownum+'][items]['+item['value']+'][id]" value="' + item['value'] + '" /></div>');
}
});
}
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
var product_row = {{ product_row }};
function addProduct() {
html = '<tr id="product-row-' + product_row + '">';
html += ' <td class="text-left"><input class="product_input form-control" name="product[' + product_row + '][name]" value="" id="input-set-' + product_row + '" /><input class="product_data" type="hidden" name="product[' + product_row + '][id]" value="" id="input-product-' + product_row + '" />';
html += '<div id="setproductsrow-' + product_row + '" class="well well-sm" style="overflow: auto;">';
html += '</div></td>';
html += '<td class="text-right"><input type="text" name="product[' + product_row + '][qty]" value="1" class="form-control" /></td>';
html += ' <td class="text-right"><input type="text" name="product[' + product_row + '][sort_order]" value="1" placeholder="{{ entry_sort_order }}" class="form-control" /></td>';
html += ' <td class="text-left"><button type="button" onclick="$(\'#product-row-' + product_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
html += '</tr>';
$('#products tbody').append(html);
product_row++;
addAutocomplete();
}
$(document).ready(function() {
addAutocomplete();
$(document).on('click', '.well-sm .fa-minus-circle', function() {
$(this).parent().remove();
});
})
//--></script></div>
{{ footer }}
@@ -1,85 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-set').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-set">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'id.title') %}
<a href="{{ sort_title }}" class="{{ (order)|lower }}">{{ column_title }}</a>
{% else %}
<a href="{{ sort_title }}">{{ column_title }}</a>
{% endif %}</td>
<td class="text-right">{% if (sort == 'i.date_added') %}
<a href="{{ sort_date_added }}" class="{{ (order)|lower }}">{{ column_date_added }}</a>
{% else %}
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
{% endif %}</td>
<td class="text-right">{{ column_status }}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (sets) %}
{% for set in sets %}
<tr>
<td class="text-center">{% if set['set_id'] in selected %}
<input type="checkbox" name="selected[]" value="{{ set['set_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ set['set_id'] }}" />
{% endif %}</td>
<td class="text-left">{{ set['title'] }}</td>
<td class="text-right">{{ set['date_added'] }}</td>
<td class="text-left">{{ set['status'] }}</td>
<td class="text-right"><a href="{{ set['edit'] }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="5">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,247 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-set" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-set" class="form-horizontal">
<div class="tab-content">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description1"><span data-toggle="tooltip" title="" data-original-title="{{ help_product_tabs_main }}">{{ text_tabs_shablon }}</span></label>
<div class="col-sm-10">
<select name="view" class="form-control">
<option value="tab" {{ view == "tab" ? 'selected="selected"' : '' }}>{{ text_tabs_tab }}</option>
<option value="popup" {{ view == "popup" ? 'selected="selected"' : '' }}>{{ text_tabs_popup }}</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description1">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" class="form-control">
<option value="1" {{ status == 1 ? 'selected="selected"' : '' }}>{{ text_enabled }}</option>
<option value="0" {{ status == 0 ? 'selected="selected"' : '' }}>{{ text_disabled }}</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description1">{{ text_tabs_links }}</label>
<div class="col-sm-10">
<select name="mode" class="form-control cust_tabs_mode">
<option value="products" {{ mode == "products" ? 'selected="selected"' : '' }}>{{ text_tabs_to_products }}</option>
<option value="categories" {{ mode == "categories" ? 'selected="selected"' : '' }}>{{ text_tabs_tab_to_categories }}</option>
</select>
</div>
</div>
<div class="form-group tabsmode" id="customtab-products" style="display: {{ mode == "products" ? 'block' : 'none' }};">
<label class="col-sm-2 control-label" for="input-product"><span data-toggle="tooltip" title="" data-original-title="{{ help_product_tabs_select }}">{{ text_products }}</span></label>
<div class="col-sm-10 required">
<input type="text" name="product" value="" placeholder="{{ text_products }}" class="form-control tab-products">
{% if (error_instanses) %}
<div class="text-danger">{{ error_instanses }}</div>
{% endif %}
<div class="well well-sm" id="cust_tabs-products" style="height: 150px; overflow: auto;">
{% if (mode == "products") %}
{% for instanse in instanses %}
<div id="product{{ instanse['id'] }}"><i class="fa fa-minus-circle"></i>{{ instanse['name'] }}<input type="hidden" name="instanses[products][]" value="{{ instanse['id'] }}">
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
<div class="form-group tabsmode" id="customtab-categories" style="display: {{ mode == "categories" ? 'block' : 'none' }};">
<label class="col-sm-2 control-label" for="input-categories"><span data-toggle="tooltip" title="" data-original-title="{{ help_product_tabs_cat_select }}">{{ text_categories }}</span></label>
<div class="col-sm-10">
<input type="text" name="category" value="" placeholder="{{ text_categories }}" class="form-control tab-categories">
<div class="well well-sm" id="cust_tabs-categories" style="height: 150px; overflow: auto;">
{% if (mode == "categories") %}
{% for instanse in instanses %}
<div id="category{{ instanse['id'] }}"><i class="fa fa-minus-circle"></i>{{ instanse['name'] }}<input type="hidden" name="instanses[categories][]" value="{{ instanse['id'] }}">
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="">{{ text_sort_order }}</label>
<div class="col-sm-10">
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ text_sort_order }}" class="form-control">
</div>
</div>
<ul class="nav nav-tabs" id="language_tab">
{% for language in languages %}
<li ><a href="#language_tab-{{ language['language_id'] }}" data-toggle="tab" aria-expanded="true"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}"> {{ language['name'] }}</a></li>
{% endfor %}
</ul>
<div class="tab-content">
{% for language in languages %}
<div class="tab-pane " id="language_tab-{{ language['language_id'] }}">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-name1">{{ text_name }}</label>
<div class="col-sm-10">
<input type="text" name="title[{{ language['language_id'] }}]" value="{{ title[language['language_id']] is defined ? title[language['language_id']] : '' }}" placeholder="{{ text_name }}" class="form-control" />
{% if (error_title[language['language_id']] is defined) %}
<div class="text-danger">{{ error_title[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description1">{{ text_description }}</label>
<div class="col-sm-10">
<textarea name="description[{{ language['language_id'] }}]" id="tabdescription-{{ language['language_id'] }}" placeholder="{{ text_description }}" data-lang="{{ language['code'] }}" class="form-control" data-toggle="summernote" data-lang="{{ summernote }}">{{ description[language['language_id']] is defined ? description[language['language_id']] : '' }}</textarea>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_store }}</label>
<div class="col-sm-10">
<div class="well well-sm" style="height: 150px; overflow: auto;">
<div class="checkbox">
<label>
{% if 0 in tab_store %}
<input type="checkbox" name="stories[]" value="0" checked="checked" />
{{ text_default }}
{% else %}
<input type="checkbox" name="stories[]" value="0" />
{{ text_default }}
{% endif %}
</label>
</div>
{% for store in stores %}
<div class="checkbox">
<label>
{% if store['store_id'] in tab_store %}
<input type="checkbox" name="stories[]" value="{{ store['store_id'] }}" checked="checked" />
{{ store['name'] }}
{% else %}
<input type="checkbox" name="stories[]" value="{{ store['store_id'] }}" />
{{ store['name'] }}
{% endif %}
</label>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
{% if (ckeditor) %}
{% for language in languages %}
ckeditorInit('tabdescription-{{ language['language_id'] }}', getURLVar('user_token'));
{% endfor %}
{% endif %}
$('#language_tab a:first').tab('show');
$('.date').datetimepicker({
pickTime: false
});
$('.tab-products').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['product_id']
}
}));
}
});
},
'select': function(item) {
$('.tab-products').val('');
$('#cust_tabs-product-' + item['value']).remove();
$('#cust_tabs-products').append('<div id="cust_tabs-product-' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="instanses[products][]" value="' + item['value'] + '" /></div>');
}
});
$('.tab-categories').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['category_id']
}
}));
}
});
},
'select': function(item) {
var row = $(this).attr('data-for');
$('.tab-categories').val('');
$('#cust_tabs-categories-' + item['value']).remove();
$('#cust_tabs-categories').append('<div id="cust_tabs-category-' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="instanses[categories][]" value="' + item['value'] + '" /></div>');
}
});
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
$('#form-set').on('change','.cust_tabs_mode', function() {
$('.tabsmode').hide();
var sel = $(this).val();
$('#customtab-'+sel).show();
});
$(document).ready(function() {
$(document).on('click', '.well-sm .fa-minus-circle', function() {
$(this).parent().remove();
});
})
//--></script>
</div>
{{ footer }}
@@ -1,143 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-tab').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<div class="well">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="control-label" for="input-name">{{ text_instanse }}</label>
<input type="text" name="filter_instanse" value="{{ filter_instanse }}" placeholder="{{ text_instanse }}" id="input-name" class="form-control" />
</div>
<button type="button" id="button-filter" class="btn btn-primary pull-right"><i class="fa fa-filter"></i> {{ button_filter }}</button>
<a href="{{ reset }}" title="{{ button_clear }}" class="btn btn-primary"><i class="fa fa-trash-o"></i></a>
</div>
</div>
</div>
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-tab">
<input type="hidden" name="filter_instanse_id" value="{{ filter_instanse_id }}" id="input-name" class="form-control" />
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'id.title') %}
<a href="{{ sort_title }}" class="{{ (order)|lower }}">{{ column_title }}</a>
{% else %}
<a href="{{ sort_title }}">{{ column_title }}</a>
{% endif %}</td>
<td class="text-right">{{ column_mode }}</td>
<td class="text-right">{{ column_instanses }}</td>
<td class="text-right">{{ column_status }}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (tabs) %}
{% for tab in tabs %}
<tr>
<td class="text-center">{% if tab['cust_tab_id'] in selected %}
<input type="checkbox" name="selected[]" value="{{ tab['cust_tab_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ tab['cust_tab_id'] }}" />
{% endif %}</td>
<td class="text-left">{{ tab['title'] }}</td>
<td class="text-left">{{ tab['mode'] }}</td>
<td class="text-right">
{% for instanse in tab['instanses'] %}
{{ instanse['name'] }}<br>
{% endfor %}</td>
</td>
<td class="text-left">{{ tab['status'] ? text_enabled : text_disabled }}</td>
<td class="text-right"><a href="{{ tab['edit'] }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="6">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
var url = 'index.php?route=extension/module/lightshop/lightshop_tab&user_token={{ user_token }}';
var filter_id = $('input[name=\'filter_instanse_id\']').val();
var filter = $('input[name=\'filter_instanse\']').val();
if (filter_id) {
url += '&filter_instanse_id=' + encodeURIComponent(filter_id);
}
if (filter) {
url += '&filter_instanse=' + encodeURIComponent(filter);
}
location = url;
});
//--></script>
<script type="text/javascript"><!--
$('input[name=\'filter_instanse\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=extension/module/lightshop/lightshop_tab/autocomplete&user_token={{ user_token }}&filter_instanse=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['mode'] + '->' + item['name'],
value: item['id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'filter_instanse\']').val(item['label']);
$('input[name=\'filter_instanse_id\']').val(item['value']);
}
});
//--></script>
{{ footer }}
@@ -1,114 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-review" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-review" class="form-horizontal">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-author">{{ entry_author }}</label>
<div class="col-sm-10">
<input type="text" name="author" value="{{ author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
{% if (error_author) %}
<div class="text-danger">{{ error_author }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-blog"><span data-toggle="tooltip" title="{{ help_blog }}">{{ entry_blog }}</span></label>
<div class="col-sm-10">
<input type="text" name="blog" value="{{ blog }}" placeholder="{{ entry_blog }}" id="input-blog" class="form-control" />
<input type="hidden" name="blog_id" value="{{ blog_id }}" />
{% if (error_blog) %}
<div class="text-danger">{{ error_blog }}</div>
{% endif %}
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-text">{{ entry_text }}</label>
<div class="col-sm-10">
<textarea name="text" cols="60" rows="8" placeholder="{{ entry_text }}" id="input-text" class="form-control">{{ text }}</textarea>
{% if (error_text) %}
<div class="text-danger">{{ error_text }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-date-added">{{ entry_date_added }}</label>
<div class="col-sm-3">
<div class="input-group datetime">
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD HH:mm:ss" id="input-date-added" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if (status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('.datetime').datetimepicker({
pickDate: true,
pickTime: true
});
//--></script>
<script type="text/javascript"><!--
$('input[name=\'blog\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=extension/module/lightshop/lightshop_blog/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['blog_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'blog\']').val(item['label']);
$('input[name=\'blog_id\']').val(item['value']);
}
});
//--></script></div>
{{ footer }}
@@ -1,170 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-review').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<div class="well">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="input-blog">{{ entry_blog }}</label>
<input type="text" name="filter_blog" value="{{ filter_blog }}" placeholder="{{ entry_blog }}" id="input-blog" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-author">{{ entry_author }}</label>
<input type="text" name="filter_author" value="{{ filter_author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="input-status">{{ entry_status }}</label>
<select name="filter_status" id="input-status" class="form-control">
<option value="*"></option>
{% if (filter_status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
{% endif %}
{% if (not filter_status and (filter_status) is not null) %}
<option value="0" selected="selected">{{ text_disabled }}</option>
{% else %}
<option value="0">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
<div class="form-group">
<label class="control-label" for="input-date-added">{{ entry_date_added }}</label>
<div class="input-group date">
<input type="text" name="filter_date_added" value="{{ filter_date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD" id="input-date-added" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
<button type="button" id="button-filter" class="btn btn-primary pull-right"><i class="fa fa-filter"></i> {{ button_filter }}</button>
</div>
</div>
</div>
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-review">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'pd.name') %}
<a href="{{ sort_blog }}" class="{{ (order)|lower }}">{{ column_blog }}</a>
{% else %}
<a href="{{ sort_blog }}">{{ column_blog }}</a>
{% endif %}</td>
<td class="text-left">{% if (sort == 'r.author') %}
<a href="{{ sort_author }}" class="{{ (order)|lower }}">{{ column_author }}</a>
{% else %}
<a href="{{ sort_author }}">{{ column_author }}</a>
{% endif %}</td>
<td class="text-left">{% if (sort == 'r.status') %}
<a href="{{ sort_status }}" class="{{ (order)|lower }}">{{ column_status }}</a>
{% else %}
<a href="{{ sort_status }}">{{ column_status }}</a>
{% endif %}</td>
<td class="text-left">{% if (sort == 'r.date_added') %}
<a href="{{ sort_date_added }}" class="{{ (order)|lower }}">{{ column_date_added }}</a>
{% else %}
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
{% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (reviews) %}
{% for review in reviews %}
<tr>
<td class="text-center">{% if (review['review_id'] in selected) %}
<input type="checkbox" name="selected[]" value="{{ review['review_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ review['review_id'] }}" />
{% endif %}</td>
<td class="text-left">{{ review['name'] }}</td>
<td class="text-left">{{ review['author'] }}</td>
<td class="text-left">{{ review['status'] }}</td>
<td class="text-left">{{ review['date_added'] }}</td>
<td class="text-right"><a href="{{ review['edit'] }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="7">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
url = 'index.php?route=catalog/lightshopblog_review&token={{ token }}';
var filter_blog = $('input[name=\'filter_blog\']').val();
if (filter_blog) {
url += '&filter_blog=' + encodeURIComponent(filter_blog);
}
var filter_author = $('input[name=\'filter_author\']').val();
if (filter_author) {
url += '&filter_author=' + encodeURIComponent(filter_author);
}
var filter_status = $('select[name=\'filter_status\']').val();
if (filter_status != '*') {
url += '&filter_status=' + encodeURIComponent(filter_status);
}
var filter_date_added = $('input[name=\'filter_date_added\']').val();
if (filter_date_added) {
url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
}
location = url;
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
pickTime: false
});
//--></script></div>
{{ footer }}
@@ -1,299 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-category" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-category" class="form-horizontal">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-general">
<ul class="nav nav-tabs" id="language">
{% for language in languages %}
<li><a href="#language{{ language['language_id'] }}" data-toggle="tab"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}" /> {{ language['name'] }}</a></li>
{% endfor %}
</ul>
<div class="tab-content">
{% for language in languages %}
<div class="tab-pane" id="language{{ language['language_id'] }}">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-name{{ language['language_id'] }}">{{ entry_name }}</label>
<div class="col-sm-10">
<input type="text" name="lightshopcatblog_description[{{ language['language_id'] }}][name]" value="{{ lightshopcatblog_description[language['language_id']] is defined ? lightshopcatblog_description[language['language_id']]['name'] : '' }}" placeholder="{{ entry_name }}" id="input-name{{ language['language_id'] }}" class="form-control" />
{% if (error_name[language['language_id']] is defined) %}
<div class="text-danger">{{ error_name[language['language_id']] }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description{{ language['language_id'] }}">{{ entry_description }}</label>
<div class="col-sm-10">
<textarea name="lightshopcatblog_description[{{ language['language_id'] }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language['language_id'] }}" data-lang="{{ lang }}" class="form-control" data-toggle="summernote" data-lang="{{ summernote }}">{{ lightshopcatblog_description[language['language_id']] is defined ? lightshopcatblog_description[language['language_id']]['description'] : '' }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-title{{ language['language_id'] }}">{{ entry_meta_title }}</label>
<div class="col-sm-10">
<input type="text" name="lightshopcatblog_description[{{ language['language_id'] }}][meta_title]" value="{{ lightshopcatblog_description[language['language_id']] is defined ? lightshopcatblog_description[language['language_id']]['meta_title'] : '' }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language['language_id'] }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-h1{{ language['language_id'] }}">{{ entry_meta_h1 }}</label>
<div class="col-sm-10">
<input type="text" name="lightshopcatblog_description[{{ language['language_id'] }}][meta_h1]" value="{{ lightshopcatblog_description[language['language_id']] is defined ? lightshopcatblog_description[language['language_id']]['meta_h1'] : '' }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language['language_id'] }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-description{{ language['language_id'] }}">{{ entry_meta_description }}</label>
<div class="col-sm-10">
<textarea name="lightshopcatblog_description[{{ language['language_id'] }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language['language_id'] }}" class="form-control">{{ lightshopcatblog_description[language['language_id']] is defined ? lightshopcatblog_description[language['language_id']]['meta_description'] : '' }}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language['language_id'] }}">{{ entry_meta_keyword }}</label>
<div class="col-sm-10">
<textarea name="lightshopcatblog_description[{{ language['language_id'] }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language['language_id'] }}" class="form-control">{{ lightshopcatblog_description[language['language_id']] is defined ? lightshopcatblog_description[language['language_id']]['meta_keyword'] : '' }}</textarea>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="tab-pane" id="tab-data">
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_store }}</label>
<div class="col-sm-10">
<div class="well well-sm" style="height: 150px; overflow: auto;">
{% for store in stores %}
<div class="checkbox">
<label> {% if store.store_id in lightshopcatblog_store %}
<input type="checkbox" name="lightshopcatblog_store[]" value="{{ store.store_id }}" checked="checked" />
{{ store.name }}
{% else %}
<input type="checkbox" name="lightshopcatblog_store[]" value="{{ store.store_id }}" />
{{ store.name }}
{% endif %}</label>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="form-group" style="display: none;">
<label class="col-sm-2 control-label" for="input-parent">{{ entry_parent }}</label>
<div class="col-sm-10">
<select name="parent_id" class="form-control">
<option value="0" selected="selected">{{ text_none }}</option>
{% for category in categoriesblog %}
{% if (category['lightshopcatblog_id'] == parent_id) %}
<option value="{{ category['lightshopcatblog_id'] }}" selected="selected">{{ category['name'] }}</option>
{% else %}
<option value="{{ category['lightshopcatblog_id'] }}">{{ category['name'] }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div class="form-group" style="display: none;">
<label class="col-sm-2 control-label">{{ entry_image }}</label>
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
</div>
</div>
<div class="form-group" style="display: none;">
<label class="col-sm-2 control-label" for="input-top"><span data-toggle="tooltip" title="{{ help_top }}">{{ entry_top }}</span></label>
<div class="col-sm-10">
<div class="checkbox">
<label>
{% if (top) %}
<input type="checkbox" name="top" value="1" checked="checked" id="input-top" />
{% else %}
<input type="checkbox" name="top" value="1" id="input-top" />
{% endif %}
&nbsp; </label>
</div>
</div>
</div>
<div class="form-group" style="display: none;">
<label class="col-sm-2 control-label" for="input-column"><span data-toggle="tooltip" title="{{ help_column }}">{{ entry_column }}</span></label>
<div class="col-sm-10">
<input type="text" name="column" value="{{ column }}" placeholder="{{ entry_column }}" id="input-column" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
<div class="col-sm-10">
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if (status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</div>
<div class="tab-pane" id="tab-seo">
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ help_keyword }}</div>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ entry_store }}</td>
<td class="text-left">{{ entry_keyword }}</td>
</tr>
</thead>
<tbody>
{% for store in stores %}
<tr>
<td class="text-left">{{ store.name }}</td>
<td class="text-left">{% for language in languages %}
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
<input type="text" name="category_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if category_seo_url[store.store_id][language.language_id] %}{{ category_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
</div>
{% if error_keyword[store.store_id][language.language_id] %}
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
{% endif %}
{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="tab-design">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left">{{ entry_store }}</td>
<td class="text-left">{{ entry_layout }}</td>
</tr>
</thead>
<tbody>
{% for store in stores %}
<tr>
<td class="text-left">{{ store.name }}</td>
<td class="text-left"><select name="category_layout[{{ store.store_id }}]" class="form-control">
<option value=""></option>
{% for layout in layouts %}
{% if category_layout[store.store_id] and category_layout[store.store_id] == layout.layout_id %}
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
{% else %}
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
{% endif %}
{% endfor %}
</select></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
{% if (ckeditor) %}
{% for language in languages %}
ckeditorInit('input-description{{ language['language_id'] }}', getURLVar('user_token'));
{% endfor %}
{% endif %}
//--></script>
<script type="text/javascript"><!--
$('input[name=\'path\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
json.unshift({
category_id: 0,
name: '{{ text_none }}'
});
response($.map(json, function(item) {
return {
label: item['name'],
value: item['category_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'path\']').val(item['label']);
$('input[name=\'parent_id\']').val(item['value']);
}
});
//--></script>
<script type="text/javascript"><!--
$('input[name=\'filter\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/filter/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['filter_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'filter\']').val('');
$('#category-filter' + item['value']).remove();
$('#category-filter').append('<div id="category-filter' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="category_filter[]" value="' + item['value'] + '" /></div>');
}
});
$('#category-filter').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
//--></script>
<script type="text/javascript"><!--
$('#language a:first').tab('show');
//--></script></div>
{{ footer }}
@@ -1,87 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-category').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-category">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'name') %}
<a href="{{ sort_name }}" class="{{ (order)|lower }}">{{ column_name }}</a>
{% else %}
<a href="{{ sort_name }}">{{ column_name }}</a>
{% endif %}</td>
<td class="text-right">{% if (sort == 'sort_order') %}
<a href="{{ sort_sort_order }}" class="{{ (order)|lower }}">{{ column_sort_order }}</a>
{% else %}
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
{% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (categories) %}
{% for category in categories %}
<tr>
<td class="text-center">{% if category['lightshopcatblog_id'] in selected %}
<input type="checkbox" name="selected[]" value="{{ category['lightshopcatblog_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ category['lightshopcatblog_id'] }}" />
{% endif %}</td>
{% if (category['href']) %}
<td class="left">{{ category['indent'] }}<a href="{{ category['href'] }}">{{ category['name'] }}</a>&nbsp;&nbsp;<i class="fa fa-sort-desc"></i></td>
{% else %}
<td class="left">{{ category['indent'] }}{{ category['name'] }}</td>
{% endif %}
<td class="text-right">{{ category['sort_order'] }}</td>
<td class="text-right"><a href="{{ category['edit'] }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="4">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,57 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<a onclick="$('#form').submit();" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></a>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-envelope-o"></i> {{ heading_title }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-entry-email">{{ entry_email }}</label>
<div class="col-sm-10">
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-entry-email" class="form-control" />
{% if (error_email) %}
<div class="text-danger">{{ error_email }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if (status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -1,97 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<a href="{{ send }}" data-toggle="tooltip" title="{{ button_subscribe }}" class="btn btn-success"><i class="fa fa-paper-plane"></i></a>
<a href="{{ email }}" data-toggle="tooltip" title="{{ button_email }}" class="btn btn-primary"><i class="fa fa-envelope-o"></i></a>
<a href="{{ insert }}" data-toggle="tooltip" title="Добавить email" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<a onclick="$('form').submit();" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger"><i class="fa fa-trash-o"></i></a>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
{% if (module_install) %}
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if (success) %}
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-envelope-o"></i> {{ heading_title }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);" /></td>
<td class="text-left">{% if (sort == 'email') %}
<a href="{{ sort_email }}" class="{{ (order)|lower }}">{{ column_email }}</a>
{% else %}
<a href="{{ sort_email }}">{{ column_email }}</a>
{% endif %}</td>
<td class="text-left">{% if (sort == 'status') %}
<a href="{{ sort_status }}" class="{{ (order)|lower }}">{{ column_status }}</a>
{% else %}
<a href="{{ sort_status }}">{{ column_status }}</a>
{% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if (subscribers) %}
{% for subscribe in subscribers %}
<tr>
<td style="text-align: center;">{% if (subscribe['selected']) %}
<input type="checkbox" name="selected[]" value="{{ subscribe['subscribe_id'] }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ subscribe['subscribe_id'] }}" />
{% endif %}</td>
<td class="text-left">{{ subscribe['email'] }}</td>
<td class="text-left">{{ subscribe['status'] }}</td>
<td class="text-right">{% for action in subscribe['action'] %}
<a href="{{ action['href'] }}" data-toggle="tooltip" title="{{ action['text'] }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a>
{% endfor %}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="4">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
</div>
</div>
</div>
</div>
{% else %}
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-envelope-o"></i> {{ heading_title }}</h3>
</div>
<div class="panel-body">
{{ text_module_not_exists }}
</div>
</div>
</div>
{% endif %}
</div>
{{ footer }}
@@ -1,61 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<a onclick="$('#form').submit();" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></a>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-envelope-o"></i> {{ heading_title }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
<ul class="nav nav-tabs" id="language">
{% for language in languages %}
<li><a href="#language{{ language['language_id'] }}" data-toggle="tab"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}" /> {{ language['name'] }}</a></li>
{% endfor %}
</ul>
<div class="tab-content">
{% for language in languages %}
<div class="tab-pane" id="language{{ language['language_id'] }}">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description{{ language['language_id'] }}">{{ entry_text_mail }}</label>
<div class="col-sm-10">
<textarea name="subscribe_descriptions[{{ language['language_id'] }}]" placeholder="{{ entry_text_mail }}" id="subscribe-description{{ language['language_id'] }}" data-lang="{{ lang }}" class="form-control" data-toggle="summernote" data-lang="{{ summernote }}">{{ subscribe_descriptions[language['language_id']] is defined ? subscribe_descriptions[language['language_id']] : '' }}</textarea>
</div>
</div>
</div>
{% endfor %}
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
{% if (ckeditor) %}
{% for language in languages %}
ckeditorInit('input-description{{ language['language_id'] }}', getURLVar('token'));
{% endfor %}
{% endif %}
//--></script>
<script type="text/javascript"><!--
$('#language a:first').tab('show');
//--></script>
{{ footer }}
File diff suppressed because it is too large Load Diff
@@ -1,111 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-theme-lightshop" class="form-horizontal">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-info" data-toggle="tab">О шаблоне</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-info">
<div class="col-sm-8 col-sm-offset-2">
<div class="about-info thumbnail">
<div class="lightshop-logo"><img src="view/image/lightshop/lightshop-logo.png" alt="lightshop"></div>
<div class="form-group">
<label class="col-sm-4 control-label" for="input-theme_lightshop_label_sale_d">Версия</label>
<div class="col-sm-8 inline-text">
{{ theme_lightshop_version }}
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="input-license-key">Введите лицензионный ключ</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" id="key" name="license_key" value="" placeholder="Введите лицензионный ключ" id="license-key" class="form-control" />
<div class="input-group-btn">
<button id="sendkey" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="input-theme_lightshop_label_sale_d">Техническая поддержка</label>
<div class="col-sm-8 inline-text">
<a href="mailto:support@899themes.ru">Отправить запрос в службу поддержки (support@899themes.ru)</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="input-theme_lightshop_label_sale_d">Разработчик</label>
<div class="col-sm-8 inline-text">
<a href="http://899themes.ru/" target="_blank">899themes.ru</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="input-theme_lightshop_label_sale_d">Лицензионное соглашение</label>
<div class="col-sm-8 inline-text">
<textarea class="license-agreement" readonly>{{ text_license }}</textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
$(document).ready(function() {
$('#sendkey').on('click', function(e) {
e.preventDefault();
var data = $('#key').val();
$.ajax({
url: 'index.php?route=extension/theme/lightshop/activatekey&user_token={{ user_token }}&newkey=1',
type: 'post',
dataType: 'json',
data: 'license_key=' + $('#key').val(),
success: function (data) {
if (data.error) { console.log(data.error);
alert(data.error);
}
if (data.success) {
alert(data.success);
location.reload();
}
}
});
});
});
//--></script>
{{ footer }}
@@ -1,53 +0,0 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-lightshopsets" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if (error_warning) %}
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal" id="form-lightshopsets">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="total_lightshopsets_status" id="input-status" class="form-control">
{% if (total_lightshopsets_status) %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
<div class="col-sm-10">
<input type="text" name="total_lightshopsets_sort_order" value="{{ total_lightshopsets_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{{ footer }}