code
stringlengths
1
2.08M
language
stringclasses
1 value
/* Just enough of CodeMirror to run runMode under node.js */ function splitLines(string){ return string.split(/\r?\n|\r/); }; function StringStream(string) { this.pos = this.start = 0; this.string = string; } StringStream.prototype = { eol: function() {return this.pos >= this.string.length;}, sol: f...
JavaScript
/** * Tag-closer extension for CodeMirror. * * This extension adds a "closeTag" utility function that can be used with key bindings to * insert a matching end tag after the ">" character of a start tag has been typed. It can * also complete "</" if a matching start tag is found. It will correctly ignore si...
JavaScript
(function () { CodeMirror.razorHints = []; function arrayContains(arr, item) { if (!Array.prototype.indexOf) { var i = arr.length; while (i--) { if (arr[i] === item) { return true; } } re...
JavaScript
CodeMirror.runMode = function(string, modespec, callback, options) { function esc(str) { return str.replace(/[<&]/, function(ch) { return ch == "<" ? "&lt;" : "&amp;"; }); } var mode = CodeMirror.getMode(CodeMirror.defaults, modespec); var isNode = callback.nodeType == 1; var tabSize = (options &&...
JavaScript
(function() { if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js"; var loading = {}; function splitCallback(cont, n) { var countDown = n; return function() { if (--countDown == 0) cont(); }; } function ensureDeps(mode, cont) { var deps = CodeMirror.modes[mode].dependencies; ...
JavaScript
(function() { function keywords(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } function heredoc(delim) { return function(stream, state) { if (stream.match(delim)) state.tokenize = null; else stream.skipTo...
JavaScript
CodeMirror.defineMode("verilog", function(config, parserConfig) { var indentUnit = config.indentUnit, keywords = parserConfig.keywords || {}, blockKeywords = parserConfig.blockKeywords || {}, atoms = parserConfig.atoms || {}, hooks = parserConfig.hooks || {}, multiLineStrings = par...
JavaScript
CodeMirror.defineMode("razor", function(config, parserConfig) { var indentUnit = config.indentUnit, keywords = words("abstract as base break case catch checked class const continue" + " default delegate do else enum event explicit extern finally fixed for" + " forea...
JavaScript
CodeMirror.defineMode('ocaml', function(config) { var words = { 'true': 'atom', 'false': 'atom', 'let': 'keyword', 'rec': 'keyword', 'in': 'keyword', 'of': 'keyword', 'and': 'keyword', 'succ': 'keyword', 'if': 'keyword', 'then': 'keyword', 'else': 'keyword', ...
JavaScript
CodeMirror.defineMode('tiki', function(config, parserConfig) { function inBlock(style, terminator, returnTokenizer) { return function(stream, state) { while (!stream.eol()) { if (stream.match(terminator)) { state.tokenize = inText; break; } stream.next(); } if (returnTok...
JavaScript
CodeMirror.defineMode("plsql", function(config, parserConfig) { var indentUnit = config.indentUnit, keywords = parserConfig.keywords, functions = parserConfig.functions, types = parserConfig.types, sqlplus = parserConfig.sqlplus, multiLineSt...
JavaScript
/* * See LICENSE in this directory for the license under which this code * is released. */ CodeMirror.defineMode("sieve", function(config) { function words(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } var keywo...
JavaScript
/********************************************************** * This script provides syntax highlighting support for * the Ntriples format. * Ntriples format specification: * http://www.w3.org/TR/rdf-testcases/#ntriples ***********************************************************/ /* The following expr...
JavaScript
/** * Author: Hans Engel * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun) */ CodeMirror.defineMode("clojure", function (config, mode) { var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", TAG = "tag", ATOM = "atom", NUMBER = "number", BRA...
JavaScript
/* * Pig Latin Mode for CodeMirror 2 * @author Prasanth Jayachandran * @link https://github.com/prasanthj/pig-codemirror-2 * This implementation is adapted from PL/SQL mode in CodeMirror 2. */ CodeMirror.defineMode("pig", function(config, parserConfig) { var indentUnit = config.indentUnit, keywords = ...
JavaScript
CodeMirror.defineMode("smarty", function(config, parserConfig) { var keyFuncs = ["debug", "extends", "function", "include", "literal"]; var last; var regs = { operatorChars: /[+\-*&%=<>!?]/, validIdentifier: /[a-zA-Z0-9\_]/, stringChar: /[\'\"]/ }; var leftDelim = (typeof config.mode.leftD...
JavaScript
// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08) // This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com) CodeMirror.defineMode("perl",function(config,parserConfig){ // http://perldoc.perl.org var PERL={ // null - magic touch // ...
JavaScript
/** * Link to the project's GitHub page: * https://github.com/pickhardt/coffeescript-codemirror-mode */ CodeMirror.defineMode('coffeescript', function(conf) { var ERRORCLASS = 'error'; function wordRegexp(words) { return new RegExp("^((" + words.join(")|(") + "))\\b"); } var sing...
JavaScript
/* LESS mode - http://www.lesscss.org/ Ported to CodeMirror by Peter Kroon <plakroon@gmail.com> Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues GitHub: @peterkroon */ CodeMirror.defineMode("less", function(config) { var indentUnit = config.indentUnit, type; function ret(style, ...
JavaScript
CodeMirror.defineMode("vbscript", function() { var regexVBScriptKeyword = /^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|U...
JavaScript
// Initiate ModeTest and set defaults var MT = ModeTest; MT.modeName = 'css'; MT.modeOptions = {}; // Requires at least one media query MT.testMode( 'atMediaEmpty', '@media { }', [ 'def', '@media', null, ' ', 'error', '{', null, ' }' ] ); MT.testMode( 'atMediaMultiple', ...
JavaScript
CodeMirror.defineMode("css", function(config) { var indentUnit = config.indentUnit, type; var atMediaTypes = keySet([ "all", "aural", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "embossed" ]); var atMediaFeatures = keySet([ "width", "min-width", "max-width", "...
JavaScript
CodeMirror.defineMode('rst', function(config, options) { function setState(state, fn, ctx) { state.fn = fn; setCtx(state, ctx); } function setCtx(state, ctx) { state.ctx = ctx || {}; } function setNormal(state, ch) { if (ch && (typeof ch !== 'string')) { ...
JavaScript
CodeMirror.defineMode("velocity", function(config) { function parseWords(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } var indentUnit = config.indentUnit; var keywords = parseWords("#end #else #bre...
JavaScript
CodeMirror.defineMode("python", function(conf, parserConf) { var ERRORCLASS = 'error'; function wordRegexp(words) { return new RegExp("^((" + words.join(")|(") + "))\\b"); } var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); var singleDelimiters = new RegExp('^[\\...
JavaScript
// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's // CodeMirror 1 mode. // highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting CodeMirror.defineMode("lua", function(config, parserConfig) { var indentUnit = config.indentUnit; function prefixRE(words...
JavaScript
CodeMirror.defineMode("rust", function() { var indentUnit = 4, altIndentUnit = 2; var valKeywords = { "if": "if-style", "while": "if-style", "else": "else-style", "do": "else-style", "ret": "else-style", "fail": "else-style", "break": "atom", "cont": "atom", "const": "let", "resource": "fn", "...
JavaScript
CodeMirror.defineMode("ecl", function(config) { function words(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } function metaHook(stream, state) { if (!state.startOfLine) return false; stream.skipToEnd(); r...
JavaScript
CodeMirror.defineMode("diff", function() { var TOKEN_NAMES = { '+': 'tag', '-': 'string', '@': 'meta' }; return { token: function(stream) { var tw_pos = stream.string.search(/[\t ]+?$/); if (!stream.sol() || tw_pos === 0) { stream.skipToEnd(); return ("...
JavaScript
CodeMirror.defineMode("changes", function(config, modeConfig) { var headerSeperator = /^-+$/; var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; var simpleEmail = /^[\w+.-]+@[\w.-]+/; return { token: ...
JavaScript
// Quick and dirty spec file highlighting CodeMirror.defineMode("spec", function(config, modeConfig) { var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/; var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|Bui...
JavaScript
CodeMirror.defineMode('shell', function(config) { var words = {}; function define(style, string) { var split = string.split(' '); for(var i = 0; i < split.length; i++) { words[split[i]] = style; } }; // Atoms define('atom', 'true false'); // Keywords define('keyword', 'i...
JavaScript
CodeMirror.defineMode("commonlisp", function (config) { var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/; var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/; var symbol = /[^\s'`,@()\[\]";]/; var t...
JavaScript
CodeMirror.defineMode("go", function(config, parserConfig) { var indentUnit = config.indentUnit; var keywords = { "break":true, "case":true, "chan":true, "const":true, "continue":true, "default":true, "defer":true, "else":true, "fallthrough":true, "for":true, "func":true, "go":true, "goto":true, ...
JavaScript
CodeMirror.defineMode("r", function(config) { function wordObj(str) { var words = str.split(" "), res = {}; for (var i = 0; i < words.length; ++i) res[words[i]] = true; return res; } var atoms = wordObj("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"); var builtins = wordObj(...
JavaScript
CodeMirror.defineMode("groovy", function(config, parserConfig) { function words(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } var keywords = words( "abstract as assert boolean break byte case catch char class const co...
JavaScript
CodeMirror.defineMode("jinja2", function(config, parserConf) { var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false", "loop", "none", "self", "super", "if", "as", "not", "and", "else", "import", "with", "without", "context"]; keywords = new RegE...
JavaScript
CodeMirror.defineMode("yaml", function() { var cons = ['true', 'false', 'on', 'off', 'yes', 'no']; var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i'); return { token: function(stream, state) { var ch = stream.peek(); var esc = state.escaped; state.escaped = false; /* comme...
JavaScript
CodeMirror.defineMode('smalltalk', function(config, modeConfig) { var specialChars = /[+\-/\\*~<>=@%|&?!.:;^]/; var keywords = /true|false|nil|self|super|thisContext/; var Context = function(tokenizer, parent) { this.next = tokenizer; this.parent = parent; }; var Token = function(name, context, eo...
JavaScript
// Initiate ModeTest and set defaults var MT = ModeTest; MT.modeName = 'markdown'; MT.modeOptions = {}; MT.testMode( 'plainText', 'foo', [ null, 'foo' ] ); // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value) MT.testMode( 'codeBlocksUsing4Spaces', ' foo', [ ...
JavaScript
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { var htmlFound = CodeMirror.mimeModes.hasOwnProperty("text/html"); var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? "text/html" : "text/plain"); var codeDepth = 0; var prevLineHasContent = false , thisLineHasContent = false; var...
JavaScript
CodeMirror.defineMode("gfm", function(config, parserConfig) { var mdMode = CodeMirror.getMode(config, "markdown"); var aliases = { html: "htmlmixed", js: "javascript", json: "application/json", c: "text/x-csrc", "c++": "text/x-c++src", java: "text/x-java", csharp: "text/x-csharp...
JavaScript
// block; "begin", "case", "fun", "if", "receive", "try": closed by "end" // block internal; "after", "catch", "of" // guard; "when", closed by "->" // "->" opens a clause, closed by ";" or "." // "<<" opens a binary, closed by ">>" // "," appears in arglists, lists, tuples and terminates lines of code // "." res...
JavaScript
var MT = ModeTest; MT.modeName = 'stex'; MT.modeOptions = {}; MT.testMode( 'word', 'foo', [ null, 'foo' ] ); MT.testMode( 'twoWords', 'foo bar', [ null, 'foo bar' ] ); MT.testMode( 'beginEndDocument', '\\begin{document}\n\\end{document}', [ 'tag', '\\begin', ...
JavaScript
/* * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) * Licence: MIT */ CodeMirror.defineMode("stex", function(cmCfg, modeCfg) { function pushCommand(state, command) { state.cmdState.push(command); } function peekCommand(state) { if (state.cmdState.length>0) ret...
JavaScript
CodeMirror.defineMode("properties", function() { return { token: function(stream, state) { var sol = stream.sol() || state.afterSection; var eol = stream.eol(); state.afterSection = false; if (sol) { if (state.nextMultiline) { state.inMultiline = true; ...
JavaScript
CodeMirror.defineMode("sparql", function(config) { var indentUnit = config.indentUnit; var curPunc; function wordRegexp(words) { return new RegExp("^(?:" + words.join("|") + ")$", "i"); } var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", ...
JavaScript
CodeMirror.defineMode("haxe", function(config, parserConfig) { var indentUnit = config.indentUnit; // 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"); var operator = kw("operat...
JavaScript
CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { //config settings var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i, scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i; //inner modes var scriptingMode, htmlMixedMode; //tokenizer when in html mode...
JavaScript
/*** |''Name''|tiddlywiki.js| |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror| |''Author''|PMario| |''Version''|0.1.7| |''Status''|''stable''| |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]| |''Documentation''|http://codemirror.tiddlyspace.co...
JavaScript
CodeMirror.defineMode("haskell", function(cmCfg, modeCfg) { function switchState(source, setState, f) { setState(f); return f(source, setState); } // These should all be Unicode extended, as per the Haskell 2010 report var smallRE = /[a-z_]/; var largeRE = /[A-Z]/; var digitRE = /[0-9]...
JavaScript
CodeMirror.defineMode("javascript", function(config, parserConfig) { var indentUnit = config.indentUnit; var jsonMode = parserConfig.json; // Tokenizer var keywords = function(){ function kw(type) {return {type: type, style: "keyword"};} var A = kw("keyword a"), B = kw("keyword b"), C = kw("ke...
JavaScript
CodeMirror.defineMode("htmlmixed", function(config) { var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true}); var jsMode = CodeMirror.getMode(config, "javascript"); var cssMode = CodeMirror.getMode(config, "css"); function html(stream, state) { var style = htmlMode.token(stream, sta...
JavaScript
/* Copyright (C) 2011 by MarkLogic Corporation Author: Mike Brevoort <mike@brevoort.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
JavaScript
$(document).ready(function(){ module("testProcessingInstructions"); test("testProcessingInstructions", function() { expect(1); var input = 'data(<?target content?>) instance of xs:string'; var expected = '<span class="cm-variable cm-def">data</span>(<span class="cm-comment cm-meta">&lt;?target co...
JavaScript
$(document).ready(function(){ module("testQuoteEscape"); test("testQuoteEscapeDouble", function() { expect(1); var input = 'let $rootfolder := "c:\\builds\\winnt\\HEAD\\qa\\scripts\\"\ let $keysfolder := concat($rootfolder, "keys\\")\ return\ $keysfolder'; var expected = '<span cla...
JavaScript
$(document).ready(function(){ module("test namespaces"); // -------------------------------------------------------------------------------- // this test is based on this: //http://mbrevoort.github.com/CodeMirror2/#!exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/K2-ExternalVariablesWith-10.xq // ...
JavaScript
$(document).ready(function(){ module("testMultiAttr"); test("test1", function() { expect(1); var expected = '<span class="cm-tag">&lt;p </span><span class="cm-attribute">a1</span>=<span class="cm-string">"foo"</span> <span class="cm-attribute">a2</span>=<span class="cm-string">"bar"</span><s...
JavaScript
$(document).ready(function(){ module("testEmptySequenceKeyword"); test("testEmptySequenceKeyword", function() { expect(1); var input = '"foo" instance of empty-sequence()'; var expected = '<span class="cm-string">"foo"</span> <span class="cm-keyword">instance</span> <span class="cm-keyword">of</s...
JavaScript
CodeMirror.defineMode("ruby", function(config, parserConfig) { function wordObj(words) { var o = {}; for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; return o; } var keywords = wordObj([ "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "e...
JavaScript
CodeMirror.defineMode("clike", function(config, parserConfig) { var indentUnit = config.indentUnit, keywords = parserConfig.keywords || {}, builtin = parserConfig.builtin || {}, blockKeywords = parserConfig.blockKeywords || {}, atoms = parserConfig.atoms || {}, hooks = parserConfig...
JavaScript
CodeMirror.defineMode("pascal", function(config) { function words(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } var keywords = words("and array begin case const div do downto else end file for forward integer " + ...
JavaScript
/** * Author: Koh Zi Han, based on implementation by Koh Zi Chun */ CodeMirror.defineMode("scheme", function (config, mode) { var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD="keyword"; var INDENT_WORD_SKIP = 2, KEYWO...
JavaScript
/* * MySQL Mode for CodeMirror 2 by MySQL-Tools * @author James Thorne (partydroid) * @link http://github.com/partydroid/MySQL-Tools * @link http://mysqltools.org * @version 02/Jan/2012 */ CodeMirror.defineMode("mysql", function(config) { var indentUnit = config.indentUnit; var curPunc; functi...
JavaScript
CodeMirror.defineMode("vb", function(conf, parserConf) { var ERRORCLASS = 'error'; function wordRegexp(words) { return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); } var singleOperators = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"); var singleDelimiters = new RegExp(...
JavaScript
CodeMirror.defineMode("xml", function(config, parserConfig) { var indentUnit = config.indentUnit; var Kludges = parserConfig.htmlMode ? { autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true, 'embed': true, 'frame': true, 'hr': true, 'img': true, 'inpu...
JavaScript
 Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function ($, Base, window, document, undefined) { var itemMappingOptions = { 'create': function (o) { var item = ko.mapping.fromJS(o.data); item.selected = ko.observable(false); item.toggleSelected = functio...
JavaScript
/* base2 - copyright 2007-2011, Dean Edwards http://code.google.com/p/base2/ http://www.opensource.org/licenses/mit-license.php Contributors: Doeke Zanstra */ var base2 = { name: "base2", version: "1.0.2", exports: "Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp," ...
JavaScript
// MSDropDown - uncompressed.jquery.dd // author: Marghoob Suleman - Search me on google // Date: 12th Aug, 2009 // Version: 2.38.4 // Revision: 38 // web: www.giftlelo.com | www.marghoobsuleman.com /* // msDropDown is free jQuery Plugin: you can redistribute it and/or modify // it under the terms of the eithe...
JavaScript
// // This File contains all standard javascript helpers for normal umbraco pages, // for resizing, event handling etc. // All UI controls should expect this js file to be present. // included in umbracoPage.master // function addEvent(obj, evType, fn) { if (obj.addEventListener) { ...
JavaScript
// // =============================================================================== // WResize is the jQuery plugin for fixing the IE window resize bug // ............................................................................... // Copyright 2007 / Andrea Ercolino // -------------------------------...
JavaScript
(function ($) { $.fn.alphanumeric = function (p) { p = $.extend({ ichars: "!@#$%^&*()+=[]\\\';,/{}|\":<>?~`.- ", nchars: "", allow: "" }, p); return this.each ( function () { if (p.nocaps) p.nchars += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; if (p.allcaps) p.nchars += "abcdefghijk...
JavaScript
function actionNewRelationType() { UmbClientMgr.openModalWindow('developer/RelationTypes/NewRelationType.aspx', 'Create New RelationType', true, 400, 300, 0, 0); }
JavaScript
function actionDeleteRelationType(relationTypeId, relationTypeName) { if (confirm('Are you sure you want to delete "' + relationTypeName + '"?')) { $.ajax({ type: "POST", url: "/umbraco/developer/RelationTypes/RelationTypesWebService.asmx/DeleteRelationType", data...
JavaScript
/*! * jQuery Templates Plugin 1.0.0pre * http://github.com/jquery/jquery-tmpl * Requires jQuery 1.4.2 * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function( jQuery, undefined ){ var oldManip = jQuery.fn.domMa...
JavaScript
var Our = Our || {}; Our.Umbraco = Our.Umbraco || {}; Our.Umbraco.uGoLive = Our.Umbraco.uGoLive || {}; (function ($) { // Class representing a check group Our.Umbraco.uGoLive.CheckGroup = function(name, checks, opts) { var me = { name: name, checks: ko.observableArra...
JavaScript
/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function($) { Umbraco.Controls.UploadMediaImage = function(txtBoxTitleID, btnID, uploadFileID) { return { _txtBoxTitleID: txtBoxTitleID, _btnID: btn...
JavaScript
/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> /// <reference path="/umbraco_client/ui/jquery.js" /> Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function($) { //jQuery plugin for Umbraco image viewer control $.fn.UmbracoImageViewer = function(opts) { //all op...
JavaScript
(function ($) { $.fn.UmbQuickSearch = function (url) { var getSearchApp = function () { if (UmbClientMgr.mainWindow().location.hash != "") { switch (UmbClientMgr.mainWindow().location.hash.toLowerCase().substring(1).toLowerCase()) { case "media": ...
JavaScript
var requestRunning = false; var xmlHttp = null; var xmlHttpDebug = false; // Inspired by great work of Webfx in xloadtree function umbracoStartXmlRequest(scriptUrl, postData, eventFunction) { // random hack for ie7 day = new Date(); z = day.getTime(); y = (z - (parseInt(z/1000,10) * 1000))/10; scriptU...
JavaScript
function dualSelectBoxShift(id) { var posVal = document.getElementById(id + "_posVals"); var selVal = document.getElementById(id + "_selVals"); // First check the possible items for (var i=0;i<posVal.options.length;i++) { if (posVal.options[i].selected) { var selNew = document.createElement(...
JavaScript
var ctrlDown = false; var shiftDown = false; var keycode = 0 var currentRichTextDocument = null; var currentRichTextObject = null; function umbracoCheckKeysUp(e) { ctrlDown = e.ctrlKey; shiftDown = e.shiftKey; } function umbracoActivateKeys(ctrl, shift, key) { ctrlDown = ctrl; shiftDown = shift; ...
JavaScript
function umbracoCheckUpgrade(result) { if (result) { if (result.UpgradeType.toLowerCase() != 'none') { if (UmbSpeechBubble == null) { InitUmbracoSpeechBubble(); } var icon = 'info'; if (result.UpgradeType.toLowerCase() == 'critical') { ...
JavaScript
//<script> ////////////////// // Helper Stuff // ////////////////// function HTMLEncode(t) { return t.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"); } // used to find the Automation server name function getDomDocumentPrefix() { if (getDomDocumentPref...
JavaScript
//used by live editing to ensure the speech bubble is initialized after the main js file has been lazy loaded. //alert("Speech Bubble init: " + InitUmbracoSpeechBubble); InitUmbracoSpeechBubble();
JavaScript
// Umbraco SpeechBubble Javascript // Dependency Loader Constructor function UmbracoSpeechBubble(id) { this.id = id; this.ie = document.all ? true : false; this.GenerateSpeechBubble(); } UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function() { var sbHtml = document.getElementBy...
JavaScript
// Umbraco SpeechBubble Javascript // Dependency Loader Constructor function UmbracoSpeechBubble(id) { this.id = id; this.ie = document.all ? true : false; this.GenerateSpeechBubble(); } UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function() { theBody = document.getElementsByTa...
JavaScript
/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> /// <reference path="/umbraco_client/ui/jquery.js" /> /// <reference path="PermissionsHandler.asmx" /> /// <reference name="MicrosoftAjax.js"/> Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function($) { $.fn.PermissionsEditor...
JavaScript
/********************* Live Editing MacroModule functions *********************/ function MacroOnDrop( sender, e ) { var container = e.get_container(); var item = e.get_droppedItem(); var position = e.get_position(); //alert( String.format( "Container: {0}, Item: {1}, Position: {2}", container.id, item.i...
JavaScript
// Umbraco Live Editing - ItemEditing: Item Editing var ItemEditing = null; Type.registerNamespace("umbraco.presentation.LiveEditing"); /************************ ItemEditing class ************************/ // Creates a new instance of the ItemEditing class. umbraco.presentation.LiveEditing.ItemEditing = fun...
JavaScript
//this is simply used for live editing in order to invoke a method from a previously lazy loaded script; //alert("ItemEditingInvoke: " + initializeGlobalItemEditing); initializeGlobalItemEditing();
JavaScript
/********************* Live Editing CreateModule functions *********************/ function CreateModuleOk() { UmbracoCommunicator.SendClientMessage('createcontent', ''); }
JavaScript
/********************* Live Editing UnpublishModule functions *********************/ function UnpublishModuleOk() { UmbracoCommunicator.SendClientMessage('unpublishcontent', ''); }
JavaScript
/********************* Live Editing DeleteModule functions *********************/ function DeleteModuleOk() { UmbracoCommunicator.SendClientMessage('deletecontent', ''); }
JavaScript
ShowSkinModule();
JavaScript
jQuery(".skinningslider").each(function () { var vals = jQuery(this).attr("rel").split(","); var minimum = vals[0]; var maximum = vals[1]; var initial = vals[2]; var ratio = vals[3] var target = vals[4]; jQuery(this).slider({ change: function (event, ui) { if (ratio !=...
JavaScript
var activecolorpicker; jQuery('input.skinningcolorpicker').ColorPicker({ onSubmit: function (hsb, hex, rgb, el) { jQuery(el).val('#' + hex); jQuery(el).ColorPickerHide(); jQuery(el).trigger('change'); }, onBeforeShow: function () { activecolorpicker = this; ...
JavaScript
jQuery('.selectskin').click(function () { jQuery('#skinupdateinprogress').show(); jQuery('#skins').hide(); jQuery('#localSkinsContainer').hide(); });
JavaScript
var umbModuleToInsertAlias; function umbMakeModulesSortable() { if (jQuery('.umbModuleContainer').length > 0) { jQuery('.umbModuleContainer').sortable({ connectWith: '.umbModuleContainer', items: '.umbModule', stop: function (event, ui) { U...
JavaScript
// Umbraco Live Editing: Communicator /********************* Communicator Constructor *********************/ function UmbracoCommunicator() { } /********************* Communicator Methods *********************/ // Sends a message to the client using the communicator. UmbracoCommunicator.pr...
JavaScript