Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BFB5105CB for ; Sat, 14 Dec 2013 11:43:35 +0000 (UTC) Received: (qmail 81808 invoked by uid 500); 14 Dec 2013 11:41:33 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 81469 invoked by uid 500); 14 Dec 2013 11:41:16 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 81027 invoked by uid 99); 14 Dec 2013 11:41:09 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Dec 2013 11:41:09 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 354EA8B9110; Sat, 14 Dec 2013 11:41:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nslater@apache.org To: commits@couchdb.apache.org Date: Sat, 14 Dec 2013 11:41:37 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [31/51] [partial] Bring Fauxton directories together http://git-wip-us.apache.org/repos/asf/couchdb/blob/c14b2991/share/www/fauxton/src/assets/js/libs/ace/snippets/javascript.js ---------------------------------------------------------------------- diff --git a/share/www/fauxton/src/assets/js/libs/ace/snippets/javascript.js b/share/www/fauxton/src/assets/js/libs/ace/snippets/javascript.js new file mode 100644 index 0000000..2e7a35d --- /dev/null +++ b/share/www/fauxton/src/assets/js/libs/ace/snippets/javascript.js @@ -0,0 +1,202 @@ +define('ace/snippets/javascript', ['require', 'exports', 'module' ], function(require, exports, module) { + + +exports.snippetText = "# Prototype\n\ +snippet proto\n\ + ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\ + ${4:// body...}\n\ + };\n\ +# Function\n\ +snippet fun\n\ + function ${1?:function_name}(${2:argument}) {\n\ + ${3:// body...}\n\ + }\n\ +# Anonymous Function\n\ +regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\n\ +snippet f\n\ + function${M1?: ${1:functionName}}($2) {\n\ + ${0:$TM_SELECTED_TEXT}\n\ + }${M2?;}${M3?,}${M4?)}\n\ +# Immediate function\n\ +trigger \\(?f\\(\n\ +endTrigger \\)?\n\ +snippet f(\n\ + (function(${1}) {\n\ + ${0:${TM_SELECTED_TEXT:/* code */}}\n\ + }(${1}));\n\ +# if\n\ +snippet if\n\ + if (${1:true}) {\n\ + ${0}\n\ + }\n\ +# if ... else\n\ +snippet ife\n\ + if (${1:true}) {\n\ + ${2}\n\ + } else {\n\ + ${0}\n\ + }\n\ +# tertiary conditional\n\ +snippet ter\n\ + ${1:/* condition */} ? ${2:a} : ${3:b}\n\ +# switch\n\ +snippet switch\n\ + switch (${1:expression}) {\n\ + case '${3:case}':\n\ + ${4:// code}\n\ + break;\n\ + ${5}\n\ + default:\n\ + ${2:// code}\n\ + }\n\ +# case\n\ +snippet case\n\ + case '${1:case}':\n\ + ${2:// code}\n\ + break;\n\ + ${3}\n\ +\n\ +# while (...) {...}\n\ +snippet wh\n\ + while (${1:/* condition */}) {\n\ + ${0:/* code */}\n\ + }\n\ +# try\n\ +snippet try\n\ + try {\n\ + ${0:/* code */}\n\ + } catch (e) {}\n\ +# do...while\n\ +snippet do\n\ + do {\n\ + ${2:/* code */}\n\ + } while (${1:/* condition */});\n\ +# Object Method\n\ +snippet :f\n\ +regex /([,{[])|^\\s*/:f/\n\ + ${1:method_name}: function(${2:attribute}) {\n\ + ${0}\n\ + }${3:,}\n\ +# setTimeout function\n\ +snippet setTimeout\n\ +regex /\\b/st|timeout|setTimeo?u?t?/\n\ + setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n\ +# Get Elements\n\ +snippet gett\n\ + getElementsBy${1:TagName}('${2}')${3}\n\ +# Get Element\n\ +snippet get\n\ + getElementBy${1:Id}('${2}')${3}\n\ +# console.log (Firebug)\n\ +snippet cl\n\ + console.log(${1});\n\ +# return\n\ +snippet ret\n\ + return ${1:result}\n\ +# for (property in object ) { ... }\n\ +snippet fori\n\ + for (var ${1:prop} in ${2:Things}) {\n\ + ${0:$2[$1]}\n\ + }\n\ +# hasOwnProperty\n\ +snippet has\n\ + hasOwnProperty(${1})\n\ +# docstring\n\ +snippet /**\n\ + /**\n\ + * ${1:description}\n\ + *\n\ + */\n\ +snippet @par\n\ +regex /^\\s*\\*\\s*/@(para?m?)?/\n\ + @param {${1:type}} ${2:name} ${3:description}\n\ +snippet @ret\n\ + @return {${1:type}} ${2:description}\n\ +# JSON.parse\n\ +snippet jsonp\n\ + JSON.parse(${1:jstr});\n\ +# JSON.stringify\n\ +snippet jsons\n\ + JSON.stringify(${1:object});\n\ +# self-defining function\n\ +snippet sdf\n\ + var ${1:function_name} = function(${2:argument}) {\n\ + ${3:// initial code ...}\n\ +\n\ + $1 = function($2) {\n\ + ${4:// main code}\n\ + };\n\ + }\n\ +# singleton\n\ +snippet sing\n\ + function ${1:Singleton} (${2:argument}) {\n\ + // the cached instance\n\ + var instance;\n\ +\n\ + // rewrite the constructor\n\ + $1 = function $1($2) {\n\ + return instance;\n\ + };\n\ + \n\ + // carry over the prototype properties\n\ + $1.prototype = this;\n\ +\n\ + // the instance\n\ + instance = new $1();\n\ +\n\ + // reset the constructor pointer\n\ + instance.constructor = $1;\n\ +\n\ + ${3:// code ...}\n\ +\n\ + return instance;\n\ + }\n\ +# class\n\ +snippet class\n\ +regex /^\\s*/clas{0,2}/\n\ + var ${1:class} = function(${20}) {\n\ + $40$0\n\ + };\n\ + \n\ + (function() {\n\ + ${60:this.prop = \"\"}\n\ + }).call(${1:class}.prototype);\n\ + \n\ + exports.${1:class} = ${1:class};\n\ +# \n\ +snippet for-\n\ + for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n\ + ${0:${2:Things}[${1:i}];}\n\ + }\n\ +# for (...) {...}\n\ +snippet for\n\ + for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n\ + ${3:$2[$1]}$0\n\ + }\n\ +# for (...) {...} (Improved Native For-Loop)\n\ +snippet forr\n\ + for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n\ + ${3:$2[$1]}$0\n\ + }\n\ +\n\ +\n\ +#modules\n\ +snippet def\n\ + define(function(require, exports, module) {\n\ + \"use strict\";\n\ + var ${1/.*\\///} = require(\"${1}\");\n\ + \n\ + $TM_SELECTED_TEXT\n\ + });\n\ +snippet req\n\ +guard ^\\s*\n\ + var ${1/.*\\///} = require(\"${1}\");\n\ + $0\n\ +snippet requ\n\ +guard ^\\s*\n\ + var ${1/.*\\/(.)/\\u$1/} = require(\"${1}\").${1/.*\\/(.)/\\u$1/};\n\ + $0\n\ +"; +exports.scope = "javascript"; + +}); http://git-wip-us.apache.org/repos/asf/couchdb/blob/c14b2991/share/www/fauxton/src/assets/js/libs/ace/snippets/json.js ---------------------------------------------------------------------- diff --git a/share/www/fauxton/src/assets/js/libs/ace/snippets/json.js b/share/www/fauxton/src/assets/js/libs/ace/snippets/json.js new file mode 100644 index 0000000..07841a2 --- /dev/null +++ b/share/www/fauxton/src/assets/js/libs/ace/snippets/json.js @@ -0,0 +1,7 @@ +define('ace/snippets/json', ['require', 'exports', 'module' ], function(require, exports, module) { + + +exports.snippetText = ""; +exports.scope = "json"; + +}); http://git-wip-us.apache.org/repos/asf/couchdb/blob/c14b2991/share/www/fauxton/src/assets/js/libs/ace/snippets/jsoniq.js ---------------------------------------------------------------------- diff --git a/share/www/fauxton/src/assets/js/libs/ace/snippets/jsoniq.js b/share/www/fauxton/src/assets/js/libs/ace/snippets/jsoniq.js new file mode 100644 index 0000000..13b9bd7 --- /dev/null +++ b/share/www/fauxton/src/assets/js/libs/ace/snippets/jsoniq.js @@ -0,0 +1,7 @@ +define('ace/snippets/jsoniq', ['require', 'exports', 'module' ], function(require, exports, module) { + + +exports.snippetText = ""; +exports.scope = "jsoniq"; + +}); http://git-wip-us.apache.org/repos/asf/couchdb/blob/c14b2991/share/www/fauxton/src/assets/js/libs/ace/theme-crimson_editor.js ---------------------------------------------------------------------- diff --git a/share/www/fauxton/src/assets/js/libs/ace/theme-crimson_editor.js b/share/www/fauxton/src/assets/js/libs/ace/theme-crimson_editor.js new file mode 100644 index 0000000..5192579 --- /dev/null +++ b/share/www/fauxton/src/assets/js/libs/ace/theme-crimson_editor.js @@ -0,0 +1,148 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/theme/crimson_editor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) { +exports.isDark = false; +exports.cssText = ".ace-crimson-editor .ace_gutter {\ +background: #ebebeb;\ +color: #333;\ +overflow : hidden;\ +}\ +.ace-crimson-editor .ace_gutter-layer {\ +width: 100%;\ +text-align: right;\ +}\ +.ace-crimson-editor .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-crimson-editor {\ +background-color: #FFFFFF;\ +color: rgb(64, 64, 64);\ +}\ +.ace-crimson-editor .ace_cursor {\ +color: black;\ +}\ +.ace-crimson-editor .ace_invisible {\ +color: rgb(191, 191, 191);\ +}\ +.ace-crimson-editor .ace_identifier {\ +color: black;\ +}\ +.ace-crimson-editor .ace_keyword {\ +color: blue;\ +}\ +.ace-crimson-editor .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-crimson-editor .ace_constant.ace_language {\ +color: rgb(255, 156, 0);\ +}\ +.ace-crimson-editor .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-crimson-editor .ace_invalid {\ +text-decoration: line-through;\ +color: rgb(224, 0, 0);\ +}\ +.ace-crimson-editor .ace_fold {\ +}\ +.ace-crimson-editor .ace_support.ace_function {\ +color: rgb(192, 0, 0);\ +}\ +.ace-crimson-editor .ace_support.ace_constant {\ +color: rgb(6, 150, 14);\ +}\ +.ace-crimson-editor .ace_support.ace_type,\ +.ace-crimson-editor .ace_support.ace_class {\ +color: rgb(109, 121, 222);\ +}\ +.ace-crimson-editor .ace_keyword.ace_operator {\ +color: rgb(49, 132, 149);\ +}\ +.ace-crimson-editor .ace_string {\ +color: rgb(128, 0, 128);\ +}\ +.ace-crimson-editor .ace_comment {\ +color: rgb(76, 136, 107);\ +}\ +.ace-crimson-editor .ace_comment.ace_doc {\ +color: rgb(0, 102, 255);\ +}\ +.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\ +color: rgb(128, 159, 191);\ +}\ +.ace-crimson-editor .ace_constant.ace_numeric {\ +color: rgb(0, 0, 64);\ +}\ +.ace-crimson-editor .ace_variable {\ +color: rgb(0, 64, 128);\ +}\ +.ace-crimson-editor .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_active-line {\ +background: rgb(232, 242, 254);\ +}\ +.ace-crimson-editor .ace_gutter-active-line {\ +background-color : #dcdcdc;\ +}\ +.ace-crimson-editor .ace_meta.ace_tag {\ +color:rgb(28, 2, 255);\ +}\ +.ace-crimson-editor .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-crimson-editor .ace_string.ace_regex {\ +color: rgb(192, 0, 192);\ +}\ +.ace-crimson-editor .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}"; + +exports.cssClass = "ace-crimson-editor"; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +});