1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
This commit is contained in:
Dave Conway-Jones 2018-10-02 18:56:22 +01:00
commit 2a50c66df8
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
49 changed files with 1266 additions and 106 deletions

View File

@ -128,6 +128,7 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/text/format.js", "packages/node_modules/@node-red/editor-client/src/js/text/format.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/state.js", "packages/node_modules/@node-red/editor-client/src/js/ui/state.js",
"packages/node_modules/@node-red/editor-client/src/js/nodes.js", "packages/node_modules/@node-red/editor-client/src/js/nodes.js",
"packages/node_modules/@node-red/editor-client/src/js/font-awesome.js",
"packages/node_modules/@node-red/editor-client/src/js/history.js", "packages/node_modules/@node-red/editor-client/src/js/history.js",
"packages/node_modules/@node-red/editor-client/src/js/validators.js", "packages/node_modules/@node-red/editor-client/src/js/validators.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/utils.js", "packages/node_modules/@node-red/editor-client/src/js/ui/utils.js",

View File

@ -97,7 +97,7 @@
"undeployedChanges": "node has undeployed changes", "undeployedChanges": "node has undeployed changes",
"nodeActionDisabled": "node actions disabled within subflow", "nodeActionDisabled": "node actions disabled within subflow",
"missing-types": "<p>Flows stopped due to missing node types.</p>", "missing-types": "<p>Flows stopped due to missing node types.</p>",
"safe-mode":"<p>Flows stopped in safe mode.</p><p>You can modify your flows and deploy the changes to restart.", "safe-mode":"<p>Flows stopped in safe mode.</p><p>You can modify your flows and deploy the changes to restart.</p>",
"restartRequired": "Node-RED must be restarted to enable upgraded modules", "restartRequired": "Node-RED must be restarted to enable upgraded modules",
"credentials_load_failed": "<p>Flows stopped as the credentials could not be decrypted.</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p>", "credentials_load_failed": "<p>Flows stopped as the credentials could not be decrypted.</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p>",
"credentials_load_failed_reset":"<p>Credentials could not be decrypted</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p><p>The flow credential file will be reset on the next deployment. Any existing flow credentials will be cleared.</p>", "credentials_load_failed_reset":"<p>Credentials could not be decrypted</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p><p>The flow credential file will be reset on the next deployment. Any existing flow credentials will be cleared.</p>",

View File

@ -97,6 +97,7 @@
"undeployedChanges": "ノードの変更をデプロイしていません", "undeployedChanges": "ノードの変更をデプロイしていません",
"nodeActionDisabled": "ノードのアクションは、サブフロー内で無効になっています", "nodeActionDisabled": "ノードのアクションは、サブフロー内で無効になっています",
"missing-types": "不明なノードが存在するため、フローを停止しました。詳細はログを確認してください。", "missing-types": "不明なノードが存在するため、フローを停止しました。詳細はログを確認してください。",
"safe-mode": "<p>セーフモードでフローを停止しました</p><p>フローを変更し、再起動するために変更をデプロイできます</p>",
"restartRequired": "更新されたモジュールを有効化するため、Node-REDを再起動する必要があります", "restartRequired": "更新されたモジュールを有効化するため、Node-REDを再起動する必要があります",
"credentials_load_failed": "<p>認証情報を復号できないため、フローを停止しました</p><p>フローの認証情報ファイルは暗号化されています。しかし、プロジェクトの暗号鍵が存在しない、または不正です</p>", "credentials_load_failed": "<p>認証情報を復号できないため、フローを停止しました</p><p>フローの認証情報ファイルは暗号化されています。しかし、プロジェクトの暗号鍵が存在しない、または不正です</p>",
"credentials_load_failed_reset": "<p>認証情報を復号できません</p><p>フローの認証情報ファイルは暗号化されています。しかし、プロジェクトの暗号鍵が存在しない、または不正です。</p><p>次回のデプロイでフローの認証情報ファイルがリセットされます。既存フローの認証情報は削除されます。</p>", "credentials_load_failed_reset": "<p>認証情報を復号できません</p><p>フローの認証情報ファイルは暗号化されています。しかし、プロジェクトの暗号鍵が存在しない、または不正です。</p><p>次回のデプロイでフローの認証情報ファイルがリセットされます。既存フローの認証情報は削除されます。</p>",
@ -171,7 +172,10 @@
"modifiedFlowsDesc": "変更したノードを含むフローのみデプロイ", "modifiedFlowsDesc": "変更したノードを含むフローのみデプロイ",
"modifiedNodes": "変更したノード", "modifiedNodes": "変更したノード",
"modifiedNodesDesc": "変更したノードのみデプロイ", "modifiedNodesDesc": "変更したノードのみデプロイ",
"restartFlows": "フローを再起動",
"restartFlowsDesc": "デプロイされた現在のフローを再起動",
"successfulDeploy": "デプロイが成功しました", "successfulDeploy": "デプロイが成功しました",
"successfulRestart": "フローの再起動が成功しました",
"deployFailed": "デプロイが失敗しました: __message__", "deployFailed": "デプロイが失敗しました: __message__",
"unusedConfigNodes": "使われていない「ノードの設定」があります。", "unusedConfigNodes": "使われていない「ノードの設定」があります。",
"unusedConfigNodesLink": "設定を参照する", "unusedConfigNodesLink": "設定を参照する",
@ -432,6 +436,7 @@
"instances": "インスタンス", "instances": "インスタンス",
"properties": "プロパティ", "properties": "プロパティ",
"info": "情報", "info": "情報",
"desc": "詳細",
"blank": "ブランク", "blank": "ブランク",
"null": "ヌル", "null": "ヌル",
"showMore": "さらに表示", "showMore": "さらに表示",

View File

@ -0,0 +1,831 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
RED.nodes.fontAwesome = (function() {
var iconMap = {
"fa-glass": "\uf000",
"fa-music": "\uf001",
"fa-search": "\uf002",
"fa-envelope-o": "\uf003",
"fa-heart": "\uf004",
"fa-star": "\uf005",
"fa-star-o": "\uf006",
"fa-user": "\uf007",
"fa-film": "\uf008",
"fa-th-large": "\uf009",
"fa-th": "\uf00a",
"fa-th-list": "\uf00b",
"fa-check": "\uf00c",
"fa-remove": "\uf00d",
"fa-close": "\uf00d",
"fa-times": "\uf00d",
"fa-search-plus": "\uf00e",
"fa-search-minus": "\uf010",
"fa-power-off": "\uf011",
"fa-signal": "\uf012",
"fa-gear": "\uf013",
"fa-cog": "\uf013",
"fa-trash-o": "\uf014",
"fa-home": "\uf015",
"fa-file-o": "\uf016",
"fa-clock-o": "\uf017",
"fa-road": "\uf018",
"fa-download": "\uf019",
"fa-arrow-circle-o-down": "\uf01a",
"fa-arrow-circle-o-up": "\uf01b",
"fa-inbox": "\uf01c",
"fa-play-circle-o": "\uf01d",
"fa-rotate-right": "\uf01e",
"fa-repeat": "\uf01e",
"fa-refresh": "\uf021",
"fa-list-alt": "\uf022",
"fa-lock": "\uf023",
"fa-flag": "\uf024",
"fa-headphones": "\uf025",
"fa-volume-off": "\uf026",
"fa-volume-down": "\uf027",
"fa-volume-up": "\uf028",
"fa-qrcode": "\uf029",
"fa-barcode": "\uf02a",
"fa-tag": "\uf02b",
"fa-tags": "\uf02c",
"fa-book": "\uf02d",
"fa-bookmark": "\uf02e",
"fa-print": "\uf02f",
"fa-camera": "\uf030",
"fa-font": "\uf031",
"fa-bold": "\uf032",
"fa-italic": "\uf033",
"fa-text-height": "\uf034",
"fa-text-width": "\uf035",
"fa-align-left": "\uf036",
"fa-align-center": "\uf037",
"fa-align-right": "\uf038",
"fa-align-justify": "\uf039",
"fa-list": "\uf03a",
"fa-dedent": "\uf03b",
"fa-outdent": "\uf03b",
"fa-indent": "\uf03c",
"fa-video-camera": "\uf03d",
"fa-photo": "\uf03e",
"fa-image": "\uf03e",
"fa-picture-o": "\uf03e",
"fa-pencil": "\uf040",
"fa-map-marker": "\uf041",
"fa-adjust": "\uf042",
"fa-tint": "\uf043",
"fa-edit": "\uf044",
"fa-pencil-square-o": "\uf044",
"fa-share-square-o": "\uf045",
"fa-check-square-o": "\uf046",
"fa-arrows": "\uf047",
"fa-step-backward": "\uf048",
"fa-fast-backward": "\uf049",
"fa-backward": "\uf04a",
"fa-play": "\uf04b",
"fa-pause": "\uf04c",
"fa-stop": "\uf04d",
"fa-forward": "\uf04e",
"fa-fast-forward": "\uf050",
"fa-step-forward": "\uf051",
"fa-eject": "\uf052",
"fa-chevron-left": "\uf053",
"fa-chevron-right": "\uf054",
"fa-plus-circle": "\uf055",
"fa-minus-circle": "\uf056",
"fa-times-circle": "\uf057",
"fa-check-circle": "\uf058",
"fa-question-circle": "\uf059",
"fa-info-circle": "\uf05a",
"fa-crosshairs": "\uf05b",
"fa-times-circle-o": "\uf05c",
"fa-check-circle-o": "\uf05d",
"fa-ban": "\uf05e",
"fa-arrow-left": "\uf060",
"fa-arrow-right": "\uf061",
"fa-arrow-up": "\uf062",
"fa-arrow-down": "\uf063",
"fa-mail-forward": "\uf064",
"fa-share": "\uf064",
"fa-expand": "\uf065",
"fa-compress": "\uf066",
"fa-plus": "\uf067",
"fa-minus": "\uf068",
"fa-asterisk": "\uf069",
"fa-exclamation-circle": "\uf06a",
"fa-gift": "\uf06b",
"fa-leaf": "\uf06c",
"fa-fire": "\uf06d",
"fa-eye": "\uf06e",
"fa-eye-slash": "\uf070",
"fa-warning": "\uf071",
"fa-exclamation-triangle": "\uf071",
"fa-plane": "\uf072",
"fa-calendar": "\uf073",
"fa-random": "\uf074",
"fa-comment": "\uf075",
"fa-magnet": "\uf076",
"fa-chevron-up": "\uf077",
"fa-chevron-down": "\uf078",
"fa-retweet": "\uf079",
"fa-shopping-cart": "\uf07a",
"fa-folder": "\uf07b",
"fa-folder-open": "\uf07c",
"fa-arrows-v": "\uf07d",
"fa-arrows-h": "\uf07e",
"fa-bar-chart-o": "\uf080",
"fa-bar-chart": "\uf080",
"fa-camera-retro": "\uf083",
"fa-key": "\uf084",
"fa-gears": "\uf085",
"fa-cogs": "\uf085",
"fa-comments": "\uf086",
"fa-thumbs-o-up": "\uf087",
"fa-thumbs-o-down": "\uf088",
"fa-star-half": "\uf089",
"fa-heart-o": "\uf08a",
"fa-sign-out": "\uf08b",
"fa-thumb-tack": "\uf08d",
"fa-external-link": "\uf08e",
"fa-sign-in": "\uf090",
"fa-trophy": "\uf091",
"fa-upload": "\uf093",
"fa-lemon-o": "\uf094",
"fa-phone": "\uf095",
"fa-square-o": "\uf096",
"fa-bookmark-o": "\uf097",
"fa-phone-square": "\uf098",
"fa-unlock": "\uf09c",
"fa-credit-card": "\uf09d",
"fa-feed": "\uf09e",
"fa-rss": "\uf09e",
"fa-hdd-o": "\uf0a0",
"fa-bullhorn": "\uf0a1",
"fa-bell-o": "\uf0a2",
"fa-certificate": "\uf0a3",
"fa-hand-o-right": "\uf0a4",
"fa-hand-o-left": "\uf0a5",
"fa-hand-o-up": "\uf0a6",
"fa-hand-o-down": "\uf0a7",
"fa-arrow-circle-left": "\uf0a8",
"fa-arrow-circle-right": "\uf0a9",
"fa-arrow-circle-up": "\uf0aa",
"fa-arrow-circle-down": "\uf0ab",
"fa-globe": "\uf0ac",
"fa-wrench": "\uf0ad",
"fa-tasks": "\uf0ae",
"fa-filter": "\uf0b0",
"fa-briefcase": "\uf0b1",
"fa-arrows-alt": "\uf0b2",
"fa-group": "\uf0c0",
"fa-users": "\uf0c0",
"fa-chain": "\uf0c1",
"fa-link": "\uf0c1",
"fa-cloud": "\uf0c2",
"fa-flask": "\uf0c3",
"fa-cut": "\uf0c4",
"fa-scissors": "\uf0c4",
"fa-copy": "\uf0c5",
"fa-files-o": "\uf0c5",
"fa-paperclip": "\uf0c6",
"fa-save": "\uf0c7",
"fa-floppy-o": "\uf0c7",
"fa-square": "\uf0c8",
"fa-navicon": "\uf0c9",
"fa-reorder": "\uf0c9",
"fa-bars": "\uf0c9",
"fa-list-ul": "\uf0ca",
"fa-list-ol": "\uf0cb",
"fa-strikethrough": "\uf0cc",
"fa-underline": "\uf0cd",
"fa-table": "\uf0ce",
"fa-magic": "\uf0d0",
"fa-truck": "\uf0d1",
"fa-money": "\uf0d6",
"fa-caret-down": "\uf0d7",
"fa-caret-up": "\uf0d8",
"fa-caret-left": "\uf0d9",
"fa-caret-right": "\uf0da",
"fa-columns": "\uf0db",
"fa-unsorted": "\uf0dc",
"fa-sort": "\uf0dc",
"fa-sort-down": "\uf0dd",
"fa-sort-desc": "\uf0dd",
"fa-sort-up": "\uf0de",
"fa-sort-asc": "\uf0de",
"fa-envelope": "\uf0e0",
"fa-rotate-left": "\uf0e2",
"fa-undo": "\uf0e2",
"fa-legal": "\uf0e3",
"fa-gavel": "\uf0e3",
"fa-dashboard": "\uf0e4",
"fa-tachometer": "\uf0e4",
"fa-comment-o": "\uf0e5",
"fa-comments-o": "\uf0e6",
"fa-flash": "\uf0e7",
"fa-bolt": "\uf0e7",
"fa-sitemap": "\uf0e8",
"fa-umbrella": "\uf0e9",
"fa-paste": "\uf0ea",
"fa-clipboard": "\uf0ea",
"fa-lightbulb-o": "\uf0eb",
"fa-exchange": "\uf0ec",
"fa-cloud-download": "\uf0ed",
"fa-cloud-upload": "\uf0ee",
"fa-user-md": "\uf0f0",
"fa-stethoscope": "\uf0f1",
"fa-suitcase": "\uf0f2",
"fa-bell": "\uf0f3",
"fa-coffee": "\uf0f4",
"fa-cutlery": "\uf0f5",
"fa-file-text-o": "\uf0f6",
"fa-building-o": "\uf0f7",
"fa-hospital-o": "\uf0f8",
"fa-ambulance": "\uf0f9",
"fa-medkit": "\uf0fa",
"fa-fighter-jet": "\uf0fb",
"fa-beer": "\uf0fc",
"fa-h-square": "\uf0fd",
"fa-plus-square": "\uf0fe",
"fa-angle-double-left": "\uf100",
"fa-angle-double-right": "\uf101",
"fa-angle-double-up": "\uf102",
"fa-angle-double-down": "\uf103",
"fa-angle-left": "\uf104",
"fa-angle-right": "\uf105",
"fa-angle-up": "\uf106",
"fa-angle-down": "\uf107",
"fa-desktop": "\uf108",
"fa-laptop": "\uf109",
"fa-tablet": "\uf10a",
"fa-mobile-phone": "\uf10b",
"fa-mobile": "\uf10b",
"fa-circle-o": "\uf10c",
"fa-quote-left": "\uf10d",
"fa-quote-right": "\uf10e",
"fa-spinner": "\uf110",
"fa-circle": "\uf111",
"fa-mail-reply": "\uf112",
"fa-reply": "\uf112",
"fa-folder-o": "\uf114",
"fa-folder-open-o": "\uf115",
"fa-smile-o": "\uf118",
"fa-frown-o": "\uf119",
"fa-meh-o": "\uf11a",
"fa-gamepad": "\uf11b",
"fa-keyboard-o": "\uf11c",
"fa-flag-o": "\uf11d",
"fa-flag-checkered": "\uf11e",
"fa-terminal": "\uf120",
"fa-code": "\uf121",
"fa-mail-reply-all": "\uf122",
"fa-reply-all": "\uf122",
"fa-star-half-empty": "\uf123",
"fa-star-half-full": "\uf123",
"fa-star-half-o": "\uf123",
"fa-location-arrow": "\uf124",
"fa-crop": "\uf125",
"fa-code-fork": "\uf126",
"fa-unlink": "\uf127",
"fa-chain-broken": "\uf127",
"fa-question": "\uf128",
"fa-info": "\uf129",
"fa-exclamation": "\uf12a",
"fa-superscript": "\uf12b",
"fa-subscript": "\uf12c",
"fa-eraser": "\uf12d",
"fa-puzzle-piece": "\uf12e",
"fa-microphone": "\uf130",
"fa-microphone-slash": "\uf131",
"fa-shield": "\uf132",
"fa-calendar-o": "\uf133",
"fa-fire-extinguisher": "\uf134",
"fa-rocket": "\uf135",
"fa-chevron-circle-left": "\uf137",
"fa-chevron-circle-right": "\uf138",
"fa-chevron-circle-up": "\uf139",
"fa-chevron-circle-down": "\uf13a",
"fa-anchor": "\uf13d",
"fa-unlock-alt": "\uf13e",
"fa-bullseye": "\uf140",
"fa-ellipsis-h": "\uf141",
"fa-ellipsis-v": "\uf142",
"fa-rss-square": "\uf143",
"fa-play-circle": "\uf144",
"fa-ticket": "\uf145",
"fa-minus-square": "\uf146",
"fa-minus-square-o": "\uf147",
"fa-level-up": "\uf148",
"fa-level-down": "\uf149",
"fa-check-square": "\uf14a",
"fa-pencil-square": "\uf14b",
"fa-external-link-square": "\uf14c",
"fa-share-square": "\uf14d",
"fa-compass": "\uf14e",
"fa-toggle-down": "\uf150",
"fa-caret-square-o-down": "\uf150",
"fa-toggle-up": "\uf151",
"fa-caret-square-o-up": "\uf151",
"fa-toggle-right": "\uf152",
"fa-caret-square-o-right": "\uf152",
"fa-euro": "\uf153",
"fa-eur": "\uf153",
"fa-gbp": "\uf154",
"fa-dollar": "\uf155",
"fa-usd": "\uf155",
"fa-rupee": "\uf156",
"fa-inr": "\uf156",
"fa-cny": "\uf157",
"fa-rmb": "\uf157",
"fa-yen": "\uf157",
"fa-jpy": "\uf157",
"fa-ruble": "\uf158",
"fa-rouble": "\uf158",
"fa-rub": "\uf158",
"fa-won": "\uf159",
"fa-krw": "\uf159",
"fa-file": "\uf15b",
"fa-file-text": "\uf15c",
"fa-sort-alpha-asc": "\uf15d",
"fa-sort-alpha-desc": "\uf15e",
"fa-sort-amount-asc": "\uf160",
"fa-sort-amount-desc": "\uf161",
"fa-sort-numeric-asc": "\uf162",
"fa-sort-numeric-desc": "\uf163",
"fa-thumbs-up": "\uf164",
"fa-thumbs-down": "\uf165",
"fa-long-arrow-down": "\uf175",
"fa-long-arrow-up": "\uf176",
"fa-long-arrow-left": "\uf177",
"fa-long-arrow-right": "\uf178",
"fa-female": "\uf182",
"fa-male": "\uf183",
"fa-sun-o": "\uf185",
"fa-moon-o": "\uf186",
"fa-archive": "\uf187",
"fa-bug": "\uf188",
"fa-arrow-circle-o-right": "\uf18e",
"fa-arrow-circle-o-left": "\uf190",
"fa-toggle-left": "\uf191",
"fa-caret-square-o-left": "\uf191",
"fa-dot-circle-o": "\uf192",
"fa-wheelchair": "\uf193",
"fa-turkish-lira": "\uf195",
"fa-try": "\uf195",
"fa-plus-square-o": "\uf196",
"fa-space-shuttle": "\uf197",
"fa-envelope-square": "\uf199",
"fa-institution": "\uf19c",
"fa-bank": "\uf19c",
"fa-university": "\uf19c",
"fa-mortar-board": "\uf19d",
"fa-graduation-cap": "\uf19d",
"fa-language": "\uf1ab",
"fa-fax": "\uf1ac",
"fa-building": "\uf1ad",
"fa-child": "\uf1ae",
"fa-paw": "\uf1b0",
"fa-spoon": "\uf1b1",
"fa-cube": "\uf1b2",
"fa-cubes": "\uf1b3",
"fa-recycle": "\uf1b8",
"fa-automobile": "\uf1b9",
"fa-car": "\uf1b9",
"fa-cab": "\uf1ba",
"fa-taxi": "\uf1ba",
"fa-tree": "\uf1bb",
"fa-database": "\uf1c0",
"fa-file-pdf-o": "\uf1c1",
"fa-file-word-o": "\uf1c2",
"fa-file-excel-o": "\uf1c3",
"fa-file-powerpoint-o": "\uf1c4",
"fa-file-photo-o": "\uf1c5",
"fa-file-picture-o": "\uf1c5",
"fa-file-image-o": "\uf1c5",
"fa-file-zip-o": "\uf1c6",
"fa-file-archive-o": "\uf1c6",
"fa-file-sound-o": "\uf1c7",
"fa-file-audio-o": "\uf1c7",
"fa-file-movie-o": "\uf1c8",
"fa-file-video-o": "\uf1c8",
"fa-file-code-o": "\uf1c9",
"fa-life-bouy": "\uf1cd",
"fa-life-buoy": "\uf1cd",
"fa-life-saver": "\uf1cd",
"fa-support": "\uf1cd",
"fa-life-ring": "\uf1cd",
"fa-circle-o-notch": "\uf1ce",
"fa-send": "\uf1d8",
"fa-paper-plane": "\uf1d8",
"fa-send-o": "\uf1d9",
"fa-paper-plane-o": "\uf1d9",
"fa-history": "\uf1da",
"fa-circle-thin": "\uf1db",
"fa-header": "\uf1dc",
"fa-paragraph": "\uf1dd",
"fa-sliders": "\uf1de",
"fa-bomb": "\uf1e2",
"fa-soccer-ball-o": "\uf1e3",
"fa-futbol-o": "\uf1e3",
"fa-tty": "\uf1e4",
"fa-binoculars": "\uf1e5",
"fa-plug": "\uf1e6",
"fa-newspaper-o": "\uf1ea",
"fa-wifi": "\uf1eb",
"fa-calculator": "\uf1ec",
"fa-bell-slash": "\uf1f6",
"fa-bell-slash-o": "\uf1f7",
"fa-trash": "\uf1f8",
"fa-copyright": "\uf1f9",
"fa-at": "\uf1fa",
"fa-eyedropper": "\uf1fb",
"fa-paint-brush": "\uf1fc",
"fa-birthday-cake": "\uf1fd",
"fa-area-chart": "\uf1fe",
"fa-pie-chart": "\uf200",
"fa-line-chart": "\uf201",
"fa-toggle-off": "\uf204",
"fa-toggle-on": "\uf205",
"fa-bicycle": "\uf206",
"fa-bus": "\uf207",
"fa-cc": "\uf20a",
"fa-shekel": "\uf20b",
"fa-sheqel": "\uf20b",
"fa-ils": "\uf20b",
"fa-cart-plus": "\uf217",
"fa-cart-arrow-down": "\uf218",
"fa-diamond": "\uf219",
"fa-ship": "\uf21a",
"fa-user-secret": "\uf21b",
"fa-motorcycle": "\uf21c",
"fa-street-view": "\uf21d",
"fa-heartbeat": "\uf21e",
"fa-venus": "\uf221",
"fa-mars": "\uf222",
"fa-mercury": "\uf223",
"fa-intersex": "\uf224",
"fa-transgender": "\uf224",
"fa-transgender-alt": "\uf225",
"fa-venus-double": "\uf226",
"fa-mars-double": "\uf227",
"fa-venus-mars": "\uf228",
"fa-mars-stroke": "\uf229",
"fa-mars-stroke-v": "\uf22a",
"fa-mars-stroke-h": "\uf22b",
"fa-neuter": "\uf22c",
"fa-genderless": "\uf22d",
"fa-server": "\uf233",
"fa-user-plus": "\uf234",
"fa-user-times": "\uf235",
"fa-hotel": "\uf236",
"fa-bed": "\uf236",
"fa-train": "\uf238",
"fa-subway": "\uf239",
"fa-battery-4": "\uf240",
"fa-battery": "\uf240",
"fa-battery-full": "\uf240",
"fa-battery-3": "\uf241",
"fa-battery-three-quarters": "\uf241",
"fa-battery-2": "\uf242",
"fa-battery-half": "\uf242",
"fa-battery-1": "\uf243",
"fa-battery-quarter": "\uf243",
"fa-battery-0": "\uf244",
"fa-battery-empty": "\uf244",
"fa-mouse-pointer": "\uf245",
"fa-i-cursor": "\uf246",
"fa-object-group": "\uf247",
"fa-object-ungroup": "\uf248",
"fa-sticky-note": "\uf249",
"fa-sticky-note-o": "\uf24a",
"fa-clone": "\uf24d",
"fa-balance-scale": "\uf24e",
"fa-hourglass-o": "\uf250",
"fa-hourglass-1": "\uf251",
"fa-hourglass-start": "\uf251",
"fa-hourglass-2": "\uf252",
"fa-hourglass-half": "\uf252",
"fa-hourglass-3": "\uf253",
"fa-hourglass-end": "\uf253",
"fa-hourglass": "\uf254",
"fa-hand-grab-o": "\uf255",
"fa-hand-rock-o": "\uf255",
"fa-hand-stop-o": "\uf256",
"fa-hand-paper-o": "\uf256",
"fa-hand-scissors-o": "\uf257",
"fa-hand-lizard-o": "\uf258",
"fa-hand-spock-o": "\uf259",
"fa-hand-pointer-o": "\uf25a",
"fa-hand-peace-o": "\uf25b",
"fa-trademark": "\uf25c",
"fa-registered": "\uf25d",
"fa-creative-commons": "\uf25e",
"fa-tv": "\uf26c",
"fa-television": "\uf26c",
"fa-calendar-plus-o": "\uf271",
"fa-calendar-minus-o": "\uf272",
"fa-calendar-times-o": "\uf273",
"fa-calendar-check-o": "\uf274",
"fa-industry": "\uf275",
"fa-map-pin": "\uf276",
"fa-map-signs": "\uf277",
"fa-map-o": "\uf278",
"fa-map": "\uf279",
"fa-commenting": "\uf27a",
"fa-commenting-o": "\uf27b",
"fa-credit-card-alt": "\uf283",
"fa-pause-circle": "\uf28b",
"fa-pause-circle-o": "\uf28c",
"fa-stop-circle": "\uf28d",
"fa-stop-circle-o": "\uf28e",
"fa-shopping-bag": "\uf290",
"fa-shopping-basket": "\uf291",
"fa-hashtag": "\uf292",
"fa-percent": "\uf295",
"fa-universal-access": "\uf29a",
"fa-wheelchair-alt": "\uf29b",
"fa-question-circle-o": "\uf29c",
"fa-blind": "\uf29d",
"fa-audio-description": "\uf29e",
"fa-volume-control-phone": "\uf2a0",
"fa-braille": "\uf2a1",
"fa-assistive-listening-systems": "\uf2a2",
"fa-asl-interpreting": "\uf2a3",
"fa-american-sign-language-interpreting": "\uf2a3",
"fa-deafness": "\uf2a4",
"fa-hard-of-hearing": "\uf2a4",
"fa-deaf": "\uf2a4",
"fa-signing": "\uf2a7",
"fa-sign-language": "\uf2a7",
"fa-low-vision": "\uf2a8",
"fa-handshake-o": "\uf2b5",
"fa-envelope-open": "\uf2b6",
"fa-envelope-open-o": "\uf2b7",
"fa-address-book": "\uf2b9",
"fa-address-book-o": "\uf2ba",
"fa-vcard": "\uf2bb",
"fa-address-card": "\uf2bb",
"fa-vcard-o": "\uf2bc",
"fa-address-card-o": "\uf2bc",
"fa-user-circle": "\uf2bd",
"fa-user-circle-o": "\uf2be",
"fa-user-o": "\uf2c0",
"fa-id-badge": "\uf2c1",
"fa-drivers-license": "\uf2c2",
"fa-id-card": "\uf2c2",
"fa-drivers-license-o": "\uf2c3",
"fa-id-card-o": "\uf2c3",
"fa-thermometer-4": "\uf2c7",
"fa-thermometer": "\uf2c7",
"fa-thermometer-full": "\uf2c7",
"fa-thermometer-3": "\uf2c8",
"fa-thermometer-three-quarters": "\uf2c8",
"fa-thermometer-2": "\uf2c9",
"fa-thermometer-half": "\uf2c9",
"fa-thermometer-1": "\uf2ca",
"fa-thermometer-quarter": "\uf2ca",
"fa-thermometer-0": "\uf2cb",
"fa-thermometer-empty": "\uf2cb",
"fa-shower": "\uf2cc",
"fa-bathtub": "\uf2cd",
"fa-s15": "\uf2cd",
"fa-bath": "\uf2cd",
"fa-podcast": "\uf2ce",
"fa-window-maximize": "\uf2d0",
"fa-window-minimize": "\uf2d1",
"fa-window-restore": "\uf2d2",
"fa-times-rectangle": "\uf2d3",
"fa-window-close": "\uf2d3",
"fa-times-rectangle-o": "\uf2d4",
"fa-window-close-o": "\uf2d4",
"fa-microchip": "\uf2db",
"fa-snowflake-o": "\uf2dc"
};
var brandIconMap = {
"fa-twitter-square": "\uf081",
"fa-facebook-square": "\uf082",
"fa-linkedin-square": "\uf08c",
"fa-github-square": "\uf092",
"fa-twitter": "\uf099",
"fa-facebook-f": "\uf09a",
"fa-facebook": "\uf09a",
"fa-github": "\uf09b",
"fa-pinterest": "\uf0d2",
"fa-pinterest-square": "\uf0d3",
"fa-google-plus-square": "\uf0d4",
"fa-google-plus": "\uf0d5",
"fa-linkedin": "\uf0e1",
"fa-github-alt": "\uf113",
"fa-maxcdn": "\uf136",
"fa-html5": "\uf13b",
"fa-css3": "\uf13c",
"fa-btc": "\uf15a",
"fa-bitcoin": "\uf15a",
"fa-youtube-square": "\uf166",
"fa-youtube": "\uf167",
"fa-xing": "\uf168",
"fa-xing-square": "\uf169",
"fa-youtube-play": "\uf16a",
"fa-dropbox": "\uf16b",
"fa-stack-overflow": "\uf16c",
"fa-instagram": "\uf16d",
"fa-flickr": "\uf16e",
"fa-adn": "\uf170",
"fa-bitbucket": "\uf171",
"fa-bitbucket-square": "\uf172",
"fa-tumblr": "\uf173",
"fa-tumblr-square": "\uf174",
"fa-apple": "\uf179",
"fa-windows": "\uf17a",
"fa-android": "\uf17b",
"fa-linux": "\uf17c",
"fa-dribbble": "\uf17d",
"fa-skype": "\uf17e",
"fa-foursquare": "\uf180",
"fa-trello": "\uf181",
"fa-gittip": "\uf184",
"fa-gratipay": "\uf184",
"fa-vk": "\uf189",
"fa-weibo": "\uf18a",
"fa-renren": "\uf18b",
"fa-pagelines": "\uf18c",
"fa-stack-exchange": "\uf18d",
"fa-vimeo-square": "\uf194",
"fa-slack": "\uf198",
"fa-wordpress": "\uf19a",
"fa-openid": "\uf19b",
"fa-yahoo": "\uf19e",
"fa-google": "\uf1a0",
"fa-reddit": "\uf1a1",
"fa-reddit-square": "\uf1a2",
"fa-stumbleupon-circle": "\uf1a3",
"fa-stumbleupon": "\uf1a4",
"fa-delicious": "\uf1a5",
"fa-digg": "\uf1a6",
"fa-pied-piper-pp": "\uf1a7",
"fa-pied-piper-alt": "\uf1a8",
"fa-drupal": "\uf1a9",
"fa-joomla": "\uf1aa",
"fa-behance": "\uf1b4",
"fa-behance-square": "\uf1b5",
"fa-steam": "\uf1b6",
"fa-steam-square": "\uf1b7",
"fa-spotify": "\uf1bc",
"fa-deviantart": "\uf1bd",
"fa-soundcloud": "\uf1be",
"fa-vine": "\uf1ca",
"fa-codepen": "\uf1cb",
"fa-jsfiddle": "\uf1cc",
"fa-ra": "\uf1d0",
"fa-rebel": "\uf1d0",
"fa-resistance": "\uf1d0",
"fa-ge": "\uf1d1",
"fa-empire": "\uf1d1",
"fa-git-square": "\uf1d2",
"fa-git": "\uf1d3",
"fa-yc-square": "\uf1d4",
"fa-hacker-news": "\uf1d4",
"fa-y-combinator-square": "\uf1d4",
"fa-tencent-weibo": "\uf1d5",
"fa-qq": "\uf1d6",
"fa-wechat": "\uf1d7",
"fa-weixin": "\uf1d7",
"fa-share-alt": "\uf1e0",
"fa-share-alt-square": "\uf1e1",
"fa-slideshare": "\uf1e7",
"fa-twitch": "\uf1e8",
"fa-yelp": "\uf1e9",
"fa-paypal": "\uf1ed",
"fa-google-wallet": "\uf1ee",
"fa-cc-visa": "\uf1f0",
"fa-cc-mastercard": "\uf1f1",
"fa-cc-discover": "\uf1f2",
"fa-cc-amex": "\uf1f3",
"fa-cc-paypal": "\uf1f4",
"fa-cc-stripe": "\uf1f5",
"fa-lastfm": "\uf202",
"fa-lastfm-square": "\uf203",
"fa-ioxhost": "\uf208",
"fa-angellist": "\uf209",
"fa-meanpath": "\uf20c",
"fa-buysellads": "\uf20d",
"fa-connectdevelop": "\uf20e",
"fa-dashcube": "\uf210",
"fa-forumbee": "\uf211",
"fa-leanpub": "\uf212",
"fa-sellsy": "\uf213",
"fa-shirtsinbulk": "\uf214",
"fa-simplybuilt": "\uf215",
"fa-skyatlas": "\uf216",
"fa-facebook-official": "\uf230",
"fa-pinterest-p": "\uf231",
"fa-whatsapp": "\uf232",
"fa-viacoin": "\uf237",
"fa-medium": "\uf23a",
"fa-yc": "\uf23b",
"fa-y-combinator": "\uf23b",
"fa-optin-monster": "\uf23c",
"fa-opencart": "\uf23d",
"fa-expeditedssl": "\uf23e",
"fa-cc-jcb": "\uf24b",
"fa-cc-diners-club": "\uf24c",
"fa-gg": "\uf260",
"fa-gg-circle": "\uf261",
"fa-tripadvisor": "\uf262",
"fa-odnoklassniki": "\uf263",
"fa-odnoklassniki-square": "\uf264",
"fa-get-pocket": "\uf265",
"fa-wikipedia-w": "\uf266",
"fa-safari": "\uf267",
"fa-chrome": "\uf268",
"fa-firefox": "\uf269",
"fa-opera": "\uf26a",
"fa-internet-explorer": "\uf26b",
"fa-contao": "\uf26d",
"fa-500px": "\uf26e",
"fa-amazon": "\uf270",
"fa-houzz": "\uf27c",
"fa-vimeo": "\uf27d",
"fa-black-tie": "\uf27e",
"fa-fonticons": "\uf280",
"fa-reddit-alien": "\uf281",
"fa-edge": "\uf282",
"fa-codiepie": "\uf284",
"fa-modx": "\uf285",
"fa-fort-awesome": "\uf286",
"fa-usb": "\uf287",
"fa-product-hunt": "\uf288",
"fa-mixcloud": "\uf289",
"fa-scribd": "\uf28a",
"fa-bluetooth": "\uf293",
"fa-bluetooth-b": "\uf294",
"fa-gitlab": "\uf296",
"fa-wpbeginner": "\uf297",
"fa-wpforms": "\uf298",
"fa-envira": "\uf299",
"fa-glide": "\uf2a5",
"fa-glide-g": "\uf2a6",
"fa-viadeo": "\uf2a9",
"fa-viadeo-square": "\uf2aa",
"fa-snapchat": "\uf2ab",
"fa-snapchat-ghost": "\uf2ac",
"fa-snapchat-square": "\uf2ad",
"fa-pied-piper": "\uf2ae",
"fa-first-order": "\uf2b0",
"fa-yoast": "\uf2b1",
"fa-themeisle": "\uf2b2",
"fa-google-plus-circle": "\uf2b3",
"fa-google-plus-official": "\uf2b3",
"fa-fa": "\uf2b4",
"fa-font-awesome": "\uf2b4",
"fa-linode": "\uf2b8",
"fa-quora": "\uf2c4",
"fa-free-code-camp": "\uf2c5",
"fa-telegram": "\uf2c6",
"fa-bandcamp": "\uf2d5",
"fa-grav": "\uf2d6",
"fa-etsy": "\uf2d7",
"fa-imdb": "\uf2d8",
"fa-ravelry": "\uf2d9",
"fa-eercast": "\uf2da",
"fa-superpowers": "\uf2dd",
"fa-wpexplorer": "\uf2de",
"fa-meetup": "\uf2e0"
};
var iconList = [];
var isUsed = {};
Object.keys(iconMap).forEach(function(icon) {
var unicode = iconMap[icon];
// skip icons with a same unicode
if (isUsed[unicode] !== true) {
iconList.push(icon);
isUsed[unicode] = true;
}
});
isUsed = undefined;
return {
getIconUnicode: function(name) {
return iconMap[name] || brandIconMap[name];
},
getIconList: function() {
return iconList;
},
}
})();

View File

@ -174,6 +174,7 @@ RED.nodes = (function() {
}, },
setIconSets: function(sets) { setIconSets: function(sets) {
iconSets = sets; iconSets = sets;
iconSets["font-awesome"] = RED.nodes.fontAwesome.getIconList();
}, },
getIconSets: function() { getIconSets: function() {
return iconSets; return iconSets;

View File

@ -498,7 +498,7 @@ RED.diff = (function() {
nodeDiv.css('backgroundColor',colour); nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); RED.utils.createIconElement(icon_url, iconContainer, false);
return nodeDiv; return nodeDiv;
} }

View File

@ -746,11 +746,11 @@ RED.editor = (function() {
var iconDiv = $('<div>',{class:"red-ui-icon-list-icon"}).appendTo(iconList); var iconDiv = $('<div>',{class:"red-ui-icon-list-icon"}).appendTo(iconList);
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(iconDiv); var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(iconDiv);
var colour = RED.utils.getNodeColor(node.type, node._def); var colour = RED.utils.getNodeColor(node.type, node._def);
var icon_url = "icons/"+moduleName+"/"+icon; var icon_url = RED.settings.apiRootUrl+"icons/"+moduleName+"/"+icon;
iconDiv.data('icon',icon_url) iconDiv.data('icon',icon_url);
nodeDiv.css('backgroundColor',colour); nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); RED.utils.createIconElement(icon_url, iconContainer, true);
if (iconPath.module === moduleName && iconPath.file === icon) { if (iconPath.module === moduleName && iconPath.file === icon) {
iconDiv.addClass("selected"); iconDiv.addClass("selected");
@ -820,7 +820,7 @@ RED.editor = (function() {
var icon_url = RED.utils.getNodeIcon(node._def,node); var icon_url = RED.utils.getNodeIcon(node._def,node);
nodeDiv.css('backgroundColor',colour); nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
var iconDiv = $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); RED.utils.createIconElement(icon_url, iconContainer, true);
iconButton.click(function(e) { iconButton.click(function(e) {
e.preventDefault(); e.preventDefault();
@ -834,7 +834,7 @@ RED.editor = (function() {
showIconPicker(iconRow,node,iconPath,function(newIcon) { showIconPicker(iconRow,node,iconPath,function(newIcon) {
$("#node-settings-icon").text(newIcon||""); $("#node-settings-icon").text(newIcon||"");
var icon_url = RED.utils.getNodeIcon(node._def,{type:node.type,icon:newIcon}); var icon_url = RED.utils.getNodeIcon(node._def,{type:node.type,icon:newIcon});
iconDiv.css("backgroundImage","url("+icon_url+")"); RED.utils.createIconElement(icon_url, iconContainer, true);
}); });
}) })
$('<div class="uneditable-input" id="node-settings-icon">').text(node.icon).appendTo(iconRow); $('<div class="uneditable-input" id="node-settings-icon">').text(node.icon).appendTo(iconRow);

View File

@ -129,9 +129,9 @@ RED.palette = (function() {
} }
function setIcon(element,sf) { function setIcon(element,sf) {
var iconElement = element.find(".palette_icon");
var icon_url = RED.utils.getNodeIcon(sf._def,sf); var icon_url = RED.utils.getNodeIcon(sf._def,sf);
iconElement.attr("style", "background-image: url("+icon_url+")"); var iconContainer = element.find(".palette_icon_container");
RED.utils.createIconElement(icon_url, iconContainer, true);
} }
function escapeNodeType(nt) { function escapeNodeType(nt) {
@ -169,7 +169,7 @@ RED.palette = (function() {
if (def.icon) { if (def.icon) {
var icon_url = RED.utils.getNodeIcon(def); var icon_url = RED.utils.getNodeIcon(def);
var iconContainer = $('<div/>',{class:"palette_icon_container"+(def.align=="right"?" palette_icon_container_right":"")}).appendTo(d); var iconContainer = $('<div/>',{class:"palette_icon_container"+(def.align=="right"?" palette_icon_container_right":"")}).appendTo(d);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); RED.utils.createIconElement(icon_url, iconContainer, true);
} }
d.style.backgroundColor = RED.utils.getNodeColor(nt,def); d.style.backgroundColor = RED.utils.getNodeColor(nt,def);

View File

@ -203,7 +203,7 @@ RED.search = (function() {
nodeDiv.css('backgroundColor',colour); nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); RED.utils.createIconElement(icon_url, iconContainer, true);
var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div); var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div);
if (node.z) { if (node.z) {

View File

@ -133,7 +133,7 @@ RED.typeSearch = (function() {
nodeDiv.css('backgroundColor',colour); nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
$('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); RED.utils.createIconElement(icon_url, iconContainer, false);
if (def.inputs > 0) { if (def.inputs > 0) {
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv); $('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);

View File

@ -706,7 +706,11 @@ RED.utils = (function() {
function separateIconPath(icon) { function separateIconPath(icon) {
var result = {module: "", file: ""}; var result = {module: "", file: ""};
if (icon) { if (icon) {
var index = icon.indexOf('/'); var index = icon.indexOf('icons/');
if (index !== -1) {
icon = icon.substring(index+6);
}
index = icon.indexOf('/');
if (index !== -1) { if (index !== -1) {
result.module = icon.slice(0, index); result.module = icon.slice(0, index);
result.file = icon.slice(index + 1); result.file = icon.slice(index + 1);
@ -763,7 +767,9 @@ RED.utils = (function() {
return RED.settings.apiRootUrl+"icons/node-red/alert.png" return RED.settings.apiRootUrl+"icons/node-red/alert.png"
} else if (node && node.icon) { } else if (node && node.icon) {
var iconPath = separateIconPath(node.icon); var iconPath = separateIconPath(node.icon);
if (isIconExists(iconPath)) { if (iconPath.module === "font-awesome") {
return node.icon;
} else if (isIconExists(iconPath)) {
return RED.settings.apiRootUrl+"icons/" + node.icon; return RED.settings.apiRootUrl+"icons/" + node.icon;
} }
} }
@ -774,8 +780,12 @@ RED.utils = (function() {
return RED.settings.apiRootUrl+"icons/node-red/subflow.png"; return RED.settings.apiRootUrl+"icons/node-red/subflow.png";
} }
} }
if (iconPath.module === "font-awesome") {
return iconPath.module+"/"+iconPath.file;
} else {
return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
} }
}
function getNodeLabel(node,defaultLabel) { function getNodeLabel(node,defaultLabel) {
defaultLabel = defaultLabel||""; defaultLabel = defaultLabel||"";
@ -882,6 +892,35 @@ RED.utils = (function() {
return parts; return parts;
} }
/**
* Create or update an icon element and append it to iconContainer.
* @param iconUrl - Url of icon.
* @param iconContainer - icon container element with palette_icon_container class.
* @param isLarge - whether the icon size is large.
*/
function createIconElement(iconUrl, iconContainer, isLarge) {
// Removes the previous icon when icon was changed.
var iconElement = iconContainer.find(".palette_icon");
if (iconElement.length !== 0) {
iconElement.remove();
}
var faIconElement = iconContainer.find("i");
if (faIconElement.length !== 0) {
faIconElement.remove();
}
// Show either icon image or font-awesome icon
var iconPath = separateIconPath(iconUrl);
if (iconPath.module === "font-awesome") {
var faIconElement = $('<i/>').appendTo(iconContainer);
var faLarge = isLarge ? "fa-lg " : "";
faIconElement.addClass("palette_icon_fa fa fa-fw " + faLarge + iconPath.file);
} else {
var imageIconElement = $('<div/>',{class:"palette_icon"}).appendTo(iconContainer);
imageIconElement.css("backgroundImage", "url("+iconUrl+")");
}
}
return { return {
createObjectElement: buildMessageElement, createObjectElement: buildMessageElement,
getMessageProperty: getMessageProperty, getMessageProperty: getMessageProperty,
@ -894,6 +933,7 @@ RED.utils = (function() {
getNodeColor: getNodeColor, getNodeColor: getNodeColor,
addSpinnerOverlay: addSpinnerOverlay, addSpinnerOverlay: addSpinnerOverlay,
decodeObject: decodeObject, decodeObject: decodeObject,
parseContextKey: parseContextKey parseContextKey: parseContextKey,
createIconElement: createIconElement
} }
})(); })();

View File

@ -1868,6 +1868,55 @@ RED.view = (function() {
RED.touch.radialMenu.show(obj,pos,options); RED.touch.radialMenu.show(obj,pos,options);
resetMouseVars(); resetMouseVars();
} }
function createIconAttributes(iconUrl, icon_group, d) {
var fontAwesomeUnicode = null;
if (iconUrl.indexOf("font-awesome/") === 0) {
var iconName = iconUrl.substr(13);
var fontAwesomeUnicode = RED.nodes.fontAwesome.getIconUnicode(iconName);
if (!fontAwesomeUnicode) {
var iconPath = RED.utils.getDefaultNodeIcon(d._def, d);
iconUrl = RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
}
}
if (fontAwesomeUnicode) {
// Since Node-RED workspace uses SVG, i tag cannot be used for font-awesome icon.
// On SVG, use text tag as an alternative.
icon_group.append("text")
.attr("xlink:href",iconUrl)
.attr("class","fa-lg")
.attr("x",15)
.attr("y",21)
.attr("stroke","none")
.attr("fill","#ffffff")
.attr("text-anchor","middle")
.attr("font-family", "FontAwesome")
.text(fontAwesomeUnicode);
} else {
var icon = icon_group.append("image")
.attr("xlink:href",iconUrl)
.attr("class","node_icon")
.attr("x",0)
.attr("width","30")
.attr("height","30");
var img = new Image();
img.src = iconUrl;
img.onload = function() {
icon.attr("width",Math.min(img.width,30));
icon.attr("height",Math.min(img.height,30));
icon.attr("x",15-Math.min(img.width,30)/2);
icon.attr("xlink:href",iconUrl);
icon.style("display",null);
//if ("right" == d._def.align) {
// icon.attr("x",function(d){return d.w-img.width-1-(d.outputs>0?5:0);});
// icon_shade.attr("x",function(d){return d.w-30});
// icon_shade_border.attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2);});
//}
}
}
}
function redraw() { function redraw() {
vis.attr("transform","scale("+scaleFactor+")"); vis.attr("transform","scale("+scaleFactor+")");
outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor); outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor);
@ -1961,11 +2010,8 @@ RED.view = (function() {
.on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_OUTPUT,0);}) .on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_OUTPUT,0);})
.on("mouseout",function(d) {portMouseOut(d3.select(this),d,PORT_TYPE_OUTPUT,0);}); .on("mouseout",function(d) {portMouseOut(d3.select(this),d,PORT_TYPE_OUTPUT,0);});
inGroup.append("svg:text").attr("class","port_label").attr("x",18).attr("y",20).style("font-size","10px").text("input"); inGroup.append("svg:text").attr("class","port_label").attr("x",18).attr("y",20).style("font-size","10px").text("input");
subflowOutputs.each(function(d,i) { subflowOutputs.each(function(d,i) {
if (d.dirty) { if (d.dirty) {
var output = d3.select(this); var output = d3.select(this);
@ -2111,12 +2157,7 @@ RED.view = (function() {
.attr("fill-opacity","0.05") .attr("fill-opacity","0.05")
.attr("height",function(d){return Math.min(50,d.h-4);}); .attr("height",function(d){return Math.min(50,d.h-4);});
var icon = icon_group.append("image") createIconAttributes(icon_url, icon_group, d);
.attr("xlink:href",icon_url)
.attr("class","node_icon")
.attr("x",0)
.attr("width","30")
.attr("height","30");
var icon_shade_border = icon_group.append("path") var icon_shade_border = icon_group.append("path")
.attr("d",function(d) { return "M 30 1 l 0 "+(d.h-2)}) .attr("d",function(d) { return "M 30 1 l 0 "+(d.h-2)})
@ -2142,19 +2183,6 @@ RED.view = (function() {
// icon_shade.attr("width",35); //icon.attr("x",5); // icon_shade.attr("width",35); //icon.attr("x",5);
//} //}
var img = new Image();
img.src = icon_url;
img.onload = function() {
icon.attr("width",Math.min(img.width,30));
icon.attr("height",Math.min(img.height,30));
icon.attr("x",15-Math.min(img.width,30)/2);
//if ("right" == d._def.align) {
// icon.attr("x",function(d){return d.w-img.width-1-(d.outputs>0?5:0);});
// icon_shade.attr("x",function(d){return d.w-30});
// icon_shade_border.attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2);});
//}
}
//icon.style("pointer-events","none"); //icon.style("pointer-events","none");
icon_group.style("pointer-events","none"); icon_group.style("pointer-events","none");
} }
@ -2291,21 +2319,25 @@ RED.view = (function() {
}); });
if (d._def.icon) { if (d._def.icon) {
icon = thisNode.select(".node_icon"); var icon = thisNode.select(".node_icon");
var current_url = icon.attr("xlink:href"); var faIcon = thisNode.select(".fa-lg");
var current_url;
if (!icon.empty()) {
current_url = icon.attr("xlink:href");
} else {
current_url = faIcon.attr("xlink:href");
}
var new_url = RED.utils.getNodeIcon(d._def,d); var new_url = RED.utils.getNodeIcon(d._def,d);
if (new_url !== current_url) { if (new_url !== current_url) {
icon.attr("xlink:href",new_url); if (!icon.empty()) {
var img = new Image(); icon.remove();
img.src = new_url; } else {
img.onload = function() { faIcon.remove();
icon.attr("width",Math.min(img.width,30)); }
icon.attr("height",Math.min(img.height,30)); var iconGroup = thisNode.select(".node_icon_group");
icon.attr("x",15-Math.min(img.width,30)/2); createIconAttributes(new_url, iconGroup, d);
} }
} }
}
thisNode.selectAll(".node_tools").attr("x",function(d){return d.w-35;}).attr("y",function(d){return d.h-20;}); thisNode.selectAll(".node_tools").attr("x",function(d){return d.w-35;}).attr("y",function(d){return d.h-20;});
@ -2346,6 +2378,15 @@ RED.view = (function() {
return 1; return 1;
}); });
if (d._def.button && (typeof d._def.button.visible === "function")) { // is defined and a function...
if (d._def.button.visible.call(d) === false) {
thisNode.selectAll(".node_button").style("display","none");
}
else {
thisNode.selectAll(".node_button").style("display","inherit");
}
}
//thisNode.selectAll(".node_right_button").attr("transform",function(d){return "translate("+(d.w - d._def.button.width.call(d))+","+0+")";}).attr("fill",function(d) { //thisNode.selectAll(".node_right_button").attr("transform",function(d){return "translate("+(d.w - d._def.button.width.call(d))+","+0+")";}).attr("fill",function(d) {
// return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color) // return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color)
//}); //});

View File

@ -257,6 +257,11 @@
background-position: 49% 50%; background-position: 49% 50%;
width: 15px; width: 15px;
} }
.palette_icon_fa {
position: relative;
top: -2.5px;
left: 0px;
}
.palette_icon_container { .palette_icon_container {
width: 18px; width: 18px;
} }

View File

@ -57,6 +57,10 @@
.editor-tray-content { .editor-tray-content {
overflow: auto; overflow: auto;
position: relative; position: relative;
.palette_icon_fa {
top: 6px;
left: 4px;
}
} }
.editor-tray-header { .editor-tray-header {
@include disable-selection; @include disable-selection;
@ -403,6 +407,10 @@
border-color: white; border-color: white;
} }
} }
.palette_icon_fa {
top: 6px;
left: 3px;
}
} }
.red-ui-icon-list-module { .red-ui-icon-list-module {
background: $palette-header-background; background: $palette-header-background;

View File

@ -188,7 +188,12 @@
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.palette_icon_fa {
color: white;
position: absolute;
top: 7px;
left: 3px;
}
.palette_node_small { .palette_node_small {
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -206,4 +211,8 @@
margin-left: -1px; margin-left: -1px;
width: 15px; width: 15px;
} }
.palette_icon_fa {
top: 2px;
left: 1px;
}
} }

View File

@ -62,6 +62,11 @@
font-size: 13px; font-size: 13px;
border-left-width: 3px; border-left-width: 3px;
border-right-width: 3px; border-right-width: 3px;
.palette_icon_fa {
position: relative;
top: -2.5px;
left: 0px;
}
} }
.red-ui-search-result-separator { .red-ui-search-result-separator {
border-bottom: 3px solid #ddd; border-bottom: 3px solid #ddd;
@ -145,6 +150,10 @@
display: table; display: table;
clear: both; clear: both;
} }
.palette_icon_fa {
top: 6px;
left: 3px;
}
} }
.red-ui-search-result-node { .red-ui-search-result-node {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1,9 @@
ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}) ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o});
(function() {
ace.require(["ace/mode/properties"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a}) ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a});
(function() {
ace.require(["ace/mode/python"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(o.prototype),t.Mode=o}) ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(o.prototype),t.Mode=o});
(function() {
ace.require(["ace/mode/sql"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

File diff suppressed because one or more lines are too long

View File

@ -1 +1,9 @@
ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d\s]*$/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlString:[{token:"indent",regex:/^\s*$/},{token:"indent",regex:/^\s*/,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};r.inherits(s,i),t.YamlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./yaml_highlight_rules").YamlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/coffee").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart=["#","//"],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/yaml"}.call(a.prototype),t.Mode=a}) ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d\s]*$/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlString:[{token:"indent",regex:/^\s*$/},{token:"indent",regex:/^\s*/,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};r.inherits(s,i),t.YamlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./yaml_highlight_rules").YamlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/coffee").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart=["#"],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/yaml"}.call(a.prototype),t.Mode=a});
(function() {
ace.require(["ace/mode/yaml"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

File diff suppressed because one or more lines are too long

View File

@ -1 +1,9 @@
ace.define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="handlebars"}) ace.define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="handlebars"});
(function() {
ace.require(["ace/snippets/handlebars"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

File diff suppressed because one or more lines are too long

View File

@ -1 +1,9 @@
ace.define("ace/snippets/javascript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Prototype\nsnippet proto\n ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n ${4:// body...}\n };\n# Function\nsnippet fun\n function ${1?:function_name}(${2:argument}) {\n ${3:// body...}\n }\n# Anonymous Function\nregex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\nsnippet f\n function${M1?: ${1:functionName}}($2) {\n ${0:$TM_SELECTED_TEXT}\n }${M2?;}${M3?,}${M4?)}\n# Immediate function\ntrigger \\(?f\\(\nendTrigger \\)?\nsnippet f(\n (function(${1}) {\n ${0:${TM_SELECTED_TEXT:/* code */}}\n }(${1}));\n# if\nsnippet if\n if (${1:true}) {\n ${0}\n }\n# if ... else\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${0}\n }\n# tertiary conditional\nsnippet ter\n ${1:/* condition */} ? ${2:a} : ${3:b}\n# switch\nsnippet switch\n switch (${1:expression}) {\n case \'${3:case}\':\n ${4:// code}\n break;\n ${5}\n default:\n ${2:// code}\n }\n# case\nsnippet case\n case \'${1:case}\':\n ${2:// code}\n break;\n ${3}\n\n# while (...) {...}\nsnippet wh\n while (${1:/* condition */}) {\n ${0:/* code */}\n }\n# try\nsnippet try\n try {\n ${0:/* code */}\n } catch (e) {}\n# do...while\nsnippet do\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\n# Object Method\nsnippet :f\nregex /([,{[])|^\\s*/:f/\n ${1:method_name}: function(${2:attribute}) {\n ${0}\n }${3:,}\n# setTimeout function\nsnippet setTimeout\nregex /\\b/st|timeout|setTimeo?u?t?/\n setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n# Get Elements\nsnippet gett\n getElementsBy${1:TagName}(\'${2}\')${3}\n# Get Element\nsnippet get\n getElementBy${1:Id}(\'${2}\')${3}\n# console.log (Firebug)\nsnippet cl\n console.log(${1});\n# return\nsnippet ret\n return ${1:result}\n# for (property in object ) { ... }\nsnippet fori\n for (var ${1:prop} in ${2:Things}) {\n ${0:$2[$1]}\n }\n# hasOwnProperty\nsnippet has\n hasOwnProperty(${1})\n# docstring\nsnippet /**\n /**\n * ${1:description}\n *\n */\nsnippet @par\nregex /^\\s*\\*\\s*/@(para?m?)?/\n @param {${1:type}} ${2:name} ${3:description}\nsnippet @ret\n @return {${1:type}} ${2:description}\n# JSON.parse\nsnippet jsonp\n JSON.parse(${1:jstr});\n# JSON.stringify\nsnippet jsons\n JSON.stringify(${1:object});\n# self-defining function\nsnippet 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\nsnippet 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\nsnippet class\nregex /^\\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# \nsnippet for-\n for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n ${0:${2:Things}[${1:i}];}\n }\n# for (...) {...}\nsnippet for\n for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n ${3:$2[$1]}$0\n }\n# for (...) {...} (Improved Native For-Loop)\nsnippet forr\n for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n ${3:$2[$1]}$0\n }\n\n\n#modules\nsnippet def\n define(function(require, exports, module) {\n "use strict";\n var ${1/.*\\///} = require("${1}");\n \n $TM_SELECTED_TEXT\n });\nsnippet req\nguard ^\\s*\n var ${1/.*\\///} = require("${1}");\n $0\nsnippet requ\nguard ^\\s*\n var ${1/.*\\/(.)/\\u$1/} = require("${1}").${1/.*\\/(.)/\\u$1/};\n $0\n',t.scope="javascript"}) ace.define("ace/snippets/javascript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Prototype\nsnippet proto\n ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n ${4:// body...}\n };\n# Function\nsnippet fun\n function ${1?:function_name}(${2:argument}) {\n ${3:// body...}\n }\n# Anonymous Function\nregex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\nsnippet f\n function${M1?: ${1:functionName}}($2) {\n ${0:$TM_SELECTED_TEXT}\n }${M2?;}${M3?,}${M4?)}\n# Immediate function\ntrigger \\(?f\\(\nendTrigger \\)?\nsnippet f(\n (function(${1}) {\n ${0:${TM_SELECTED_TEXT:/* code */}}\n }(${1}));\n# if\nsnippet if\n if (${1:true}) {\n ${0}\n }\n# if ... else\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${0}\n }\n# tertiary conditional\nsnippet ter\n ${1:/* condition */} ? ${2:a} : ${3:b}\n# switch\nsnippet switch\n switch (${1:expression}) {\n case \'${3:case}\':\n ${4:// code}\n break;\n ${5}\n default:\n ${2:// code}\n }\n# case\nsnippet case\n case \'${1:case}\':\n ${2:// code}\n break;\n ${3}\n\n# while (...) {...}\nsnippet wh\n while (${1:/* condition */}) {\n ${0:/* code */}\n }\n# try\nsnippet try\n try {\n ${0:/* code */}\n } catch (e) {}\n# do...while\nsnippet do\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\n# Object Method\nsnippet :f\nregex /([,{[])|^\\s*/:f/\n ${1:method_name}: function(${2:attribute}) {\n ${0}\n }${3:,}\n# setTimeout function\nsnippet setTimeout\nregex /\\b/st|timeout|setTimeo?u?t?/\n setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n# Get Elements\nsnippet gett\n getElementsBy${1:TagName}(\'${2}\')${3}\n# Get Element\nsnippet get\n getElementBy${1:Id}(\'${2}\')${3}\n# console.log (Firebug)\nsnippet cl\n console.log(${1});\n# return\nsnippet ret\n return ${1:result}\n# for (property in object ) { ... }\nsnippet fori\n for (var ${1:prop} in ${2:Things}) {\n ${0:$2[$1]}\n }\n# hasOwnProperty\nsnippet has\n hasOwnProperty(${1})\n# docstring\nsnippet /**\n /**\n * ${1:description}\n *\n */\nsnippet @par\nregex /^\\s*\\*\\s*/@(para?m?)?/\n @param {${1:type}} ${2:name} ${3:description}\nsnippet @ret\n @return {${1:type}} ${2:description}\n# JSON.parse\nsnippet jsonp\n JSON.parse(${1:jstr});\n# JSON.stringify\nsnippet jsons\n JSON.stringify(${1:object});\n# self-defining function\nsnippet 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\nsnippet 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\nsnippet class\nregex /^\\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# \nsnippet for-\n for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n ${0:${2:Things}[${1:i}];}\n }\n# for (...) {...}\nsnippet for\n for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n ${3:$2[$1]}$0\n }\n# for (...) {...} (Improved Native For-Loop)\nsnippet forr\n for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n ${3:$2[$1]}$0\n }\n\n\n#modules\nsnippet def\n define(function(require, exports, module) {\n "use strict";\n var ${1/.*\\///} = require("${1}");\n \n $TM_SELECTED_TEXT\n });\nsnippet req\nguard ^\\s*\n var ${1/.*\\///} = require("${1}");\n $0\nsnippet requ\nguard ^\\s*\n var ${1/.*\\/(.)/\\u$1/} = require("${1}").${1/.*\\/(.)/\\u$1/};\n $0\n',t.scope="javascript"});
(function() {
ace.require(["ace/snippets/javascript"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"}) ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="json"});
(function() {
ace.require(["ace/snippets/json"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"}) ace.define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"});
(function() {
ace.require(["ace/snippets/markdown"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"}) ace.define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="properties"});
(function() {
ace.require(["ace/snippets/properties"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/python",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet #!\n #!/usr/bin/env python\nsnippet imp\n import ${1:module}\nsnippet from\n from ${1:package} import ${2:module}\n# Module Docstring\nsnippet docs\n \'\'\'\n File: ${1:FILENAME:file_name}\n Author: ${2:author}\n Description: ${3}\n \'\'\'\nsnippet wh\n while ${1:condition}:\n ${2:# TODO: write code...}\n# dowh - does the same as do...while in other languages\nsnippet dowh\n while True:\n ${1:# TODO: write code...}\n if ${2:condition}:\n break\nsnippet with\n with ${1:expr} as ${2:var}:\n ${3:# TODO: write code...}\n# New Class\nsnippet cl\n class ${1:ClassName}(${2:object}):\n """${3:docstring for $1}"""\n def __init__(self, ${4:arg}):\n ${5:super($1, self).__init__()}\n self.$4 = $4\n ${6}\n# New Function\nsnippet def\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n """${3:docstring for $1}"""\n ${4:# TODO: write code...}\nsnippet deff\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n ${3:# TODO: write code...}\n# New Method\nsnippet defs\n def ${1:mname}(self, ${2:arg}):\n ${3:# TODO: write code...}\n# New Property\nsnippet property\n def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n# Ifs\nsnippet if\n if ${1:condition}:\n ${2:# TODO: write code...}\nsnippet el\n else:\n ${1:# TODO: write code...}\nsnippet ei\n elif ${1:condition}:\n ${2:# TODO: write code...}\n# For\nsnippet for\n for ${1:item} in ${2:items}:\n ${3:# TODO: write code...}\n# Encodes\nsnippet cutf8\n # -*- coding: utf-8 -*-\nsnippet clatin1\n # -*- coding: latin-1 -*-\nsnippet cascii\n # -*- coding: ascii -*-\n# Lambda\nsnippet ld\n ${1:var} = lambda ${2:vars} : ${3:action}\nsnippet .\n self.\nsnippet try Try/Except\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\nsnippet try Try/Except/Else\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n finally:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Else/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\n finally:\n ${6:# TODO: write code...}\n# if __name__ == \'__main__\':\nsnippet ifmain\n if __name__ == \'__main__\':\n ${1:main()}\n# __magic__\nsnippet _\n __${1:init}__${2}\n# python debugger (pdb)\nsnippet pdb\n import pdb; pdb.set_trace()\n# ipython debugger (ipdb)\nsnippet ipdb\n import ipdb; ipdb.set_trace()\n# ipython debugger (pdbbb)\nsnippet pdbbb\n import pdbpp; pdbpp.set_trace()\nsnippet pprint\n import pprint; pprint.pprint(${1})${2}\nsnippet "\n """\n ${1:doc}\n """\n# test function/method\nsnippet test\n def test_${1:description}(${2:self}):\n ${3:# TODO: write code...}\n# test case\nsnippet testcase\n class ${1:ExampleCase}(unittest.TestCase):\n \n def test_${2:description}(self):\n ${3:# TODO: write code...}\nsnippet fut\n from __future__ import ${1}\n#getopt\nsnippet getopt\n try:\n # Short option syntax: "hv:"\n # Long option syntax: "help" or "verbose="\n opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])\n \n except getopt.GetoptError, err:\n # Print debug info\n print str(err)\n ${3:error_action}\n\n for option, argument in opts:\n if option in ("-h", "--help"):\n ${4}\n elif option in ("-v", "--verbose"):\n verbose = argument\n',t.scope="python"}) ace.define("ace/snippets/python",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet #!\n #!/usr/bin/env python\nsnippet imp\n import ${1:module}\nsnippet from\n from ${1:package} import ${2:module}\n# Module Docstring\nsnippet docs\n \'\'\'\n File: ${1:FILENAME:file_name}\n Author: ${2:author}\n Description: ${3}\n \'\'\'\nsnippet wh\n while ${1:condition}:\n ${2:# TODO: write code...}\n# dowh - does the same as do...while in other languages\nsnippet dowh\n while True:\n ${1:# TODO: write code...}\n if ${2:condition}:\n break\nsnippet with\n with ${1:expr} as ${2:var}:\n ${3:# TODO: write code...}\n# New Class\nsnippet cl\n class ${1:ClassName}(${2:object}):\n """${3:docstring for $1}"""\n def __init__(self, ${4:arg}):\n ${5:super($1, self).__init__()}\n self.$4 = $4\n ${6}\n# New Function\nsnippet def\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n """${3:docstring for $1}"""\n ${4:# TODO: write code...}\nsnippet deff\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n ${3:# TODO: write code...}\n# New Method\nsnippet defs\n def ${1:mname}(self, ${2:arg}):\n ${3:# TODO: write code...}\n# New Property\nsnippet property\n def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n# Ifs\nsnippet if\n if ${1:condition}:\n ${2:# TODO: write code...}\nsnippet el\n else:\n ${1:# TODO: write code...}\nsnippet ei\n elif ${1:condition}:\n ${2:# TODO: write code...}\n# For\nsnippet for\n for ${1:item} in ${2:items}:\n ${3:# TODO: write code...}\n# Encodes\nsnippet cutf8\n # -*- coding: utf-8 -*-\nsnippet clatin1\n # -*- coding: latin-1 -*-\nsnippet cascii\n # -*- coding: ascii -*-\n# Lambda\nsnippet ld\n ${1:var} = lambda ${2:vars} : ${3:action}\nsnippet .\n self.\nsnippet try Try/Except\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\nsnippet try Try/Except/Else\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n finally:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Else/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\n finally:\n ${6:# TODO: write code...}\n# if __name__ == \'__main__\':\nsnippet ifmain\n if __name__ == \'__main__\':\n ${1:main()}\n# __magic__\nsnippet _\n __${1:init}__${2}\n# python debugger (pdb)\nsnippet pdb\n import pdb; pdb.set_trace()\n# ipython debugger (ipdb)\nsnippet ipdb\n import ipdb; ipdb.set_trace()\n# ipython debugger (pdbbb)\nsnippet pdbbb\n import pdbpp; pdbpp.set_trace()\nsnippet pprint\n import pprint; pprint.pprint(${1})${2}\nsnippet "\n """\n ${1:doc}\n """\n# test function/method\nsnippet test\n def test_${1:description}(${2:self}):\n ${3:# TODO: write code...}\n# test case\nsnippet testcase\n class ${1:ExampleCase}(unittest.TestCase):\n \n def test_${2:description}(self):\n ${3:# TODO: write code...}\nsnippet fut\n from __future__ import ${1}\n#getopt\nsnippet getopt\n try:\n # Short option syntax: "hv:"\n # Long option syntax: "help" or "verbose="\n opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])\n \n except getopt.GetoptError, err:\n # Print debug info\n print str(err)\n ${3:error_action}\n\n for option, argument in opts:\n if option in ("-h", "--help"):\n ${4}\n elif option in ("-v", "--verbose"):\n verbose = argument\n',t.scope="python"});
(function() {
ace.require(["ace/snippets/python"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}) ace.define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"});
(function() {
ace.require(["ace/snippets/sql"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"}) ace.define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="swift"});
(function() {
ace.require(["ace/snippets/swift"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"}) ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="text"});
(function() {
ace.require(["ace/snippets/text"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="yaml"}) ace.define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="yaml"});
(function() {
ace.require(["ace/snippets/yaml"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)});
(function() {
ace.require(["ace/theme/chrome"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1 +1,9 @@
ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #FFFFFF;color: #4D4D4C}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #FFFFFF;color: #4D4D4C}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)});
(function() {
ace.require(["ace/theme/tomorrow"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -73,6 +73,7 @@
align: "right", align: "right",
button: { button: {
toggle: "active", toggle: "active",
visible: function() { return this.tosidebar; },
onclick: function() { onclick: function() {
var label = this.name||"debug"; var label = this.name||"debug";
var node = this; var node = this;
@ -84,7 +85,7 @@
t:'edit', t:'edit',
node:node, node:node,
changes:{ changes:{
active: !node.active active:!node.active
}, },
dirty:node.dirty, dirty:node.dirty,
changed:node.changed changed:node.changed

View File

@ -19,10 +19,7 @@ module.exports = function(RED) {
if (this.tosidebar === undefined) { this.tosidebar = true; } if (this.tosidebar === undefined) { this.tosidebar = true; }
this.severity = n.severity || 40; this.severity = n.severity || 40;
this.active = (n.active === null || typeof n.active === "undefined") || n.active; this.active = (n.active === null || typeof n.active === "undefined") || n.active;
if (this.tostatus) { if (this.tostatus) { this.status({fill:"grey", shape:"ring"}); }
this.oldStatus = {fill:"grey", shape:"ring"};
this.status(this.oldStatus);
}
else { this.status({}); } else { this.status({}); }
var node = this; var node = this;
@ -78,16 +75,16 @@ module.exports = function(RED) {
node.log(util.inspect(output, {colors:useColors})); node.log(util.inspect(output, {colors:useColors}));
} }
} }
if (this.tostatus === true) {
var st = util.inspect(output);
var severity = node.severity;
if (st.length > 32) { st = st.substr(0,32) + "..."; }
node.status({fill:colors[severity], shape:"dot", text:st});
}
if (this.active) { if (this.active) {
if (this.tosidebar == true) { if (this.tosidebar == true) {
sendDebug({id:node.id, z:node.z, name:node.name, topic:msg.topic, property:property, msg:output, _path:msg._path}); sendDebug({id:node.id, z:node.z, name:node.name, topic:msg.topic, property:property, msg:output, _path:msg._path});
} }
if (this.tostatus === true) {
var st = util.inspect(output);
if (st.length > 32) { st = st.substr(0,32) + "..."; }
node.oldStatus = {fill:colors[node.severity], shape:"dot", text:st};
node.status(node.oldStatus);
}
} }
} }
}); });