diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 5d4d87bb7..07efaf18e 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -28,7 +28,7 @@ To help us understand the issue, please fill-in as much of the following informa ### Please tell us about your environment: - [ ] Node-RED version: -- [ ] node.js version: +- [ ] Node.js version: - [ ] npm version: - [ ] Platform/OS: - [ ] Browser: diff --git a/.github/ISSUE_TEMPLATE/--bug_report.md b/.github/ISSUE_TEMPLATE/--bug_report.md index ff13e2ace..63923455e 100644 --- a/.github/ISSUE_TEMPLATE/--bug_report.md +++ b/.github/ISSUE_TEMPLATE/--bug_report.md @@ -33,7 +33,7 @@ To help us understand the issue, please fill-in as much of the following informa ### Please tell us about your environment: - [ ] Node-RED version: -- [ ] node.js version: +- [ ] Node.js version: - [ ] npm version: - [ ] Platform/OS: - [ ] Browser: diff --git a/.github/ISSUE_TEMPLATE/-anything-else.md b/.github/ISSUE_TEMPLATE/-anything-else.md index dbf28e501..836c78967 100644 --- a/.github/ISSUE_TEMPLATE/-anything-else.md +++ b/.github/ISSUE_TEMPLATE/-anything-else.md @@ -7,8 +7,11 @@ assignees: '' --- -Please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack). +Please DO NOT raise an issue. -You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`. +We DO NOT use the issue tracker for general support or feature requests. Only bug reports should be raised here using the 'Bug report' template. +For general support, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack). You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`. That way the whole Node-RED user community can help, rather than rely on the core development team. + +For feature requests, please use the Node-RED Forum](https://discourse.nodered.org). Many ideas have already been discussed there and you should search that for your request before starting a new discussion. diff --git a/.travis.yml b/.travis.yml index 94bf3698c..a101eecb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ sudo: false language: node_js matrix: include: + - node_js: "12" - node_js: "10" script: - ./node_modules/.bin/grunt && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage diff --git a/CHANGELOG.md b/CHANGELOG.md index a99600a05..28f11c2db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,259 @@ +#### 1.0.2: Maintenance Release + +Runtime + - Allow node.status() to be passed number/bool types + - Allow node emitted events to have multiple arguments + - #2323 Fixed docstrings to have them match the function signature (name of parameters). + - #2318 NLS: Unify translations of "boolean" + +Editor + - Ensure node status is refreshed whenever node is edited + - #2315 #2316 Ensure z property included in full message debug payload + - #2321 Fixed editor.json (JA nls) + - #2313 Fix element to collapse items in visual JSON editor + - #2314 Insert divider in menu by calling RED.menu.addItem('id', null); + +Nodes + - Change: Fixup use of node.done + - #2322 Template: Fix invalid JSON data in template node docs + - #2320 File: Fixed a typo in 10-file.html (JA nls) + - #2312 Template: Remove unnecessary comma in help text + - #2319 Inject: Interval of inject node should be 596 hours or less. + +#### 1.0.1: Maintenance Release + +Runtime + - #2301 Add env vars to enable safe mode and projects + - `NODE_RED_ENABLE_SAFE_MODE` + - `NODE_RED_ENABLE_PROJECTS` + +Editor + - #2308 Fix grid setting + - #2306 i18n support in tooltips + - Fix error when setting typedInput to boolean true/false + - #2299 Fix SVG icons in IE11 + - #2303 Fix issue where subflow color did not update when not on a flow + +Nodes + - #2297 TLS: Allow TLS config node to provide just CA cert + - #2307 Inject: Fix width on inject node property + - #2305 Switch: Let switch node between rule work both ways round + - Range: Add example to range node info and make use of target consistent + - Join: node must clone group message before sending + + +#### 1.0.0: Milestone Release + +Editor + - Add click-on-tooltip to close + - Fix node draggable handling + - Ensure complete node scope property is remapped on import + - Update i18n for project feature + - Fix menu hiding function for flow editor + - Normalise default subflow color references + - Hide header text of very small screens to deploy is visible + - Fix tab access on touch screens + - Update radialMenu to use standard theme colours + - Fix undefined reference loading on mobile + - Allow word breaking of node name with long word + - Enable wrap mode in Markdown editor + - Maximize the size of markdown editor + +Nodes + - remove legacy error option from file in mode + - Change MQTT node default 3.1 compatibility mode to false + - Show clear debug shortcut in tooltip + - Fix file-in port labels for all 4 options + - Add extra comment re Mustache escapes to Template info + - Fix typo in complete node + - Allow Function node output input to go to 0 + +#### 1.0.0-beta.4: Beta Release + +Runtime + - Clone the first message passed to node.send in Function node + +Editor + - Move flow-status button to footer for consistency + - Fix node hover effect to prevent jumping position + - Filter quick-add properly when splicing a wire + - Mark workspace dirty when deleting link node link Fixes #2274 + - Add red-ui-button class to strategy login button + - Fix padding of subflow locale select Closes #2276 + - Update info text of complete node & add JP text + - Add class red-ui-button to cancel button + - Add css class to login submit button (#2275) + - Realign subflow output port labels + - Move context sidebar auto-refresh option to individual sections + - Update Japanese message catalogue + - Fix subflow UI for select + - remove padding before label text for SUBFLOW UI row + - Allow SUBFLOW UI label row without variable name + +Nodes + - Remove old rc option from exec node for 1.0 + - Add python and SQL to template language options + - Fix Switch node display of jsonata_exp type + - Remove sentiment from core nodes + +#### 1.0.0-beta.3: Beta Release + +Runtime + - [FEATURE] Add Node Done API - make message passing async + - Ensure the subflow stop promise is waiting for before restarting + - Limit the regex for the /nodes/ api end points + - Add error event handler to ssh-keygen child_process Fixes #2255 + - Fix default value handling on context array access Fixes #2252 + - Remove all ui test dependencies from package.json + - Add req back to audit log events and extend to Projects api + - Ensure 2nd arg to node.error is an object Fixes #2228 + - Use a more atomic process for writing context files Fixes #2271 + + +Editor + - [FEATURE] Change core node categories + - [FEATURE] Subflow Instance property UI (#2236) + - [FEATURE] Add visual JSON editor + - [FEATURE] Add Action List dialog + - [FEATURE] Add new shortcut to clear debug message list - ctrl-alt-l + - [FEATURE] Add show-library dialog actions + - [FEATURE] Add shift-cursor handling for moving quick-add dialog + - [FEATURE] Add enable/disable-flow actions + - [FEATURE] Add actions to change deploy type + - [FEATURE] Allow config nodes to be disabled, tidy css and add actions + - [FEATURE] Add default shortcut (ctrl-d) for deploy + - [FEATURE] Initial implementation of redo (un-undo) - ctrl-y + - [FEATURE] add support for specifying subflow template color + - [FEATURE] Use ctrl-click on wire to splice node in place + - [FEATURE] Allow search results to show more than 25 results + - [FEATURE] Allow a node to change if it has an input port Closes #2268 + - Revealing node position needs to account for zoom level Fixes #2172 + - Fix typedInput option selection Fixes #2174 + - Fix palette node id handling so search works Fixes #2173 + - Add popover tooltips to debug sidebar,function and template + - Add popovers to context sidebar mini buttons + - Ensure node status icon is shown when value set + - Revert treeList children function signature change + - Restore tray component css for compatibility. Mark as deprecated + - fix function name & string compare function + - Handle empty list of example flows Fixes #2171 + - Ensure library list has an item selected when opened + - Ensure tooltip popover doesn't replace normal popover + - Fix clipboard export download button + - Ensure input box has focus on repeated quick add + - Fix width calculation of typedInput + - Remove some hardcoded css colors + - Fix display of node help when clicking in palette Fixes #2194 + - Ensure node help is loaded in the right language Fixes #2195 + - Do not allow tab focus on clipboard hidden element + - Fix undefined error on typedInput due to valueLabel used before being added + - Fix undo of flow disable state change + - Fix select-all action in main view + - Fix delete-all action on config node sidebar + - Update UI tests for new editor css + - Add insertItemAt doc to editableList + - Ensure focus returns to the right element after dialogs shown + - Set autocomplete to disabled in form input elements + - Update all node icons to SVG + - Handle png/svg fallback for def.icon values. Remove old pngs + - Ignore empty examples directories (don't add to import menu) + - better handle example file at any depth - #2222 + - Properly escape node types in palette + - Ensure session expiry timeout doesn't exceed limit + - Use node/tab map to make filterNodes more efficient + - Rearrange contents of subflow template settings tab + - Handle undefined node.\_def in edit stack title. + - fix converting selection to subflow + - Fix inserting new subflow node to existing wire between nodes + - Support displaying falsey node status values Fixes #2246 + - Remove tab menu from node property UI for subflow and config nodes + - Mark workspace dirty when shift-click-drag detaches wires Fixes #2260 + - Fix subflow category change on palette + + +Nodes + - Remove pi gpi, twitter, email and feedparser nodes from core + - Fix error handling in Websocket broadcast function Fixes #2182 + - Handle websocket item being parseable but not an object better + - stop join tripping up if last message of buffer is blank. + - Add support for env var propety in switch node + - Improve handling of file upload in request node + - Add "has key" rule to switch node + tests + - Optimise generation of switch node edit dialog + - Add keep-alive option to HTTP Request - #2261 + +#### 1.0.0-beta.2: Beta Release + +Runtime + - Fix length calculation when loading library file + +#### 1.0.0-beta.1: Beta Release + +Runtime + - Update runtime apis to support multiple libraries + - Add Node 12 to travis (allow_failures) + - Bump all dependencies Fixes #2152 + +Editor + - [BREAKING] complete overhaul of editor DOM/CSS structure + - [BREAKING] Get rid of Bootstrap + - Simplify index.mst to a single div to insert the editor + - Append node configs to div rather than body + - Only redraw node status when it has changed + - Minimise work done to calculate node label widths + - Allow script tags with src to reference esm modules + - Upgrade to jq 3.4.1 / jq-ui 1.12.1 + - Allow editor language to be chosen in editor settings + - Only NLS status text that starts with a letter Fixes #2128 + - Fix display of link node list within subflow Fixes #2140 + - Blur the active element when closing edit dialog via action Fixes #2097 + - Trigger change evnt on typedInput when type changes and options present Fixes #2160 + - Move library import/export to single dialog + - Move type-library dialogs to new style dialog + - Fix node drag and drop animation + - let status be simple text if wanted + - Add workspace statusBar + - Complete refresh of German translations + - Fix memory leak in Debug sidebar #2163 + - Introduce toggleButton and move flow-disabled to use it + - Allow RED.settings.get/set to use full property desc + - Add auto-refresh toggle to context sidebar + - Add build-custom-theme script + - Add RED.view.selectNodes api for node selection whilst editing + - Add node-select to typedInput + +Nodes + - http request node: warn user if msg.requestTimeout == 0 + - hide delay node reset label on deploy + - Fix CSV regex to treat strings starting e as text + - Add "don't parse numbers" option to csv node + - Add expand editor button to Template node + - Update catch/status nodes to use selectNodes api and treeList + +#### 0.20.8: Maintenance Release + + - Sanitize tab name in edit dialog + - Pass httpServer to runtime even when httpAdmin disabled Fixes #2272 + +#### 0.20.7: Maintenance Release + + - Update jsonata to 1.6.5 which should fix #2183 + - Ensure the subflow stop promise is waiting for before restarting + - Properly escape node types in palette + +#### 0.20.6: Maintenance Release + + - Revealing node position needs to account for zoom level Fixes #2172 + - stop join tripping up if last message of buffer is blank. + - Improve handling of file upload in request node + - Handle subflow internal node wired to a non-existant node Fixes #2202 + - Do not save subflow env vars with blank names + - Don't allow a link node virtual wire to connect to normal port + - Clear HTTP Request node authType when auth disabled Fixes #2215 + - Fix parsing of content-type header Fixes #2216 + - Fix join node reset issue with merging objects + - Copy data-i18n attribute on TypedInput Fixes #2211 + #### 0.20.5: Maintenance Release - Revert error handling in palette manager @@ -658,7 +914,7 @@ Nodes - Initial support of sequence rules for SWITCH node (#1545) - initial support of SORT node (#1500) - Inject node - let once delay be editable (#1541) - - Introduce `nodeMaxMessageBufferLength` setting for msg sequence nodes + - Introduce `nodeMessageBufferMaxLength` setting for msg sequence nodes - Let CSV correct parts if we remove header row. - let default apply if msg.delay not set in override mode. (#1397) - let trigger node be reset by boolean message (#1554) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33a2f582f..f0f4096c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ relevant nodes, press Ctrl-E and copy the flow data from the Export dialog. At a minimum, please include: - Version of Node-RED - either release number if you downloaded a zip, or the first few lines of `git log` if you are cloning the repository directly. - - Version of node.js - what does `node -v` say? + - Version of Node.js - what does `node -v` say? ## Feature requests diff --git a/Gruntfile.js b/Gruntfile.js index e11caabbc..caa043e76 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -145,11 +145,13 @@ module.exports = function(grunt) { "packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js", "packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js", "packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js", + "packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js", "packages/node_modules/@node-red/editor-client/src/js/ui/actions.js", "packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js", "packages/node_modules/@node-red/editor-client/src/js/ui/diff.js", "packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js", "packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js", + "packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js", "packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js", @@ -167,6 +169,7 @@ module.exports = function(grunt) { "packages/node_modules/@node-red/editor-client/src/js/ui/library.js", "packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js", "packages/node_modules/@node-red/editor-client/src/js/ui/search.js", + "packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js", "packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js", "packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js", "packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js", @@ -181,22 +184,22 @@ module.exports = function(grunt) { vendor: { files: { "packages/node_modules/@node-red/editor-client/public/vendor/vendor.js": [ - "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-1.11.3.min.js", - "packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/js/bootstrap.min.js", - "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-3.4.1.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/marked/marked.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.min.js", - "packages/node_modules/@node-red/editor-client/src/vendor/i18next/i18next.min.js" - ], - "packages/node_modules/@node-red/editor-client/public/vendor/vendor.css": [ - // TODO: resolve relative resource paths in - // bootstrap/FA/jquery - ], - "packages/node_modules/@node-red/editor-client/public/vendor/jsonata/jsonata.min.js": [ + "packages/node_modules/@node-red/editor-client/src/vendor/i18next/i18next.min.js", "node_modules/jsonata/jsonata-es5.min.js", - "packages/node_modules/@node-red/editor-client/src/vendor/jsonata/formatter.js" + "packages/node_modules/@node-red/editor-client/src/vendor/jsonata/formatter.js", + "packages/node_modules/@node-red/editor-client/src/vendor/ace/ace.js", + "packages/node_modules/@node-red/editor-client/src/vendor/ace/ext-language_tools.js", ], + // "packages/node_modules/@node-red/editor-client/public/vendor/vendor.css": [ + // // TODO: resolve relative resource paths in + // // bootstrap/FA/jquery + // ], "packages/node_modules/@node-red/editor-client/public/vendor/ace/worker-jsonata.js": [ "node_modules/jsonata/jsonata-es5.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/jsonata/worker-jsonata.js" @@ -222,10 +225,6 @@ module.exports = function(grunt) { files: [{ dest: 'packages/node_modules/@node-red/editor-client/public/red/style.min.css', src: 'packages/node_modules/@node-red/editor-client/src/sass/style.scss' - }, - { - dest: 'packages/node_modules/@node-red/editor-client/public/vendor/bootstrap/css/bootstrap.min.css', - src: 'packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.css' }] } }, @@ -277,7 +276,7 @@ module.exports = function(grunt) { files: [ 'packages/node_modules/@node-red/editor-client/src/js/**/*.js' ], - tasks: ['copy:build','concat','uglify','attachCopyright:js'] + tasks: ['copy:build','concat',/*'uglify',*/ 'attachCopyright:js'] }, sass: { files: [ @@ -352,9 +351,7 @@ module.exports = function(grunt) { cwd: 'packages/node_modules/@node-red/editor-client/src/vendor', src: [ 'ace/**', - //'bootstrap/css/**', - 'bootstrap/img/**', - 'jquery/css/**', + 'jquery/css/base/**', 'font-awesome/**' ], expand: true, @@ -499,7 +496,9 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-chmod'); grunt.loadNpmTasks('grunt-jsonlint'); grunt.loadNpmTasks('grunt-mocha-istanbul'); - grunt.loadNpmTasks('grunt-webdriver'); + if (fs.existsSync(path.join("node_modules", "grunt-webdriver"))) { + grunt.loadNpmTasks('grunt-webdriver'); + } grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-jsdoc-to-markdown'); grunt.loadNpmTasks('grunt-npm-command'); @@ -558,8 +557,8 @@ module.exports = function(grunt) { }); grunt.registerTask('verifyUiTestDependencies', function() { - if (!fs.existsSync(path.join("node_modules", "chromedriver"))) { - grunt.fail.fatal('You need to run "npm install chromedriver@2" before running UI test.'); + if (!fs.existsSync(path.join("node_modules", "grunt-webdriver"))) { + grunt.fail.fatal('You need to install the UI test dependencies first.\nUse the script in "scripts/install-ui-test-dependencies.sh"'); return false; } }); @@ -582,9 +581,15 @@ module.exports = function(grunt) { 'Runs code style check on editor code', ['jshint:editor']); - grunt.registerTask('test-ui', - 'Builds editor content then runs unit tests on editor ui', - ['verifyUiTestDependencies','build','jshint:editor','webdriver:all']); + if (!fs.existsSync(path.join("node_modules", "grunt-webdriver"))) { + grunt.registerTask('test-ui', + 'Builds editor content then runs unit tests on editor ui', + ['verifyUiTestDependencies']); + } else { + grunt.registerTask('test-ui', + 'Builds editor content then runs unit tests on editor ui', + ['verifyUiTestDependencies','build','jshint:editor','webdriver:all']); + } grunt.registerTask('test-nodes', 'Runs unit tests on core nodes', diff --git a/README.md b/README.md index 3d0acb0e3..3baa69377 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ http://nodered.org [![Build Status](https://travis-ci.org/node-red/node-red.svg?branch=master)](https://travis-ci.org/node-red/node-red) [![Coverage Status](https://coveralls.io/repos/node-red/node-red/badge.svg?branch=master)](https://coveralls.io/r/node-red/node-red?branch=master) -A visual tool for wiring the Internet of Things. +Low-code programming for event-driven applications. -![Node-RED: A visual tool for wiring the Internet of Things](http://nodered.org/images/node-red-screenshot.png) +![Node-RED: Low-code programming for event-driven applications](http://nodered.org/images/node-red-screenshot.png) ## Quick Start @@ -56,7 +56,7 @@ This project adheres to the [Contributor Covenant 1.4](http://contributor-covena ## Authors -Node-RED is a project of the [JS Foundation](http://js.foundation). +Node-RED is a project of the [OpenJS Foundation](https://openjsf.org). It was created by [IBM Emerging Technology](https://www.ibm.com/blogs/emerging-technology/). @@ -67,4 +67,4 @@ It was created by [IBM Emerging Technology](https://www.ibm.com/blogs/emerging-t ## Copyright and license -Copyright JS Foundation and other contributors, http://js.foundation under [the Apache 2.0 license](LICENSE). +Copyright JS Foundation and other contributors, https://openjsf.org under [the Apache 2.0 license](LICENSE). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..a52064d59 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 1.0.0 | :white_check_mark: | +| 0.20.x | :white_check_mark: | + + +## Reporting a Vulnerability + +Please report any potential security issues to `team@nodered.org`. This will notify the core project team who will respond accordingly. diff --git a/package.json b/package.json index d401a614e..8d2ac8a4c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "node-red", - "version": "0.20.5", - "description": "A visual tool for wiring the Internet of Things", + "version": "1.0.2", + "description": "Low-code programming for event-driven applications", "homepage": "http://nodered.org", "license": "Apache-2.0", "repository": { @@ -24,80 +24,77 @@ } ], "dependencies": { - "ajv": "6.10.0", + "ajv": "6.10.2", "basic-auth": "2.0.1", "bcryptjs": "2.4.3", "body-parser": "1.19.0", "cheerio": "0.22.0", "clone": "2.1.2", "content-type": "1.0.4", - "cookie": "0.3.1", + "cookie": "0.4.0", "cookie-parser": "1.4.4", "cors": "2.8.5", "cron": "1.7.1", "denque": "1.4.1", - "express": "4.16.4", - "express-session": "1.16.1", - "fs-extra": "7.0.1", + "express": "4.17.1", + "express-session": "1.16.2", + "fs-extra": "8.1.0", "fs.notify": "0.0.4", - "hash-sum": "1.0.2", - "https-proxy-agent": "2.2.1", - "i18next": "15.1.0", - "iconv-lite": "0.4.24", + "hash-sum": "2.0.0", + "https-proxy-agent": "2.2.2", + "i18next": "15.1.2", + "iconv-lite": "0.5.0", "is-utf8": "0.2.1", "js-yaml": "3.13.1", "json-stringify-safe": "5.0.1", - "jsonata": "1.6.4", + "jsonata": "1.6.5", + "media-typer": "1.1.0", "memorystore": "1.6.1", - "mime": "2.4.2", + "mime": "2.4.4", "mqtt": "2.18.8", - "multer": "1.4.1", - "mustache": "3.0.1", - "node-red-node-email": "^1.4.0", - "node-red-node-feedparser": "^0.1.14", - "node-red-node-rbe": "^0.2.4", - "node-red-node-sentiment": "^0.1.3", - "node-red-node-tail": "^0.0.2", - "node-red-node-twitter": "^1.1.4", + "multer": "1.4.2", + "mustache": "3.0.2", + "node-red-node-rbe": "^0.2.5", + "node-red-node-sentiment": "^0.1.4", + "node-red-node-tail": "^0.0.3", "nopt": "4.0.1", "oauth2orize": "1.11.0", "on-headers": "1.0.2", "passport": "0.4.0", "passport-http-bearer": "1.0.1", "passport-oauth2-client-password": "0.1.2", - "raw-body": "2.4.0", + "raw-body": "2.4.1", "request": "2.88.0", - "semver": "6.0.0", - "uglify-js": "3.5.9", + "semver": "6.3.0", + "uglify-js": "3.6.0", "when": "3.7.8", "ws": "6.2.1", "xml2js": "0.4.19" }, "optionalDependencies": { - "bcrypt": "3.0.5" + "bcrypt": "3.0.6" }, "devDependencies": { - "grunt": "~1.0.3", + "grunt": "~1.0.4", "grunt-chmod": "~1.1.1", "grunt-cli": "~1.3.2", "grunt-concurrent": "~2.3.1", - "grunt-contrib-clean": "~1.1.0", - "grunt-contrib-compress": "~1.4.0", + "grunt-contrib-clean": "~2.0.0", + "grunt-contrib-compress": "~1.5.0", "grunt-contrib-concat": "~1.0.1", "grunt-contrib-copy": "~1.0.0", - "grunt-contrib-jshint": "~1.1.0", - "grunt-contrib-uglify": "~3.4.0", + "grunt-contrib-jshint": "~2.1.0", + "grunt-contrib-uglify": "~4.0.1", "grunt-contrib-watch": "~1.1.0", "grunt-jsdoc": "^2.2.1", "grunt-jsdoc-to-markdown": "^4.0.0", - "grunt-jsonlint": "~1.1.0", + "grunt-jsonlint": "~2.0.0", "grunt-mkdir": "~1.0.0", "grunt-mocha-istanbul": "5.0.2", "grunt-nodemon": "~0.4.2", "grunt-npm-command": "~0.1.2", "grunt-sass": "~2.0.0", "grunt-simple-mocha": "~0.4.1", - "grunt-webdriver": "^2.0.3", "http-proxy": "^1.16.2", "istanbul": "0.4.5", "minami": "1.2.3", @@ -107,11 +104,7 @@ "sinon": "1.17.7", "stoppable": "^1.1.0", "supertest": "3.4.2", - "wdio-chromedriver-service": "^0.1.5", - "wdio-mocha-framework": "^0.6.4", - "wdio-spec-reporter": "^0.1.5", - "webdriverio": "^4.14.1", - "node-red-node-test-helper": "^0.2.2", + "node-red-node-test-helper": "^0.2.3", "jsdoc-nr-template": "node-red/jsdoc-nr-template" }, "engines": { diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/context.js b/packages/node_modules/@node-red/editor-api/lib/admin/context.js index 6a2efd82d..54bfd9f85 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/context.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/context.js @@ -30,7 +30,8 @@ module.exports = { scope: req.params.scope, id: req.params.id, key: req.params[0], - store: req.query['store'] + store: req.query['store'], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.context.getValue(opts).then(function(result) { res.json(result); @@ -45,7 +46,8 @@ module.exports = { scope: req.params.scope, id: req.params.id, key: req.params[0], - store: req.query['store'] + store: req.query['store'], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.context.delete(opts).then(function(result) { res.status(204).end(); diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/flow.js b/packages/node_modules/@node-red/editor-api/lib/admin/flow.js index 5ba5d7a04..98ae997ff 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/flow.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/flow.js @@ -24,7 +24,8 @@ module.exports = { get: function(req,res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.flows.getFlow(opts).then(function(result) { return res.json(result); @@ -35,7 +36,8 @@ module.exports = { post: function(req,res) { var opts = { user: req.user, - flow: req.body + flow: req.body, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.flows.addFlow(opts).then(function(id) { return res.json({id:id}); @@ -47,7 +49,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - flow: req.body + flow: req.body, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.flows.updateFlow(opts).then(function(id) { return res.json({id:id}); @@ -58,7 +61,8 @@ module.exports = { delete: function(req,res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.flows.deleteFlow(opts).then(function() { res.status(204).end(); diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/flows.js b/packages/node_modules/@node-red/editor-api/lib/admin/flows.js index ccad8718f..11b30e446 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/flows.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/flows.js @@ -27,7 +27,8 @@ module.exports = { return res.status(400).json({code:"invalid_api_version", message:"Invalid API Version requested"}); } var opts = { - user: req.user + user: req.user, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.flows.getFlows(opts).then(function(result) { if (version === "v1") { @@ -46,7 +47,8 @@ module.exports = { } var opts = { user: req.user, - deploymentType: req.get("Node-RED-Deployment-Type")||"full" + deploymentType: req.get("Node-RED-Deployment-Type")||"full", + req: apiUtils.getRequestLogObject(req) } if (opts.deploymentType !== 'reload') { diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/index.js b/packages/node_modules/@node-red/editor-api/lib/admin/index.js index 32bf010c5..50d7b168f 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/index.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/index.js @@ -48,13 +48,13 @@ module.exports = { // Nodes adminApp.get("/nodes",needsPermission("nodes.read"),nodes.getAll,apiUtil.errorHandler); adminApp.post("/nodes",needsPermission("nodes.write"),nodes.post,apiUtil.errorHandler); - adminApp.get(/\/nodes\/messages/,needsPermission("nodes.read"),nodes.getModuleCatalogs,apiUtil.errorHandler); - adminApp.get(/\/nodes\/((@[^\/]+\/)?[^\/]+\/[^\/]+)\/messages/,needsPermission("nodes.read"),nodes.getModuleCatalog,apiUtil.errorHandler); - adminApp.get(/\/nodes\/((@[^\/]+\/)?[^\/]+)$/,needsPermission("nodes.read"),nodes.getModule,apiUtil.errorHandler); - adminApp.put(/\/nodes\/((@[^\/]+\/)?[^\/]+)$/,needsPermission("nodes.write"),nodes.putModule,apiUtil.errorHandler); - adminApp.delete(/\/nodes\/((@[^\/]+\/)?[^\/]+)$/,needsPermission("nodes.write"),nodes.delete,apiUtil.errorHandler); - adminApp.get(/\/nodes\/((@[^\/]+\/)?[^\/]+)\/([^\/]+)$/,needsPermission("nodes.read"),nodes.getSet,apiUtil.errorHandler); - adminApp.put(/\/nodes\/((@[^\/]+\/)?[^\/]+)\/([^\/]+)$/,needsPermission("nodes.write"),nodes.putSet,apiUtil.errorHandler); + adminApp.get(/^\/nodes\/messages/,needsPermission("nodes.read"),nodes.getModuleCatalogs,apiUtil.errorHandler); + adminApp.get(/^\/nodes\/((@[^\/]+\/)?[^\/]+\/[^\/]+)\/messages/,needsPermission("nodes.read"),nodes.getModuleCatalog,apiUtil.errorHandler); + adminApp.get(/^\/nodes\/((@[^\/]+\/)?[^\/]+)$/,needsPermission("nodes.read"),nodes.getModule,apiUtil.errorHandler); + adminApp.put(/^\/nodes\/((@[^\/]+\/)?[^\/]+)$/,needsPermission("nodes.write"),nodes.putModule,apiUtil.errorHandler); + adminApp.delete(/^\/nodes\/((@[^\/]+\/)?[^\/]+)$/,needsPermission("nodes.write"),nodes.delete,apiUtil.errorHandler); + adminApp.get(/^\/nodes\/((@[^\/]+\/)?[^\/]+)\/([^\/]+)$/,needsPermission("nodes.read"),nodes.getSet,apiUtil.errorHandler); + adminApp.put(/^\/nodes\/((@[^\/]+\/)?[^\/]+)\/([^\/]+)$/,needsPermission("nodes.write"),nodes.putSet,apiUtil.errorHandler); // Context adminApp.get("/context/:scope(global)",needsPermission("context.read"),context.get,apiUtil.errorHandler); diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js b/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js index 59a137587..2787a5c36 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js @@ -24,7 +24,8 @@ module.exports = { }, getAll: function(req,res) { var opts = { - user: req.user + user: req.user, + req: apiUtils.getRequestLogObject(req) } if (req.get("accept") == "application/json") { runtimeAPI.nodes.getNodeList(opts).then(function(list) { @@ -42,7 +43,8 @@ module.exports = { var opts = { user: req.user, module: req.body.module, - version: req.body.version + version: req.body.version, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.addModule(opts).then(function(info) { res.json(info); @@ -54,7 +56,8 @@ module.exports = { delete: function(req,res) { var opts = { user: req.user, - module: req.params[0] + module: req.params[0], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.removeModule(opts).then(function() { res.status(204).end(); @@ -66,7 +69,8 @@ module.exports = { getSet: function(req,res) { var opts = { user: req.user, - id: req.params[0] + "/" + req.params[2] + id: req.params[0] + "/" + req.params[2], + req: apiUtils.getRequestLogObject(req) } if (req.get("accept") === "application/json") { runtimeAPI.nodes.getNodeInfo(opts).then(function(result) { @@ -87,7 +91,8 @@ module.exports = { getModule: function(req,res) { var opts = { user: req.user, - module: req.params[0] + module: req.params[0], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.getModuleInfo(opts).then(function(result) { res.send(result); @@ -106,7 +111,8 @@ module.exports = { var opts = { user: req.user, id: req.params[0] + "/" + req.params[2], - enabled: body.enabled + enabled: body.enabled, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.setNodeSetState(opts).then(function(result) { res.send(result); @@ -125,7 +131,8 @@ module.exports = { var opts = { user: req.user, module: req.params[0], - enabled: body.enabled + enabled: body.enabled, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.setModuleState(opts).then(function(result) { res.send(result); @@ -139,7 +146,8 @@ module.exports = { var opts = { user: req.user, module: req.params[0], - lang: req.query.lng + lang: req.query.lng, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.getModuleCatalog(opts).then(function(result) { res.json(result); @@ -152,7 +160,8 @@ module.exports = { getModuleCatalogs: function(req,res) { var opts = { user: req.user, - lang: req.query.lng + lang: req.query.lng, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.getModuleCatalogs(opts).then(function(result) { res.json(result); @@ -164,7 +173,8 @@ module.exports = { getIcons: function(req,res) { var opts = { - user: req.user + user: req.user, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.getIconList(opts).then(function(list) { res.json(list); diff --git a/packages/node_modules/@node-red/editor-api/lib/auth/tokens.js b/packages/node_modules/@node-red/editor-api/lib/auth/tokens.js index 31c12d228..6e867d7df 100644 --- a/packages/node_modules/@node-red/editor-api/lib/auth/tokens.js +++ b/packages/node_modules/@node-red/editor-api/lib/auth/tokens.js @@ -56,7 +56,7 @@ function expireSessions() { } if (nextExpiry < Number.MAX_SAFE_INTEGER) { // Allow 5 seconds grace - expiryTimeout = setTimeout(expireSessions,(nextExpiry - Date.now()) + 5000) + expiryTimeout = setTimeout(expireSessions,Math.min(2147483647,(nextExpiry - Date.now()) + 5000)) } if (modified) { return storage.saveSessions(sessions); @@ -129,7 +129,7 @@ module.exports = { sessions[accessToken] = session; if (!expiryTimeout) { - expiryTimeout = setTimeout(expireSessions,(accessTokenExpiresAt - Date.now()) + 5000) + expiryTimeout = setTimeout(expireSessions,Math.min(2147483647,(accessTokenExpiresAt - Date.now()) + 5000)) } return storage.saveSessions(sessions).then(function() { diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/index.js b/packages/node_modules/@node-red/editor-api/lib/editor/index.js index dbf4c18f2..3628fa702 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/index.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/index.js @@ -25,8 +25,8 @@ var auth = require("../auth"); var nodes = require("../admin/nodes"); // TODO: move /icons into here var needsPermission; var runtimeAPI; -var log = require("@node-red/util").log; // TODO: separate module -var i18n = require("@node-red/util").i18n; // TODO: separate module +var log = require("@node-red/util").log; +var i18n = require("@node-red/util").i18n; var apiUtil = require("../util"); @@ -93,9 +93,8 @@ module.exports = { // Library var library = require("./library"); library.init(runtimeAPI); - editorApp.get("/library/flows",needsPermission("library.read"),library.getAll,apiUtil.errorHandler); - editorApp.get(/library\/([^\/]+)(?:$|\/(.*))/,needsPermission("library.read"),library.getEntry); - editorApp.post(/library\/([^\/]+)\/(.*)/,needsPermission("library.write"),library.saveEntry); + editorApp.get(/library\/([^\/]+)\/([^\/]+)(?:$|\/(.*))/,needsPermission("library.read"),library.getEntry); + editorApp.post(/library\/([^\/]+)\/([^\/]+)\/(.*)/,needsPermission("library.write"),library.saveEntry); // Credentials diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/library.js b/packages/node_modules/@node-red/editor-api/lib/editor/library.js index e8b09424a..47a41bb7b 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/library.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/library.js @@ -25,23 +25,12 @@ module.exports = { init: function(_runtimeAPI) { runtimeAPI = _runtimeAPI; }, - - getAll: function(req,res) { - var opts = { - user: req.user, - type: 'flows' - } - runtimeAPI.library.getEntries(opts).then(function(result) { - res.json(result); - }).catch(function(err) { - apiUtils.rejectHandler(req,res,err); - }); - }, getEntry: function(req,res) { var opts = { user: req.user, - type: req.params[0], - path: req.params[1]||"" + library: req.params[0], + type: req.params[1], + path: req.params[2]||"" } runtimeAPI.library.getEntry(opts).then(function(result) { if (typeof result === "string") { @@ -62,8 +51,9 @@ module.exports = { saveEntry: function(req,res) { var opts = { user: req.user, - type: req.params[0], - path: req.params[1]||"" + library: req.params[0], + type: req.params[1], + path: req.params[2]||"" } // TODO: horrible inconsistencies between flows and all other types if (opts.type === "flows") { diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/projects.js b/packages/node_modules/@node-red/editor-api/lib/editor/projects.js index ff7fc5e85..0849c8ff8 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/projects.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/projects.js @@ -22,7 +22,8 @@ var needsPermission = require("../auth").needsPermission; function listProjects(req,res) { var opts = { - user: req.user + user: req.user, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.listProjects(opts).then(function(result) { res.json(result); @@ -33,7 +34,8 @@ function listProjects(req,res) { function getProject(req,res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getProject(opts).then(function(data) { if (data) { @@ -49,7 +51,8 @@ function getProjectStatus(req,res) { var opts = { user: req.user, id: req.params.id, - remote: req.query.remote + remote: req.query.remote, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getStatus(opts).then(function(data){ if (data) { @@ -64,7 +67,8 @@ function getProjectStatus(req,res) { function getProjectRemotes(req,res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getRemotes(opts).then(function(data) { res.json(data); @@ -98,7 +102,8 @@ module.exports = { app.post("/", needsPermission("projects.write"), function(req,res) { var opts = { user: req.user, - project: req.body + project: req.body, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.createProject(opts).then(function(result) { res.json(result); @@ -112,7 +117,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - project: req.body + project: req.body, + req: apiUtils.getRequestLogObject(req) } if (req.body.active) { @@ -150,7 +156,8 @@ module.exports = { app.delete("/:id", needsPermission("projects.write"), function(req,res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.deleteProject(opts).then(function() { res.status(204).end(); @@ -168,7 +175,8 @@ module.exports = { app.get("/:id/files", needsPermission("projects.read"), function(req,res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getFiles(opts).then(function(data) { res.json(data); @@ -185,7 +193,8 @@ module.exports = { user: req.user, id: req.params.id, path: req.params[0], - tree: req.params.treeish + tree: req.params.treeish, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getFile(opts).then(function(data) { res.json({content:data}); @@ -199,7 +208,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - path: req.params[0] + path: req.params[0], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.revertFile(opts).then(function() { @@ -214,7 +224,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - path: req.params[0] + path: req.params[0], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.stageFile(opts).then(function() { getProjectStatus(req,res); @@ -228,7 +239,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - path: req.body.files + path: req.body.files, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.stageFile(opts).then(function() { getProjectStatus(req,res); @@ -242,7 +254,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - message: req.body.message + message: req.body.message, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.commit(opts).then(function() { getProjectStatus(req,res); @@ -256,7 +269,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - path: req.params[0] + path: req.params[0], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.unstageFile(opts).then(function() { getProjectStatus(req,res); @@ -269,7 +283,8 @@ module.exports = { app.delete("/:id/stage", needsPermission("projects.write"), function(req, res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.unstageFile(opts).then(function() { getProjectStatus(req,res); @@ -284,7 +299,8 @@ module.exports = { user: req.user, id: req.params.id, path: req.params[0], - type: req.params.type + type: req.params.type, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getFileDiff(opts).then(function(data) { res.json({ @@ -301,7 +317,8 @@ module.exports = { user: req.user, id: req.params.id, limit: req.query.limit || 20, - before: req.query.before + before: req.query.before, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getCommits(opts).then(function(data) { res.json(data); @@ -315,7 +332,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - sha: req.params.sha + sha: req.params.sha, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getCommit(opts).then(function(data) { res.json({commit:data}); @@ -330,7 +348,8 @@ module.exports = { user: req.user, id: req.params.id, remote: req.params[0], - track: req.query.u + track: req.query.u, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.push(opts).then(function(data) { res.status(204).end(); @@ -346,7 +365,8 @@ module.exports = { id: req.params.id, remote: req.params[0], track: req.query.setUpstream, - allowUnrelatedHistories: req.query.allowUnrelatedHistories + allowUnrelatedHistories: req.query.allowUnrelatedHistories, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.pull(opts).then(function(data) { res.status(204).end(); @@ -359,7 +379,8 @@ module.exports = { app.delete("/:id/merge", needsPermission("projects.write"), function(req, res) { var opts = { user: req.user, - id: req.params.id + id: req.params.id, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.abortMerge(opts).then(function() { res.status(204).end(); @@ -374,7 +395,8 @@ module.exports = { user: req.user, id: req.params.id, path: req.params[0], - resolution: req.body.resolutions + resolution: req.body.resolutions, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.resolveMerge(opts).then(function() { res.status(204).end(); @@ -388,7 +410,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - remote: false + remote: false, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getBranches(opts).then(function(data) { res.json(data); @@ -403,7 +426,8 @@ module.exports = { user: req.user, id: req.params.id, branch: req.params.branchName, - force: !!req.query.force + force: !!req.query.force, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.deleteBranch(opts).then(function(data) { res.status(204).end(); @@ -417,7 +441,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - remote: true + remote: true, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getBranches(opts).then(function(data) { res.json(data); @@ -431,7 +456,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - branch: req.params[0] + branch: req.params[0], + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.getBranchStatus(opts).then(function(data) { res.json(data); @@ -446,7 +472,8 @@ module.exports = { user: req.user, id: req.params.id, branch: req.body.name, - create: req.body.create + create: req.body.create, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.setBranch(opts).then(function(data) { res.json(data); @@ -463,7 +490,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - remote: req.body + remote: req.body, + req: apiUtils.getRequestLogObject(req) } if (/^https?:\/\/[^/]+@/i.test(req.body.url)) { res.status(400).json({error:"unexpected_error", message:"Git http url must not include username/password"}); @@ -481,7 +509,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - remote: req.params.remoteName + remote: req.params.remoteName, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.removeRemote(opts).then(function(data) { getProjectRemotes(req,res); @@ -497,7 +526,8 @@ module.exports = { var opts = { user: req.user, id: req.params.id, - remote: remote + remote: remote, + req: apiUtils.getRequestLogObject(req) } runtimeAPI.projects.updateRemote(opts).then(function() { res.status(204).end(); diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/settings.js b/packages/node_modules/@node-red/editor-api/lib/editor/settings.js index 944792fb7..9d9867f1b 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/settings.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/settings.js @@ -19,6 +19,8 @@ var sshkeys = require("./sshkeys"); var theme = require("./theme"); var clone = require("clone"); +var i18n = require("@node-red/util").i18n + function extend(target, source) { var keys = Object.keys(source); var i = keys.length; @@ -53,12 +55,14 @@ module.exports = { user: req.user } runtimeAPI.settings.getRuntimeSettings(opts).then(function(result) { + result.editorTheme = result.editorTheme||{}; var themeSettings = theme.settings(); if (themeSettings) { // result.editorTheme may already exist with the palette // disabled. Need to merge that into the receive settings - result.editorTheme = extend(clone(themeSettings),result.editorTheme||{}); + result.editorTheme = extend(clone(themeSettings),result.editorTheme); } + result.editorTheme.languages = i18n.availableLanguages("editor"); res.json(result); }); }, diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js index ea088b3eb..17dbbafea 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js @@ -28,7 +28,7 @@ var defaultContext = { }, header: { title: "Node-RED", - image: "red/images/node-red.png" + image: "red/images/node-red.svg" }, asset: { red: (process.env.NODE_ENV == "development")? "red/red.js":"red/red.min.js", @@ -169,6 +169,9 @@ module.exports = { } } } + themeApp.get("/", function(req,res) { + res.json(themeContext); + }) if (theme.hasOwnProperty("menu")) { themeSettings.menu = theme.menu; diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js index ce3ec862c..24b819fec 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js @@ -25,7 +25,7 @@ var theme = require("./theme"); var runtimeAPI; var editorClientDir = path.dirname(require.resolve("@node-red/editor-client")); -var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.png"); +var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.svg"); var editorTemplatePath = path.join(editorClientDir,"templates","index.mst"); var editorTemplate; diff --git a/packages/node_modules/@node-red/editor-api/lib/util.js b/packages/node_modules/@node-red/editor-api/lib/util.js index 1984bd5f1..0cef96bbb 100644 --- a/packages/node_modules/@node-red/editor-api/lib/util.js +++ b/packages/node_modules/@node-red/editor-api/lib/util.js @@ -47,5 +47,12 @@ module.exports = { code: err.code||"unexpected_error", message: err.message||err.toString() }); + }, + getRequestLogObject: function(req) { + return { + user: req.user, + path: req.path, + ip: (req.headers && req.headers['x-forwarded-for']) || (req.connection && req.connection.remoteAddress) || undefined + } } } diff --git a/packages/node_modules/@node-red/editor-api/package.json b/packages/node_modules/@node-red/editor-api/package.json index 315a1ee18..ac86c1f9b 100644 --- a/packages/node_modules/@node-red/editor-api/package.json +++ b/packages/node_modules/@node-red/editor-api/package.json @@ -1,6 +1,6 @@ { "name": "@node-red/editor-api", - "version": "0.20.5", + "version": "1.0.2", "license": "Apache-2.0", "main": "./lib/index.js", "repository": { @@ -16,17 +16,17 @@ } ], "dependencies": { - "@node-red/util": "0.20.5", - "@node-red/editor-client": "0.20.5", + "@node-red/util": "1.0.2", + "@node-red/editor-client": "1.0.2", "bcryptjs": "2.4.3", "body-parser": "1.19.0", "clone": "2.1.2", "cors": "2.8.5", - "express-session": "1.16.1", - "express": "4.16.4", + "express-session": "1.16.2", + "express": "4.17.1", "memorystore": "1.6.1", - "mime": "2.4.2", - "mustache": "3.0.1", + "mime": "2.4.4", + "mustache": "3.0.2", "oauth2orize": "1.11.0", "passport-http-bearer": "1.0.1", "passport-oauth2-client-password": "0.1.2", @@ -35,6 +35,6 @@ "ws": "6.2.1" }, "optionalDependencies": { - "bcrypt": "3.0.5" + "bcrypt": "3.0.6" } } diff --git a/packages/node_modules/@node-red/editor-client/locales/de/editor.json b/packages/node_modules/@node-red/editor-client/locales/de/editor.json index d477d3f0e..c7394c347 100755 --- a/packages/node_modules/@node-red/editor-client/locales/de/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/de/editor.json @@ -26,8 +26,7 @@ "status" : "Status", "enabled" : "Aktiviert", "disabled" : "Inaktiviert", - "info" : "Beschreibung", - "tip" : "Beschreibung akzeptiert Markdown und wird auf der Registerkarte Info angezeigt." + "info" : "Beschreibung" }, "menu" : { "label" : { @@ -48,16 +47,13 @@ }, "settings" : "Einstellungen", "userSettings" : "Benutzereinstellungen", - "nodes" : "Knoten", - "displayStatus" : "Knotenstatus anzeigen", - "displayConfig" : "Konfigurationsknoten", + "nodes" : "Nodes", + "displayStatus" : "Nodestatus anzeigen", + "displayConfig" : "Konfigurations-Node", "import" : "Import", "export" : "Exportieren", "search" : "Flows durchsuchen", "searchInput" : "durchsuchen Sie Ihre Flows", - "clipboard" : "Zwischenablage", - "library" : "Bibliothek", - "examples" : "Beispiele", "subflows" : "Subflow", "createSubflow" : "Subflow erstellen", "selectionToSubflow" : "Auswahl für Subflow", @@ -87,17 +83,17 @@ "notAuthorized" : "Keine Berechtigung", "errors" : { "settings" : "Sie müssen angemeldet sein, um auf die Einstellungen zuzugreifen.", - "deploy" : "Sie müssen angemeldet sein, um Änderungen implementieren zu können.", + "deploy" : "Sie müssen angemeldet sein, um Änderungen anwenden zu können.", "notAuthorized" : "Sie müssen angemeldet sein, um diese Aktion ausführen zu können." } }, "notification" : { "warning" : " Warnung : __message__", "warnings" : { - "undeployedChanges" : "Knoten hat nicht implementierte Änderungen", - "nodeActionDisabled" : "In Subflow inaktivierte Knotenaktionen", - "missing-types" : "

Die Flows wurden aufgrund fehlender Knotentypen gestoppt.

", - "restartRequired" : "Knoten-RED muss erneut gestartet werden, damit aufgerüstete Module aktiviert werden können", + "undeployedChanges" : "Node hat nicht implementierte Änderungen", + "nodeActionDisabled" : "In Subflow inaktivierte Nodeaktionen", + "missing-types" : "

Die Flows wurden aufgrund fehlender Nodetypen gestoppt.

", + "restartRequired" : "Node-RED muss erneut gestartet werden, damit aufgerüstete Module aktiviert werden können", "credentials_load_failed" : "

Die Flows wurden gestoppt, da die Berechtigungsnachweise nicht entschlüsselt werden konnten.

Die Datei mit dem Datenflowberechtigungsnachweis ist verschlüsselt, aber der Verschlüsselungsschlüssel des Projekts fehlt oder ist ungültig.

", "credentials_load_failed_reset" : "

Die Berechtigungsnachweise konnten nicht entschlüsselt werden

Die Datei mit dem Flow-Berechtigungsnachweis ist verschlüsselt, aber der Chiffrierschlüssel des Projekts fehlt oder ist ungültig.

Die Datei des Flow-Berechtigungsnachweises wird bei der nächsten Implementierung zurückgesetzt. Alle vorhandenen Datenflowberechtigungsnachweise werden gelöscht.

", "missing_flow_file" : "

Die Projektflowdatei wurde nicht gefunden.

Das Projekt ist nicht mit einer Flow-Datei konfiguriert.

", @@ -136,19 +132,19 @@ } }, "clipboard" : { - "nodes" : "Knoten", - "selectNodes" : "Wählen Sie den Text oben aus, und kopieren Sie die Datei in die Zwischenablage.", - "pasteNodes" : "Knoten hier einfügen", - "importNodes" : "Knoten importieren", - "exportNodes" : "Knoten in Zwischenablage exportieren", + "clipboard" : "Zwischenablage", + "nodes" : "Nodes", + "pasteNodes" : "Nodes hier einfügen", + "importNodes" : "Nodes importieren", + "exportNodes" : "Nodes in Zwischenablage exportieren", "importUnrecognised" : "Importierter Typ nicht erkannt:", "importUnrecognised_plural" : "Importierte Typen nicht erkannt:", - "nodesExported" : "Knoten, die in die Zwischenablage exportiert wurden", - "nodeCopied" : "__count__ Knoten kopiert", - "nodeCopied_plural" : "__count__ Knoten kopiert", + "nodesExported" : "Nodes, die in die Zwischenablage exportiert wurden", + "nodeCopied" : "__count__ Node kopiert", + "nodeCopied_plural" : "__count__ Nodes kopiert", "invalidFlow" : "Ungültiger Nachrichtenflow: __message__", "export" : { - "selected" : "Ausgewählte Knoten", + "selected" : "Ausgewählte Nodes", "current" : "Aktueller Flow", "all" : "alle Flows", "compact" : "kompakt", @@ -164,16 +160,16 @@ "copyMessageValue_truncated" : "Abgeschnittene Wert kopiert" }, "deploy" : { - "deploy" : "Implementieren", + "deploy" : "deploy", "full" : "Voll", "fullDesc" : "Implementiert alles im Arbeitsbereich", "modifiedFlows" : "Geänderte Flows", - "modifiedFlowsDesc" : "Implementiert nur Flows, die geänderte Knoten enthalten.", - "modifiedNodes" : "Geänderte Knoten", - "modifiedNodesDesc" : "Implementiert nur Knoten, die sich geändert haben.", + "modifiedFlowsDesc" : "Implementiert nur Flows, die geänderte Nodes enthalten.", + "modifiedNodes" : "Geänderte Nodes", + "modifiedNodesDesc" : "Implementiert nur Nodes, die sich geändert haben.", "successfulDeploy" : "Erfolgreich implementiert", - "deployFailed" : "Implementieren fehlgeschlagen: __message__", - "unusedConfigNodes" : "Sie haben einige nicht verwendete Konfigurationsknoten.", + "deployFailed" : "Deploy fehlgeschlagen: __message__", + "unusedConfigNodes" : "Sie haben einige nicht verwendete Konfigurations-Nodes.", "unusedConfigNodesLink" : "Klicken Sie hier, um sie zu sehen", "errors" : { "noResponse" : "Keine Antwort vom Server" @@ -181,16 +177,16 @@ "confirm" : { "button" : { "ignore" : "Ignorieren", - "confirm" : "Implementieren bestätigen", + "confirm" : "Deploy bestätigen", "review" : "Änderungen prüfen", "cancel" : "Abbrechen", "merge" : "Zusammenführen", - "overwrite" : "Ignorieren & implementieren" + "overwrite" : "Ignorieren & deployen" }, "undeployedChanges" : "Sie haben nicht implementierte Änderungen.\n\nWenn Sie diese Seite verlassen, gehen diese Änderungen verloren.", - "improperlyConfigured" : "Der Arbeitsbereich enthält einige Knoten, die nicht ordnungsgemäß konfiguriert sind:", - "unknown" : "Der Arbeitsbereich enthält einige unbekannte Knotentypen:", - "confirm" : "Sind Sie sicher, dass Sie implementieren möchten?", + "improperlyConfigured" : "Der Arbeitsbereich enthält einige Nodes, die nicht ordnungsgemäß konfiguriert sind:", + "unknown" : "Der Arbeitsbereich enthält einige unbekannte Node-Typen:", + "confirm" : "Sind Sie sicher, dass Sie deployen möchten?", "doNotWarn" : "warnen Sie nicht noch einmal.", "conflict" : "Auf dem Server wird eine aktuellere Gruppe von Datenflüssen ausgeführt.", "backgroundUpdate" : "Die Datenflüsse auf dem Server wurden aktualisiert.", @@ -203,7 +199,7 @@ "diff" : { "unresolvedCount" : "__count__ unaufgelöster Konflikt", "unresolvedCount_plural" : "__count__ unaufgelöste Konflikte", - "globalNodes" : "Globale Knoten", + "globalNodes" : "Globale Nodes", "flowProperties" : "Flow-Eigenschaften", "type" : { "added" : "hinzugefügt", @@ -215,8 +211,8 @@ "movedTo" : "verschoben zu __id__", "movedFrom" : "verschoben von __id__" }, - "nodeCount" : "__count__, Knoten", - "nodeCount_plural" : "__count__-Knoten", + "nodeCount" : "__count__, Node", + "nodeCount_plural" : "__count__-Nodes", "local" : "Lokale Änderungen", "remote" : "Ferne Änderungen", "reviewChanges" : "Änderungen prüfen", @@ -240,9 +236,8 @@ "deleteSubflow" : "Subflow löschen", "info" : "Beschreibung", "category" : "Kategorie", - "format" : "Markdown-Format", "errors" : { - "noNodesSelected" : " Subflow kann nicht erstellt werden : Es wurden keine Knoten ausgewählt.", + "noNodesSelected" : " Subflow kann nicht erstellt werden : Es wurden keine Nodes ausgewählt.", "multipleInputsToSelection" : " Subflow kann nicht erstellt werden : Mehrere Eingaben zur Auswahl" } }, @@ -252,13 +247,13 @@ "configUpdate" : "Aktualisieren", "configDelete" : "Löschen", "nodesUse" : "__count__node verwendet diese Konfiguration", - "nodesUse_plural" : "__count__ -Knoten verwenden diese Konfiguration", - "addNewConfig" : "Neuen __type__config-Knoten hinzufügen", - "editNode" : "__type__ Knoten bearbeiten", - "editConfig" : "__type__config-Knoten bearbeiten", + "nodesUse_plural" : "__count__ -Nodes verwenden diese Konfiguration", + "addNewConfig" : "Neuen __type__config-Node hinzufügen", + "editNode" : "__type__ Node bearbeiten", + "editConfig" : "__type__config-Node bearbeiten", "addNewType" : "Neuen __type__ hinzufügen ...", - "nodeProperties" : "Knoteneigenschaften", - "portLabels" : "Knoteneinstellungen", + "nodeProperties" : "Node-Eigenschaften", + "portLabels" : "Node-Einstellungen", "labelInputs" : "Eingänge", "labelOutputs" : "Ausgänge", "settingIcon" : "Symbol", @@ -267,7 +262,7 @@ "searchIcons" : "Suchsymbole", "useDefault" : "Standardwert verwenden", "errors" : { - "scopeChange" : "Wenn Sie den Geltungsbereich ändern, wird er für Knoten in anderen Nachrichtenflüssen, die ihn verwenden, nicht verfügbar sein." + "scopeChange" : "Wenn Sie den Geltungsbereich ändern, wird er für Nodes in anderen Nachrichtenflüssen, die ihn verwenden, nicht verfügbar sein." } }, "keyboard" : { @@ -279,48 +274,45 @@ "unassigned" : "Nicht zugeordnet", "global" : "global", "workspace" : "Arbeitsbereich", - "selectAll" : "Alle Knoten auswählen", - "selectAllConnected" : "Alle verbundenen Knoten auswählen", - "addRemoveNode" : "Knoten aus Auswahl hinzufügen/entfernen", - "editSelected" : "Ausgewählten Knoten bearbeiten", - "deleteSelected" : "Ausgewählte Knoten oder ausgewählten Link löschen", - "importNode" : "Knoten importieren", - "exportNode" : "Knoten exportieren", - "nudgeNode" : "Ausgewählte Knoten verschieben (1px)", - "moveNode" : "Ausgewählte Knoten verschieben (20px)", + "selectAll" : "Alle Nodes auswählen", + "selectAllConnected" : "Alle verbundenen Nodes auswählen", + "addRemoveNode" : "Node aus Auswahl hinzufügen/entfernen", + "editSelected" : "Ausgewählten Node bearbeiten", + "deleteSelected" : "Ausgewählte Node oder ausgewählten Link löschen", + "importNode" : "Node importieren", + "exportNode" : "Node exportieren", + "nudgeNode" : "Ausgewählte Nodes verschieben (1px)", + "moveNode" : "Ausgewählte Nodes verschieben (20px)", "toggleSidebar" : "Seitenleiste ein-/ausschalten", - "copyNode" : "Ausgewählte Knoten kopieren", - "cutNode" : "Ausgewählte Knoten ausschneiden", - "pasteNode" : "Knoten einfügen", + "copyNode" : "Ausgewählte Nodes kopieren", + "cutNode" : "Ausgewählte Nodes ausschneiden", + "pasteNode" : "Node einfügen", "undoChange" : "Letzte Änderung rückgängig machen", "searchBox" : "Suchfeld öffnen", "managePalette" : "Palette verwalten" }, "library" : { + "library" : "Bibliothek", "openLibrary" : "Bibliothek öffnen ...", "saveToLibrary" : "In Bibliothek speichern ...", "typeLibrary" : "__type__, Bibliothek", "unnamedType" : "Unbenannt __type__", - "exportToLibrary" : "Knoten in Bibliothek exportieren", "dialogSaveOverwrite" : "Ein __libraryType__ mit dem Namen __libraryName__ ist bereits vorhanden. Überschreiben?", "invalidFilename" : "Ungültiger Dateiname", - "savedNodes" : "Gespeicherte Knoten", + "savedNodes" : "Gespeicherte Nodes", "savedType" : "Gespeichert __type__", "saveFailed" : "Speichern fehlgeschlagen: __message__", - "filename" : "Name der Datei", - "folder" : "Ordner", - "filenamePlaceholder" : "Datei", - "fullFilenamePlaceholder" : "a/b/Datei", - "folderPlaceholder" : "a/b", - "breadcrumb" : "Bibliothek" + "types": { + "examples" : "Beispiele" + } }, "palette" : { "noInfo" : "Keine Informationen verfügbar", - "filter" : "Filterknoten", + "filter" : "Filter Nodes", "search" : "Suchmodule", "addCategory" : "Neu hinzufügen ...", "label" : { - "subflows" : "untergeordnete Nachrichtenflüsse", + "subflows" : "Subflows", "input" : "Eingabe", "output" : "Ausgabe", "function" : "Funktion", @@ -330,15 +322,15 @@ "advanced" : "fortgeschritten" }, "event" : { - "nodeAdded" : "Knoten zur Palette hinzugefügt:", - "nodeAdded_plural" : "Die Palette wurde der Palette hinzugefügt.", - "nodeRemoved" : "Knoten aus Palette entfernt:", - "nodeRemoved_plural" : "Knoten aus Palette entfernt:", - "nodeEnabled" : "Knoten aktiviert:", - "nodeEnabled_plural" : "Knoten aktiviert:", - "nodeDisabled" : "Knoten inaktiviert:", - "nodeDisabled_plural" : "Knoten inaktiviert:", - "nodeUpgraded" : "Knotenmodul __module__ aktualisiert auf Version __version__" + "nodeAdded" : "Node zur Palette hinzugefügt:", + "nodeAdded_plural" : "Die Nodes wurde der Palette hinzugefügt.", + "nodeRemoved" : "Node aus Palette entfernt:", + "nodeRemoved_plural" : "Nodes aus Palette entfernt:", + "nodeEnabled" : "Node aktiviert:", + "nodeEnabled_plural" : "Nodes aktiviert:", + "nodeDisabled" : "Node inaktiviert:", + "nodeDisabled_plural" : "Nodes inaktiviert:", + "nodeUpgraded" : "Node-Modul __module__ aktualisiert auf Version __version__" }, "editor" : { "title" : "Palette verwalten", @@ -362,8 +354,8 @@ "yearsMonthsV" : "____ Jahre, __count__ Monat vor", "yearsMonthsV_plural" : "____ Jahre, __count__ Monaten" }, - "nodeCount" : "__label__, Knoten", - "nodeCount_plural" : "__label__ Knoten", + "nodeCount" : "__label__, Node", + "nodeCount_plural" : "__label__ Nodes", "moduleCount" : "__count__ Modul verfügbar", "moduleCount_plural" : "__count__-Module verfügbar", "inuse" : "im Gebrauch", @@ -377,14 +369,14 @@ "install" : "installieren", "installed" : "installiert", "loading" : "Kataloge werden geladen ...", - "tab-nodes" : "Knoten", + "tab-nodes" : "Nodes", "tab-install" : "installieren", "sort" : "Sortierung:", "sortAZ" : "a-z", "sortRecent" : "kürzlich", "more" : "+ __count__ mehr", "errors" : { - "catalogLoadFailed" : "

Fehler beim Laden des Knotenkatalogs.

Weitere Informationen finden Sie in der Browserkonsole.

", + "catalogLoadFailed" : "

Fehler beim Laden des Node-Katalogs.

Weitere Informationen finden Sie in der Browserkonsole.

", "installFailed" : "

Installation fehlgeschlagen: __module__

__message__

Überprüfen Sie das Protokoll auf weitere Informationen.

", "removeFailed" : "

Entfernen fehlgeschlagen: __module__

__message__

Überprüfen Sie das Protokoll auf weitere Informationen.

", "updateFailed" : "

Aktualisierung fehlgeschlagen: __module__

__message__

Überprüfen Sie das Protokoll auf weitere Informationen.

", @@ -393,22 +385,22 @@ }, "confirm" : { "install" : { - "body" : "

Installieren von '__module__'

Vor der Installation von lesen Sie bitte die Dokumentation des Knotens. Einige Knoten haben Abhängigkeiten, die nicht automatisch aufgelöst werden können und einen Neustart von 'Node-RED' erfordern.

", - "title" : "Knoten installieren" + "body" : "

Installieren von '__module__'

Vor der Installation von lesen Sie bitte die Dokumentation des Nodes. Einige Nodes haben Abhängigkeiten, die nicht automatisch aufgelöst werden können und einen Neustart von 'Node-RED' erfordern.

", + "title" : "Nodes installieren" }, "remove" : { - "body" : "

Entfernen von '__module__'

-Der Knoten deinstalliert ihn aus Node-RED. Der Knoten kann weiterhin Ressourcen verwenden, bis Node-RED erneut gestartet wird.

", - "title" : "Knoten entfernen" + "body" : "

Entfernen von '__module__'

-Der Node deinstalliert ihn aus Node-RED. Der Node kann weiterhin Ressourcen verwenden, bis Node-RED erneut gestartet wird.

", + "title" : "Nodes entfernen" }, "update" : { - "body" : "

Aktualisieren von '__module__'

Für die Aktualisierung des Knotens ist ein Neustart von 'Node-RED' erforderlich, damit die Aktualisierung abgeschlossen werden kann. Dies muss manuell geschehen.

", - "title" : "Knoten aktualisieren" + "body" : "

Aktualisieren von '__module__'

Für die Aktualisierung des Nodes ist ein Neustart von 'Node-RED' erforderlich, damit die Aktualisierung abgeschlossen werden kann. Dies muss manuell geschehen.

", + "title" : "Nodes aktualisieren" }, "cannotUpdate" : { - "body" : "Es ist eine Aktualisierung für diesen Knoten verfügbar, aber sie ist nicht an einer Position installiert, die vom Palettenmanager aktualisiert werden kann.

Weitere Informationen zum Aktualisieren dieses Knotens finden Sie in der Dokumentation." + "body" : "Es ist eine Aktualisierung für diesen Node verfügbar, aber sie ist nicht an einer Position installiert, die vom Palettenmanager aktualisiert werden kann.

Weitere Informationen zum Aktualisieren dieses Nodes finden Sie in der Dokumentation." }, "button" : { - "review" : "Knoteninformationen öffnen", + "review" : "Node-Informationen öffnen", "install" : "installieren", "remove" : "Entfernen", "update" : "Aktualisieren" @@ -418,10 +410,10 @@ }, "sidebar" : { "info" : { - "name" : "Knoteninformationen", + "name" : "Node-Informationen", "tabName" : "Name", "label" : "info", - "node" : "Knoten", + "node" : "Node", "type" : "Typ", "id" : "ID", "status" : "Status", @@ -437,23 +429,23 @@ "showLess" : "Weniger anzeigen", "flow" : "Flow", "selection" : "Auswahl", - "nodes" : "__count__ Knoten", + "nodes" : "__count__ Nodes", "flowDesc" : "Beschreibung des Flows", "subflowDesc" : "Beschreibung des Subflows", - "nodeHelp" : "Knotenhilfe", + "nodeHelp" : "Node-Hilfe", "none" : "Keine", "arrayItems" : "__count__ items", "showTips" : "Sie können die Tipps in der Anzeige \"Einstellungen\" öffnen." }, "config" : { - "name" : "Konfigurationsknoten", + "name" : "Konfigurations-Node", "label" : "Konfiguration", "global" : "Bei allen Flows", "none" : "keine", "subflows" : "Subflows", "flows" : "Flows", - "filterUnused" : "Nicht verwendet", "filterAll" : "alle", + "filterUnused" : "Nicht verwendet", "filtered" : "__count__ verdeckt" }, "context" : { @@ -462,7 +454,7 @@ "none" : "keine ausgewählt", "refresh" : "Aktualisierung zum Laden", "empty" : "leer", - "node" : "Knoten", + "node" : "Node", "flow" : "Flow", "global" : "Global" }, @@ -610,13 +602,13 @@ }, "typedInput" : { "type" : { - "str" : "Zeichenfolge", - "num" : "Anzahl", + "str" : "String", + "num" : "Number", "re" : "Regulärer Ausdruck", "bool" : "boolean", "json" : "JSON", - "bin" : "Puffer", - "date" : "Zeitmarke", + "bin" : "Buffer", + "date" : "timestamp", "jsonata" : "Ausdruck", "env" : "env, Variable" } @@ -626,7 +618,7 @@ }, "search" : { "empty" : "Keine Übereinstimmungen gefunden", - "addNode" : "Knoten hinzufügen ..." + "addNode" : "Node hinzufügen ..." }, "expressionEditor" : { "functions" : "Funktionen", @@ -658,10 +650,10 @@ "title" : "Markdown-Editor" }, "bufferEditor" : { - "title" : "Puffereditor", + "title" : "Buffereditor", "modeString" : "Als UTF-8-Zeichenfolge bearbeiten", "modeArray" : "Als JSON-Array bearbeiten", - "modeDesc" : "

Puffereditor

Der Puffertyp wird als JSON-Array mit Bytewerten gespeichert. Der Editor versucht, den eingegebenen Wert als JSON-Array zu parsen. Wenn es sich nicht um ein gültiges JSON handelt, wird es als UTF-8-Zeichenfolge behandelt und in ein Array der einzelnen Zeichencodepunkte konvertiert.

Beispiel: Der Wert Hello World wird in das JSON-Array konvertiert:

 [ 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100] 

" + "modeDesc" : "

Buffereditor

Der Buffertyp wird als JSON-Array mit Bytewerten gespeichert. Der Editor versucht, den eingegebenen Wert als JSON-Array zu parsen. Wenn es sich nicht um ein gültiges JSON handelt, wird es als UTF-8-Zeichenfolge behandelt und in ein Array der einzelnen Zeichencodepunkte konvertiert.

Beispiel: Der Wert Hello World wird in das JSON-Array konvertiert:

 [ 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100] 

" }, "projects" : { "config-git" : "Git-Client konfigurieren", @@ -826,4 +818,4 @@ "code" : "code" } } -} \ No newline at end of file +} diff --git a/packages/node_modules/@node-red/editor-client/locales/de/infotips.json b/packages/node_modules/@node-red/editor-client/locales/de/infotips.json index 59f796055..4cec02f31 100755 --- a/packages/node_modules/@node-red/editor-client/locales/de/infotips.json +++ b/packages/node_modules/@node-red/editor-client/locales/de/infotips.json @@ -1,23 +1,23 @@ { "info" : { - "tip0" : "Sie können die ausgewählten Knoten oder Verbindungen mit {{ core:delete-selection }} entfernen.", - "tip1" : "Suche nach Knoten mit {{ core:search }}", + "tip0" : "Sie können die ausgewählten Nodes oder Verbindungen mit {{ core:delete-selection }} entfernen.", + "tip1" : "Suche nach Nodes mit {{ core:search }}", "tip2" : "{{ core:toggle-sidebar }} schaltet die Ansicht dieser Seitenleiste ein.", - "tip3" : "Sie können Ihre Palette von Knoten mit {{ core:manage-palette }} verwalten.", - "tip4" : "Ihre Flow-Konfigurationsknoten werden in der Seitenleiste angezeigt. Es kann über das Menü oder mit {{ core:show-config-tab }} aufgerufen werden.", + "tip3" : "Sie können Ihre Palette von Nodes mit {{ core:manage-palette }} verwalten.", + "tip4" : "Ihre Flow-Konfigurations-Nodes werden in der Seitenleiste angezeigt. Es kann über das Menü oder mit {{ core:show-config-tab }} aufgerufen werden.", "tip5" : "Aktiviert oder inaktiviert diese Tipps von der Option in den Einstellungen", - "tip6" : "Verschieben Sie die ausgewählten Knoten mit Hilfe der [left] [up] [down] und [right] Tasten. Halten Sie [Shift] gedrückt, um das Fenster weiter zu schieben", - "tip7" : "Wenn Sie einen Knoten auf eine Verbindung ziehen, wird er in die Verbindung eingefügt.", - "tip8" : "Die ausgewählten Knoten exportieren oder die aktuelle Registerkarte mit {{ core:show-export-dialog }}", + "tip6" : "Verschieben Sie die ausgewählten Nodes mit Hilfe der [left] [up] [down] und [right] Tasten. Halten Sie [Shift] gedrückt, um das Fenster weiter zu schieben", + "tip7" : "Wenn Sie einen Node auf eine Verbindung ziehen, wird er in die Verbindung eingefügt.", + "tip8" : "Die ausgewählten Nodes exportieren oder die aktuelle Registerkarte mit {{ core:show-export-dialog }}", "tip9" : "Importieren Sie einen Flow, indem Sie sein JSON in den Editor ziehen oder mit {{ core:show-import-dialog }}.", - "tip10" : "[Umschalt] [Klicken] und ziehen Sie auf einen Knotenanschluss, um alle angeschlossenen Verbindungen oder nur die ausgewählte zu verschieben.", + "tip10" : "[Umschalt] [Klicken] und ziehen Sie auf einen Node-Anschluss, um alle angeschlossenen Verbindungen oder nur die ausgewählte zu verschieben.", "tip11" : "Die Registerkarte \"Info\" mit {{ core:show-info-tab }} oder der Registerkarte \"Debug\" mit {{ core:show-debug-tab }} anzeigen", "tip12" : "[ctrl] [Klicken] in den Arbeitsbereich, um den Schnellhinzufügedialog zu öffnen.", - "tip13" : "Halten Sie [ctrl] gedrückt, wenn Sie auf einem Knotenanschluss klicken, um eine Schnellverbindung zu aktivieren.", - "tip14" : "Halten Sie [Umschalt] gedrückt, wenn Sie auf einen Knoten klicken, um auch alle verbundenen Knoten auszuwählen.", - "tip15" : "Halten Sie [ctrl] gedrückt, wenn Sie auf einen Knoten klicken, um ihn aus der aktuellen Auswahl hinzuzufügen oder zu entfernen.", + "tip13" : "Halten Sie [ctrl] gedrückt, wenn Sie auf einem Node-Anschluss klicken, um eine Schnellverbindung zu aktivieren.", + "tip14" : "Halten Sie [Umschalt] gedrückt, wenn Sie auf einen Node klicken, um auch alle verbundenen Nodes auszuwählen.", + "tip15" : "Halten Sie [ctrl] gedrückt, wenn Sie auf einen Node klicken, um ihn aus der aktuellen Auswahl hinzuzufügen oder zu entfernen.", "tip16" : "Indexzungen wechseln mit {{ core:show-previous-tab }} und {{ core:show-next-tab }}", - "tip17" : "Sie können die Änderungen im Editierrahmen des Knotens mit {{ core:confirm-edit-tray }} bestätigen oder sie mit {{ core:cancel-edit-tray }} abbrechen.", - "tip18" : "Durch Drücken von {{ core:edit-selected-node }} wird der erste Knoten in der aktuellen Auswahl bearbeitet." + "tip17" : "Sie können die Änderungen im Editierrahmen des Nodes mit {{ core:confirm-edit-tray }} bestätigen oder sie mit {{ core:cancel-edit-tray }} abbrechen.", + "tip18" : "Durch Drücken von {{ core:edit-selected-node }} wird der erste Node in der aktuellen Auswahl bearbeitet." } } \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/locales/de/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/de/jsonata.json index a7cf12715..7859ca844 100755 --- a/packages/node_modules/@node-red/editor-client/locales/de/jsonata.json +++ b/packages/node_modules/@node-red/editor-client/locales/de/jsonata.json @@ -53,7 +53,7 @@ }, "$now" : { "args" : "", - "desc" : "Generiert eine Zeitmarke im ISO-8601-kompatiblen Format und gibt sie als Zeichenfolge zurück." + "desc" : "Generiert einen Zeitstempel im ISO-8601-kompatiblen Format und gibt sie als Zeichenfolge zurück." }, "$base64encode" : { "args" : "Zeichenfolge", @@ -201,7 +201,7 @@ }, "$fromMillis" : { "args" : "Anzahl", - "desc" : "Konvertieren Sie eine Zahl, die Millisekunden seit der Unix-Epoche (1. Januar 1970 (UTC)) in eine Zeitmarkenzeichenfolge im ISO 8601-Format darstellt." + "desc" : "Konvertieren Sie eine Zahl, die Millisekunden seit der Unix-Epoche (1. Januar 1970 (UTC)) enthält in eine Zeitangabe im ISO 8601-Format." }, "$formatNumber" : { "args" : "Zahl, Bild [, Optionen]", @@ -212,8 +212,8 @@ "desc" : "Transformiere die `Zahl` in eine Zeichenfolge und formatiert sie in eine ganze Zahl, die in der durch das `radix` -Argument angegebenen Zahlenbasis dargestellt wird. Wenn 'radix' nicht angegeben wird, wird standardmäßig die Basis 10 verwendet. 'radix` kann zwischen 2 und 36 liegen, andernfalls wird ein Fehler ausgelöst." }, "$toMillis" : { - "args" : "Zeitmarke", - "desc" : "Konvertieren Sie eine Zeichenfolge `Zeitmarke' im ISO 8601-Format in die Anzahl der Millisekunden seit der Unix-Epoche (1. Januar 1970 (UTC)) als Zahl. Es wird ein Fehler ausgelöst, wenn die Zeichenfolge nicht das richtige Format hat." + "args" : "timestamp", + "desc" : "Konvertieren Sie eine Zeitangabe im ISO 8601-Format in die Anzahl der Millisekunden seit der Unix-Epoche (1. Januar 1970 (UTC)) als Zahl. Es wird ein Fehler ausgelöst, wenn die Zeichenfolge nicht das richtige Format hat." }, "$env" : { "args" : "arg", diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index e8daafc65..ad985e785 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -28,7 +28,8 @@ "status": "Status", "enabled": "Enabled", "disabled":"Disabled", - "info": "Description" + "info": "Description", + "selectNodes": "Click nodes to select" }, "menu": { "label": { @@ -43,6 +44,8 @@ "ltr": "Left-to-right", "rtl": "Right-to-left", "auto": "Contextual", + "language": "Language", + "browserDefault": "Browser default", "flowVertical": "Vertical flow" }, "sidebar": { @@ -60,9 +63,6 @@ "export": "Export", "search": "Search flows", "searchInput": "search your flows", - "clipboard": "Clipboard", - "library": "Library", - "examples": "Examples", "subflows": "Subflows", "createSubflow": "Create Subflow", "selectionToSubflow": "Selection to Subflow", @@ -155,6 +155,7 @@ } }, "clipboard": { + "clipboard": "Clipboard", "nodes": "Nodes", "node": "__count__ node", "node_plural": "__count__ nodes", @@ -164,7 +165,6 @@ "flow_plural": "__count__ flows", "subflow": "__count__ subflow", "subflow_plural": "__count__ subflows", - "selectNodes": "Select the text above and copy to the clipboard.", "pasteNodes": "Paste flow json or", "selectFile": "select a file to import", "importNodes": "Import nodes", @@ -183,7 +183,11 @@ "all":"all flows", "compact":"compact", "formatted":"formatted", - "copy": "Export to clipboard" + "copy": "Copy to clipboard", + "export": "Export to library", + "exportAs": "Export as", + "overwrite": "Replace", + "exists": "

\"__file__\" already exists.

Do you want to replace it?

" }, "import": { "import": "Import to", @@ -307,10 +311,12 @@ "addNewType": "Add new __type__...", "nodeProperties": "node properties", "label": "Label", + "color": "Color", "portLabels": "Port labels", "labelInputs": "Inputs", "labelOutputs": "Outputs", "settingIcon": "Icon", + "default": "default", "noDefaultLabel": "none", "defaultLabel": "use default label", "searchIcons": "Search icons", @@ -318,8 +324,43 @@ "description": "Description", "show": "Show", "hide": "Hide", + "locale": "Select UI Language", + "icon": "Icon", + "inputType": "Input type", + "inputs" : { + "input": "input", + "select": "select", + "checkbox": "checkbox", + "spinner": "spinner", + "none": "none", + "hidden": "hide property" + }, + "types": { + "str": "string", + "num": "number", + "bool": "bool", + "json": "JSON", + "bin": "buffer", + "env": "env variable" + }, + "menu": { + "input": "input", + "select": "select", + "checkbox": "checkbox", + "spinner": "spinner", + "hidden": "label only" + }, + "select": { + "label": "Label", + "value": "Value" + }, + "spinner": { + "min": "Minimum", + "max": "Maximum" + }, "errors": { - "scopeChange": "Changing the scope will make it unavailable to nodes in other flows that use it" + "scopeChange": "Changing the scope will make it unavailable to nodes in other flows that use it", + "invalidProperties": "Invalid properties:" } }, "keyboard": { @@ -347,25 +388,26 @@ "pasteNode": "Paste nodes", "undoChange": "Undo the last change performed", "searchBox": "Open search box", - "managePalette": "Manage palette" + "managePalette": "Manage palette", + "actionList":"Action list" }, "library": { + "library": "Library", "openLibrary": "Open Library...", "saveToLibrary": "Save to Library...", "typeLibrary": "__type__ library", "unnamedType": "Unnamed __type__", - "exportToLibrary": "Export nodes to library", + "exportedToLibrary": "Nodes exported to library", "dialogSaveOverwrite": "A __libraryType__ called __libraryName__ already exists. Overwrite?", "invalidFilename": "Invalid filename", "savedNodes": "Saved nodes", "savedType": "Saved __type__", "saveFailed": "Save failed: __message__", - "filename": "Filename", - "folder": "Folder", - "filenamePlaceholder": "file", - "fullFilenamePlaceholder": "a/b/file", - "folderPlaceholder": "a/b", - "breadcrumb": "Library" + "newFolder": "New folder", + "types": { + "local": "Local", + "examples": "Examples" + } }, "palette": { "noInfo": "no information available", @@ -374,9 +416,13 @@ "addCategory": "Add new...", "label": { "subflows": "subflows", + "network": "network", + "common": "common", "input": "input", "output": "output", "function": "function", + "sequence": "sequence", + "parser": "parser", "social": "social", "storage": "storage", "analysis": "analysis", @@ -513,8 +559,10 @@ "none": "none", "subflows": "subflows", "flows": "flows", - "filterUnused":"unused", - "filterAll":"all", + "filterAll": "all", + "showAllConfigNodes": "Show all config nodes", + "filterUnused": "unused", + "showAllUnusedConfigNodes": "Show all unused config nodes", "filtered": "__count__ hidden" }, "context": { @@ -526,7 +574,10 @@ "node": "Node", "flow": "Flow", "global": "Global", - "deleteConfirm": "Are you sure you want to delete this item?" + "deleteConfirm": "Are you sure you want to delete this item?", + "autoRefresh": "Refresh on selection change", + "refrsh": "Refresh", + "delete": "Delete" }, "palette": { "name": "Palette management", @@ -541,6 +592,7 @@ "noSummaryAvailable": "No summary available", "editDescription": "Edit project description", "editDependencies": "Edit project dependencies", + "noDescriptionAvailable": "No description available", "editReadme": "Edit README.md", "showProjectSettings": "Show project settings", "projectSettings": { @@ -727,9 +779,21 @@ "jsEditor": { "title": "JavaScript editor" }, + "textEditor": { + "title": "Text editor" + }, "jsonEditor": { "title": "JSON editor", - "format": "format JSON" + "format": "format JSON", + "rawMode": "Edit JSON", + "uiMode": "Visual editor", + "insertAbove": "Insert above", + "insertBelow": "Insert below", + "addItem": "Add item", + "copyPath": "Copy path to item", + "expandItems": "Expand items", + "collapseItems": "Collapse items", + "duplicate": "Duplicate" }, "markdownEditor": { "title": "Markdown editor", @@ -919,8 +983,17 @@ }, "editor-tab": { "properties": "Properties", + "envProperties": "Environment Variables", "description": "Description", "appearance": "Appearance", - "env": "Environment Variables" + "preview": "UI Preview", + "defaultValue": "Default value" + }, + "languages" : { + "de": "German", + "en-US": "English", + "ja": "Japanese", + "ko": "Korean", + "zh-CN": "Chinese(Simplified)" } } diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json index 429fb7cfd..d1d7dcefb 100755 --- a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json @@ -28,7 +28,8 @@ "status": "状態", "enabled": "有効", "disabled": "無効", - "info": "詳細" + "info": "詳細", + "selectNodes": "ノードをクリックして選択" }, "menu": { "label": { @@ -43,6 +44,8 @@ "ltr": "左から右", "rtl": "右から左", "auto": "文脈", + "language": "表示言語", + "browserDefault": "ブラウザのデフォルト", "flowVertical": "縦フロー" }, "sidebar": { @@ -60,9 +63,6 @@ "export": "書き出し", "search": "ノードを検索", "searchInput": "ノードを検索", - "clipboard": "クリップボード", - "library": "ライブラリ", - "examples": "サンプル", "subflows": "サブフロー", "createSubflow": "サブフローを作成", "selectionToSubflow": "選択部分をサブフロー化", @@ -81,7 +81,7 @@ "projects-new": "新規", "projects-open": "開く", "projects-settings": "設定", - "showNodeLabelDefault": "追加したノードのラベルを表示する" + "showNodeLabelDefault": "追加したノードのラベルを表示" } }, "actions": { @@ -155,6 +155,7 @@ } }, "clipboard": { + "clipboard": "クリップボード", "nodes": "ノード", "node": "__count__ 個のノード", "node_plural": "__count__ 個のノード", @@ -164,7 +165,6 @@ "flow_plural": "__count__ 個のフロー", "subflow": "__count__ 個のサブフロー", "subflow_plural": "__count__ 個のサブフロー", - "selectNodes": "上のテキストを選択し、クリップボードへコピーしてください", "pasteNodes": "JSON形式のフローデータを貼り付けてください", "selectFile": "読み込むファイルを選択してください", "importNodes": "フローをクリップボートから読み込み", @@ -183,7 +183,11 @@ "all": "全てのタブ", "compact": "インデントのないJSONフォーマット", "formatted": "インデント付きのJSONフォーマット", - "copy": "書き出し" + "copy": "書き出し", + "export": "ライブラリに書き出し", + "exportAs": "書き出し先", + "overwrite": "更新", + "exists": "

\"__file__\"は既に存在します。

更新しますか?

" }, "import": { "import": "読み込み先", @@ -307,10 +311,12 @@ "addNewType": "新規に __type__ を追加...", "nodeProperties": "プロパティ", "label": "ラベル", + "color": "色", "portLabels": "ポートラベル", "labelInputs": "入力", "labelOutputs": "出力", "settingIcon": "アイコン", + "default": "デフォルト", "noDefaultLabel": "なし", "defaultLabel": "既定のラベルを使用", "searchIcons": "アイコンを検索", @@ -318,8 +324,43 @@ "description": "詳細", "show": "表示", "hide": "非表示", + "locale": "UI言語の選択", + "icon": "記号", + "inputType": "入力形式", + "inputs": { + "input": "入力", + "select": "メニュー", + "checkbox": "チェックボックス", + "spinner": "スピナー", + "none": "無し", + "hidden": "非表示" + }, + "types": { + "str": "文字列", + "num": "数値", + "bool": "真偽", + "json": "JSON", + "bin": "バッファ", + "env": "環境変数" + }, + "menu": { + "input": "入力", + "select": "選択", + "checkbox": "チェックボックス", + "spinner": "数値", + "hidden": "ラベルのみ" + }, + "select": { + "label": "ラベル", + "value": "値" + }, + "spinner": { + "min": "最小値", + "max": "最大値" + }, "errors": { - "scopeChange": "スコープの変更は、他のフローで使われているノードを無効にします" + "scopeChange": "スコープの変更は、他のフローで使われているノードを無効にします", + "invalidProperties": "プロパティが不正です:" } }, "keyboard": { @@ -347,25 +388,26 @@ "pasteNode": "ノードを貼り付け", "undoChange": "変更操作を戻す", "searchBox": "ノードを検索", - "managePalette": "パレットの管理" + "managePalette": "パレットの管理", + "actionList": "動作一覧" }, "library": { + "library": "ライブラリ", "openLibrary": "ライブラリを開く", "saveToLibrary": "ライブラリへ保存", "typeLibrary": "__type__ ライブラリ", "unnamedType": "名前なし __type__", - "exportToLibrary": "ライブラリへフローを書き出す", + "exportedToLibrary": "ライブラリにノードを書き出しました", "dialogSaveOverwrite": "__libraryName__ という __libraryType__ は既に存在しています 上書きしますか?", "invalidFilename": "不正なファイル名", "savedNodes": "フローを保存しました", "savedType": "__type__ を保存しました", "saveFailed": "保存に失敗しました: __message__", - "filename": "ファイル名", - "folder": "フォルダ", - "filenamePlaceholder": "ファイル", - "fullFilenamePlaceholder": "a/b/file", - "folderPlaceholder": "a/b", - "breadcrumb": "ライブラリ" + "newFolder": "新規フォルダ", + "types": { + "local": "ローカル", + "examples": "サンプル" + } }, "palette": { "noInfo": "情報がありません", @@ -374,9 +416,13 @@ "addCategory": "新規追加...", "label": { "subflows": "サブフロー", + "network": "ネットワーク", + "common": "共通", "input": "入力", "output": "出力", "function": "機能", + "sequence": "シーケンス", + "parser": "パーサ", "social": "ソーシャル", "storage": "ストレージ", "analysis": "分析", @@ -513,8 +559,10 @@ "none": "なし", "subflows": "サブフロー", "flows": "フロー", - "filterUnused": "未使用", "filterAll": "全て", + "showAllConfigNodes": "全設定ノードを表示", + "filterUnused": "未使用", + "showAllUnusedConfigNodes": "未使用の全設定ノードを表示", "filtered": "__count__ 個が無効" }, "context": { @@ -523,10 +571,13 @@ "none": "選択されていません", "refresh": "読み込みのため更新してください", "empty": "データが存在しません", - "node": "Node", - "flow": "Flow", - "global": "Global", - "deleteConfirm": "データを削除しても良いですか?" + "node": "ノード", + "flow": "フロー", + "global": "グローバル", + "deleteConfirm": "データを削除しても良いですか?", + "autoRefresh": "選択対象が変化した場合更新", + "refrsh": "更新", + "delete": "削除" }, "palette": { "name": "パレットの管理", @@ -538,9 +589,10 @@ "description": "詳細", "dependencies": "依存関係", "settings": "設定", - "noSummaryAvailable": "サマリが存在しません", + "noSummaryAvailable": "要約が存在しません", "editDescription": "プロジェクトの詳細を編集", "editDependencies": "プロジェクトの依存関係を編集", + "noDescriptionAvailable": "詳細が存在しません", "editReadme": "README.mdを編集", "showProjectSettings": "プロジェクト設定を表示", "projectSettings": { @@ -726,9 +778,21 @@ "jsEditor": { "title": "JavaScriptエディタ" }, + "textEditor": { + "title": "テキストエディタ" + }, "jsonEditor": { "title": "JSONエディタ", - "format": "JSONフォーマット" + "format": "JSONフォーマット", + "rawMode": "JSONを編集", + "uiMode": "ビジュアルエディタ", + "insertAbove": "上に挿入", + "insertBelow": "下に挿入", + "addItem": "要素を追加", + "copyPath": "要素のパスをコピー", + "expandItems": "要素を展開", + "collapseItems": "要素を折り畳む", + "duplicate": "複製" }, "markdownEditor": { "title": "マークダウンエディタ", @@ -892,7 +956,7 @@ "confirm": "

デプロイされていない変更は失われます。

続けますか?

" }, "send-req": { - "auth-req": "リポジトリ対する認証が必要です", + "auth-req": "リポジトリに対する認証が必要です", "username": "ユーザ名", "password": "パスワード", "passphrase": "パスフレーズ", @@ -918,8 +982,17 @@ }, "editor-tab": { "properties": "プロパティ", + "envProperties": "環境変数", "description": "説明", "appearance": "外観", - "env": "環境変数" + "preview": "UIプレビュー", + "defaultValue": "デフォルト値" + }, + "languages": { + "de": "ドイツ語", + "en-US": "英語", + "ja": "日本語", + "ko": "韓国語", + "zh-CN": "中国語(簡体)" } } diff --git a/packages/node_modules/@node-red/editor-client/locales/ko/editor.json b/packages/node_modules/@node-red/editor-client/locales/ko/editor.json index da7c69e64..3c12e116a 100755 --- a/packages/node_modules/@node-red/editor-client/locales/ko/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/ko/editor.json @@ -58,9 +58,6 @@ "export": "내보내기", "search": "플로우 겅색", "searchInput": "플로우 검색", - "clipboard": "클립보드", - "library": "라이브러리", - "examples": "예시", "subflows": "보조 플로우", "createSubflow": "보조 플로우 생성", "selectionToSubflow": "보조 플로우 선택", @@ -148,6 +145,7 @@ } }, "clipboard": { + "clipboard": "클립보드", "nodes": "노드", "node": "__count__ 개의 노드", "node_plural": "__count__ 개의 노드", @@ -157,7 +155,6 @@ "flow_plural": "__count__ 개의 플로우", "subflow": "__count__ 개의 서브 플로우", "subflow_plural": "__count__ 개의 서브 플로우", - "selectNodes": "텍스트를 선택하고 클립보드에 복사하세요", "pasteNodes": "여기에 노드를 붙여넣기 하세요", "selectFile": "불러올 파일을 선택하세요", "importNodes": "노드 불러오기", @@ -276,7 +273,6 @@ "deleteSubflow": "서브 플로우 삭제", "info": "상세내역", "category": "카테고리", - "format": "Markdown 형식", "errors": { "noNodesSelected": "서브 플로우를 생성할 수 없습니다 : 노드가 선택되지 않았습니다", "multipleInputsToSelection": "서브 플로우를 생성할 수 없습니다 : 복수의 입력이 선택되었습니다" @@ -338,22 +334,19 @@ "managePalette": "팔렛트 관리" }, "library": { + "library": "라이브러리", "openLibrary": "라이브러리 열기...", "saveToLibrary": "라이브러리로 저장...", "typeLibrary": "__type__ 라이브러리", "unnamedType": "이름없는 __type__", - "exportToLibrary": "라이브러리로 노드 내보내기", "dialogSaveOverwrite": "__libraryType__이 __libraryName__으로 이미 등록되어있습니다. 덮어쓸까요?", "invalidFilename": "파일명이 올바르지 않습니다", "savedNodes": "저장된 노드", "savedType": "저장된 __type__", "saveFailed": "저장 실패 : __message__", - "filename": "파일명", - "folder": "폴더명", - "filenamePlaceholder": "파일", - "fullFilenamePlaceholder": "a/b/file", - "folderPlaceholder": "a/b", - "breadcrumb": "라이브러리" + "types": { + "examples": "예시" + } }, "palette": { "noInfo": "정보 없음", @@ -501,8 +494,8 @@ "none": "없음", "subflows": "보조 플로우", "flows": "플로우", - "filterUnused": "미사용", "filterAll": "전체", + "filterUnused": "미사용", "filtered": "__count__ 개 숨김" }, "context": { @@ -904,4 +897,4 @@ "description": "상세 내역", "appearance": "모양" } -} \ No newline at end of file +} diff --git a/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json b/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json index b7c1313a3..3c23fc553 100644 --- a/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json @@ -51,9 +51,6 @@ "export": "导出", "search": "查找流程", "searchInput": "查找流程", - "clipboard": "剪贴板", - "library": "库", - "examples": "例子", "subflows": "子流程", "createSubflow": "新建子流程", "selectionToSubflow": "将选择部分更改为子流程", @@ -101,8 +98,8 @@ } }, "clipboard": { + "clipboard": "剪贴板", "nodes": "节点", - "selectNodes": "选择上面的文本并复制到剪贴板", "pasteNodes": "在这里粘贴节点", "importNodes": "导入节点", "exportNodes": "导出节点至剪贴板", @@ -238,6 +235,7 @@ "managePalette": "管理面板" }, "library": { + "library": "库", "openLibrary": "打开库...", "saveToLibrary": "保存到库...", "typeLibrary": "__type__类型库", @@ -248,12 +246,9 @@ "savedNodes": "保存的节点", "savedType": "已保存__type__", "saveFailed": "保存失败: __message__", - "filename": "文件名", - "folder": "文件夹", - "filenamePlaceholder": "文件", - "fullFilenamePlaceholder": "a/b/文件", - "folderPlaceholder": "a/b", - "breadcrumb": "库" + "types": { + "examples": "例子" + } }, "palette": { "noInfo": "无可用信息", @@ -391,8 +386,8 @@ "none": "无", "subflows": "子流程", "flows": "流程", - "filterUnused": "未使用", "filterAll": "所有", + "filterUnused": "未使用", "filtered": "__count__ 个隐藏" }, "palette": { diff --git a/packages/node_modules/@node-red/editor-client/package.json b/packages/node_modules/@node-red/editor-client/package.json index 06855cca3..441a19629 100644 --- a/packages/node_modules/@node-red/editor-client/package.json +++ b/packages/node_modules/@node-red/editor-client/package.json @@ -1,6 +1,6 @@ { "name": "@node-red/editor-client", - "version": "0.20.5", + "version": "1.0.2", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.png deleted file mode 100644 index a2f5373e2..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.svg new file mode 100644 index 000000000..c4511ba87 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.png deleted file mode 100644 index e83638234..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg new file mode 100644 index 000000000..0b0069272 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.png deleted file mode 100644 index b5f3a9870..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.svg new file mode 100644 index 000000000..fc3221f1c --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.png deleted file mode 100644 index 775374d17..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg new file mode 100644 index 000000000..e4448e10f --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.png deleted file mode 100644 index 3174716cc..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.svg new file mode 100644 index 000000000..af540dd3d --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.png deleted file mode 100644 index 4d982a9c8..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg new file mode 100644 index 000000000..12d4c8972 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.png deleted file mode 100644 index 197fc610d..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg new file mode 100644 index 000000000..00f319014 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.png b/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.png deleted file mode 100644 index e38f39146..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.svg b/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.svg new file mode 100644 index 000000000..de75fbe4e --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/node-changed.png b/packages/node_modules/@node-red/editor-client/src/images/icons/node-changed.png deleted file mode 100644 index 38a179444..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/icons/node-changed.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/node-error.png b/packages/node_modules/@node-red/editor-client/src/images/icons/node-error.png deleted file mode 100644 index c20c8e85a..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/icons/node-error.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/node-red.png b/packages/node_modules/@node-red/editor-client/src/images/node-red.png deleted file mode 100644 index a60c26729..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/node-red.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/node-red.svg b/packages/node_modules/@node-red/editor-client/src/images/node-red.svg new file mode 100644 index 000000000..c62b35866 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/node-red.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/pw_maze_white.png b/packages/node_modules/@node-red/editor-client/src/images/pw_maze_white.png deleted file mode 100644 index 66464831c..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/pw_maze_white.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.png b/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.png deleted file mode 100644 index 022777c4d..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.svg b/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.svg new file mode 100644 index 000000000..0a0f4b45f --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png deleted file mode 100644 index 247371fe5..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg new file mode 100644 index 000000000..8e91ec38e --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png deleted file mode 100644 index 5f5d2404e..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg new file mode 100644 index 000000000..90105811f --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png deleted file mode 100644 index 615c8dd4f..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg new file mode 100644 index 000000000..efc427ac9 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png deleted file mode 100644 index 9530983de..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg new file mode 100644 index 000000000..8eee38409 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png deleted file mode 100644 index 0ea51da00..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg new file mode 100644 index 000000000..a24515f30 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png deleted file mode 100644 index 704105ce5..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg new file mode 100644 index 000000000..500ca3926 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png deleted file mode 100644 index 57ac8761f..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg new file mode 100644 index 000000000..978c89149 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png deleted file mode 100644 index 87deb02ae..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg new file mode 100644 index 000000000..b44c5921c --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg new file mode 100644 index 000000000..41ed2e3a6 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/js/comms.js b/packages/node_modules/@node-red/editor-client/src/js/comms.js index ea128424b..75a018a56 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/comms.js +++ b/packages/node_modules/@node-red/editor-client/src/js/comms.js @@ -143,7 +143,7 @@ RED.comms = (function() { } else { var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' '+ RED._("notification.errors.lostConnectionTry")+''; errornotification.update(msg,{silent:true}); - $(errornotification).find("a").click(function(e) { + $(errornotification).find("a").on("click", function(e) { e.preventDefault(); errornotification.update(RED._("notification.errors.lostConnection"),{silent:true}); clearInterval(connectCountdownTimer); diff --git a/packages/node_modules/@node-red/editor-client/src/js/history.js b/packages/node_modules/@node-red/editor-client/src/js/history.js index 2e256564c..db54701bb 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/history.js +++ b/packages/node_modules/@node-red/editor-client/src/js/history.js @@ -14,7 +14,8 @@ * limitations under the License. **/ RED.history = (function() { - var undo_history = []; + var undoHistory = []; + var redoHistory = []; function undoEvent(ev) { var i; @@ -22,52 +23,81 @@ RED.history = (function() { var node; var subflow; var modifiedTabs = {}; + var inverseEv; if (ev) { if (ev.t == 'multi') { + inverseEv = { + t: 'multi', + events: [] + }; len = ev.events.length; for (i=len-1;i>=0;i--) { - undoEvent(ev.events[i]); + var r = undoEvent(ev.events[i]); + inverseEv.events.push(r); } } else if (ev.t == 'replace') { + inverseEv = { + t: 'replace', + config: RED.nodes.createCompleteNodeSet(), + changed: [], + rev: RED.nodes.version() + }; RED.nodes.clear(); var imported = RED.nodes.import(ev.config); imported[0].forEach(function(n) { if (ev.changed[n.id]) { n.changed = true; + inverseEv.changed[n.id] = true; } }) RED.nodes.version(ev.rev); } else if (ev.t == 'add') { + inverseEv = { + t: "delete", + }; if (ev.nodes) { + inverseEv.nodes = []; for (i=0;i ev.subflow.inputCount) { + inverseEv.subflow.inputs = ev.node.in.slice(ev.subflow.inputCount); ev.node.in.splice(ev.subflow.inputCount); } else if (ev.subflow.inputs.length > 0) { ev.node.in = ev.node.in.concat(ev.subflow.inputs); } } if (ev.subflow.hasOwnProperty('outputCount')) { + inverseEv.subflow.outputCount = ev.node.out.length; if (ev.node.out.length > ev.subflow.outputCount) { + inverseEv.subflow.outputs = ev.node.out.slice(ev.subflow.outputCount); ev.node.out.splice(ev.subflow.outputCount); } else if (ev.subflow.outputs.length > 0) { ev.node.out = ev.node.out.concat(ev.subflow.outputs); } } if (ev.subflow.hasOwnProperty('instances')) { + inverseEv.subflow.instances = []; ev.subflow.instances.forEach(function(n) { + inverseEv.subflow.instances.push(n); var node = RED.nodes.node(n.id); if (node) { node.changed = n.changed; @@ -254,9 +334,11 @@ RED.history = (function() { var outputMap; if (ev.outputMap) { outputMap = {}; + inverseEv.outputMap = {}; for (var port in ev.outputMap) { if (ev.outputMap.hasOwnProperty(port) && ev.outputMap[port] !== "-1") { outputMap[ev.outputMap[port]] = port; + inverseEv.outputMap[ev.outputMap[port]] = port; } } } @@ -264,39 +346,107 @@ RED.history = (function() { RED.editor.validateNode(ev.node); } if (ev.links) { + inverseEv.createdLinks = []; for (i=0;i -1) { + return preferredLangs[i] + } + } + return 'end-US' + }, loadNodeCatalog: function(namespace,done) { - var languageList = i18n.functions.toLanguages(i18n.detectLanguage()); + var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage()); var toLoad = languageList.length; languageList.forEach(function(lang) { $.ajax({ @@ -68,7 +86,7 @@ RED.i18n = (function() { }, loadNodeCatalogs: function(done) { - var languageList = i18n.functions.toLanguages(i18n.detectLanguage()); + var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage()); var toLoad = languageList.length; languageList.forEach(function(lang) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/keymap.json b/packages/node_modules/@node-red/editor-client/src/js/keymap.json index ea32e66f3..2677321b7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/keymap.json +++ b/packages/node_modules/@node-red/editor-client/src/js/keymap.json @@ -1,6 +1,6 @@ { "*": { - "ctrl-shift-p":"core:manage-palette", + "alt-shift-p":"core:manage-palette", "ctrl-f": "core:search", "ctrl-shift-f": "core:list-flows", "ctrl-=": "core:zoom-in", @@ -8,6 +8,7 @@ "ctrl-0": "core:zoom-reset", "ctrl-enter": "core:confirm-edit-tray", "ctrl-escape": "core:cancel-edit-tray", + "ctrl-d": "core:deploy-flows", "ctrl-g i": "core:show-info-tab", "ctrl-g d": "core:show-debug-tab", "ctrl-g c": "core:show-config-tab", @@ -17,19 +18,22 @@ "ctrl-space": "core:toggle-sidebar", "ctrl-p": "core:toggle-palette", "ctrl-,": "core:show-user-settings", + "ctrl-alt-l": "core:clear-debug-messages", "ctrl-alt-r": "core:show-remote-diff", "ctrl-alt-n": "core:new-project", "ctrl-alt-o": "core:open-project", "ctrl-g v": "core:show-version-control-tab", - "ctrl-shift-l": "core:show-event-log" + "ctrl-shift-l": "core:show-event-log", + "ctrl-shift-p":"core:show-action-list" }, - "sidebar-node-config": { + "red-ui-sidebar-node-config": { "backspace": "core:delete-config-selection", "delete": "core:delete-config-selection", "ctrl-a": "core:select-all-config-nodes", - "ctrl-z": "core:undo" + "ctrl-z": "core:undo", + "ctrl-y": "core:redo" }, - "workspace": { + "red-ui-workspace": { "backspace": "core:delete-selection", "delete": "core:delete-selection", "enter": "core:edit-selected-node", @@ -37,6 +41,7 @@ "ctrl-x": "core:cut-selection-to-internal-clipboard", "ctrl-v": "core:paste-from-internal-clipboard", "ctrl-z": "core:undo", + "ctrl-y": "core:redo", "ctrl-a": "core:select-all-nodes", "shift-?": "core:show-help", "up": "core:move-selection-up", diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index 2bfdd74fa..d956684ce 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -17,6 +17,8 @@ RED.nodes = (function() { var node_defs = {}; var nodes = []; + var nodeTabMap = {}; + var configNodes = {}; var links = []; var defaultWorkspace; @@ -213,6 +215,11 @@ RED.nodes = (function() { n.i = nextId+1; } nodes.push(n); + if (nodeTabMap[n.z]) { + nodeTabMap[n.z][n.id] = n; + } else { + console.warn("Node added to unknown tab/subflow:",n); + } } RED.events.emit('nodes:add',n); } @@ -246,6 +253,9 @@ RED.nodes = (function() { node = getNode(id); if (node) { nodes.splice(nodes.indexOf(node),1); + if (nodeTabMap[node.z]) { + delete nodeTabMap[node.z][node.id]; + } removedLinks = links.filter(function(l) { return (l.source === node) || (l.target === node); }); removedLinks.forEach(function(l) {links.splice(links.indexOf(l), 1); }); var updatedConfigNode = false; @@ -291,6 +301,17 @@ RED.nodes = (function() { return {links:removedLinks,nodes:removedNodes}; } + function moveNodeToTab(node, z) { + if (nodeTabMap[node.z]) { + delete nodeTabMap[node.z][node.id]; + } + if (!nodeTabMap[z]) { + nodeTabMap[z] = {}; + } + nodeTabMap[z][node.id] = node; + node.z = z; + } + function removeLink(l) { var index = links.indexOf(l); if (index != -1) { @@ -300,6 +321,8 @@ RED.nodes = (function() { function addWorkspace(ws,targetIndex) { workspaces[ws.id] = ws; + nodeTabMap[ws.id] = {}; + ws._def = RED.nodes.getType('tab'); if (targetIndex === undefined) { workspacesOrder.push(ws.id); @@ -312,6 +335,7 @@ RED.nodes = (function() { } function removeWorkspace(id) { delete workspaces[id]; + delete nodeTabMap[id]; workspacesOrder.splice(workspacesOrder.indexOf(id),1); var removedNodes = []; @@ -357,30 +381,32 @@ RED.nodes = (function() { sf.name = subflowName; } subflows[sf.id] = sf; + nodeTabMap[sf.id] = {}; + RED.nodes.registerType("subflow:"+sf.id, { defaults:{ name:{value:""}, env:{value:[]} }, - icon: function() { return sf.icon||"subflow.png" }, + icon: function() { return sf.icon||"subflow.svg" }, category: sf.category || "subflows", inputs: sf.in.length, outputs: sf.out.length, - color: "#da9", + color: sf.color || "#DDAA99", label: function() { return this.name||RED.nodes.subflow(sf.id).name }, - labelStyle: function() { return this.name?"node_label_italic":""; }, + labelStyle: function() { return this.name?"red-ui-flow-node-label-italic":""; }, paletteLabel: function() { return RED.nodes.subflow(sf.id).name }, inputLabels: function(i) { return sf.inputLabels?sf.inputLabels[i]:null }, outputLabels: function(i) { return sf.outputLabels?sf.outputLabels[i]:null }, oneditresize: function(size) { - var rows = $("#dialog-form>div:not(.node-input-env-container-row)"); + // var rows = $(".dialog-form>div:not(.node-input-env-container-row)"); var height = size.height; - for (var i=0; idiv.node-input-env-container-row"); - height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); - $("#node-input-env-container").editableList('height',height-80); + // for (var i=0; idiv.node-input-env-container-row"); + // height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); + $("ol.red-ui-editor-subflow-env-list").editableList('height',height); }, set:{ module: "node-red" @@ -393,6 +419,7 @@ RED.nodes = (function() { } function removeSubflow(sf) { delete subflows[sf.id]; + delete nodeTabMap[sf.id]; registry.removeNodeType("subflow:"+sf.id); } @@ -463,7 +490,9 @@ RED.nodes = (function() { node.id = n.id; node.type = n.type; node.z = n.z; - + if (n.d === true) { + node.d = true; + } if (node.type == "unknown") { for (var p in n._orig) { if (n._orig.hasOwnProperty(p)) { @@ -549,6 +578,7 @@ RED.nodes = (function() { node.in = []; node.out = []; node.env = n.env; + node.color = n.color; n.in.forEach(function(p) { var nIn = {x:p.x,y:p.y,wires:[]}; @@ -581,7 +611,7 @@ RED.nodes = (function() { node.outputLabels = n.outputLabels.slice(); } if (n.icon) { - if (n.icon !== "node-red/subflow.png") { + if (n.icon !== "node-red/subflow.svg") { node.icon = n.icon; } } @@ -967,6 +997,9 @@ RED.nodes = (function() { users:[], _config:{} }; + if (n.hasOwnProperty('d')) { + configNode.d = n.d; + } for (d in def.defaults) { if (def.defaults.hasOwnProperty(d)) { configNode[d] = n[d]; @@ -1016,6 +1049,9 @@ RED.nodes = (function() { if (n.hasOwnProperty('l')) { node.l = n.l; } + if (n.hasOwnProperty('d')) { + node.d = n.d; + } if (createNewIds) { if (subflow_blacklist[n.z]) { continue; @@ -1072,7 +1108,7 @@ RED.nodes = (function() { color:"#fee", defaults: {}, label: "unknown: "+n.type, - labelStyle: "node_label_italic", + labelStyle: "red-ui-flow-node-label-italic", outputs: n.outputs||n.wires.length, set: registry.getNodeSet("node-red/unknown") } @@ -1158,6 +1194,7 @@ RED.nodes = (function() { var nodeTypeArrayReferences = { "catch":"scope", "status":"scope", + "complete": "scope", "link in":"links", "link out":"links" } @@ -1258,13 +1295,22 @@ RED.nodes = (function() { // TODO: supports filter.z|type function filterNodes(filter) { var result = []; + var searchSet = nodes; + var doZFilter = false; + if (filter.hasOwnProperty("z")) { + if (Object.hasOwnProperty("values") && nodeTabMap.hasOwnProperty(filter.z) ) { + searchSet = Object.values(nodeTabMap[filter.z]); + } else { + doZFilter = true; + } + } - for (var n=0;n)/); var stepConfig = function() { if (configs.length === 0) { - $("body").i18n(); - $("#palette > .palette-spinner").hide(); - $(".palette-scroll").removeClass("hide"); - $("#palette-search").removeClass("hide"); + $("#red-ui-editor").i18n(); + $("#red-ui-palette > .red-ui-palette-spinner").hide(); + $(".red-ui-palette-scroll").removeClass("hide"); + $("#red-ui-palette-search").removeClass("hide"); loadFlows(function() { if (RED.settings.theme("projects.enabled",false)) { RED.projects.refresh(function(activeProject) { @@ -347,12 +353,11 @@ var RED = (function() { var parts = topic.split("/"); var node = RED.nodes.node(parts[1]); if (node) { - if (msg.hasOwnProperty("text")) { - if (msg.text[0] !== ".") { - msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()}); - } + if (msg.hasOwnProperty("text") && /^[a-zA-Z]/.test(msg.text)) { + msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()}); } node.status = msg; + node.dirtyStatus = true; node.dirty = true; RED.view.redraw(); } @@ -433,7 +438,7 @@ var RED = (function() { }); } - function loadEditor() { + function buildMainMenu() { var menuOptions = []; if (RED.settings.theme("projects.enabled",false)) { menuOptions.push({id:"menu-item-projects-menu",label:RED._("menu.label.projects"),options:[ @@ -442,34 +447,20 @@ var RED = (function() { {id:"menu-item-projects-settings",label:RED._("menu.label.projects-settings"),disabled:false,onselect:"core:show-project-settings"} ]}); } - - menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[ - // {id:"menu-item-view-show-grid",setting:"view-show-grid",label:RED._("menu.label.view.showGrid"),toggle:true,onselect:"core:toggle-show-grid"}, - // {id:"menu-item-view-snap-grid",setting:"view-snap-grid",label:RED._("menu.label.view.snapGrid"),toggle:true,onselect:"core:toggle-snap-grid"}, - // {id:"menu-item-status",setting:"node-show-status",label:RED._("menu.label.displayStatus"),toggle:true,onselect:"core:toggle-status", selected: true}, - //null, - // {id:"menu-item-bidi",label:RED._("menu.label.view.textDir"),options:[ - // {id:"menu-item-bidi-default",toggle:"text-direction",label:RED._("menu.label.view.defaultDir"),selected: true, onselect:function(s) { if(s){RED.text.bidi.setTextDirection("")}}}, - // {id:"menu-item-bidi-ltr",toggle:"text-direction",label:RED._("menu.label.view.ltr"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("ltr")}}}, - // {id:"menu-item-bidi-rtl",toggle:"text-direction",label:RED._("menu.label.view.rtl"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("rtl")}}}, - // {id:"menu-item-bidi-auto",toggle:"text-direction",label:RED._("menu.label.view.auto"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("auto")}}} - // ]}, - // null, {id:"menu-item-palette",label:RED._("menu.label.palette.show"),toggle:true,onselect:"core:toggle-palette", selected: true}, {id:"menu-item-sidebar",label:RED._("menu.label.sidebar.show"),toggle:true,onselect:"core:toggle-sidebar", selected: true}, {id:"menu-item-event-log",label:RED._("eventLog.title"),onselect:"core:show-event-log"}, + {id:"menu-item-action-list",label:RED._("keyboard.actionList"),onselect:"core:show-action-list"}, null ]}); menuOptions.push(null); - menuOptions.push({id:"menu-item-import",label:RED._("menu.label.import"),options:[ - {id:"menu-item-import-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-import-dialog"}, - {id:"menu-item-import-library",label:RED._("menu.label.library"),options:[]} - ]}); - menuOptions.push({id:"menu-item-export",label:RED._("menu.label.export"),options:[ - {id:"menu-item-export-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-export-dialog"}, - {id:"menu-item-export-library",label:RED._("menu.label.library"),disabled:true,onselect:"core:library-export"} - ]}); + if (RED.settings.theme("menu.menu-item-import-library", true)) { + menuOptions.push({id: "menu-item-import", label: RED._("menu.label.import"), onselect: "core:show-import-dialog"}); + } + if (RED.settings.theme("menu.menu-item-export-library", true)) { + menuOptions.push({id: "menu-item-export", label: RED._("menu.label.export"), onselect: "core:show-export-dialog"}); + } menuOptions.push(null); menuOptions.push({id:"menu-item-search",label:RED._("menu.label.search"),onselect:"core:search"}); menuOptions.push(null); @@ -492,7 +483,9 @@ var RED = (function() { menuOptions.push({id:"menu-item-user-settings",label:RED._("menu.label.settings"),onselect:"core:show-user-settings"}); menuOptions.push(null); - menuOptions.push({id:"menu-item-keyboard-shortcuts",label:RED._("menu.label.keyboardShortcuts"),onselect:"core:show-help"}); + if (RED.settings.theme("menu.menu-item-keyboard-shortcuts", true)) { + menuOptions.push({id: "menu-item-keyboard-shortcuts", label: RED._("menu.label.keyboardShortcuts"), onselect: "core:show-help"}); + } menuOptions.push({id:"menu-item-help", label: RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")), href: RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs") @@ -500,13 +493,24 @@ var RED = (function() { menuOptions.push({id:"menu-item-node-red-version", label:"v"+RED.settings.version, onselect: "core:show-about" }); + $('
  • ').appendTo(".red-ui-header-toolbar") + RED.menu.init({id:"red-ui-header-button-sidemenu",options: menuOptions}); + + } + + function loadEditor() { + + RED.workspaces.init(); + RED.statusBar.init(); RED.view.init(); RED.userSettings.init(); RED.user.init(); + RED.notifications.init(); RED.library.init(); RED.keyboard.init(); RED.palette.init(); RED.eventLog.init(); + if (RED.settings.theme('palette.editable') !== false) { RED.palette.editor.init(); } else { @@ -522,27 +526,57 @@ var RED = (function() { } RED.subflow.init(); - RED.workspaces.init(); RED.clipboard.init(); RED.search.init(); + RED.actionList.init(); RED.editor.init(); RED.diff.init(); - RED.menu.init({id:"btn-sidemenu",options: menuOptions}); RED.deploy.init(RED.settings.theme("deployButton",null)); - RED.notifications.init(); - RED.actions.add("core:show-about", showAbout); + buildMainMenu(); + RED.nodes.init(); RED.comms.connect(); - $("#main-container").show(); - $(".header-toolbar").show(); + $("#red-ui-main-container").show(); + $(".red-ui-header-toolbar").show(); + + RED.actions.add("core:show-about", showAbout); loadNodeList(); } + function buildEditor(options) { + var header = $('
    ').appendTo(options.target); + var logo = $('').appendTo(header); + $('
      ').appendTo(header); + $('
      ').appendTo(header); + $('
      '+ + '
      '+ + '
      '+ + '
      '+ + '
      '+ + '
      '+ + '
      ').appendTo(options.target); + $('
      ').appendTo(options.target); + $('
      ').appendTo(options.target); + $.getJSON(options.apiRootUrl+"theme", function(theme) { + if (theme.header) { + if (theme.header.url) { + logo = $("",{href:theme.header.url}).appendTo(logo); + } + if (theme.header.image) { + $('',{src:theme.header.image}).appendTo(logo); + } + if (theme.header.title) { + $('').html(theme.header.title).appendTo(logo); + } + } + }); + } + var initialised = false; function init(options) { @@ -556,6 +590,10 @@ var RED = (function() { if (options.apiRootUrl && !/\/$/.test(options.apiRootUrl)) { options.apiRootUrl = options.apiRootUrl+"/"; } + options.target = $("#red-ui-editor"); + options.target.addClass("red-ui-editor"); + + buildEditor(options); RED.i18n.init(options, function() { RED.settings.init(options, loadEditor); }) diff --git a/packages/node_modules/@node-red/editor-client/src/js/settings.js b/packages/node_modules/@node-red/editor-client/src/js/settings.js index faf80c083..e360cea7d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/settings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/settings.js @@ -37,7 +37,7 @@ RED.settings = (function () { if (key === "auth-tokens") { localStorage.setItem(key, JSON.stringify(value)); } else { - userSettings[key] = value; + RED.utils.setMessageProperty(userSettings,key,value); saveUserSettings(); } }; @@ -46,16 +46,25 @@ RED.settings = (function () { * If the key is not set in the localStorage it returns undefined * Else return the JSON parsed value * @param key + * @param defaultIfUndefined * @returns {*} */ - var get = function (key) { + var get = function (key,defaultIfUndefined) { if (!hasLocalStorage()) { return undefined; } if (key === "auth-tokens") { return JSON.parse(localStorage.getItem(key)); } else { - return userSettings[key]; + try { + var v = RED.utils.getMessageProperty(userSettings,key); + if (v === undefined) { + v = defaultIfUndefined; + } + } catch(err) { + v = defaultIfUndefined; + } + return v; } }; @@ -131,6 +140,12 @@ RED.settings = (function () { RED.settings.remove("auth-tokens"); } console.log("Node-RED: " + data.version); + console.groupCollapsed("Versions"); + console.log("jQuery",$().jquery) + console.log("jQuery UI",$.ui.version); + console.log("ACE",ace.version); + console.log("D3",d3.version); + console.groupEnd(); loadUserSettings(done); }, error: function(jqXHR,textStatus,errorThrown) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/text/bidi.js b/packages/node_modules/@node-red/editor-client/src/js/text/bidi.js index 1835f5111..8fc4a0d86 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/text/bidi.js +++ b/packages/node_modules/@node-red/editor-client/src/js/text/bidi.js @@ -97,14 +97,14 @@ RED.text.bidi = (function() { } /** - * Enforces the text direction for all the spans with style bidiAware under + * Enforces the text direction for all the spans with style red-ui-text-bidi-aware under * workspace or sidebar div */ function enforceTextDirectionOnPage() { - $("#workspace").find('span.bidiAware').each(function() { + $("#red-ui-workspace").find('span.red-ui-text-bidi-aware').each(function() { $(this).attr("dir", resolveBaseTextDir($(this).html())); }); - $("#sidebar").find('span.bidiAware').each(function() { + $("#red-ui-sidebar").find('span.red-ui-text-bidi-aware').each(function() { $(this).attr("dir", resolveBaseTextDir($(this).text())); }); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js new file mode 100644 index 000000000..ac8a06813 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js @@ -0,0 +1,230 @@ +/** + * 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.actionList = (function() { + + var disabled = false; + var dialog = null; + var searchInput; + var searchResults; + var selected = -1; + var visible = false; + + var filterTerm = ""; + var filterTerms = []; + var previousActiveElement; + + function ensureSelectedIsVisible() { + var selectedEntry = searchResults.find("li.selected"); + if (selectedEntry.length === 1) { + var scrollWindow = searchResults.parent(); + var scrollHeight = scrollWindow.height(); + var scrollOffset = scrollWindow.scrollTop(); + var y = selectedEntry.position().top; + var h = selectedEntry.height(); + if (y+h > scrollHeight) { + scrollWindow.animate({scrollTop: '-='+(scrollHeight-(y+h)-10)},50); + } else if (y<0) { + scrollWindow.animate({scrollTop: '+='+(y-10)},50); + } + } + } + + function createDialog() { + dialog = $("
      ",{id:"red-ui-actionList",class:"red-ui-search"}).appendTo("#red-ui-main-container"); + var searchDiv = $("
      ",{class:"red-ui-search-container"}).appendTo(dialog); + searchInput = $('').appendTo(searchDiv).searchBox({ + change: function() { + filterTerm = $(this).val().trim(); + filterTerms = filterTerm.split(" "); + searchResults.editableList('filter'); + searchResults.find("li.selected").removeClass("selected"); + var children = searchResults.children(":visible"); + if (children.length) { + $(children[0]).addClass('selected'); + } + } + }); + + searchInput.on('keydown',function(evt) { + var selectedChild; + if (evt.keyCode === 40) { + // Down + selectedChild = searchResults.find("li.selected"); + if (!selectedChild.length) { + var children = searchResults.children(":visible"); + if (children.length) { + $(children[0]).addClass('selected'); + } + } else { + var nextChild = selectedChild.nextAll(":visible").first(); + if (nextChild.length) { + selectedChild.removeClass('selected'); + nextChild.addClass('selected'); + } + } + ensureSelectedIsVisible(); + evt.preventDefault(); + } else if (evt.keyCode === 38) { + // Up + selectedChild = searchResults.find("li.selected"); + var nextChild = selectedChild.prevAll(":visible").first(); + if (nextChild.length) { + selectedChild.removeClass('selected'); + nextChild.addClass('selected'); + } + ensureSelectedIsVisible(); + evt.preventDefault(); + } else if (evt.keyCode === 13) { + // Enter + selectedChild = searchResults.find("li.selected"); + selectCommand(searchResults.editableList('getItem',selectedChild)); + } + }); + searchInput.i18n(); + + var searchResultsDiv = $("
      ",{class:"red-ui-search-results-container"}).appendTo(dialog); + searchResults = $('
        ',{style:"position: absolute;top: 5px;bottom: 5px;left: 5px;right: 5px;"}).appendTo(searchResultsDiv).editableList({ + addButton: false, + addItem: function(container,i,action) { + if (action.id === undefined) { + $('
        ',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container); + } else { + var div = $('',{href:'#',class:"red-ui-search-result"}).appendTo(container); + var contentDiv = $('
        ',{class:"red-ui-search-result-action"}).appendTo(div); + + + $('
        ').text(action.label).appendTo(contentDiv); + // $('
        ',{class:"red-ui-search-result-node-type"}).text(node.type).appendTo(contentDiv); + // $('
        ',{class:"red-ui-search-result-node-id"}).text(node.id).appendTo(contentDiv); + if (action.key) { + $('
        ',{class:"red-ui-search-result-action-key"}).html(RED.keyboard.formatKey(action.key)).appendTo(contentDiv); + } + div.on("click", function(evt) { + evt.preventDefault(); + selectCommand(action); + }); + } + }, + scrollOnAdd: false, + filter: function(item) { + if (filterTerm !== "") { + var pos=0; + for (var i=0;i -1) { + pos = j; + } else { + return false; + } + } + return true; + } + return true; + } + }); + + } + + function selectCommand(command) { + hide(); + if (command) { + RED.actions.invoke(command.id); + } + } + + function show(v) { + if (disabled) { + return; + } + if (!visible) { + previousActiveElement = document.activeElement; + RED.keyboard.add("*","escape",function(){hide()}); + $("#red-ui-header-shade").show(); + $("#red-ui-editor-shade").show(); + $("#red-ui-palette-shade").show(); + $("#red-ui-sidebar-shade").show(); + $("#red-ui-sidebar-separator").hide(); + if (dialog === null) { + createDialog(); + } + dialog.slideDown(300); + searchInput.searchBox('value',v) + searchResults.editableList('empty'); + results = []; + var actions = RED.actions.list(); + actions.sort(function(A,B) { + return A.id.localeCompare(B.id); + }); + actions.forEach(function(action) { + action.label = action.id.replace(/:/,": ").replace(/-/g," ").replace(/(^| )./g,function() { return arguments[0].toUpperCase()}); + action._label = action.label.toLowerCase(); + searchResults.editableList('addItem',action) + }) + RED.events.emit("actionList:open"); + visible = true; + } + searchInput.trigger("focus"); + var children = searchResults.children(":visible"); + if (children.length) { + $(children[0]).addClass('selected'); + } + } + + function hide() { + if (visible) { + RED.keyboard.remove("escape"); + visible = false; + $("#red-ui-header-shade").hide(); + $("#red-ui-editor-shade").hide(); + $("#red-ui-palette-shade").hide(); + $("#red-ui-sidebar-shade").hide(); + $("#red-ui-sidebar-separator").show(); + if (dialog !== null) { + dialog.slideUp(200,function() { + searchInput.searchBox('value',''); + }); + } + RED.events.emit("actionList:close"); + if (previousActiveElement) { + $(previousActiveElement).trigger("focus"); + previousActiveElement = null; + } + } + } + + function init() { + RED.actions.add("core:show-action-list",show); + + RED.events.on("editor:open",function() { disabled = true; }); + RED.events.on("editor:close",function() { disabled = false; }); + RED.events.on("search:open",function() { disabled = true; }); + RED.events.on("search:close",function() { disabled = false; }); + RED.events.on("type-search:open",function() { disabled = true; }); + RED.events.on("type-search:close",function() { disabled = false; }); + + $("#red-ui-header-shade").on('mousedown',hide); + $("#red-ui-editor-shade").on('mousedown',hide); + $("#red-ui-palette-shade").on('mousedown',hide); + $("#red-ui-sidebar-shade").on('mousedown',hide); + } + + return { + init: init, + show: show, + hide: hide + }; + +})(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js index 97addf5c5..cdff62919 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js @@ -24,38 +24,38 @@ RED.clipboard = (function() { var disabled = false; var popover; var currentPopoverError; + var activeTab; + var libraryBrowser; + var examplesBrowser; function setupDialogs() { - dialog = $('
        ') - .appendTo("body") + dialog = $('
        ') + .appendTo("#red-ui-editor") .dialog({ modal: true, autoOpen: false, - width: 500, + width: 700, resizable: false, + classes: { + "ui-dialog": "red-ui-editor-dialog", + "ui-dialog-titlebar-close": "hide", + "ui-widget-overlay": "red-ui-editor-dialog" + }, buttons: [ { - id: "clipboard-dialog-cancel", + id: "red-ui-clipboard-dialog-cancel", text: RED._("common.label.cancel"), click: function() { $( this ).dialog( "close" ); } }, { - id: "clipboard-dialog-close", - class: "primary", - text: RED._("common.label.close"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - id: "clipboard-dialog-download", + id: "red-ui-clipboard-dialog-download", class: "primary", text: RED._("clipboard.download"), click: function() { var element = document.createElement('a'); - element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent($("#clipboard-export").val())); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent($("#red-ui-clipboard-dialog-export-text").val())); element.setAttribute('download', "flows.json"); element.style.display = 'none'; document.body.appendChild(element); @@ -65,30 +65,100 @@ RED.clipboard = (function() { } }, { - id: "clipboard-dialog-copy", + id: "red-ui-clipboard-dialog-export", class: "primary", text: RED._("clipboard.export.copy"), click: function() { - $("#clipboard-export").select(); - document.execCommand("copy"); - document.getSelection().removeAllRanges(); - RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"}); - $( this ).dialog( "close" ); + if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") { + $("#red-ui-clipboard-dialog-export-text").select(); + document.execCommand("copy"); + document.getSelection().removeAllRanges(); + RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"}); + $( this ).dialog( "close" ); + } else { + var flowToExport = $("#red-ui-clipboard-dialog-export-text").val(); + var selectedPath = libraryBrowser.getSelected(); + if (!selectedPath.children) { + selectedPath = selectedPath.parent; + } + var filename = $("#red-ui-clipboard-dialog-tab-library-name").val().trim(); + var saveFlow = function() { + $.ajax({ + url:'library/'+selectedPath.library+'/'+selectedPath.type+'/'+selectedPath.path + filename, + type: "POST", + data: flowToExport, + contentType: "application/json; charset=utf-8" + }).done(function() { + $(dialog).dialog( "close" ); + RED.notify(RED._("library.exportedToLibrary"),"success"); + }).fail(function(xhr,textStatus,err) { + if (xhr.status === 401) { + RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error"); + } else { + RED.notify(RED._("library.saveFailed",{message:xhr.responseText}),"error"); + } + }); + } + if (selectedPath.children) { + var exists = false; + selectedPath.children.forEach(function(f) { + if (f.label === filename) { + exists = true; + } + }); + if (exists) { + dialog.dialog("close"); + var notification = RED.notify(RED._("clipboard.export.exists",{file:RED.utils.sanitize(filename)}),{ + type: "warning", + fixed: true, + buttons: [{ + text: RED._("common.label.cancel"), + click: function() { + notification.hideNotification() + dialog.dialog( "open" ); + } + },{ + text: RED._("clipboard.export.overwrite"), + click: function() { + notification.hideNotification() + saveFlow(); + } + }] + }); + } else { + saveFlow(); + } + } else { + saveFlow(); + } + } } }, { - id: "clipboard-dialog-ok", + id: "red-ui-clipboard-dialog-ok", class: "primary", text: RED._("common.label.import"), click: function() { - RED.view.importNodes($("#clipboard-import").val(),$("#import-tab > a.selected").attr('id') === 'import-tab-new'); + var addNewFlow = ($("#red-ui-clipboard-dialog-import-opt > a.selected").attr('id') === 'red-ui-clipboard-dialog-import-opt-new'); + if (activeTab === "red-ui-clipboard-dialog-import-tab-clipboard") { + RED.view.importNodes($("#red-ui-clipboard-dialog-import-text").val(),addNewFlow); + } else { + var selectedPath; + if (activeTab === "red-ui-clipboard-dialog-import-tab-library") { + selectedPath = libraryBrowser.getSelected(); + } else { + selectedPath = examplesBrowser.getSelected(); + } + if (selectedPath.path) { + $.get('library/'+selectedPath.library+'/'+selectedPath.type+'/'+selectedPath.path, function(data) { + RED.view.importNodes(data,addNewFlow); + }); + } + } $( this ).dialog( "close" ); } } ], - open: function(e) { - $(this).parent().find(".ui-dialog-titlebar-close").hide(); - }, close: function(e) { if (popover) { popover.close(true); @@ -101,152 +171,281 @@ RED.clipboard = (function() { exportNodesDialog = '
        '+ - ''+ - ''+ - ''+ - ''+ - ''+ + ''+ + ''+ + ''+ + ''+ + ''+ ''+ '
        '+ - '
        '+ - ''+ - '
        '+ - '
        '+ - ''+ - ''+ - ''+ - ''+ - '
        '; + '
        '+ + '
        '+ + '
          '+ + '
          '+ + '
          '+ + '
          '+ + '
          '+ + ''+ + '
          '+ + '
          '+ + ''+ + ''+ + ''+ + ''+ + '
          '+ + '
          '+ + '
          '+ + '
          '+ + '
          '+ + ''+ + '
          '+ + '
          '+ + '
          '+ + '
          ' + ; + importNodesDialog = - '
          '+ - ' '+ - ''+ + '
          '+ + '
          '+ + '
            '+ + '
            '+ + '
            '+ + '
            '+ + '
            '+ + ' '+ + ''+ + '
            '+ + '
            '+ + ''+ + '
            '+ + '
            '+ + '
            '+ + '
            '+ + '
            '+ '
            '+ '
            '+ - ''+ - '
            '+ - '
            '+ - ''+ - ''+ - ''+ - ''+ - ''+ + ''+ + ''+ + ''+ + ''+ + ''+ '
            '; + } - var validateImportTimeout; - - function validateImport() { - if (validateImportTimeout) { - clearTimeout(validateImportTimeout); + var validateExportFilenameTimeout + function validateExportFilename() { + if (validateExportFilenameTimeout) { + clearTimeout(validateExportFilenameTimeout); } - validateImportTimeout = setTimeout(function() { - var importInput = $("#clipboard-import"); - var v = importInput.val().trim(); - if (v === "") { - popover.close(true); - currentPopoverError = null; - importInput.removeClass("input-error"); - $("#clipboard-dialog-ok").button("disable"); - return; - } - try { - if (!/^\[[\s\S]*\]$/m.test(v)) { - throw new Error(RED._("clipboard.import.errors.notArray")); - } - var res = JSON.parse(v); - for (var i=0;i
            ').text(errString); - var errorPos; - // Chrome error messages - var m = /at position (\d+)/i.exec(errString); - if (m) { - errorPos = parseInt(m[1]); - } else { - // Firefox error messages - m = /at line (\d+) column (\d+)/i.exec(errString); - if (m) { - var line = parseInt(m[1])-1; - var col = parseInt(m[2])-1; - var lines = v.split("\n"); - errorPos = 0; - for (var i=0;i').appendTo(message); - var code = $('
            ').appendTo(parseError);
            -                            $('').text(v.substring(errorPos-12,errorPos)).appendTo(code)
            -                            $('').text(v.charAt(errorPos)).appendTo(code);
            -                            $('').text(v.substring(errorPos+1,errorPos+12)).appendTo(code);
            -                        }
            -                        popover.close(true).setContent(message).open();
            -                        currentPopoverError = errString;
            -                    }
            -                } else {
            -                    currentPopoverError = null;
            -                }
            -                $("#clipboard-dialog-ok").button("disable");
            +        validateExportFilenameTimeout = setTimeout(function() {
            +            var filenameInput = $("#red-ui-clipboard-dialog-tab-library-name");
            +            var filename = filenameInput.val().trim();
            +            var valid = filename.length > 0 && !/[\/\\]/.test(filename);
            +            if (valid) {
            +                filenameInput.removeClass("input-error");
            +                $("#red-ui-clipboard-dialog-export").button("enable");
            +            } else {
            +                filenameInput.addClass("input-error");
            +                $("#red-ui-clipboard-dialog-export").button("disable");
                         }
                     },100);
                 }
             
            -    function importNodes() {
            +    var validateImportTimeout;
            +    function validateImport() {
            +        if (activeTab === "red-ui-clipboard-dialog-import-tab-clipboard") {
            +            if (validateImportTimeout) {
            +                clearTimeout(validateImportTimeout);
            +            }
            +            validateImportTimeout = setTimeout(function() {
            +                var importInput = $("#red-ui-clipboard-dialog-import-text");
            +                var v = importInput.val().trim();
            +                if (v === "") {
            +                    popover.close(true);
            +                    currentPopoverError = null;
            +                    importInput.removeClass("input-error");
            +                    $("#red-ui-clipboard-dialog-ok").button("disable");
            +                    return;
            +                }
            +                try {
            +                    if (!/^\[[\s\S]*\]$/m.test(v)) {
            +                        throw new Error(RED._("clipboard.import.errors.notArray"));
            +                    }
            +                    var res = JSON.parse(v);
            +                    for (var i=0;i
            ').text(errString); + var errorPos; + // Chrome error messages + var m = /at position (\d+)/i.exec(errString); + if (m) { + errorPos = parseInt(m[1]); + } else { + // Firefox error messages + m = /at line (\d+) column (\d+)/i.exec(errString); + if (m) { + var line = parseInt(m[1])-1; + var col = parseInt(m[2])-1; + var lines = v.split("\n"); + errorPos = 0; + for (var i=0;i').appendTo(message); + var code = $('
            ').appendTo(parseError);
            +                                $('').text(v.substring(errorPos-12,errorPos)).appendTo(code)
            +                                $('').text(v.charAt(errorPos)).appendTo(code);
            +                                $('').text(v.substring(errorPos+1,errorPos+12)).appendTo(code);
            +                            }
            +                            popover.close(true).setContent(message).open();
            +                            currentPopoverError = errString;
            +                        }
            +                    } else {
            +                        currentPopoverError = null;
            +                    }
            +                    $("#red-ui-clipboard-dialog-ok").button("disable");
            +                }
            +            },100);
            +        } else {
            +            var file = libraryBrowser.getSelected();
            +            if (file && file.label && !file.children) {
            +                $("#red-ui-clipboard-dialog-ok").button("enable");
            +            } else {
            +                $("#red-ui-clipboard-dialog-ok").button("disable");
            +            }
            +        }
            +    }
            +
            +    function importNodes(mode) {
                     if (disabled) {
                         return;
                     }
            +        mode = mode || "clipboard";
            +
                     dialogContainer.empty();
                     dialogContainer.append($(importNodesDialog));
            +
            +        var tabs = RED.tabs.create({
            +            id: "red-ui-clipboard-dialog-import-tabs",
            +            vertical: true,
            +            onchange: function(tab) {
            +                $("#red-ui-clipboard-dialog-import-tabs-content").children().hide();
            +                $("#" + tab.id).show();
            +                activeTab = tab.id;
            +                if (popover) {
            +                    popover.close(true);
            +                    currentPopoverError = null;
            +                }
            +                if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") {
            +                    $("#red-ui-clipboard-dialog-import-text").trigger("focus");
            +                } else {
            +                    libraryBrowser.focus();
            +                }
            +                validateImport();
            +            }
            +        });
            +        tabs.addTab({
            +            id: "red-ui-clipboard-dialog-import-tab-clipboard",
            +            label: RED._("clipboard.clipboard")
            +        });
            +        tabs.addTab({
            +            id: "red-ui-clipboard-dialog-import-tab-library",
            +            label: RED._("library.library")
            +        });
            +        tabs.addTab({
            +            id: "red-ui-clipboard-dialog-import-tab-examples",
            +            label: RED._("library.types.examples")
            +        });
            +
            +        $("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
            +        $("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
            +        $("#red-ui-clipboard-dialog-export").button("enable");
            +
            +        libraryBrowser = RED.library.createBrowser({
            +            container: $("#red-ui-clipboard-dialog-import-tab-library"),
            +            onselect: function(file) {
            +                if (file && file.label && !file.children) {
            +                    $("#red-ui-clipboard-dialog-ok").button("enable");
            +                } else {
            +                    $("#red-ui-clipboard-dialog-ok").button("disable");
            +                }
            +            },
            +            onconfirm: function(item) {
            +                if (item && item.label && !item.children) {
            +                    $("#red-ui-clipboard-dialog-ok").trigger("click");
            +                }
            +            }
            +        })
            +        loadFlowLibrary(libraryBrowser,"local",RED._("library.types.local"));
            +
            +        examplesBrowser = RED.library.createBrowser({
            +            container: $("#red-ui-clipboard-dialog-import-tab-examples"),
            +            onselect: function(file) {
            +                if (file && file.label && !file.children) {
            +                    $("#red-ui-clipboard-dialog-ok").button("enable");
            +                } else {
            +                    $("#red-ui-clipboard-dialog-ok").button("disable");
            +                }
            +            },
            +            onconfirm: function(item) {
            +                if (item && item.label && !item.children) {
            +                    $("#red-ui-clipboard-dialog-ok").trigger("click");
            +                }
            +            }
            +        })
            +        loadFlowLibrary(examplesBrowser,"_examples_",RED._("library.types.examples"));
            +
            +
                     dialogContainer.i18n();
             
            -        $("#clipboard-dialog-ok").show();
            -        $("#clipboard-dialog-cancel").show();
            -        $("#clipboard-dialog-close").hide();
            -        $("#clipboard-dialog-copy").hide();
            -        $("#clipboard-dialog-download").hide();
            -        $("#clipboard-dialog-ok").button("disable");
            -        $("#clipboard-import").keyup(validateImport);
            -        $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
            +        $("#red-ui-clipboard-dialog-ok").show();
            +        $("#red-ui-clipboard-dialog-cancel").show();
            +        $("#red-ui-clipboard-dialog-export").hide();
            +        $("#red-ui-clipboard-dialog-download").hide();
            +        $("#red-ui-clipboard-dialog-ok").button("disable");
            +        $("#red-ui-clipboard-dialog-import-text").on("keyup", validateImport);
            +        $("#red-ui-clipboard-dialog-import-text").on('paste',function() { setTimeout(validateImport,10)});
             
            -        $("#import-tab > a").click(function(evt) {
            +        $("#red-ui-clipboard-dialog-import-opt > a").on("click", function(evt) {
                         evt.preventDefault();
                         if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
                             return;
            @@ -255,66 +454,122 @@ RED.clipboard = (function() {
                         $(this).addClass('selected');
                     });
             
            -        $("#import-file-upload").change(function() {
            +        $("#red-ui-clipboard-dialog-import-file-upload").on("change", function() {
                         var fileReader = new FileReader();
                         fileReader.onload = function () {
            -                $("#clipboard-import").val(fileReader.result);
            +                $("#red-ui-clipboard-dialog-import-text").val(fileReader.result);
                             validateImport();
                         };
                         fileReader.readAsText($(this).prop('files')[0]);
                     })
            -        $("#import-file-upload-btn").click(function(evt) {
            +        $("#red-ui-clipboard-dialog-import-file-upload-btn").on("click", function(evt) {
                         evt.preventDefault();
            -            $("#import-file-upload").click();
            +            $("#red-ui-clipboard-dialog-import-file-upload").trigger("click");
                     })
             
            +        tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+mode);
            +        if (mode === 'clipboard') {
            +            setTimeout(function() {
            +                $("#red-ui-clipboard-dialog-import-text").trigger("focus");
            +            },100)
            +        }
            +
            +
                     dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open");
                     popover = RED.popover.create({
            -            target: $("#clipboard-import"),
            +            target: $("#red-ui-clipboard-dialog-import-text"),
                         trigger: "manual",
                         direction: "bottom",
                         content: ""
                     });
                 }
             
            -    function exportNodes() {
            +    function exportNodes(mode) {
                     if (disabled) {
                         return;
                     }
             
            +        mode = mode || "clipboard";
            +
                     dialogContainer.empty();
                     dialogContainer.append($(exportNodesDialog));
            -        dialogContainer.i18n();
            -        var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini";
             
            -        $("#export-format-group > a").click(function(evt) {
            +        var tabs = RED.tabs.create({
            +            id: "red-ui-clipboard-dialog-export-tabs",
            +            vertical: true,
            +            onchange: function(tab) {
            +                $("#red-ui-clipboard-dialog-export-tabs-content").children().hide();
            +                $("#" + tab.id).show();
            +                activeTab = tab.id;
            +                if (tab.id === "red-ui-clipboard-dialog-export-tab-clipboard") {
            +                    $("#red-ui-clipboard-dialog-export").button("option","label", RED._("clipboard.export.copy"))
            +                    $("#red-ui-clipboard-dialog-download").show();
            +                } else {
            +                    $("#red-ui-clipboard-dialog-export").button("option","label", RED._("clipboard.export.export"))
            +                    $("#red-ui-clipboard-dialog-download").hide();
            +                    libraryBrowser.focus();
            +                }
            +
            +            }
            +        });
            +        tabs.addTab({
            +            id: "red-ui-clipboard-dialog-export-tab-clipboard",
            +            label: RED._("clipboard.clipboard")
            +        });
            +        tabs.addTab({
            +            id: "red-ui-clipboard-dialog-export-tab-library",
            +            label: RED._("library.library")
            +        });
            +
            +        $("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
            +        $("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
            +        $("#red-ui-clipboard-dialog-export").button("enable");
            +
            +        libraryBrowser = RED.library.createBrowser({
            +            container: $("#red-ui-clipboard-dialog-export-tab-library-browser"),
            +            folderTools: true,
            +            onselect: function(file) {
            +                if (file && file.label && !file.children) {
            +                    $("#red-ui-clipboard-dialog-tab-library-name").val(file.label);
            +                }
            +            }
            +        })
            +        loadFlowLibrary(libraryBrowser,"local",RED._("library.types.local"));
            +
            +        $("#red-ui-clipboard-dialog-tab-library-name").val("flows.json").select();
            +
            +        dialogContainer.i18n();
            +        var format = RED.settings.flowFilePretty ? "red-ui-clipboard-dialog-export-fmt-full" : "red-ui-clipboard-dialog-export-fmt-mini";
            +
            +        $("#red-ui-clipboard-dialog-export-fmt-group > a").on("click", function(evt) {
                         evt.preventDefault();
                         if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
            -                $("#clipboard-export").focus();
            +                $("#red-ui-clipboard-dialog-export-text").trigger("focus");
                             return;
                         }
                         $(this).parent().children().removeClass('selected');
                         $(this).addClass('selected');
             
            -            var flow = $("#clipboard-export").val();
            +            var flow = $("#red-ui-clipboard-dialog-export-text").val();
                         if (flow.length > 0) {
                             var nodes = JSON.parse(flow);
             
                             format = $(this).attr('id');
            -                if (format === 'export-format-full') {
            +                if (format === 'red-ui-clipboard-dialog-export-fmt-full') {
                                 flow = JSON.stringify(nodes,null,4);
                             } else {
                                 flow = JSON.stringify(nodes);
                             }
            -                $("#clipboard-export").val(flow);
            -                $("#clipboard-export").focus();
            +                $("#red-ui-clipboard-dialog-export-text").val(flow);
            +                setTimeout(function() { $("#red-ui-clipboard-dialog-export-text").scrollTop(0); },50);
            +
            +                $("#red-ui-clipboard-dialog-export-text").trigger("focus");
                         }
                     });
             
            -        $("#export-range-group > a").click(function(evt) {
            +        $("#red-ui-clipboard-dialog-export-rng-group > a").on("click", function(evt) {
                         evt.preventDefault();
                         if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
            -                $("#clipboard-export").focus();
                             return;
                         }
                         $(this).parent().children().removeClass('selected');
            @@ -322,7 +577,7 @@ RED.clipboard = (function() {
                         var type = $(this).attr('id');
                         var flow = "";
                         var nodes = null;
            -            if (type === 'export-range-selected') {
            +            if (type === 'red-ui-clipboard-dialog-export-rng-selected') {
                             var selection = RED.workspaces.selection();
                             if (selection.length > 0) {
                                 nodes = [];
            @@ -335,77 +590,97 @@ RED.clipboard = (function() {
                             }
                             // Don't include the subflow meta-port nodes in the exported selection
                             nodes = RED.nodes.createExportableNodeSet(nodes.filter(function(n) { return n.type !== 'subflow'}));
            -            } else if (type === 'export-range-flow') {
            +            } else if (type === 'red-ui-clipboard-dialog-export-rng-flow') {
                             var activeWorkspace = RED.workspaces.active();
                             nodes = RED.nodes.filterNodes({z:activeWorkspace});
                             var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace);
                             nodes.unshift(parentNode);
                             nodes = RED.nodes.createExportableNodeSet(nodes);
            -            } else if (type === 'export-range-full') {
            +            } else if (type === 'red-ui-clipboard-dialog-export-rng-full') {
                             nodes = RED.nodes.createCompleteNodeSet(false);
                         }
                         if (nodes !== null) {
            -                if (format === "export-format-full") {
            +                if (format === "red-ui-clipboard-dialog-export-fmt-full") {
                                 flow = JSON.stringify(nodes,null,4);
                             } else {
                                 flow = JSON.stringify(nodes);
                             }
                         }
                         if (flow.length > 0) {
            -                $("#export-copy").removeClass('disabled');
            +                $("#red-ui-clipboard-dialog-export").removeClass('disabled');
                         } else {
            -                $("#export-copy").addClass('disabled');
            +                $("#red-ui-clipboard-dialog-export").addClass('disabled');
                         }
            -            $("#clipboard-export").val(flow);
            -            $("#clipboard-export").focus();
            +            $("#red-ui-clipboard-dialog-export-text").val(flow);
            +            setTimeout(function() { $("#red-ui-clipboard-dialog-export-text").scrollTop(0); },50);
            +            $("#red-ui-clipboard-dialog-export-text").trigger("focus");
                     })
             
            -        $("#clipboard-dialog-ok").hide();
            -        $("#clipboard-dialog-cancel").hide();
            -        $("#clipboard-dialog-copy").hide();
            -        $("#clipboard-dialog-close").hide();
            +        $("#red-ui-clipboard-dialog-ok").hide();
            +        $("#red-ui-clipboard-dialog-cancel").hide();
            +        $("#red-ui-clipboard-dialog-export").hide();
                     var selection = RED.workspaces.selection();
                     if (selection.length > 0) {
            -            $("#export-range-selected").click();
            +            $("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
                     } else {
                         selection = RED.view.selection();
                         if (selection.nodes) {
            -                $("#export-range-selected").click();
            +                $("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
                         } else {
            -                $("#export-range-selected").addClass('disabled').removeClass('selected');
            -                $("#export-range-flow").click();
            +                $("#red-ui-clipboard-dialog-export-rng-selected").addClass('disabled').removeClass('selected');
            +                $("#red-ui-clipboard-dialog-export-rng-flow").trigger("click");
                         }
                     }
            -        if (format === "export-format-full") {
            -            $("#export-format-full").click();
            +        if (format === "red-ui-clipboard-dialog-export-fmt-full") {
            +            $("#red-ui-clipboard-dialog-export-fmt-full").trigger("click");
                     } else {
            -            $("#export-format-mini").click();
            +            $("#red-ui-clipboard-dialog-export-fmt-mini").trigger("click");
                     }
            -        $("#clipboard-export")
            -            .focus(function() {
            -                var textarea = $(this);
            -                textarea.select();
            -                textarea.mouseup(function() {
            -                    textarea.unbind("mouseup");
            -                    return false;
            -                })
            -            });
            +        tabs.activateTab("red-ui-clipboard-dialog-export-tab-"+mode);
                     dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" );
             
            -        $("#clipboard-export").focus();
            -        if (!document.queryCommandSupported("copy")) {
            -            $("#clipboard-dialog-cancel").hide();
            -            $("#clipboard-dialog-close").show();
            -        } else {
            -            $("#clipboard-dialog-cancel").show();
            -            $("#clipboard-dialog-copy").show();
            -        }
            -        $("#clipboard-dialog-download").show();
            +        $("#red-ui-clipboard-dialog-export-text").trigger("focus");
            +        $("#red-ui-clipboard-dialog-cancel").show();
            +        $("#red-ui-clipboard-dialog-export").show();
            +        $("#red-ui-clipboard-dialog-download").show();
            +
            +    }
            +
            +    function loadFlowLibrary(browser,library,label) {
            +        // if (includeExamples) {
            +        //     listing.push({
            +        //         library: "_examples_",
            +        //         type: "flows",
            +        //         icon: 'fa fa-hdd-o',
            +        //         label: RED._("library.types.examples"),
            +        //         path: "",
            +        //         children: function(done,item) {
            +        //             RED.library.loadLibraryFolder("_examples_","flows","",function(children) {
            +        //                 item.children = children;
            +        //                 done(children);
            +        //             })
            +        //         }
            +        //     })
            +        // }
            +        browser.data([{
            +            library: library,
            +            type: "flows",
            +            icon: 'fa fa-hdd-o',
            +            label: label,
            +            path: "",
            +            expanded: true,
            +            children: function(done, item) {
            +                RED.library.loadLibraryFolder(library,"flows","",function(children) {
            +                    item.children = children;
            +                    done(children);
            +                })
            +            }
            +        }], true);
             
                 }
             
                 function hideDropTarget() {
            -        $("#dropTarget").hide();
            +        $("#red-ui-drop-target").hide();
                     RED.keyboard.remove("escape");
                 }
                 function copyText(value,element,msg) {
            @@ -435,7 +710,7 @@ RED.clipboard = (function() {
                     if (truncated) {
                         msg += "_truncated";
                     }
            -        $("#clipboard-hidden").val(value).select();
            +        $("#red-ui-clipboard-hidden").val(value).select();
                     var result =  document.execCommand("copy");
                     if (result && element) {
                         var popover = RED.popover.create({
            @@ -455,29 +730,34 @@ RED.clipboard = (function() {
                     init: function() {
                         setupDialogs();
             
            -            $('').appendTo("body");
            +            $('').appendTo("#red-ui-editor");
             
                         RED.actions.add("core:show-export-dialog",exportNodes);
                         RED.actions.add("core:show-import-dialog",importNodes);
             
            +            RED.actions.add("core:show-library-export-dialog",function() { exportNodes('library') });
            +            RED.actions.add("core:show-library-import-dialog",function() { importNodes('library') });
             
                         RED.events.on("editor:open",function() { disabled = true; });
                         RED.events.on("editor:close",function() { disabled = false; });
                         RED.events.on("search:open",function() { disabled = true; });
                         RED.events.on("search:close",function() { disabled = false; });
            +            RED.events.on("actionList:open",function() { disabled = true; });
            +            RED.events.on("actionList:close",function() { disabled = false; });
                         RED.events.on("type-search:open",function() { disabled = true; });
                         RED.events.on("type-search:close",function() { disabled = false; });
             
            +            $('

            ').appendTo('#red-ui-editor'); - $('#chart').on("dragenter",function(event) { + $('#red-ui-workspace-chart').on("dragenter",function(event) { if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 || $.inArray("Files",event.originalEvent.dataTransfer.types) != -1) { - $("#dropTarget").css({display:'table'}); + $("#red-ui-drop-target").css({display:'table'}); RED.keyboard.add("*", "escape" ,hideDropTarget); } }); - $('#dropTarget').on("dragover",function(event) { + $('#red-ui-drop-target').on("dragover",function(event) { if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 || $.inArray("Files",event.originalEvent.dataTransfer.types) != -1) { event.preventDefault(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js index be7d2d4cd..157c1e495 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js @@ -38,7 +38,7 @@ this.options[0].show(); } - this.element.change(function() { + this.element.on("change", function() { if (this.checked) { that.options[0].hide(); that.options[1].show(); @@ -53,7 +53,7 @@ child.checkboxSet('state',isChecked,false,true); }) }) - this.uiElement.click(function(e) { + this.uiElement.on("click", function(e) { e.stopPropagation(); // state returns null for a partial state. Clicking on that should // result in false. diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js index ee29a6a35..06ccc97d9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js @@ -32,7 +32,10 @@ * - scrollOnAdd : boolean - whether to scroll to newly added items * methods: * - addItem(itemData) + * - insertItemAt : function(data,index) - add an item at the specified index * - removeItem(itemData) + * - getItemAt(index) + * - indexOf(itemData) * - width(width) * - height(height) * - items() @@ -75,9 +78,9 @@ addLabel = 'add'; } } - $(' '+addLabel+'') + $(' '+addLabel+'') .appendTo(this.topContainer) - .click(function(evt) { + .on("click", function(evt) { evt.preventDefault(); that.addItem({}); }); @@ -185,6 +188,11 @@ } }, _destroy: function() { + if (this.topContainer) { + var tc = this.topContainer; + delete this.topContainer; + tc.remove(); + } }, _refreshFilter: function() { var that = this; @@ -230,7 +238,24 @@ this.uiHeight = desiredHeight; this._resize(); }, - addItem: function(data) { + getItemAt: function(index) { + var items = this.items(); + if (index >= 0 && index < items.length) { + return $(items[index]).data('data'); + } else { + return; + } + }, + indexOf: function(data) { + var items = this.items(); + for (var i=0;i'); @@ -248,7 +273,13 @@ }); } if (!added) { - li.appendTo(this.element); + if (index <= 0) { + li.prependTo(this.element); + } else if (index > that.element.children().length-1) { + li.appendTo(this.element); + } else { + li.insertBefore(this.element.children().eq(index)); + } } var row = $('
            ').addClass("red-ui-editableList-item-content").appendTo(li); row.data('data',data); @@ -257,10 +288,10 @@ li.addClass("red-ui-editableList-item-sortable"); } if (this.options.removable) { - var deleteButton = $('',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li); + var deleteButton = $('',{href:"#",class:"red-ui-editableList-item-remove red-ui-button red-ui-button-small"}).appendTo(li); $('',{class:"fa fa-remove"}).appendTo(deleteButton); li.addClass("red-ui-editableList-item-removable"); - deleteButton.click(function(evt) { + deleteButton.on("click", function(evt) { evt.preventDefault(); var data = row.data('data'); li.addClass("red-ui-editableList-item-deleting") @@ -293,6 +324,9 @@ },0); } }, + addItem: function(data) { + this.insertItemAt(data,this.element.children().length) + }, addItems: function(items) { for (var i=0; i 0) { this.uiContainer.scrollTop(this.uiContainer.scrollTop()+items.position().top) } + }, + getItem: function(li) { + var el = li.find(".red-ui-editableList-item-content"); + if (el.length) { + return el.data('data'); + } else { + return null; + } } }); })(jQuery); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js index 612bf4516..e73c82293 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js @@ -56,12 +56,12 @@ RED.menu = (function() { } if (opt === null) { - item = $('
          • '); + item = $('
          • '); } else { item = $('
          • '); if (opt.group) { - item.addClass("menu-group-"+opt.group); + item.addClass("red-ui-menu-group-"+opt.group); } var linkContent = '
            '; @@ -71,7 +71,7 @@ RED.menu = (function() { } if (opt.icon !== undefined) { - if (/\.png/.test(opt.icon)) { + if (/\.(png|svg)/.test(opt.icon)) { linkContent += ' '; } else { linkContent += ' '; @@ -79,10 +79,10 @@ RED.menu = (function() { } if (opt.sublabel) { - linkContent += ''+opt.label+''+ - ''+opt.sublabel+'' + linkContent += ''+opt.label+''+ + ''+opt.sublabel+'' } else { - linkContent += ''+opt.label+'' + linkContent += ''+opt.label+'' } linkContent += ''; @@ -92,27 +92,16 @@ RED.menu = (function() { menuItems[opt.id] = opt; if (opt.onselect) { - link.click(function(e) { + link.on("click", function(e) { e.preventDefault(); if ($(this).parent().hasClass("disabled")) { return; } if (opt.toggle) { - var selected = isSelected(opt.id); - if (typeof opt.toggle === "string") { - if (!selected) { - for (var m in menuItems) { - if (menuItems.hasOwnProperty(m)) { - var mi = menuItems[m]; - if (mi.id != opt.id && opt.toggle == mi.toggle) { - setSelected(mi.id,false); - } - } - } - setSelected(opt.id,true); - } + if (opt.toggle === true) { + setSelected(opt.id, !isSelected(opt.id)); } else { - setSelected(opt.id, !selected); + setSelected(opt.id, true); } } else { triggerAction(opt.id); @@ -125,13 +114,13 @@ RED.menu = (function() { link.attr("target","_blank").attr("href",opt.href); } else if (!opt.options) { item.addClass("disabled"); - link.click(function(event) { + link.on("click", function(event) { event.preventDefault(); }); } if (opt.options) { - item.addClass("dropdown-submenu pull-left"); - var submenu = $('').appendTo(item); + item.addClass("red-ui-menu-dropdown-submenu pull-left"); + var submenu = $('
              ').appendTo(item); for (var i=0;i",{class:"dropdown-menu pull-right"}); + var topMenu = $("
                ",{class:"red-ui-menu red-ui-menu-dropdown pull-right"}); if (options.id) { topMenu.attr({id:options.id+"-submenu"}); var menuParent = $("#"+options.id); if (menuParent.length === 1) { topMenu.insertAfter(menuParent); + menuParent.on("click", function(evt) { + evt.stopPropagation(); + evt.preventDefault(); + if (topMenu.is(":visible")) { + $(document).off("click.red-ui-menu"); + topMenu.hide(); + } else { + $(document).on("click.red-ui-menu", function(evt) { + $(document).off("click.red-ui-menu"); + activeMenu = null; + topMenu.hide(); + }); + $(".red-ui-menu").hide(); + topMenu.show(); + } + }) } } @@ -193,8 +198,9 @@ RED.menu = (function() { } function setSelected(id,state) { + var alreadySet = false; if (isSelected(id) == state) { - return; + alreadySet = true; } var opt = menuItems[id]; if (state) { @@ -202,10 +208,26 @@ RED.menu = (function() { } else { $("#"+id).removeClass("active"); } - if (opt && opt.onselect) { - triggerAction(opt.id,state); + if (opt) { + if (opt.toggle && typeof opt.toggle === "string") { + if (state) { + for (var m in menuItems) { + if (menuItems.hasOwnProperty(m)) { + var mi = menuItems[m]; + if (mi.id != opt.id && opt.toggle == mi.toggle) { + setSelected(mi.id,false); + } + } + } + } + } + if (!alreadySet && opt.onselect) { + triggerAction(opt.id,state); + } + if (!opt.local && !alreadySet) { + RED.settings.set(opt.setting||("menu-"+opt.id), state); + } } - RED.settings.set(opt.setting||("menu-"+opt.id), state); } function toggleSelected(id) { @@ -222,14 +244,14 @@ RED.menu = (function() { function addItem(id,opt) { var item = createMenuItem(opt); - if (opt.group) { - var groupItems = $("#"+id+"-submenu").children(".menu-group-"+opt.group); + if (opt !== null && opt.group) { + var groupItems = $("#"+id+"-submenu").children(".red-ui-menu-group-"+opt.group); if (groupItems.length === 0) { item.appendTo("#"+id+"-submenu"); } else { for (var i=0;i
              '); if (size !== "default") { div.addClass("red-ui-popover-size-"+size); @@ -122,7 +127,15 @@ RED.popover = (function() { } } div.addClass('red-ui-popover-'+d).css({top: top, left: left}); - + if (existingPopover) { + existingPopover.close(true); + } + target.data("red-ui-popover",res) + if (options.tooltip) { + div.on("mousedown", function(evt) { + closePopup(true); + }); + } if (instant) { div.show(); } else { @@ -131,7 +144,7 @@ RED.popover = (function() { } } var closePopup = function(instant) { - $(document).off('mousedown.modal-popover-close'); + $(document).off('mousedown.red-ui-popover'); if (!active) { if (div) { if (instant) { @@ -142,6 +155,7 @@ RED.popover = (function() { }); } div = null; + target.removeData("red-ui-popover",res) } } } @@ -162,7 +176,7 @@ RED.popover = (function() { } }); } else if (trigger === 'click') { - target.click(function(e) { + target.on("click", function(e) { e.preventDefault(); e.stopPropagation(); active = !active; @@ -185,7 +199,7 @@ RED.popover = (function() { } } else if (trigger === 'modal') { - $(document).on('mousedown.modal-popover-close', function (event) { + $(document).on('mousedown.red-ui-popover', function (event) { var target = event.target; while (target.nodeName !== 'BODY' && target !== div[0]) { target = target.parentElement; @@ -236,6 +250,7 @@ RED.popover = (function() { } } return RED.popover.create({ + tooltip: true, target:target, trigger: "hover", size: "small", @@ -243,6 +258,71 @@ RED.popover = (function() { content: label, delay: { show: 750, hide: 50 } }); + }, + panel: function(content) { + var panel = $('
              '); + panel.css({ display: "none" }); + panel.appendTo(document.body); + content.appendTo(panel); + var closeCallback; + + function hide() { + $(document).off("mousedown.red-ui-popover-panel-close"); + panel.hide(); + panel.css({ + height: "auto" + }); + panel.remove(); + } + function show(options) { + var closeCallback = options.onclose; + var target = options.target; + var align = options.align || "left"; + + var pos = target.offset(); + var targetWidth = target.width(); + var targetHeight = target.height(); + var panelHeight = panel.height(); + var panelWidth = panel.width(); + + var top = (targetHeight+pos.top); + if (top+panelHeight > $(window).height()) { + top -= (top+panelHeight)-$(window).height() + 5; + } + if (top < 0) { + panelHeight.height(panelHeight+top) + top = 0; + } + if (align === "left") { + panel.css({ + top: top+"px", + left: (pos.left)+"px", + }); + } else if(align === "right") { + panel.css({ + top: top+"px", + left: (pos.left-panelWidth)+"px", + }); + } + panel.slideDown(100); + + $(document).on("mousedown.red-ui-popover-panel-close", function(event) { + if(!$(event.target).closest(panel).length && !$(event.target).closest(".red-ui-editor-dialog").length) { + if (closeCallback) { + closeCallback(); + } + hide(); + } + // if ($(event.target).closest(target).length) { + // event.preventDefault(); + // } + }) + } + return { + container: panel, + show:show, + hide:hide + } } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js index 1c6aad8d2..214668485 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js @@ -35,6 +35,7 @@ this.currentTimeout = null; this.lastSent = ""; this.element.val(""); + this.element.addClass("red-ui-searchBox-input"); this.uiContainer = this.element.wrap("
              ").parent(); this.uiContainer.addClass("red-ui-searchBox-container"); @@ -44,7 +45,7 @@ e.preventDefault(); that.element.val(""); that._change("",true); - that.element.focus(); + that.element.trigger("focus"); }); this.resultCount = $('',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer); @@ -60,7 +61,7 @@ }); this.element.on("focus",function() { - $("body").one("mousedown",function() { + $(document).one("mousedown",function() { that.element.blur(); }); }); @@ -86,6 +87,7 @@ that._trigger("change"); },this.options.delay); } else { + this.lastSent = this.element.val(); this._trigger("change"); } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js index d31753a31..610f388de 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js @@ -39,17 +39,17 @@ RED.stack = (function() { } } if (options.fill && options.singleExpanded) { - $(window).resize(resizeStack); - $(window).focus(resizeStack); + $(window).on("resize", resizeStack); + $(window).on("focus", resizeStack); } return { add: function(entry) { entries.push(entry); - entry.container = $('
              ').appendTo(container); + entry.container = $('
              ').appendTo(container); if (!visible) { entry.container.hide(); } - var header = $('
              ').appendTo(entry.container); + var header = $('
              ').appendTo(entry.container); entry.header = header; entry.contentWrap = $('
              ',{style:"position:relative"}).appendTo(entry.container); if (options.fill) { @@ -57,7 +57,7 @@ RED.stack = (function() { } entry.content = $('
              ').appendTo(entry.contentWrap); if (entry.collapsible !== false) { - header.click(function() { + header.on("click", function() { if (options.singleExpanded) { if (!entry.isExpanded()) { for (var i=0;i
              ').appendTo(header); if (entry.expanded) { - entry.container.addClass("palette-category-expanded"); + entry.container.addClass("expanded"); icon.addClass("expanded"); } else { entry.contentWrap.hide(); @@ -118,7 +118,7 @@ RED.stack = (function() { } icon.addClass("expanded"); - entry.container.addClass("palette-category-expanded"); + entry.container.addClass("expanded"); entry.contentWrap.slideDown(200); return true; } @@ -126,13 +126,13 @@ RED.stack = (function() { entry.collapse = function() { if (entry.isExpanded()) { icon.removeClass("expanded"); - entry.container.removeClass("palette-category-expanded"); + entry.container.removeClass("expanded"); entry.contentWrap.slideUp(200); return true; } }; entry.isExpanded = function() { - return entry.container.hasClass("palette-category-expanded"); + return entry.container.hasClass("expanded"); }; if (options.fill && options.singleExpanded) { resizeStack(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js index 3de4b5845..0d371e56f 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js @@ -19,6 +19,9 @@ RED.tabs = (function() { var defaultTabIcon = "fa fa-lemon-o"; + var dragActive = false; + var dblClickTime; + var dblClickArmed = false; function createTabs(options) { var tabs = {}; @@ -37,7 +40,7 @@ RED.tabs = (function() { if (options.addButton) { wrapper.addClass("red-ui-tabs-add"); var addButton = $('
              ').appendTo(wrapper); - addButton.find('a').click(function(evt) { + addButton.find('a').on("click", function(evt) { evt.preventDefault(); if (typeof options.addButton === 'function') { options.addButton(); @@ -73,7 +76,7 @@ RED.tabs = (function() { if (options.searchButton) { wrapper.addClass("red-ui-tabs-search"); var searchButton = $('').appendTo(wrapper); - searchButton.find('a').click(function(evt) { + searchButton.find('a').on("click", function(evt) { evt.preventDefault(); if (typeof options.searchButton === 'function') { options.searchButton() @@ -96,7 +99,7 @@ RED.tabs = (function() { if (options.scrollable) { wrapper.addClass("red-ui-tabs-scrollable"); scrollContainer.addClass("red-ui-tabs-scroll-container"); - scrollContainer.scroll(updateScroll); + scrollContainer.on("scroll",updateScroll); scrollLeft = $('
              ').appendTo(wrapper).find("a"); scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();}); scrollRight = $('
              ').appendTo(wrapper).find("a"); @@ -113,7 +116,7 @@ RED.tabs = (function() { if (options.menu !== false) { var selectButton = $('').appendTo(collapsedButtonsRow); selectButton.addClass("red-ui-tab-link-button-menu") - selectButton.click(function(evt) { + selectButton.on("click", function(evt) { evt.stopPropagation(); evt.preventDefault(); if (!collapsibleMenu) { @@ -136,7 +139,7 @@ RED.tabs = (function() { } }); options = pinnedOptions.concat(options); - collapsibleMenu = RED.menu.init({id:"debug-message-option-menu",options: options}); + collapsibleMenu = RED.menu.init({options: options}); collapsibleMenu.css({ position: "absolute" }) @@ -148,10 +151,11 @@ RED.tabs = (function() { left: (elementPos.left - collapsibleMenu.width() + selectButton.width())+"px" }) if (collapsibleMenu.is(":visible")) { - $(document).off("click.tabmenu"); + $(document).off("click.red-ui-tabmenu"); } else { - $(document).on("click.tabmenu", function(evt) { - $(document).off("click.tabmenu"); + $(".red-ui-menu").hide(); + $(document).on("click.red-ui-tabmenu", function(evt) { + $(document).off("click.red-ui-tabmenu"); collapsibleMenu.hide(); }); } @@ -200,7 +204,16 @@ RED.tabs = (function() { } function onTabClick(evt) { - evt.preventDefault(); + if (dragActive) { + return + } + if (dblClickTime && Date.now()-dblClickTime < 400) { + dblClickTime = 0; + dblClickArmed = true; + return onTabDblClick.call(this,evt); + } + dblClickTime = Date.now(); + var currentTab = ul.find("li.red-ui-tab.active"); var thisTab = $(this).parent(); var fireSelectionChanged = false; @@ -266,7 +279,6 @@ RED.tabs = (function() { if (fireSelectionChanged) { selectionChanged(); } - return false; } function updateScroll() { @@ -288,7 +300,6 @@ RED.tabs = (function() { } function onTabDblClick(evt) { evt.preventDefault(); - evt.stopPropagation(); if (evt.metaKey || evt.shiftKey) { return; } @@ -348,7 +359,7 @@ RED.tabs = (function() { } var tabs = ul.find("li.red-ui-tab"); var width = wrapper.width(); - var tabCount = tabs.size(); + var tabCount = tabs.length; var tabWidth; if (options.collapsible) { @@ -417,7 +428,11 @@ RED.tabs = (function() { } - ul.find("li.red-ui-tab a").on("click",onTabClick).on("dblclick",onTabDblClick); + ul.find("li.red-ui-tab a") + .on("mouseup",onTabClick) + .on("click", function(evt) {evt.preventDefault(); }) + .on("dblclick", function(evt) {evt.stopPropagation(); evt.preventDefault(); }) + setTimeout(function() { updateTabWidths(); },0); @@ -434,7 +449,7 @@ RED.tabs = (function() { var li = ul.find("a[href='#"+id+"']").parent(); if (li.hasClass("active")) { var tab = li.prev(); - if (tab.size() === 0) { + if (tab.length === 0) { tab = li.next(); } activateTab(tab.find("a")); @@ -448,7 +463,10 @@ RED.tabs = (function() { } delete tabs[id]; updateTabWidths(); - collapsibleMenu = null; + if (collapsibleMenu) { + collapsibleMenu.remove(); + collapsibleMenu = null; + } } return { @@ -484,7 +502,7 @@ RED.tabs = (function() { } else if (tab.iconClass) { $('',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link); } - var span = $('',{class:"bidiAware"}).text(tab.label).appendTo(link); + var span = $('',{class:"red-ui-text-bidi-aware"}).text(tab.label).appendTo(link); span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label)); if (options.collapsible) { li.addClass("red-ui-tab-pinned"); @@ -509,7 +527,7 @@ RED.tabs = (function() { } else { $('',{class:defaultTabIcon}).appendTo(pinnedLink); } - pinnedLink.click(function(evt) { + pinnedLink.on("click", function(evt) { evt.preventDefault(); activateTab(tab.id); }); @@ -520,8 +538,9 @@ RED.tabs = (function() { RED.popover.tooltip($(pinnedLink), tab.name, tab.action); } - link.on("click",onTabClick); - link.on("dblclick",onTabDblClick); + link.on("mouseup",onTabClick); + link.on("click", function(evt) { evt.preventDefault(); }) + link.on("dblclick", function(evt) { evt.stopPropagation(); evt.preventDefault(); }) if (tab.closeable) { @@ -543,7 +562,7 @@ RED.tabs = (function() { options.onadd(tab); } link.attr("title",tab.label); - if (ul.find("li.red-ui-tab").size() == 1) { + if (ul.find("li.red-ui-tab").length == 1) { activateTab(link); } if (options.onreorder) { @@ -556,6 +575,8 @@ RED.tabs = (function() { axis:"x", distance: 20, start: function(event,ui) { + if (dblClickArmed) { dblClickArmed = false; return false } + dragActive = true; originalTabOrder = []; tabElements = []; ul.children().each(function(i) { @@ -611,6 +632,7 @@ RED.tabs = (function() { } }, stop: function(event,ui) { + dragActive = false; ul.children().css({position:"relative",left:"",transition:""}); if (!li.hasClass('active')) { li.css({zIndex:""}); @@ -626,7 +648,10 @@ RED.tabs = (function() { setTimeout(function() { updateTabWidths(); },10); - collapsibleMenu = null; + if (collapsibleMenu) { + collapsibleMenu.remove(); + collapsibleMenu = null; + } }, removeTab: removeTab, activateTab: activateTab, @@ -634,7 +659,7 @@ RED.tabs = (function() { previousTab: activatePreviousTab, resize: updateTabWidths, count: function() { - return ul.find("li.red-ui-tab").size(); + return ul.find("li.red-ui-tab").length; }, contains: function(id) { return ul.find("a[href='#"+id+"']").length > 0; @@ -643,7 +668,7 @@ RED.tabs = (function() { tabs[id].label = label; var tab = ul.find("a[href='#"+id+"']"); tab.attr("title",label); - tab.find("span.bidiAware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label)); + tab.find("span.red-ui-text-bidi-aware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label)); updateTabWidths(); }, selection: getSelection, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js new file mode 100644 index 000000000..398d35c85 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js @@ -0,0 +1,100 @@ +/** + * 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. + **/ +(function($) { + +/** + * options: + * - invertState : boolean - if "true" the button will show "enabled" when the + * checkbox is not selected and vice versa. + * - enabledIcon : string - the icon for "enabled" state, default "fa-check-square-o" + * - enabledLabel : string - the label for "enabled" state, default "Enabled" ("editor:workspace.enabled") + * - disabledIcon : string - the icon for "disabled" state, default "fa-square-o" + * - disabledLabel : string - the label for "disabled" state, default "Disabled" ("editor:workspace.disabled") + * - baseClass : string - the base css class to apply, default "red-ui-button" (alternative eg "red-ui-sidebar-header-button") + * - class : string - additional classes to apply to the button - eg "red-ui-button-small" + * methods: + * - + */ + $.widget( "nodered.toggleButton", { + _create: function() { + var that = this; + + var invertState = false; + if (this.options.hasOwnProperty("invertState")) { + invertState = this.options.invertState; + } + var baseClass = this.options.baseClass || "red-ui-button"; + var enabledIcon = this.options.enabledIcon || "fa-check-square-o"; + var disabledIcon = this.options.disabledIcon || "fa-square-o"; + var enabledLabel = this.options.hasOwnProperty('enabledLabel') ? this.options.enabledLabel : RED._("editor:workspace.enabled"); + var disabledLabel = this.options.hasOwnProperty('disabledLabel') ? this.options.disabledLabel : RED._("editor:workspace.disabled"); + + this.element.css("display","none"); + this.element.on("focus", function() { + that.button.focus(); + }); + this.button = $(''); + if (this.options.class) { + this.button.addClass(this.options.class) + } + this.element.after(this.button); + this.buttonIcon = this.button.find("i"); + this.buttonLabel = this.button.find("span"); + + // Quick hack to find the maximum width of the button + this.button.addClass("selected"); + this.buttonIcon.addClass(enabledIcon); + this.buttonLabel.text(enabledLabel); + var width = this.button.width(); + this.button.removeClass("selected"); + this.buttonIcon.removeClass(enabledIcon); + that.buttonIcon.addClass(disabledIcon); + that.buttonLabel.text(disabledLabel); + width = Math.max(width,this.button.width()); + this.buttonIcon.removeClass(disabledIcon); + + // Fix the width of the button so it doesn't jump around when toggled + if (width > 0) { + this.button.width(Math.ceil(width)); + } + + this.button.on("click",function(e) { + e.stopPropagation(); + if (that.buttonIcon.hasClass(disabledIcon)) { + that.element.prop("checked",!invertState); + } else { + that.element.prop("checked",invertState); + } + that.element.trigger("change"); + }) + + this.element.on("change", function(e) { + if ($(this).prop("checked") !== invertState) { + that.button.addClass("selected"); + that.buttonIcon.addClass(enabledIcon); + that.buttonIcon.removeClass(disabledIcon); + that.buttonLabel.text(enabledLabel); + } else { + that.button.removeClass("selected"); + that.buttonIcon.addClass(disabledIcon); + that.buttonIcon.removeClass(enabledIcon); + that.buttonLabel.text(disabledLabel); + } + }) + this.element.trigger("change"); + } + }); +})(jQuery); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js index 8e0249183..0e391a5b8 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js @@ -18,32 +18,70 @@ /** * options: * - data : array - initial items to display in tree + * - multi : boolean - if true, .selected will return an array of results + * otherwise, returns the first selected item + * - sortable: boolean/string - TODO: see editableList + * - rootSortable: boolean - if 'sortable' is set, then setting this to + * false, prevents items being sorted to the + * top level of the tree * * methods: * - data(items) - clears existing items and replaces with new data * * events: * - treelistselect : function(event, item) {} - * + * - treelistconfirm : function(event,item) {} + * - treelistchangeparent: function(event,item, oldParent, newParent) {} * * data: * [ * { * label: 'Local', // label for the item + * sublabel: 'Local', // a sub-label for the item * icon: 'fa fa-rocket', // (optional) icon for the item * selected: true/false, // (optional) if present, display checkbox accordingly - * children: [] | function(done) // (optional) an array of child items, or a function + * children: [] | function(done,item) // (optional) an array of child items, or a function * // that will call the `done` callback with an array * // of child items + * expanded: true/false, // show the child items by default + * deferBuild: true/false, // don't build any ui elements for the item's children + * until it is expanded by the user. + * element: // custom dom element to use for the item - ignored if `label` is set * } * ] * - * - * * var treeList = $("
              ").css({width: "100%", height: "100%"}).treeList({data:[...]}) * treeList.on('treelistselect', function(e,item) { console.log(item)}) * treeList.treeList('data',[ ... ] ) * + * + * After `data` has been added to the tree, each item is augmented the following + * properties and functions: + * + * item.parent - set to the parent item + * item.treeList.container + * item.treeList.label - the label element for the item + * item.treeList.depth - the depth in the tree (0 == root) + * item.treeList.parentList - the editableList instance this item is in + * item.treeList.remove() - removes the item from the tree + * item.treeList.makeLeaf(detachChildElements) - turns an element with children into a leaf node, + * removing the UI decoration etc. + * detachChildElements - any children with custom + * elements will be detached rather than removed + * so jQuery event handlers are preserved in case + * the child elements need to be reattached later + * item.treeList.makeParent(children) - turns an element into a parent node, adding the necessary + * UI decoration. + * item.treeList.insertChildAt(newItem,position,select) - adds a child item an the specified position. + * Optionally selects the item after adding. + * item.treeList.addChild(newItem,select) - appends a child item. + * Optionally selects the item after adding. + * item.treeList.expand(done) - expands the parent item to show children. Optional 'done' callback. + * item.treeList.collapse() - collapse the parent item to hide children. + * + * + * + * */ $.widget( "nodered.treeList", { @@ -51,110 +89,449 @@ var that = this; this.element.addClass('red-ui-treeList'); + this.element.attr("tabIndex",0); var wrapper = $('
              ',{class:'red-ui-treeList-container'}).appendTo(this.element); + this.element.on('keydown', function(evt) { + var selected = that._topList.find(".selected").parent().data('data'); + if (!selected && (evt.keyCode === 40 || evt.keyCode === 38)) { + that.select(that._data[0]); + return; + } + var target; + switch(evt.keyCode) { + case 13: // ENTER + if (selected.children) { + if (selected.treeList.container.hasClass("expanded")) { + selected.treeList.collapse() + } else { + selected.treeList.expand() + } + } else { + that._trigger("confirm",null,selected) + } + break; + case 37: // LEFT + if (selected.children&& selected.treeList.container.hasClass("expanded")) { + selected.treeList.collapse() + } else if (selected.parent) { + target = selected.parent; + } + break; + case 38: // UP + target = that._getPreviousSibling(selected); + if (target) { + target = that._getLastDescendant(target); + } + if (!target && selected.parent) { + target = selected.parent; + } + break; + case 39: // RIGHT + if (selected.children) { + if (!selected.treeList.container.hasClass("expanded")) { + selected.treeList.expand() + } + } + break + case 40: //DOWN + if (selected.children && Array.isArray(selected.children) && selected.children.length > 0 && selected.treeList.container.hasClass("expanded")) { + target = selected.children[0]; + } else { + target = that._getNextSibling(selected); + while (!target && selected.parent) { + selected = selected.parent; + target = that._getNextSibling(selected); + } + } + break + } + if (target) { + that.select(target); + } + }); this._data = []; - this._topList = $('
                ').css({ + this._topList = $('
                  ').css({ position:'absolute', top: 0, left:0, right:0, bottom:0 - }).appendTo(wrapper).editableList({ + }).appendTo(wrapper); + + var topListOptions = { addButton: false, scrollOnAdd: false, height: '100%', addItem: function(container,i,item) { - that._addSubtree(container,item,0); + that._addSubtree(that._topList,container,item,0); } - }); + }; + if (this.options.rootSortable !== false && !!this.options.sortable) { + topListOptions.sortable = this.options.sortable; + topListOptions.connectWith = '.red-ui-treeList-sortable'; + this._topList.addClass('red-ui-treeList-sortable'); + } + this._topList.editableList(topListOptions) + + if (this.options.data) { this.data(this.options.data); } }, - _addChildren: function(container,children,depth) { + _getLastDescendant: function(item) { + // Gets the last visible descendant of the item + if (!item.children || !item.treeList.container.hasClass("expanded") || item.children.length === 0) { + return item; + } + return this._getLastDescendant(item.children[item.children.length-1]); + }, + _getPreviousSibling: function(item) { + var candidates; + if (!item.parent) { + candidates = this._data; + } else { + candidates = item.parent.children; + } + var index = candidates.indexOf(item); + if (index === 0) { + return null; + } else { + return candidates[index-1]; + } + }, + _getNextSibling: function(item) { + var candidates; + if (!item.parent) { + candidates = this._data; + } else { + candidates = item.parent.children; + } + var index = candidates.indexOf(item); + if (index === candidates.length - 1) { + return null; + } else { + return candidates[index+1]; + } + }, + _addChildren: function(container,parent,children,depth) { var that = this; - var subtree = $('
                    ').appendTo(container).editableList({ + var subtree = $('
                      ').appendTo(container).editableList({ + connectWith: ".red-ui-treeList-sortable", + sortable: that.options.sortable, addButton: false, scrollOnAdd: false, height: 'auto', addItem: function(container,i,item) { - that._addSubtree(container,item,depth+1); + that._addSubtree(subtree,container,item,depth+1); + }, + sortItems: function(data) { + var children = []; + var reparented = []; + data.each(function() { + var child = $(this).data('data'); + children.push(child); + var evt = that._fixDepths(parent,child); + if (evt) { + reparented.push(evt); + } + }) + if (Array.isArray(parent.children)) { + parent.children = children; + } + reparented.forEach(function(evt) { + that._trigger("changeparent",null,evt); + }); + that._trigger("sort",null,parent); } }); + if (!!that.options.sortable) { + subtree.addClass('red-ui-treeList-sortable'); + } for (var i=0;i",{class:"red-ui-treeList-label"}).appendTo(container); + item.treeList.label = label; if (item.class) { label.addClass(item.class); } - label.css({ - paddingLeft: (depth*15)+'px' - }) + if (item.gutter) { + item.gutter.css({ + position: 'absolute' + }).appendTo(label) + + } + var labelPaddingWidth = (item.gutter?item.gutter.width()+2:0)+(depth*20); + item.treeList.labelPadding = $('').css({ + display: "inline-block", + width: labelPaddingWidth+'px' + }).appendTo(label); + label.on('mouseover',function(e) { that._trigger('itemmouseover',e,item); }) label.on('mouseout',function(e) { that._trigger('itemmouseout',e,item); }) + label.on('mouseenter',function(e) { that._trigger('itemmouseenter',e,item); }) + label.on('mouseleave',function(e) { that._trigger('itemmouseleave',e,item); }) - if (item.children) { - $('').appendTo(label); + item.treeList.makeLeaf = function(detachChildElements) { + if (!treeListIcon.children().length) { + // Already a leaf + return + } + if (detachChildElements && item.children) { + var detachChildren = function(item) { + if (item.children) { + item.children.forEach(function(child) { + if (child.element) { + child.element.detach(); + } + if (child.gutter) { + child.gutter.detach(); + } + detachChildren(child); + }); + } + } + detachChildren(item); + } + treeListIcon.empty(); + if (!item.deferBuild) { + item.treeList.childList.remove(); + delete item.treeList.childList; + } + label.off("click.red-ui-treeList-expand"); + treeListIcon.off("click.red-ui-treeList-expand"); + delete item.children; + container.removeClass("expanded"); + } + item.treeList.makeParent = function(children) { + if (treeListIcon.children().length) { + // Already a parent because we've got the angle-right icon + return; + } + $('').appendTo(treeListIcon); + treeListIcon.on("click.red-ui-treeList-expand", function(e) { + e.stopPropagation(); + e.preventDefault(); + if (container.hasClass("expanded")) { + item.treeList.collapse(); + } else { + item.treeList.expand(); + } + }); // $('').appendTo(label); - label.click(function(e) { - if (!container.hasClass("built") && typeof item.children === 'function') { - container.addClass('built'); - var childrenAdded = false; - var spinner; - item.children(function(children) { - childrenAdded = true; - that._addChildren(container,children,depth); + label.on("click.red-ui-treeList-expand", function(e) { + if (container.hasClass("expanded")) { + if (item.hasOwnProperty('selected') || label.hasClass("selected")) { + item.treeList.collapse(); + } + } else { + item.treeList.expand(); + } + }) + if (!item.children) { + item.children = children||[]; + item.treeList.childList = that._addChildren(container,item,item.children,depth).hide(); + } + } + item.treeList.insertChildAt = function(newItem,position,select) { + newItem.parent = item; + item.children.splice(position,0,newItem); + + if (!item.deferBuild) { + item.treeList.childList.editableList('insertItemAt',newItem,position) + if (select) { + setTimeout(function() { + that.select(newItem) + },100); + } + that._trigger("sort",null,item); + } + } + item.treeList.addChild = function(newItem,select) { + item.treeList.insertChildAt(newItem,item.children.length,select); + } + item.treeList.expand = function(done) { + if (!item.children) { + return; + } + if (container.hasClass("expanded")) { + done && done(); + return; + } + if (!container.hasClass("built") && (item.deferBuild || typeof item.children === 'function')) { + container.addClass('built'); + var childrenAdded = false; + var spinner; + var startTime = 0; + var completeBuild = function(children) { + childrenAdded = true; + item.treeList.childList = that._addChildren(container,item,children,depth).hide(); + var delta = Date.now() - startTime; + if (delta < 400) { + setTimeout(function() { + item.treeList.childList.slideDown('fast'); + if (spinner) { + spinner.remove(); + } + },400-delta); + } else { + item.treeList.childList.slideDown('fast'); if (spinner) { spinner.remove(); } - }); - if (!childrenAdded) { - spinner = $('
                      ').css({ - "background-position": (35+depth*15)+'px 50%' - }).appendTo(container); } - + done && done(); + that._trigger("childrenloaded",null,item) } - container.toggleClass("expanded"); - }) - } else { - $('').appendTo(label); + if (typeof item.children === 'function') { + item.children(completeBuild,item); + } else { + delete item.deferBuild; + completeBuild(item.children); + } + if (!childrenAdded) { + startTime = Date.now(); + spinner = $('
                      ').css({ + "background-position": (35+depth*20)+'px 50%' + }).appendTo(container); + } + + } else { + if (that._loadingData) { + item.treeList.childList.show(); + } else { + item.treeList.childList.slideDown('fast'); + } + done && done(); + } + container.addClass("expanded"); } + item.treeList.collapse = function() { + if (!item.children) { + return; + } + item.treeList.childList.slideUp('fast'); + container.removeClass("expanded"); + } + + var treeListIcon = $('').appendTo(label); + if (item.children) { + item.treeList.makeParent(); + } + if (item.hasOwnProperty('selected')) { var selectWrapper = $('').appendTo(label); - var cb = $('').prop('checked',item.selected).appendTo(selectWrapper); + var cb = $('').prop('checked',item.selected).appendTo(selectWrapper); + label.toggleClass("selected",item.selected); cb.on('click', function(e) { e.stopPropagation(); }); cb.on('change', function(e) { item.selected = this.checked; + label.toggleClass("selected",this.checked); that._trigger("select",e,item); }) - } else if (!item.children) { - label.click(function(e) { + if (!item.children) { + label.on("click", function(e) { + e.stopPropagation(); + cb.trigger("click"); + }) + } + item.treeList.select = function(v) { + if (v !== item.selected) { + cb.trigger("click"); + } + } + } else { + label.on("click", function(e) { + that._topList.find(".selected").removeClass("selected"); + label.addClass("selected"); that._trigger("select",e,item) }) + label.on("dblclick", function(e) { + if (!item.children) { + that._trigger("confirm",e,item); + } + }) } if (item.icon) { $('').appendTo(label); } - $('').text(item.label).appendTo(label); + if (item.hasOwnProperty('label') || item.hasOwnProperty('sublabel')) { + if (item.hasOwnProperty('label')) { + $('').text(item.label).appendTo(label); + } + if (item.hasOwnProperty('sublabel')) { + $('').text(item.sublabel).appendTo(label); + } + + } else if (item.element) { + $(item.element).appendTo(label); + $(item.element).css({ + width: "calc(100% - "+(labelPaddingWidth+20+(item.icon?20:0))+"px)" + }) + } if (item.children) { - if (Array.isArray(item.children)) { - that._addChildren(container,item.children,depth); + if (Array.isArray(item.children) && !item.deferBuild) { + item.treeList.childList = that._addChildren(container,item,item.children,depth).hide(); } if (item.expanded) { - label.click(); + item.treeList.expand(); } } }, @@ -162,12 +539,19 @@ this._topList.editableList('empty'); }, data: function(items) { + var that = this; if (items !== undefined) { this._data = items; this._topList.editableList('empty'); + this._loadingData = true; for (var i=0; i',{class:"red-ui-search-result-node"}).css({ + "margin-top": "2px", + "margin-left": "3px" + }).appendTo(container); + var nodeLabel = $('').css({ + "line-height": "32px", + "margin-left": "6px" + }).appendTo(container); + if (node) { + var colour = RED.utils.getNodeColor(node.type,node._def); + var icon_url = RED.utils.getNodeIcon(node._def,node); + if (node.type === 'tab') { + colour = "#C0DEED"; + } + nodeDiv.css('backgroundColor',colour); + var iconContainer = $('
                      ',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv); + RED.utils.createIconElement(icon_url, iconContainer, true); + var l = RED.utils.getNodeLabel(node,node.id); + nodeLabel.text(l); + } else { + nodeDiv.css({ + 'backgroundColor': '#eee', + 'border-style' : 'dashed' + }); + + } + }, + expand: function() { + var that = this; + RED.tray.hide(); + RED.view.selectNodes({ + single: true, + selected: [that.value()], + onselect: function(selection) { + that.value(selection.id); + RED.tray.show(); + }, + oncancel: function() { + RED.tray.show(); + } + }) + } } }; var nlsd = false; @@ -124,7 +179,7 @@ } var contextStores = RED.settings.context.stores; var contextOptions = contextStores.map(function(store) { - return {value:store,label: store, icon:''} + return {value:store,label: store, icon:''} }) if (contextOptions.length < 2) { allOptions.flow.options = []; @@ -138,12 +193,12 @@ var that = this; this.disarmClick = false; - this.input = $(''); + this.input = $(''); this.input.insertAfter(this.element); this.input.val(this.element.val()); this.element.addClass('red-ui-typedInput'); this.uiWidth = this.element.outerWidth(); - this.elementDiv = this.input.wrap("
                      ").parent().addClass('red-ui-typedInput-input'); + this.elementDiv = this.input.wrap("
                      ").parent().addClass('red-ui-typedInput-input-wrap'); this.uiSelect = this.elementDiv.wrap( "
                      " ).parent(); var attrStyle = this.element.attr('style'); var m; @@ -159,11 +214,11 @@ that.uiSelect.css("margin"+d,m); that.input.css("margin"+d,0); }); - - ["type","placeholder"].forEach(function(d) { + + ["type","placeholder","autocomplete","data-i18n"].forEach(function(d) { var m = that.element.attr(d); that.input.attr(d,m); - }); + }); this.uiSelect.addClass("red-ui-typedInput-container"); @@ -171,11 +226,13 @@ this.options.types = this.options.types||Object.keys(allOptions); - this.selectTrigger = $('').prependTo(this.uiSelect); - $('').toggle(this.options.types.length > 1).appendTo(this.selectTrigger); + this.selectTrigger = $('').prependTo(this.uiSelect); + $('').toggle(this.options.types.length > 1).appendTo(this.selectTrigger); this.selectLabel = $('').appendTo(this.selectTrigger); + this.valueLabelContainer = $('
                      ').appendTo(this.uiSelect) + this.types(this.options.types); if (this.options.typeField) { @@ -198,9 +255,15 @@ that.validate(); that.element.val(that.value()); that.element.trigger('change',that.propertyType,that.value()); + }); + this.input.on('keydown', function(evt) { + if (evt.keyCode >= 37 && evt.keyCode <= 40) { + evt.stopPropagation(); + } }) - this.selectTrigger.click(function(event) { + this.selectTrigger.on("click", function(event) { event.preventDefault(); + event.stopPropagation(); that._showTypeMenu(); }); this.selectTrigger.on('keydown',function(evt) { @@ -208,31 +271,35 @@ // Down that._showTypeMenu(); } + evt.stopPropagation(); }).on('focus', function() { that.uiSelect.addClass('red-ui-typedInput-focus'); }) // explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline' - this.optionSelectTrigger = $('').appendTo(this.uiSelect); + this.optionSelectTrigger = $('').appendTo(this.uiSelect); this.optionSelectLabel = $('').prependTo(this.optionSelectTrigger); RED.popover.tooltip(this.optionSelectLabel,function() { return that.optionValue; }); - this.optionSelectTrigger.click(function(event) { + this.optionSelectTrigger.on("click", function(event) { event.preventDefault(); + event.stopPropagation(); that._showOptionSelectMenu(); }).on('keydown', function(evt) { if (evt.keyCode === 40) { // Down that._showOptionSelectMenu(); } + evt.stopPropagation(); }).on('blur', function() { that.uiSelect.removeClass('red-ui-typedInput-focus'); }).on('focus', function() { that.uiSelect.addClass('red-ui-typedInput-focus'); }); - this.optionExpandButton = $('').appendTo(this.uiSelect); + this.optionExpandButton = $('').appendTo(this.uiSelect); + this.optionExpandButtonIcon = $('').appendTo(this.optionExpandButton); this.type(this.options.default||this.typeList[0].value); }catch(err) { console.log(err.stack); @@ -241,9 +308,12 @@ _showTypeMenu: function() { if (this.typeList.length > 1) { this._showMenu(this.menu,this.selectTrigger); - this.menu.find("[value='"+this.propertyType+"']").focus(); + var selected = this.menu.find("[value='"+this.propertyType+"']"); + setTimeout(function() { + selected.trigger("focus"); + },120); } else { - this.input.focus(); + this.input.trigger("focus"); } }, _showOptionSelectMenu: function() { @@ -257,25 +327,41 @@ if (selectedOption.length === 0) { selectedOption = this.optionMenu.children(":first"); } - selectedOption.focus(); + selectedOption.trigger("focus"); } }, _hideMenu: function(menu) { - $(document).off("mousedown.close-property-select"); + $(document).off("mousedown.red-ui-typedInput-close-property-select"); menu.hide(); + menu.css({ + height: "auto" + }); + + if (menu.opts.multiple) { + var selected = []; + menu.find('input[type="checkbox"]').each(function() { + if ($(this).prop("checked")) { + selected.push($(this).data('value')) + } + }) + menu.callback(selected); + } + if (this.elementDiv.is(":visible")) { - this.input.focus(); + this.input.trigger("focus"); } else if (this.optionSelectTrigger.is(":visible")){ - this.optionSelectTrigger.focus(); + this.optionSelectTrigger.trigger("focus"); } else { - this.selectTrigger.focus(); + this.selectTrigger.trigger("focus"); } }, - _createMenu: function(opts,callback) { + _createMenu: function(menuOptions,opts,callback) { var that = this; - var menu = $("
                      ").addClass("red-ui-typedInput-options"); - opts.forEach(function(opt) { + var menu = $("
                      ").addClass("red-ui-typedInput-options red-ui-editor-dialog"); + menu.opts = opts; + menu.callback = callback; + menuOptions.forEach(function(opt) { if (typeof opt === 'string') { opt = {value:opt,label:opt}; } @@ -287,7 +373,7 @@ if (opt.icon.indexOf("<") === 0) { $(opt.icon).prependTo(op); } else if (opt.icon.indexOf("/") !== -1) { - $('',{src:opt.icon,style:"margin-right: 4px; height: 18px;"}).prependTo(op); + $('',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px; height: 18px;"}).prependTo(op); } else { $('',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op); } @@ -297,32 +383,43 @@ if (!opt.icon && !opt.label) { op.text(opt.value); } + var cb; + if (opts.multiple) { + cb = $('').css("pointer-events","none").data('value',opt.value).prependTo(op).on("mousedown", function(evt) { evt.preventDefault() }); + } - op.click(function(event) { + op.on("click", function(event) { event.preventDefault(); - callback(opt.value); - that._hideMenu(menu); + event.stopPropagation(); + if (!opts.multiple) { + callback(opt.value); + that._hideMenu(menu); + } else { + cb.prop("checked",!cb.prop("checked")); + } }); }); menu.css({ - display: "none", + display: "none" }); menu.appendTo(document.body); menu.on('keydown', function(evt) { if (evt.keyCode === 40) { + evt.preventDefault(); // DOWN - $(this).children(":focus").next().focus(); + $(this).children(":focus").next().trigger("focus"); } else if (evt.keyCode === 38) { + evt.preventDefault(); // UP - $(this).children(":focus").prev().focus(); + $(this).children(":focus").prev().trigger("focus"); } else if (evt.keyCode === 27) { + // ESCAPE + evt.preventDefault(); that._hideMenu(menu); } + evt.stopPropagation(); }) - - - return menu; }, @@ -331,22 +428,37 @@ this.disarmClick = false; return } + if (menu.opts.multiple) { + var selected = {}; + this.value().split(",").forEach(function(f) { + selected[f] = true; + }) + menu.find('input[type="checkbox"]').each(function() { + $(this).prop("checked",selected[$(this).data('value')]) + }) + } + + var that = this; var pos = relativeTo.offset(); var height = relativeTo.height(); var menuHeight = menu.height(); - var top = (height+pos.top-3); + var top = (height+pos.top); if (top+menuHeight > $(window).height()) { top -= (top+menuHeight)-$(window).height()+5; } + if (top < 0) { + menu.height(menuHeight+top) + top = 0; + } menu.css({ top: top+"px", - left: (2+pos.left)+"px", + left: (pos.left)+"px", }); menu.slideDown(100); this._delay(function() { that.uiSelect.addClass('red-ui-typedInput-focus'); - $(document).on("mousedown.close-property-select", function(event) { + $(document).on("mousedown.red-ui-typedInput-close-property-select", function(event) { if(!$(event.target).closest(menu).length) { that._hideMenu(menu); } @@ -357,21 +469,27 @@ }) }); }, - _getLabelWidth: function(label) { + _getLabelWidth: function(label, done) { var labelWidth = label.outerWidth(); if (labelWidth === 0) { - var container = $('
                      ').css({ + var wrapper = $('
                      ').css({ position:"absolute", - top:0, - left:-1000 + "white-space": "nowrap", + top:-2000 }).appendTo(document.body); + var container = $('
                      ').appendTo(wrapper); var newTrigger = label.clone().appendTo(container); - labelWidth = newTrigger.outerWidth(); - container.remove(); + setTimeout(function() { + labelWidth = newTrigger.outerWidth(); + wrapper.remove(); + done(labelWidth); + },50) + } else { + done(labelWidth); } - return labelWidth; }, _resize: function() { + var that = this; if (this.uiWidth !== null) { this.uiSelect.width(this.uiWidth); } @@ -380,68 +498,78 @@ this.selectTrigger.addClass("red-ui-typedInput-full-width"); } else { this.selectTrigger.removeClass("red-ui-typedInput-full-width"); - var labelWidth = this._getLabelWidth(this.selectTrigger); - this.elementDiv.css('left',labelWidth+"px"); - if (this.optionExpandButton.is(":visible")) { - this.elementDiv.css('right',"22px"); - } else { - this.elementDiv.css('right','0'); - this.input.css({ - 'border-top-right-radius': '4px', - 'border-bottom-right-radius': '4px' - }); - } - - // if (this.optionSelectTrigger) { - // this.optionSelectTrigger.css({'left':(labelWidth)+"px",'width':'calc( 100% - '+labelWidth+'px )'}); - // } - - if (this.optionSelectTrigger) { - if (type && type.options && type.hasValue === true) { - this.optionSelectLabel.css({'left':'auto'}) - var lw = this._getLabelWidth(this.optionSelectLabel); - this.optionSelectTrigger.css({'width':(23+lw)+"px"}); - this.elementDiv.css('right',(23+lw)+"px"); - this.input.css({ - 'border-top-right-radius': 0, - 'border-bottom-right-radius': 0 - }); + this._getLabelWidth(this.selectTrigger, function(labelWidth) { + that.elementDiv.css('left',labelWidth+"px"); + that.valueLabelContainer.css('left',labelWidth+"px"); + if (that.optionExpandButton.shown) { + that.elementDiv.css('right',"22px"); + that.valueLabelContainer.css('right',"22px"); } else { - this.optionSelectLabel.css({'left':'0'}) - this.optionSelectTrigger.css({'width':'calc( 100% - '+labelWidth+'px )'}); - if (!this.optionExpandButton.is(":visible")) { - this.elementDiv.css({'right':0}); - this.input.css({ - 'border-top-right-radius': '4px', - 'border-bottom-right-radius': '4px' + that.elementDiv.css('right','0'); + that.valueLabelContainer.css('right','0'); + that.input.css({ + 'border-top-right-radius': '4px', + 'border-bottom-right-radius': '4px' + }); + } + if (that.optionSelectTrigger) { + if (type && type.options && type.hasValue === true) { + that.optionSelectLabel.css({'left':'auto'}) + that._getLabelWidth(that.optionSelectLabel, function(lw) { + that.optionSelectTrigger.css({'width':(23+lw)+"px"}); + that.elementDiv.css('right',(23+lw)+"px"); + that.input.css({ + 'border-top-right-radius': 0, + 'border-bottom-right-radius': 0 + }); }); + } else { + that.optionSelectLabel.css({'left':'0'}) + that.optionSelectTrigger.css({'width':'calc( 100% - '+labelWidth+'px )'}); + if (!that.optionExpandButton.shown) { + that.elementDiv.css({'right':0}); + that.input.css({ + 'border-top-right-radius': '4px', + 'border-bottom-right-radius': '4px' + }); + } } } - } + }); } }, _updateOptionSelectLabel: function(o) { var opt = this.typeMap[this.propertyType]; this.optionSelectLabel.empty(); - if (o.icon) { - if (o.icon.indexOf("<") === 0) { - $(o.icon).prependTo(this.optionSelectLabel); - } else if (o.icon.indexOf("/") !== -1) { - // url - $('',{src:o.icon,style:"height: 18px;"}).prependTo(this.optionSelectLabel); + if (this.typeMap[this.propertyType].valueLabel) { + if (opt.multiple) { + this.typeMap[this.propertyType].valueLabel.call(this,this.optionSelectLabel,o); } else { - // icon class - $('',{class:"red-ui-typedInput-icon "+o.icon}).prependTo(this.optionSelectLabel); + this.typeMap[this.propertyType].valueLabel.call(this,this.optionSelectLabel,o.value); + } + } else if (!opt.multiple) { + if (o.icon) { + if (o.icon.indexOf("<") === 0) { + $(o.icon).prependTo(this.optionSelectLabel); + } else if (o.icon.indexOf("/") !== -1) { + // url + $('',{src:mapDeprecatedIcon(o.icon),style:"height: 18px;"}).prependTo(this.optionSelectLabel); + } else { + // icon class + $('',{class:"red-ui-typedInput-icon "+o.icon}).prependTo(this.optionSelectLabel); + } + } else if (o.label) { + this.optionSelectLabel.text(o.label); + } else { + this.optionSelectLabel.text(o.value); + } + if (opt.hasValue) { + this.optionValue = o.value; + this._resize(); + this.input.trigger('change',this.propertyType,this.value()); } - } else if (o.label) { - this.optionSelectLabel.text(o.label); } else { - this.optionSelectLabel.text(o.value); - } - if (opt.hasValue) { - this.optionValue = o.value; - this._resize(); - this.input.trigger('change',this.propertyType,this.value()); + this.optionSelectLabel.text(o.length+" selected"); } }, _destroy: function() { @@ -449,6 +577,7 @@ this.optionMenu.remove(); } this.menu.remove(); + this.uiSelect.remove(); }, types: function(types) { var that = this; @@ -465,11 +594,11 @@ return result; }); this.selectTrigger.toggleClass("disabled", this.typeList.length === 1); - this.selectTrigger.find(".fa-sort-desc").toggle(this.typeList.length > 1) + this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1) if (this.menu) { this.menu.remove(); } - this.menu = this._createMenu(this.typeList, function(v) { that.type(v) }); + this.menu = this._createMenu(this.typeList,{},function(v) { that.type(v) }); if (currentType && !this.typeMap.hasOwnProperty(currentType)) { this.type(this.typeList[0].value); } else { @@ -483,33 +612,52 @@ this._resize(); }, value: function(value) { + var that = this; + var opt = this.typeMap[this.propertyType]; if (!arguments.length) { var v = this.input.val(); - if (this.typeMap[this.propertyType].export) { - v = this.typeMap[this.propertyType].export(v,this.optionValue) + if (opt.export) { + v = opt.export(v,this.optionValue) } return v; } else { - var selectedOption; - if (this.typeMap[this.propertyType].options) { - for (var i=0;i',{src:opt.icon,style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel); + image.src = mapDeprecatedIcon(opt.icon); + $('',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel); } else { $('',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(this.selectLabel); } - } else { + } + if (opt.hasValue === false || (opt.showLabel !== false && !opt.icon)) { this.selectLabel.text(opt.label); } if (this.optionMenu) { @@ -549,13 +700,16 @@ if (opt.options) { if (this.optionExpandButton) { this.optionExpandButton.hide(); + this.optionExpandButton.shown = false; } if (this.optionSelectTrigger) { this.optionSelectTrigger.show(); if (!opt.hasValue) { this.elementDiv.hide(); + this.valueLabelContainer.hide(); } else { this.elementDiv.show(); + this.valueLabelContainer.hide(); } this.activeOptions = {}; opt.options.forEach(function(o) { @@ -569,36 +723,50 @@ if (!that.activeOptions.hasOwnProperty(that.optionValue)) { that.optionValue = null; } - this.optionMenu = this._createMenu(opt.options,function(v){ - that._updateOptionSelectLabel(that.activeOptions[v]); - if (!opt.hasValue) { - that.value(that.activeOptions[v].value) - } - }); + var op; if (!opt.hasValue) { - var currentVal = this.input.val(); var validValue = false; - for (var i=0;i'); + var content = opt.expand.content.call(that,container); + var panel = RED.popover.panel(container); + panel.container.css({ + width:that.valueLabelContainer.width() + }); + if (opt.expand.minWidth) { + panel.container.css({ + minWidth: opt.expand.minWidth+"px" + }); + } + panel.show({ + target:that.optionExpandButton, + onclose:content.onclose, + align: "right" + }); + } }) } else { + this.optionExpandButton.shown = false; this.optionExpandButton.hide(); } } + this._trigger("typechange",null,this.propertyType); this.input.trigger('change',this.propertyType,this.value()); } - if (image) { - image.onload = function() { that._resize(); } - image.onerror = function() { that._resize(); } - } else { + if (!image) { this._resize(); } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index 96363e21b..cdf84d02f 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -17,9 +17,9 @@ RED.deploy = (function() { var deploymentTypes = { - "full":{img:"red/images/deploy-full-o.png"}, - "nodes":{img:"red/images/deploy-nodes-o.png"}, - "flows":{img:"red/images/deploy-flows-o.png"} + "full":{img:"red/images/deploy-full-o.svg"}, + "nodes":{img:"red/images/deploy-nodes-o.svg"}, + "flows":{img:"red/images/deploy-flows-o.svg"} } var ignoreDeployWarnings = { @@ -36,7 +36,7 @@ RED.deploy = (function() { function changeDeploymentType(type) { deploymentType = type; - $("#btn-deploy-icon").attr("src",deploymentTypes[type].img); + $("#red-ui-header-button-deploy-icon").attr("src",deploymentTypes[type].img); } /** @@ -44,62 +44,68 @@ RED.deploy = (function() { * type: "default" - Button with drop-down options - no further customisation available * type: "simple" - Button without dropdown. Customisations: * label: the text to display - default: "Deploy" - * icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.png" + * icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.svg" */ function init(options) { options = options || {}; var type = options.type || "default"; if (type == "default") { - $('
                    1. '+ - ''+ - ''+ - ' '+ + $('
                    2. '+ + ''+ + ''+ + ' '+ ''+RED._("deploy.deploy")+''+ ''+ - ''+ + ''+ ''+ ''+ ''+ - ''+ - '
                    3. ').prependTo(".header-toolbar"); - RED.menu.init({id:"btn-deploy-options", + ''+ + '').prependTo(".red-ui-header-toolbar"); + RED.menu.init({id:"red-ui-header-button-deploy-options", options: [ - {id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}}, - {id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}}, - {id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}}, + {id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.svg",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}}, + {id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.svg",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}}, + {id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.svg",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}}, null, - {id:"deploymenu-item-reload", icon:"red/images/deploy-reload.png",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"}, + {id:"deploymenu-item-reload", icon:"red/images/deploy-reload.svg",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"}, ] }); } else if (type == "simple") { var label = options.label || RED._("deploy.deploy"); - var icon = 'red/images/deploy-full-o.png'; + var icon = 'red/images/deploy-full-o.svg'; if (options.hasOwnProperty('icon')) { icon = options.icon; } - $('
                    4. '+ - ''+ - ''+ - (icon?' ':'')+ + $('
                    5. '+ + ''+ + ''+ + (icon?' ':'')+ ''+label+''+ ''+ - ''+ + ''+ ''+ ''+ ''+ - '
                    6. ').prependTo(".header-toolbar"); + '').prependTo(".red-ui-header-toolbar"); } - $('#btn-deploy').click(function(event) { + $('#red-ui-header-button-deploy').on("click", function(event) { event.preventDefault(); save(); }); RED.actions.add("core:deploy-flows",save); - RED.actions.add("core:restart-flows",restart); + if (type === "default") { + RED.actions.add("core:restart-flows",restart); + RED.actions.add("core:set-deploy-type-to-full",function() { RED.menu.setSelected("deploymenu-item-full",true);}); + RED.actions.add("core:set-deploy-type-to-modified-flows",function() { RED.menu.setSelected("deploymenu-item-flow",true); }); + RED.actions.add("core:set-deploy-type-to-modified-nodes",function() { RED.menu.setSelected("deploymenu-item-node",true); }); + } + RED.events.on('nodes:change',function(state) { @@ -107,10 +113,10 @@ RED.deploy = (function() { window.onbeforeunload = function() { return RED._("deploy.confirm.undeployedChanges"); } - $("#btn-deploy").removeClass("disabled"); + $("#red-ui-header-button-deploy").removeClass("disabled"); } else { window.onbeforeunload = null; - $("#btn-deploy").addClass("disabled"); + $("#red-ui-header-button-deploy").addClass("disabled"); } }); @@ -176,14 +182,14 @@ RED.deploy = (function() { function resolveConflict(currentNodes, activeDeploy) { var message = $('
                      '); $('

                      ').appendTo(message); - var conflictCheck = $('
                      '+ + var conflictCheck = $('
                      '+ '
                      '+ '
                      ').appendTo(message); - var conflictAutoMerge = $('
                      '+ - '
                      '+ + var conflictAutoMerge = $('
                      '+ + '
                      '+ '
                      ').hide().appendTo(message); - var conflictManualMerge = $('
                      '+ - '
                      '+ + var conflictManualMerge = $('
                      '+ + '
                      '+ '
                      ').hide().appendTo(message); message.i18n(); @@ -196,22 +202,22 @@ RED.deploy = (function() { } }, { - id: "node-dialog-confirm-deploy-review", + id: "red-ui-deploy-dialog-confirm-deploy-review", text: RED._("deploy.confirm.button.review"), class: "primary disabled", click: function() { - if (!$("#node-dialog-confirm-deploy-review").hasClass('disabled')) { + if (!$("#red-ui-deploy-dialog-confirm-deploy-review").hasClass('disabled')) { RED.diff.showRemoteDiff(); conflictNotification.close(); } } }, { - id: "node-dialog-confirm-deploy-merge", + id: "red-ui-deploy-dialog-confirm-deploy-merge", text: RED._("deploy.confirm.button.merge"), class: "primary disabled", click: function() { - if (!$("#node-dialog-confirm-deploy-merge").hasClass('disabled')) { + if (!$("#red-ui-deploy-dialog-confirm-deploy-merge").hasClass('disabled')) { RED.diff.mergeDiff(currentDiff); conflictNotification.close(); } @@ -220,7 +226,7 @@ RED.deploy = (function() { ]; if (activeDeploy) { buttons.push({ - id: "node-dialog-confirm-deploy-overwrite", + id: "red-ui-deploy-dialog-confirm-deploy-overwrite", text: RED._("deploy.confirm.button.overwrite"), class: "primary", click: function() { @@ -245,11 +251,11 @@ RED.deploy = (function() { var d = Object.keys(diff.conflicts); if (d.length === 0) { conflictAutoMerge.show(); - $("#node-dialog-confirm-deploy-merge").removeClass('disabled') + $("#red-ui-deploy-dialog-confirm-deploy-merge").removeClass('disabled') } else { conflictManualMerge.show(); } - $("#node-dialog-confirm-deploy-review").removeClass('disabled') + $("#red-ui-deploy-dialog-confirm-deploy-review").removeClass('disabled') },ellapsed); }) } @@ -266,15 +272,15 @@ RED.deploy = (function() { } function restart() { var startTime = Date.now(); - $(".deploy-button-content").css('opacity',0); - $(".deploy-button-spinner").show(); - var deployWasEnabled = !$("#btn-deploy").hasClass("disabled"); - $("#btn-deploy").addClass("disabled"); + $(".red-ui-deploy-button-content").css('opacity',0); + $(".red-ui-deploy-button-spinner").show(); + var deployWasEnabled = !$("#red-ui-header-button-deploy").hasClass("disabled"); + $("#red-ui-header-button-deploy").addClass("disabled"); deployInflight = true; - $("#header-shade").show(); - $("#editor-shade").show(); - $("#palette-shade").show(); - $("#sidebar-shade").show(); + $("#red-ui-header-shade").show(); + $("#red-ui-editor-shade").show(); + $("#red-ui-palette-shade").show(); + $("#red-ui-sidebar-shade").show(); $.ajax({ url:"flows", @@ -284,12 +290,12 @@ RED.deploy = (function() { } }).done(function(data,textStatus,xhr) { if (deployWasEnabled) { - $("#btn-deploy").removeClass("disabled"); + $("#red-ui-header-button-deploy").removeClass("disabled"); } RED.notify('

                      '+RED._("deploy.successfulRestart")+'

                      ',"success"); }).fail(function(xhr,textStatus,err) { if (deployWasEnabled) { - $("#btn-deploy").removeClass("disabled"); + $("#red-ui-header-button-deploy").removeClass("disabled"); } if (xhr.status === 401) { RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error"); @@ -304,17 +310,17 @@ RED.deploy = (function() { deployInflight = false; var delta = Math.max(0,300-(Date.now()-startTime)); setTimeout(function() { - $(".deploy-button-content").css('opacity',1); - $(".deploy-button-spinner").hide(); - $("#header-shade").hide(); - $("#editor-shade").hide(); - $("#palette-shade").hide(); - $("#sidebar-shade").hide(); + $(".red-ui-deploy-button-content").css('opacity',1); + $(".red-ui-deploy-button-spinner").hide(); + $("#red-ui-header-shade").hide(); + $("#red-ui-editor-shade").hide(); + $("#red-ui-palette-shade").hide(); + $("#red-ui-sidebar-shade").hide(); },delta); }); } function save(skipValidation,force) { - if (!$("#btn-deploy").hasClass("disabled")) { + if (!$("#red-ui-header-button-deploy").hasClass("disabled")) { if (!RED.user.hasPermission("flows.write")) { RED.notify(RED._("user.errors.deploy"),"error"); return; @@ -355,13 +361,13 @@ RED.deploy = (function() { if (hasUnknown && !ignoreDeployWarnings.unknown) { showWarning = true; notificationMessage = "

                      "+RED._('deploy.confirm.unknown')+"

                      "+ - '
                      • '+cropList(unknownNodes).map(function(n) { return sanitize(n) }).join("
                      • ")+"

                      "+ + '

                      • '+cropList(unknownNodes).map(function(n) { return sanitize(n) }).join("
                      • ")+"

                      "+ RED._('deploy.confirm.confirm')+ "

                      "; notificationButtons= [ { - id: "node-dialog-confirm-deploy-deploy", + id: "red-ui-deploy-dialog-confirm-deploy-deploy", text: RED._("deploy.confirm.button.confirm"), class: "primary", click: function() { @@ -375,12 +381,12 @@ RED.deploy = (function() { invalidNodes.sort(sortNodeInfo); notificationMessage = "

                      "+RED._('deploy.confirm.improperlyConfigured')+"

                      "+ - '
                      • '+cropList(invalidNodes.map(function(A) { return sanitize( (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")")})).join("
                      • ")+"

                      "+ + '

                      • '+cropList(invalidNodes.map(function(A) { return sanitize( (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")")})).join("
                      • ")+"

                      "+ RED._('deploy.confirm.confirm')+ "

                      "; notificationButtons= [ { - id: "node-dialog-confirm-deploy-deploy", + id: "red-ui-deploy-dialog-confirm-deploy-deploy", text: RED._("deploy.confirm.button.confirm"), class: "primary", click: function() { @@ -411,9 +417,9 @@ RED.deploy = (function() { var nns = RED.nodes.createCompleteNodeSet(); var startTime = Date.now(); - $(".deploy-button-content").css('opacity',0); - $(".deploy-button-spinner").show(); - $("#btn-deploy").addClass("disabled"); + $(".red-ui-deploy-button-content").css('opacity',0); + $(".red-ui-deploy-button-spinner").show(); + $("#red-ui-header-button-deploy").addClass("disabled"); var data = {flows:nns}; @@ -422,10 +428,10 @@ RED.deploy = (function() { } deployInflight = true; - $("#header-shade").show(); - $("#editor-shade").show(); - $("#palette-shade").show(); - $("#sidebar-shade").show(); + $("#red-ui-header-shade").show(); + $("#red-ui-editor-shade").show(); + $("#red-ui-palette-shade").show(); + $("#red-ui-sidebar-shade").show(); $.ajax({ url:"flows", type: "POST", @@ -476,7 +482,7 @@ RED.deploy = (function() { RED.events.emit("deploy"); }).fail(function(xhr,textStatus,err) { RED.nodes.dirty(true); - $("#btn-deploy").removeClass("disabled"); + $("#red-ui-header-button-deploy").removeClass("disabled"); if (xhr.status === 401) { RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error"); } else if (xhr.status === 409) { @@ -490,12 +496,12 @@ RED.deploy = (function() { deployInflight = false; var delta = Math.max(0,300-(Date.now()-startTime)); setTimeout(function() { - $(".deploy-button-content").css('opacity',1); - $(".deploy-button-spinner").hide(); - $("#header-shade").hide(); - $("#editor-shade").hide(); - $("#palette-shade").hide(); - $("#sidebar-shade").hide(); + $(".red-ui-deploy-button-content").css('opacity',1); + $(".red-ui-deploy-button-spinner").hide(); + $("#red-ui-header-shade").hide(); + $("#red-ui-editor-shade").hide(); + $("#red-ui-palette-shade").hide(); + $("#red-ui-sidebar-shade").hide(); },delta); }); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js index bef2ffc69..7c5b22f26 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js @@ -22,7 +22,7 @@ RED.diff = (function() { } function createDiffTable(container,CurrentDiff) { - var diffList = $('
                        ').appendTo(container); + var diffList = $('
                          ').appendTo(container); diffList.editableList({ addButton: false, height: "auto", @@ -34,22 +34,22 @@ RED.diff = (function() { var def = object.def; var conflicts = CurrentDiff.conflicts; - var tabDiv = $('
                          ',{class:"node-diff-tab"}).appendTo(container); + var tabDiv = $('
                          ',{class:"red-ui-diff-list-flow"}).appendTo(container); tabDiv.addClass('collapsed'); - var titleRow = $('
                          ',{class:"node-diff-tab-title"}).appendTo(tabDiv); + var titleRow = $('
                          ',{class:"red-ui-diff-list-flow-title"}).appendTo(tabDiv); var nodesDiv = $('
                          ').appendTo(tabDiv); - var originalCell = $('
                          ',{class:"node-diff-node-entry-cell"}).appendTo(titleRow); - var localCell = $('
                          ',{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(titleRow); + var originalCell = $('
                          ',{class:"red-ui-diff-list-node-cell"}).appendTo(titleRow); + var localCell = $('
                          ',{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-local"}).appendTo(titleRow); var remoteCell; var selectState; if (remoteDiff) { - remoteCell = $('
                          ',{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(titleRow); + remoteCell = $('
                          ',{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-remote"}).appendTo(titleRow); } - $('').appendTo(originalCell); + $('').appendTo(originalCell); createNodeIcon(tab,def).appendTo(originalCell); var tabForLabel = (object.newTab || object.tab).n; - var titleSpan = $('',{class:"node-diff-tab-title-meta"}).appendTo(originalCell); + var titleSpan = $('',{class:"red-ui-diff-list-flow-title-meta"}).appendTo(originalCell); if (tabForLabel.type === 'tab') { titleSpan.text(tabForLabel.label||tabForLabel.id); } else if (tab.type === 'subflow') { @@ -87,53 +87,53 @@ RED.diff = (function() { } } if (tab.type !== undefined) { - var div = $("
                          ",{class:"node-diff-node-entry node-diff-node-props collapsed"}).appendTo(nodesDiv); - var row = $("
                          ",{class:"node-diff-node-entry-header"}).appendTo(div); - var originalNodeDiv = $("
                          ",{class:"node-diff-node-entry-cell"}).appendTo(row); - var localNodeDiv = $("
                          ",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(row); + var div = $("
                          ",{class:"red-ui-diff-list-node red-ui-diff-list-node-props collapsed"}).appendTo(nodesDiv); + var row = $("
                          ",{class:"red-ui-diff-list-node-header"}).appendTo(div); + var originalNodeDiv = $("
                          ",{class:"red-ui-diff-list-node-cell"}).appendTo(row); + var localNodeDiv = $("
                          ",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-local"}).appendTo(row); var localChanged = false; var remoteChanged = false; if (!localDiff.newConfig.all[tab.id]) { - localNodeDiv.addClass("node-diff-empty"); + localNodeDiv.addClass("red-ui-diff-empty"); } else if (localDiff.added[tab.id]) { - localNodeDiv.addClass("node-diff-node-added"); + localNodeDiv.addClass("red-ui-diff-status-added"); localChanged = true; - $(' ').appendTo(localNodeDiv); + $(' ').appendTo(localNodeDiv); } else if (localDiff.changed[tab.id]) { - localNodeDiv.addClass("node-diff-node-changed"); + localNodeDiv.addClass("red-ui-diff-status-changed"); localChanged = true; - $(' ').appendTo(localNodeDiv); + $(' ').appendTo(localNodeDiv); } else { - localNodeDiv.addClass("node-diff-node-unchanged"); - $(' ').appendTo(localNodeDiv); + localNodeDiv.addClass("red-ui-diff-status-unchanged"); + $(' ').appendTo(localNodeDiv); } var remoteNodeDiv; if (remoteDiff) { - remoteNodeDiv = $("
                          ",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(row); + remoteNodeDiv = $("
                          ",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-remote"}).appendTo(row); if (!remoteDiff.newConfig.all[tab.id]) { - remoteNodeDiv.addClass("node-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-empty"); if (remoteDiff.deleted[tab.id]) { remoteChanged = true; } } else if (remoteDiff.added[tab.id]) { - remoteNodeDiv.addClass("node-diff-node-added"); + remoteNodeDiv.addClass("red-ui-diff-status-added"); remoteChanged = true; - $(' ').appendTo(remoteNodeDiv); + $(' ').appendTo(remoteNodeDiv); } else if (remoteDiff.changed[tab.id]) { - remoteNodeDiv.addClass("node-diff-node-changed"); + remoteNodeDiv.addClass("red-ui-diff-status-changed"); remoteChanged = true; - $(' ').appendTo(remoteNodeDiv); + $(' ').appendTo(remoteNodeDiv); } else { - remoteNodeDiv.addClass("node-diff-node-unchanged"); - $(' ').appendTo(remoteNodeDiv); + remoteNodeDiv.addClass("red-ui-diff-status-unchanged"); + $(' ').appendTo(remoteNodeDiv); } } - $('').appendTo(originalNodeDiv); + $('').appendTo(originalNodeDiv); $('').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv); - row.click(function(evt) { + row.on("click", function(evt) { evt.preventDefault(); $(this).parent().toggleClass('collapsed'); }); @@ -143,13 +143,13 @@ RED.diff = (function() { if (conflicts[tab.id]) { flowStats.conflicts++; - if (!localNodeDiv.hasClass("node-diff-empty")) { - $('').prependTo(localNodeDiv); + if (!localNodeDiv.hasClass("red-ui-diff-empty")) { + $('').prependTo(localNodeDiv); } - if (!remoteNodeDiv.hasClass("node-diff-empty")) { - $('').prependTo(remoteNodeDiv); + if (!remoteNodeDiv.hasClass("red-ui-diff-empty")) { + $('').prependTo(remoteNodeDiv); } - div.addClass("node-diff-node-entry-conflict"); + div.addClass("red-ui-diff-list-node-conflict"); } else { selectState = CurrentDiff.resolutions[tab.id]; } @@ -157,7 +157,7 @@ RED.diff = (function() { createNodeConflictRadioBoxes(tab,div,localNodeDiv,remoteNodeDiv,true,!conflicts[tab.id],selectState,CurrentDiff); } } - // var stats = $('',{class:"node-diff-tab-stats"}).appendTo(titleRow); + // var stats = $('',{class:"red-ui-diff-list-flow-stats"}).appendTo(titleRow); var localNodeCount = 0; var remoteNodeCount = 0; var seen = {}; @@ -182,21 +182,21 @@ RED.diff = (function() { } }); } - titleRow.click(function(evt) { - // if (titleRow.parent().find(".node-diff-node-entry:not(.hide)").length > 0) { + titleRow.on("click", function(evt) { + // if (titleRow.parent().find(".red-ui-diff-list-node:not(.hide)").length > 0) { titleRow.parent().toggleClass('collapsed'); if ($(this).parent().hasClass('collapsed')) { - $(this).parent().find('.node-diff-node-entry').addClass('collapsed'); - $(this).parent().find('.debug-message-element').addClass('collapsed'); + $(this).parent().find('.red-ui-diff-list-node').addClass('collapsed'); + $(this).parent().find('.red-ui-debug-msg-element').addClass('collapsed'); } // } }) if (localDiff.deleted[tab.id]) { - $(' ').appendTo(localCell); + $(' ').appendTo(localCell); } else if (object.newTab) { if (localDiff.added[tab.id]) { - $(' ').appendTo(localCell); + $(' ').appendTo(localCell); } else { if (tab.id) { if (localDiff.changed[tab.id]) { @@ -205,37 +205,37 @@ RED.diff = (function() { flowStats.local.unchangedCount++; } } - var localStats = $('',{class:"node-diff-tab-stats"}).appendTo(localCell); - $('').text(RED._('diff.nodeCount',{count:localNodeCount})).appendTo(localStats); + var localStats = $('',{class:"red-ui-diff-list-flow-stats"}).appendTo(localCell); + $('').text(RED._('diff.nodeCount',{count:localNodeCount})).appendTo(localStats); if (flowStats.conflicts + flowStats.local.addedCount + flowStats.local.changedCount + flowStats.local.deletedCount > 0) { - $(' [ ').appendTo(localStats); + $(' [ ').appendTo(localStats); if (flowStats.conflicts > 0) { - $(' '+flowStats.conflicts+'').appendTo(localStats); + $(' '+flowStats.conflicts+'').appendTo(localStats); } if (flowStats.local.addedCount > 0) { - $(' '+flowStats.local.addedCount+'').appendTo(localStats); + $(' '+flowStats.local.addedCount+'').appendTo(localStats); } if (flowStats.local.changedCount > 0) { - $(' '+flowStats.local.changedCount+'').appendTo(localStats); + $(' '+flowStats.local.changedCount+'').appendTo(localStats); } if (flowStats.local.deletedCount > 0) { - $(' '+flowStats.local.deletedCount+'').appendTo(localStats); + $(' '+flowStats.local.deletedCount+'').appendTo(localStats); } - $(' ] ').appendTo(localStats); + $(' ] ').appendTo(localStats); } } } else { - localCell.addClass("node-diff-empty"); + localCell.addClass("red-ui-diff-empty"); } if (remoteDiff) { if (remoteDiff.deleted[tab.id]) { - $(' ').appendTo(remoteCell); + $(' ').appendTo(remoteCell); } else if (object.remoteTab) { if (remoteDiff.added[tab.id]) { - $(' ').appendTo(remoteCell); + $(' ').appendTo(remoteCell); } else { if (tab.id) { if (remoteDiff.changed[tab.id]) { @@ -244,31 +244,31 @@ RED.diff = (function() { flowStats.remote.unchangedCount++; } } - var remoteStats = $('',{class:"node-diff-tab-stats"}).appendTo(remoteCell); - $('').text(RED._('diff.nodeCount',{count:remoteNodeCount})).appendTo(remoteStats); + var remoteStats = $('',{class:"red-ui-diff-list-flow-stats"}).appendTo(remoteCell); + $('').text(RED._('diff.nodeCount',{count:remoteNodeCount})).appendTo(remoteStats); if (flowStats.conflicts + flowStats.remote.addedCount + flowStats.remote.changedCount + flowStats.remote.deletedCount > 0) { - $(' [ ').appendTo(remoteStats); + $(' [ ').appendTo(remoteStats); if (flowStats.conflicts > 0) { - $(' '+flowStats.conflicts+'').appendTo(remoteStats); + $(' '+flowStats.conflicts+'').appendTo(remoteStats); } if (flowStats.remote.addedCount > 0) { - $(' '+flowStats.remote.addedCount+'').appendTo(remoteStats); + $(' '+flowStats.remote.addedCount+'').appendTo(remoteStats); } if (flowStats.remote.changedCount > 0) { - $(' '+flowStats.remote.changedCount+'').appendTo(remoteStats); + $(' '+flowStats.remote.changedCount+'').appendTo(remoteStats); } if (flowStats.remote.deletedCount > 0) { - $(' '+flowStats.remote.deletedCount+'').appendTo(remoteStats); + $(' '+flowStats.remote.deletedCount+'').appendTo(remoteStats); } - $(' ] ').appendTo(remoteStats); + $(' ] ').appendTo(remoteStats); } } } else { - remoteCell.addClass("node-diff-empty"); + remoteCell.addClass("red-ui-diff-empty"); } selectState = ""; if (flowStats.conflicts > 0) { - titleRow.addClass("node-diff-node-entry-conflict"); + titleRow.addClass("red-ui-diff-list-node-conflict"); } else { selectState = CurrentDiff.resolutions[tab.id]; } @@ -279,8 +279,8 @@ RED.diff = (function() { } } - if (tabDiv.find(".node-diff-node-entry").length === 0) { - tabDiv.addClass("node-diff-tab-empty"); + if (tabDiv.find(".red-ui-diff-list-node").length === 0) { + tabDiv.addClass("red-ui-diff-list-flow-empty"); } container.i18n(); } @@ -288,10 +288,10 @@ RED.diff = (function() { return diffList; } function buildDiffPanel(container,diff,options) { - var diffPanel = $('
                          ').appendTo(container); - var diffHeaders = $('
                          ').appendTo(diffPanel); + var diffPanel = $('
                          ').appendTo(container); + var diffHeaders = $('
                          ').appendTo(diffPanel); if (options.mode === "merge") { - diffPanel.addClass("node-dialog-view-diff-panel-merge"); + diffPanel.addClass("red-ui-diff-panel-merge"); } var diffList = createDiffTable(diffPanel, diff); @@ -304,13 +304,13 @@ RED.diff = (function() { if (remoteDiff !== undefined) { - diffPanel.addClass('node-diff-three-way'); + diffPanel.addClass('red-ui-diff-three-way'); var localTitle = options.oldRevTitle || RED._('diff.local'); var remoteTitle = options.newRevTitle || RED._('diff.remote'); $('
                          ').text(localTitle).appendTo(diffHeaders); $('
                          ').text(remoteTitle).appendTo(diffHeaders); } else { - diffPanel.removeClass('node-diff-three-way'); + diffPanel.removeClass('red-ui-diff-three-way'); } return { @@ -399,9 +399,9 @@ RED.diff = (function() { diff: localDiff, def: { defaults:{}, - icon:"subflow.png", + icon:"subflow.svg", category: "subflows", - color: "#da9" + color: "#DDAA99" }, tab:currentConfig.subflows[subflowId] } @@ -422,9 +422,9 @@ RED.diff = (function() { diff: localDiff, def: { defaults:{}, - icon:"subflow.png", + icon:"subflow.svg", category: "subflows", - color: "#da9" + color: "#DDAA99" }, tab:newConfig.subflows[subflowId], newTab:newConfig.subflows[subflowId] @@ -443,9 +443,9 @@ RED.diff = (function() { remoteDiff: remoteDiff, def: { defaults:{}, - icon:"subflow.png", + icon:"subflow.svg", category: "subflows", - color: "#da9" + color: "#DDAA99" }, tab:remoteDiff.newConfig.subflows[subflowId], remoteTab: remoteDiff.newConfig.subflows[subflowId] @@ -458,7 +458,7 @@ RED.diff = (function() { }; } function formatWireProperty(wires,allNodes) { - var result = $("
                          ",{class:"node-diff-property-wires"}) + var result = $("
                          ",{class:"red-ui-diff-list-wires"}) var list = $("
                            "); var c = 0; wires.forEach(function(p,i) { @@ -489,7 +489,7 @@ RED.diff = (function() { return result; } function createNodeIcon(node,def) { - var nodeDiv = $("
                            ",{class:"node-diff-node-entry-node"}); + var nodeDiv = $("
                            ",{class:"red-ui-diff-list-node-icon"}); var colour = RED.utils.getNodeColor(node.type,def); var icon_url = RED.utils.getNodeIcon(def,node); if (node.type === 'tab') { @@ -497,17 +497,16 @@ RED.diff = (function() { } nodeDiv.css('backgroundColor',colour); - var iconContainer = $('
                            ',{class:"palette_icon_container"}).appendTo(nodeDiv); + var iconContainer = $('
                            ',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv); RED.utils.createIconElement(icon_url, iconContainer, false); return nodeDiv; } function createNode(node,def) { - var nodeTitleDiv = $("
                            ",{class:"node-diff-node-entry-title"}) + var nodeTitleDiv = $("
                            ",{class:"red-ui-diff-list-node-title"}) createNodeIcon(node,def).appendTo(nodeTitleDiv); - var contentDiv = $('
                            ',{class:"node-diff-node-description"}).appendTo(nodeTitleDiv); var nodeLabel = node.label || node.name || node.id; - $('',{class:"node-diff-node-label"}).text(nodeLabel).appendTo(contentDiv); + $('
                            ',{class:"red-ui-diff-list-node-description"}).text(nodeLabel).appendTo(nodeTitleDiv); return nodeTitleDiv; } function createNodeDiffRow(node,stats,CurrentDiff) { @@ -550,89 +549,89 @@ RED.diff = (function() { if (def === undefined) { if (/^subflow:/.test(node.type)) { def = { - icon:"subflow.png", + icon:"subflow.svg", category: "subflows", - color: "#da9", + color: "#DDAA99", defaults:{name:{value:""}} } } else { def = {}; } } - var div = $("
                            ",{class:"node-diff-node-entry collapsed"}); - var row = $("
                            ",{class:"node-diff-node-entry-header"}).appendTo(div); + var div = $("
                            ",{class:"red-ui-diff-list-node collapsed"}); + var row = $("
                            ",{class:"red-ui-diff-list-node-header"}).appendTo(div); - var originalNodeDiv = $("
                            ",{class:"node-diff-node-entry-cell"}).appendTo(row); - var localNodeDiv = $("
                            ",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(row); + var originalNodeDiv = $("
                            ",{class:"red-ui-diff-list-node-cell"}).appendTo(row); + var localNodeDiv = $("
                            ",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-local"}).appendTo(row); var remoteNodeDiv; var chevron; if (remoteDiff) { - remoteNodeDiv = $("
                            ",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(row); + remoteNodeDiv = $("
                            ",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-remote"}).appendTo(row); } - $('').appendTo(originalNodeDiv); + $('').appendTo(originalNodeDiv); if (unChanged) { stats.local.unchangedCount++; createNode(node,def).appendTo(originalNodeDiv); - localNodeDiv.addClass("node-diff-node-unchanged"); - $(' ').appendTo(localNodeDiv); + localNodeDiv.addClass("red-ui-diff-status-unchanged"); + $(' ').appendTo(localNodeDiv); if (remoteDiff) { stats.remote.unchangedCount++; - remoteNodeDiv.addClass("node-diff-node-unchanged"); - $(' ').appendTo(remoteNodeDiv); + remoteNodeDiv.addClass("red-ui-diff-status-unchanged"); + $(' ').appendTo(remoteNodeDiv); } - div.addClass("node-diff-node-unchanged"); + div.addClass("red-ui-diff-status-unchanged"); } else if (localDiff.added[node.id]) { - localNodeDiv.addClass("node-diff-node-added"); + localNodeDiv.addClass("red-ui-diff-status-added"); if (remoteNodeDiv) { - remoteNodeDiv.addClass("node-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-empty"); } - $(' ').appendTo(localNodeDiv); + $(' ').appendTo(localNodeDiv); createNode(node,def).appendTo(originalNodeDiv); } else if (remoteDiff && remoteDiff.added[node.id]) { - localNodeDiv.addClass("node-diff-empty"); - remoteNodeDiv.addClass("node-diff-node-added"); - $(' ').appendTo(remoteNodeDiv); + localNodeDiv.addClass("red-ui-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-status-added"); + $(' ').appendTo(remoteNodeDiv); createNode(node,def).appendTo(originalNodeDiv); } else { createNode(node,def).appendTo(originalNodeDiv); if (localDiff.moved[node.id]) { var localN = localDiff.newConfig.all[node.id]; if (!localDiff.deleted[node.z] && node.z !== localN.z && node.z !== "" && !localDiff.newConfig.all[node.z]) { - localNodeDiv.addClass("node-diff-empty"); + localNodeDiv.addClass("red-ui-diff-empty"); } else { - localNodeDiv.addClass("node-diff-node-moved"); + localNodeDiv.addClass("red-ui-diff-status-moved"); var localMovedMessage = ""; if (node.z === localN.z) { localMovedMessage = RED._("diff.type.movedFrom",{id:(localDiff.currentConfig.all[node.id].z||'global')}); } else { localMovedMessage = RED._("diff.type.movedTo",{id:(localN.z||'global')}); } - $(' '+localMovedMessage+'').appendTo(localNodeDiv); + $(' '+localMovedMessage+'').appendTo(localNodeDiv); } localChanged = true; } else if (localDiff.deleted[node.z]) { - localNodeDiv.addClass("node-diff-empty"); + localNodeDiv.addClass("red-ui-diff-empty"); localChanged = true; } else if (localDiff.deleted[node.id]) { - localNodeDiv.addClass("node-diff-node-deleted"); - $(' ').appendTo(localNodeDiv); + localNodeDiv.addClass("red-ui-diff-status-deleted"); + $(' ').appendTo(localNodeDiv); localChanged = true; } else if (localDiff.changed[node.id]) { if (localDiff.newConfig.all[node.id].z !== node.z) { - localNodeDiv.addClass("node-diff-empty"); + localNodeDiv.addClass("red-ui-diff-empty"); } else { - localNodeDiv.addClass("node-diff-node-changed"); - $(' ').appendTo(localNodeDiv); + localNodeDiv.addClass("red-ui-diff-status-changed"); + $(' ').appendTo(localNodeDiv); localChanged = true; } } else { if (localDiff.newConfig.all[node.id].z !== node.z) { - localNodeDiv.addClass("node-diff-empty"); + localNodeDiv.addClass("red-ui-diff-empty"); } else { stats.local.unchangedCount++; - localNodeDiv.addClass("node-diff-node-unchanged"); - $(' ').appendTo(localNodeDiv); + localNodeDiv.addClass("red-ui-diff-status-unchanged"); + $(' ').appendTo(localNodeDiv); } } @@ -640,36 +639,36 @@ RED.diff = (function() { if (remoteDiff.moved[node.id]) { var remoteN = remoteDiff.newConfig.all[node.id]; if (!remoteDiff.deleted[node.z] && node.z !== remoteN.z && node.z !== "" && !remoteDiff.newConfig.all[node.z]) { - remoteNodeDiv.addClass("node-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-empty"); } else { - remoteNodeDiv.addClass("node-diff-node-moved"); + remoteNodeDiv.addClass("red-ui-diff-status-moved"); var remoteMovedMessage = ""; if (node.z === remoteN.z) { remoteMovedMessage = RED._("diff.type.movedFrom",{id:(remoteDiff.currentConfig.all[node.id].z||'global')}); } else { remoteMovedMessage = RED._("diff.type.movedTo",{id:(remoteN.z||'global')}); } - $(' '+remoteMovedMessage+'').appendTo(remoteNodeDiv); + $(' '+remoteMovedMessage+'').appendTo(remoteNodeDiv); } } else if (remoteDiff.deleted[node.z]) { - remoteNodeDiv.addClass("node-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-empty"); } else if (remoteDiff.deleted[node.id]) { - remoteNodeDiv.addClass("node-diff-node-deleted"); - $(' ').appendTo(remoteNodeDiv); + remoteNodeDiv.addClass("red-ui-diff-status-deleted"); + $(' ').appendTo(remoteNodeDiv); } else if (remoteDiff.changed[node.id]) { if (remoteDiff.newConfig.all[node.id].z !== node.z) { - remoteNodeDiv.addClass("node-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-empty"); } else { - remoteNodeDiv.addClass("node-diff-node-changed"); - $(' ').appendTo(remoteNodeDiv); + remoteNodeDiv.addClass("red-ui-diff-status-changed"); + $(' ').appendTo(remoteNodeDiv); } } else { if (remoteDiff.newConfig.all[node.id].z !== node.z) { - remoteNodeDiv.addClass("node-diff-empty"); + remoteNodeDiv.addClass("red-ui-diff-empty"); } else { stats.remote.unchangedCount++; - remoteNodeDiv.addClass("node-diff-node-unchanged"); - $(' ').appendTo(remoteNodeDiv); + remoteNodeDiv.addClass("red-ui-diff-status-unchanged"); + $(' ').appendTo(remoteNodeDiv); } } } @@ -692,22 +691,22 @@ RED.diff = (function() { if (conflicted) { stats.conflicts++; - if (!localNodeDiv.hasClass("node-diff-empty")) { - $('').prependTo(localNodeDiv); + if (!localNodeDiv.hasClass("red-ui-diff-empty")) { + $('').prependTo(localNodeDiv); } - if (!remoteNodeDiv.hasClass("node-diff-empty")) { - $('').prependTo(remoteNodeDiv); + if (!remoteNodeDiv.hasClass("red-ui-diff-empty")) { + $('').prependTo(remoteNodeDiv); } - div.addClass("node-diff-node-entry-conflict"); + div.addClass("red-ui-diff-list-node-conflict"); } else { selectState = CurrentDiff.resolutions[node.id]; } // Node row createNodeConflictRadioBoxes(node,div,localNodeDiv,remoteNodeDiv,false,!conflicted,selectState,CurrentDiff); - row.click(function(evt) { + row.on("click", function(evt) { $(this).parent().toggleClass('collapsed'); - if($(this).siblings('.node-diff-node-entry-properties').length === 0) { + if($(this).siblings('.red-ui-diff-list-node-properties').length === 0) { createNodePropertiesTable(def,node,localNode,remoteNode).appendTo(div); } }); @@ -722,7 +721,7 @@ RED.diff = (function() { remoteNode = remoteNodeObj.node; } - var nodePropertiesDiv = $("
                            ",{class:"node-diff-node-entry-properties"}); + var nodePropertiesDiv = $("
                            ",{class:"red-ui-diff-list-node-properties"}); var nodePropertiesTable = $("").appendTo(nodePropertiesDiv); var nodePropertiesTableCols = $('').appendTo(nodePropertiesTable); if (remoteNode !== undefined) { @@ -742,25 +741,25 @@ RED.diff = (function() { var status; row = $("").appendTo(nodePropertiesTableBody); - $("").appendTo(nodePropertiesTableBody); - $("").appendTo(nodePropertiesTableBody); - $("").appendTo(nodePropertiesTableBody); - var propertyNameCell = $("').appendTo(table); + $(propRow.children()[1]).text(activeLibrary.type); + if (file.props.hasOwnProperty('name')) { + propRow = $('').appendTo(table); + $(propRow.children()[1]).text(file.props.name); + } + for (var p in file.props) { + if (file.props.hasOwnProperty(p) && p !== 'name' && p !== 'fn') { + propRow = $('').appendTo(table); + $(propRow.children()[0]).text(p); + RED.utils.createObjectElement(file.props[p]).appendTo(propRow.children()[1]); + } + } + libraryEditor.setValue(data,-1); + }); + } else { + libraryEditor.setValue("",-1); + } + } + }); + RED.panels.create({ + container:$("#red-ui-library-dialog-load-panes"), + dir: "horizontal", + resize: function() { + libraryEditor.resize(); + } + }); + RED.panels.create({ + container:$("#red-ui-library-dialog-load-preview"), + dir: "vertical", + resize: function() { + libraryEditor.resize(); + } + }); }, create: createUI, - loadFlowLibrary: loadFlowLibrary, - - export: exportFlow + createBrowser:createBrowser, + export: exportFlow, + loadLibraryFolder: loadLibraryFolder } })(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js b/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js index 7a6a3bbf7..e252570d6 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js @@ -24,7 +24,7 @@ RED.notifications = (function() { var myNotification = RED.notify("This is the message to display",{ modal: true, fixed: true, - type: 'warning', + type: 'warning', // 'compact', 'success', 'warning', 'error' buttons: [ { text: "cancel", @@ -62,7 +62,7 @@ RED.notifications = (function() { } if (options.modal) { - $("#full-shade").show(); + $("#red-ui-full-shade").show(); } if (currentNotifications.length > 4) { @@ -77,14 +77,14 @@ RED.notifications = (function() { } } var n = document.createElement("div"); - n.id="red-notification-"+c; - n.className = "notification"; + n.id="red-ui-notification-"+c; + n.className = "red-ui-notification"; n.fixed = fixed; if (type) { - n.className = "notification notification-"+type; + n.className = "red-ui-notification red-ui-notification-"+type; } if (options.width) { - var parentWidth = $("#notifications").width(); + var parentWidth = $("#red-ui-notifications").width(); if (options.width > parentWidth) { var margin = -(options.width-parentWidth)/2; $(n).css({ @@ -103,9 +103,9 @@ RED.notifications = (function() { $(n).append(msg); } if (options.buttons) { - var buttonSet = $('
                            ').appendTo(n) + var buttonSet = $('
                            ').appendTo(n) options.buttons.forEach(function(buttonDef) { - var b = $('').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) { + $('').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) { evt.preventDefault(); RED.actions.invoke("core:show-event-log"); }); @@ -953,11 +948,11 @@ RED.palette.editor = (function() { }, { text: RED._("palette.editor.confirm.button.remove"), - class: "primary palette-module-install-confirm-button-remove", + class: "primary red-ui-palette-module-install-confirm-button-remove", click: function() { var spinner = RED.utils.addSpinnerOverlay(container, true); var buttonRow = $('
                            ').appendTo(spinner); - $('').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) { + $('').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) { evt.preventDefault(); RED.actions.invoke("core:show-event-log"); }); @@ -1009,7 +1004,7 @@ RED.palette.editor = (function() { if (entry.url) { buttons.push({ text: RED._("palette.editor.confirm.button.review"), - class: "primary palette-module-install-confirm-button-install", + class: "primary red-ui-palette-module-install-confirm-button-install", click: function() { var url = entry.url||""; window.open(url); @@ -1018,12 +1013,12 @@ RED.palette.editor = (function() { } buttons.push({ text: RED._("palette.editor.confirm.button.install"), - class: "primary palette-module-install-confirm-button-install", + class: "primary red-ui-palette-module-install-confirm-button-install", click: function() { var spinner = RED.utils.addSpinnerOverlay(container, true); var buttonRow = $('
                            ').appendTo(spinner); - $('').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) { + $('').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) { evt.preventDefault(); RED.actions.invoke("core:show-event-log"); }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js index 391519e6d..f80ac98d0 100755 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js @@ -17,49 +17,63 @@ RED.palette = (function() { var exclusion = ['config','unknown','deprecated']; - var coreCategories = ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced']; + var coreCategories = [ + 'subflows', + 'common', + 'function', + 'network', + 'input', + 'output', + 'sequence', + 'parser', + 'storage', + 'analysis', + 'social', + 'advanced' + ]; var categoryContainers = {}; var sidebarControls; function createCategory(originalCategory,rootCategory,category,ns) { - if ($("#palette-base-category-"+rootCategory).length === 0) { + if ($("#red-ui-palette-base-category-"+rootCategory).length === 0) { createCategoryContainer(originalCategory,rootCategory, ns+":palette.label."+rootCategory); } - $("#palette-container-"+rootCategory).show(); - if ($("#palette-"+category).length === 0) { - $("#palette-base-category-"+rootCategory).append('
                            '); + $("#red-ui-palette-container-"+rootCategory).show(); + if ($("#red-ui-palette-"+category).length === 0) { + $("#red-ui-palette-base-category-"+rootCategory).append('
                            '); } } function createCategoryContainer(originalCategory,category, labelId) { var label = RED._(labelId, {defaultValue:category}); label = (label || category).replace(/_/g, " "); - var catDiv = $('
                            '+ - '
                            '+label+'
                            '+ - '
                            '+ - '
                            '+ - '
                            '+ - '
                            '+ + var catDiv = $('
                            '+ + '
                            '+label+'
                            '+ + '
                            '+ + '
                            '+ + '
                            '+ + '
                            '+ + '
                            '+ '
                            '+ - '
                            ').appendTo("#palette-container"); + '
                            ').appendTo("#red-ui-palette-container"); catDiv.data('category',originalCategory); catDiv.data('label',label); categoryContainers[category] = { container: catDiv, close: function() { - catDiv.removeClass("palette-open"); - catDiv.addClass("palette-closed"); - $("#palette-base-category-"+category).slideUp(); - $("#palette-header-"+category+" i").removeClass("expanded"); + catDiv.removeClass("red-ui-palette-open"); + catDiv.addClass("red-ui-palette-closed"); + $("#red-ui-palette-base-category-"+category).slideUp(); + $("#red-ui-palette-header-"+category+" i").removeClass("expanded"); }, open: function() { - catDiv.addClass("palette-open"); - catDiv.removeClass("palette-closed"); - $("#palette-base-category-"+category).slideDown(); - $("#palette-header-"+category+" i").addClass("expanded"); + catDiv.addClass("red-ui-palette-open"); + catDiv.removeClass("red-ui-palette-closed"); + $("#red-ui-palette-base-category-"+category).slideDown(); + $("#red-ui-palette-header-"+category+" i").addClass("expanded"); }, toggle: function() { - if (catDiv.hasClass("palette-open")) { + if (catDiv.hasClass("red-ui-palette-open")) { categoryContainers[category].close(); } else { categoryContainers[category].open(); @@ -67,7 +81,7 @@ RED.palette = (function() { } }; - $("#palette-header-"+category).on('click', function(e) { + $("#red-ui-palette-header-"+category).on('click', function(e) { categoryContainers[category].toggle(); }); } @@ -84,18 +98,36 @@ RED.palette = (function() { var displayLines = []; - var currentLine = words[0]; - var currentLineWidth = RED.view.calculateTextWidth(currentLine, "palette_label", 0); - - for (var i=1;i 0) { + displayLines.push(currentLine); + } + while (true) { + var wordWidth = RED.view.calculateTextWidth(word, "red-ui-palette-label", 0); + if (wordWidth >= nodeWidth) { + // break word if too wide + for(var j = word.length; j > 0; j--) { + var s = word.substring(0, j); + var width = RED.view.calculateTextWidth(s, "red-ui-palette-label", 0); + if (width < nodeWidth) { + displayLines.push(s); + word = word.substring(j); + break; + } + } + } + else { + currentLine = word; + break; + } + } } } displayLines.push(currentLine); @@ -104,15 +136,15 @@ RED.palette = (function() { var multiLineNodeHeight = 8+(lineHeight*displayLines.length); el.css({height:multiLineNodeHeight+"px"}); - var labelElement = el.find(".palette_label"); + var labelElement = el.find(".red-ui-palette-label"); labelElement.html(lines).attr('dir', RED.text.bidi.resolveBaseTextDir(lines)); if (RED.view.vertical()) { - el.find(".palette_port").css({top:(multiLineNodeHeight/2-5)+"px", left: "55px"}); - el.find(".palette_port_output").css({top:(multiLineNodeHeight-5)+"px", right: "55px"}); - el.find(".palette_port_input").css({top: "-5px"}); + el.find(".red-ui-palette-port").css({top:(multiLineNodeHeight/2-5)+"px", left: "55px"}); + el.find(".red-ui-palette-port-output").css({top:(multiLineNodeHeight-5)+"px", right: "55px"}); + el.find(".red-ui-palette-port-input").css({top: "-5px"}); }else{ - el.find(".palette_port").css({top:(multiLineNodeHeight/2-5)+"px"}); + el.find(".red-ui-palette-port").css({top:(multiLineNodeHeight/2-5)+"px"}); // el.find(".palette_port_output").css({top:(multiLineNodeHeight/2-5)+"px", right: "-6px", left: "auto"}); } @@ -152,30 +184,32 @@ RED.palette = (function() { function setIcon(element,sf) { var icon_url = RED.utils.getNodeIcon(sf._def); - var iconContainer = element.find(".palette_icon_container"); + var iconContainer = element.find(".red-ui-palette-icon-container"); RED.utils.createIconElement(icon_url, iconContainer, true); } - function escapeNodeType(nt) { - return nt.replace(" ","_").replace(".","_").replace(":","_"); + function getPaletteNode(type) { + return $(".red-ui-palette-node[data-palette-type='"+type+"']"); } + function escapeCategory(category) { + return category.replace(/[ /.]/g,"_"); + } function addNodeType(nt,def) { - var nodeTypeId = escapeNodeType(nt); - if ($("#palette_node_"+nodeTypeId).length) { + if (getPaletteNode(nt).length) { return; } - if (exclusion.indexOf(def.category)===-1) { + var nodeCategory = def.category; - var originalCategory = def.category; - var category = def.category.replace(/ /g,"_"); + if (exclusion.indexOf(nodeCategory)===-1) { + + var originalCategory = nodeCategory; + var category = escapeCategory(nodeCategory); var rootCategory = category.split("-")[0]; - var d = document.createElement("div"); - d.id = "palette_node_"+nodeTypeId; - d.type = nt; + var d = $('
                            ',{class:"red-ui-palette-node"}).attr("data-palette-type",nt).data('category',rootCategory); - var label = /^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1]; + var label = nt;///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1]; if (typeof def.paletteLabel !== "undefined") { try { label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||""; @@ -185,51 +219,49 @@ RED.palette = (function() { } $('
                            ', { - class: "palette_label" - + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " palette_label_right" : "") + class: "red-ui-palette-label" + + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "") }).appendTo(d); - d.className="palette_node"; if (def.icon) { var icon_url = RED.utils.getNodeIcon(def); var iconContainer = $('
                            ', { - class: "palette_icon_container" - + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " palette_icon_container_right" : "") + class: "red-ui-palette-icon-container" + + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-icon-container-right" : "") }).appendTo(d); RED.utils.createIconElement(icon_url, iconContainer, true); } - d.style.backgroundColor = RED.utils.getNodeColor(nt,def); + d.css("backgroundColor", RED.utils.getNodeColor(nt,def)); if (def.outputs > 0) { var portOut = document.createElement("div"); - portOut.className = "palette_port palette_port_output"; - d.appendChild(portOut); + portOut.className = "red-ui-palette-port red-ui-palette-port-output"; + d.append(portOut); } if (def.inputs > 0) { var portIn = document.createElement("div"); - portIn.className = "palette_port palette_port_input"; - d.appendChild(portIn); + portIn.className = "red-ui-palette-port red-ui-palette-port-input"; + d.append(portIn); } - createCategory(def.category,rootCategory,category,(coreCategories.indexOf(rootCategory) !== -1)?"node-red":def.set.id); + createCategory(nodeCategory,rootCategory,category,(coreCategories.indexOf(rootCategory) !== -1)?"node-red":def.set.id); - $("#palette-"+category).append(d); + $("#red-ui-palette-"+category).append(d); - $(d).data('category',rootCategory); - - d.onmousedown = function(e) { e.preventDefault(); }; + d.on("mousedown", function(e) { e.preventDefault();}); var popover = RED.popover.create({ - target:$(d), + target:d, trigger: "hover", width: "300px", content: "hi", delay: { show: 750, hide: 50 } }); - $(d).data('popover',popover); + + d.data('popover',popover); // $(d).popover({ // title:d.type, @@ -239,19 +271,21 @@ RED.palette = (function() { // html: true, // container:'body' // }); - $(d).click(function() { + d.on("click", function() { RED.view.focus(); var helpText; if (nt.indexOf("subflow:") === 0) { - helpText = marked(RED.nodes.subflow(nt.substring(8)).info||"")||(''+RED._("sidebar.info.none")+''); + helpText = marked(RED.nodes.subflow(nt.substring(8)).info||"")||(''+RED._("sidebar.info.none")+''); } else { - helpText = $("script[data-help-name='"+d.type+"']").html()||(''+RED._("sidebar.info.none")+''); + helpText = $("script[data-help-name='"+d.attr("data-palette-type")+"']").html()||(''+RED._("sidebar.info.none")+''); } + // Don't look too closely. RED.sidebar.info.set will set the 'Description' + // section of the sidebar. Pass in the title of the Help section so it looks + // right. RED.sidebar.info.set(helpText,RED._("sidebar.info.nodeHelp")); }); - var chart = $("#chart"); - var chartOffset = chart.offset(); - var chartSVG = $("#chart>svg").get(0); + var chart = $("#red-ui-workspace-chart"); + var chartSVG = $("#red-ui-workspace-chart>svg").get(0); var activeSpliceLink; var mouseX; var mouseY; @@ -260,22 +294,23 @@ RED.palette = (function() { var paletteTop; $(d).draggable({ helper: 'clone', - appendTo: 'body', + appendTo: '#red-ui-editor', revert: 'invalid', - revertDuration: 300, - containment:'#main-container', + revertDuration: 200, + containment:'#red-ui-main-container', start: function() { - paletteWidth = $("#palette").width(); - paletteTop = $("#palette").parent().position().top + $("#palette-container").position().top; + paletteWidth = $("#red-ui-palette").width(); + paletteTop = $("#red-ui-palette").parent().position().top + $("#red-ui-palette-container").position().top; RED.view.focus(); }, - stop: function() { d3.select('.link_splice').classed('link_splice',false); if (spliceTimer) { clearTimeout(spliceTimer); spliceTimer = null;}}, + stop: function() { d3.select('.red-ui-flow-link-splice').classed('red-ui-flow-link-splice',false); if (spliceTimer) { clearTimeout(spliceTimer); spliceTimer = null;}}, drag: function(e,ui) { - ui.originalPosition.left = $('#' + e.target.id).offset().left; + var paletteNode = getPaletteNode(nt); + ui.originalPosition.left = paletteNode.offset().left; if (def.inputs > 0 && def.outputs > 0) { - mouseX = ui.position.left-paletteWidth+(ui.helper.width()/2) - chartOffset.left + chart.scrollLeft(); - mouseY = ui.position.top-paletteTop+(ui.helper.height()/2) - chartOffset.top + chart.scrollTop(); + mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft(); + mouseY = ui.position.top - paletteTop + (ui.helper.height()/2) + chart.scrollTop(); if (!spliceTimer) { spliceTimer = setTimeout(function() { var nodes = []; @@ -300,7 +335,7 @@ RED.palette = (function() { for (var i=0;i 0) { var portIn = document.createElement("div"); - portIn.className = "palette_port palette_port_input"; + portIn.className = "red-ui-palette-port red-ui-palette-port-input"; paletteNode.append(portIn); } else if (portInput.length !== 0 && sf.in.length === 0) { portInput.remove(); @@ -414,7 +445,7 @@ RED.palette = (function() { if (portOutput.length === 0 && sf.out.length > 0) { var portOut = document.createElement("div"); - portOut.className = "palette_port palette_port_output"; + portOut.className = "red-ui-palette-port red-ui-palette-port-output"; paletteNode.append(portOut); } else if (portOutput.length !== 0 && sf.out.length === 0) { portOutput.remove(); @@ -425,35 +456,35 @@ RED.palette = (function() { var currentCategory = paletteNode.data('category'); var newCategory = (sf.category||"subflows"); if (currentCategory !== newCategory) { - var category = newCategory.replace(/ /g,"_"); + var category = escapeCategory(newCategory); createCategory(newCategory,category,category,"node-red"); - var currentCategoryNode = paletteNode.closest(".palette-category"); - var newCategoryNode = $("#palette-"+category); + var currentCategoryNode = paletteNode.closest(".red-ui-palette-category"); + var newCategoryNode = $("#red-ui-palette-"+category); newCategoryNode.append(paletteNode); - if (newCategoryNode.find(".palette_node").length === 1) { + if (newCategoryNode.find(".red-ui-palette-node").length === 1) { categoryContainers[category].open(); } paletteNode.data('category',newCategory); - if (currentCategoryNode.find(".palette_node").length === 0) { + if (currentCategoryNode.find(".red-ui-palette-node").length === 0) { if (currentCategoryNode.find("i").hasClass("expanded")) { - currentCategoryNode.find(".palette-content").slideToggle(); + currentCategoryNode.find(".red-ui-palette-content").slideToggle(); currentCategoryNode.find("i").toggleClass("expanded"); } } - - - } + + paletteNode.css("backgroundColor", sf.color); }); } function filterChange(val) { var re = new RegExp(val.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'),'i'); - $("#palette-container .palette_node").each(function(i,el) { - var currentLabel = $(el).find(".palette_label").text(); - if (val === "" || re.test(el.id) || re.test(currentLabel)) { + $("#red-ui-palette-container .red-ui-palette-node").each(function(i,el) { + var currentLabel = $(el).find(".red-ui-palette-label").text(); + var type = $(el).attr("data-palette-type"); + if (val === "" || re.test(type) || re.test(currentLabel)) { $(this).show(); } else { $(this).hide(); @@ -463,11 +494,13 @@ RED.palette = (function() { for (var category in categoryContainers) { if (categoryContainers.hasOwnProperty(category)) { if (categoryContainers[category].container - .find(".palette_node") + .find(".red-ui-palette-node") .filter(function() { return $(this).css('display') !== 'none'}).length === 0) { categoryContainers[category].close(); + categoryContainers[category].container.slideUp(); } else { categoryContainers[category].open(); + categoryContainers[category].container.show(); } } } @@ -475,6 +508,13 @@ RED.palette = (function() { function init() { + $('').appendTo("#red-ui-palette"); + $('').appendTo("#red-ui-palette"); + $('
                            ').appendTo("#red-ui-palette"); + $('').appendTo("#red-ui-palette"); + $('
                            ').appendTo("#red-ui-palette"); + + RED.events.on('registry:node-type-added', function(nodeType) { var def = RED.nodes.getType(nodeType); addNodeType(nodeType,def); @@ -515,45 +555,53 @@ RED.palette = (function() { } }); - $("#palette > .palette-spinner").show(); + $("#red-ui-palette > .red-ui-palette-spinner").show(); - $("#palette-search input").searchBox({ + + $("#red-ui-palette-search input").searchBox({ delay: 100, change: function() { filterChange($(this).val()); } }) - sidebarControls = $('
                            ",{class:"node-diff-property-cell-label"}).text("id").appendTo(row); - localCell = $("",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); + $("",{class:"red-ui-diff-list-cell-label"}).text("id").appendTo(row); + localCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row); if (localNode) { - localCell.addClass("node-diff-node-unchanged"); - $('').appendTo(localCell); - element = $('').appendTo(localCell); + localCell.addClass("red-ui-diff-status-unchanged"); + $('').appendTo(localCell); + element = $('').appendTo(localCell); propertyElements['local.id'] = RED.utils.createObjectElement(localNode.id).appendTo(element); } else { - localCell.addClass("node-diff-empty"); + localCell.addClass("red-ui-diff-empty"); } if (remoteNode !== undefined) { - remoteCell = $("",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); - remoteCell.addClass("node-diff-node-unchanged"); + remoteCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row); + remoteCell.addClass("red-ui-diff-status-unchanged"); if (remoteNode) { - $('').appendTo(remoteCell); - element = $('').appendTo(remoteCell); + $('').appendTo(remoteCell); + element = $('').appendTo(remoteCell); propertyElements['remote.id'] = RED.utils.createObjectElement(remoteNode.id).appendTo(element); } else { - remoteCell.addClass("node-diff-empty"); + remoteCell.addClass("red-ui-diff-empty"); } } @@ -785,12 +784,12 @@ RED.diff = (function() { conflict = true; } row = $("
                            ",{class:"node-diff-property-cell-label"}).text("position").appendTo(row); - localCell = $("",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); + $("",{class:"red-ui-diff-list-cell-label"}).text("position").appendTo(row); + localCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row); if (localNode) { - localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged")); - $(''+(localChanged?'':'')+'').appendTo(localCell); - element = $('').appendTo(localCell); + localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged")); + $(''+(localChanged?'':'')+'').appendTo(localCell); + element = $('').appendTo(localCell); propertyElements['local.position'] = RED.utils.createObjectElement({x:localNode.x,y:localNode.y}, { path: "position", @@ -803,15 +802,15 @@ RED.diff = (function() { } ).appendTo(element); } else { - localCell.addClass("node-diff-empty"); + localCell.addClass("red-ui-diff-empty"); } if (remoteNode !== undefined) { - remoteCell = $("",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); - remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged")); + remoteCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row); + remoteCell.addClass("red-ui-diff-status-"+(remoteChanged?"changed":"unchanged")); if (remoteNode) { - $(''+(remoteChanged?'':'')+'').appendTo(remoteCell); - element = $('').appendTo(remoteCell); + $(''+(remoteChanged?'':'')+'').appendTo(remoteCell); + element = $('').appendTo(remoteCell); propertyElements['remote.position'] = RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y}, { path: "position", @@ -824,7 +823,7 @@ RED.diff = (function() { } ).appendTo(element); } else { - remoteCell.addClass("node-diff-empty"); + remoteCell.addClass("red-ui-diff-empty"); } } } @@ -853,34 +852,34 @@ RED.diff = (function() { conflict = true; } row = $("
                            ",{class:"node-diff-property-cell-label"}).text("wires").appendTo(row); - localCell = $("",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); + $("",{class:"red-ui-diff-list-cell-label"}).text("wires").appendTo(row); + localCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row); if (localNode) { if (!conflict) { - localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged")); - $(''+(localChanged?'':'')+'').appendTo(localCell); + localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged")); + $(''+(localChanged?'':'')+'').appendTo(localCell); } else { - localCell.addClass("node-diff-node-conflict"); - $('').appendTo(localCell); + localCell.addClass("red-ui-diff-status-conflict"); + $('').appendTo(localCell); } formatWireProperty(localNode.wires,localNodeObj.all).appendTo(localCell); } else { - localCell.addClass("node-diff-empty"); + localCell.addClass("red-ui-diff-empty"); } if (remoteNode !== undefined) { - remoteCell = $("",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); + remoteCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row); if (remoteNode) { if (!conflict) { - remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged")); - $(''+(remoteChanged?'':'')+'').appendTo(remoteCell); + remoteCell.addClass("red-ui-diff-status-"+(remoteChanged?"changed":"unchanged")); + $(''+(remoteChanged?'':'')+'').appendTo(remoteCell); } else { - remoteCell.addClass("node-diff-node-conflict"); - $('').appendTo(remoteCell); + remoteCell.addClass("red-ui-diff-status-conflict"); + $('').appendTo(remoteCell); } formatWireProperty(remoteNode.wires,remoteNodeObj.all).appendTo(remoteCell); } else { - remoteCell.addClass("node-diff-empty"); + remoteCell.addClass("red-ui-diff-empty"); } } } @@ -926,17 +925,17 @@ RED.diff = (function() { } row = $("
                            ",{class:"node-diff-property-cell-label"}).text(d).appendTo(row); - localCell = $("",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); + var propertyNameCell = $("",{class:"red-ui-diff-list-cell-label"}).text(d).appendTo(row); + localCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row); if (localNode) { if (!conflict) { - localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged")); - $(''+(localChanged?'':'')+'').appendTo(localCell); + localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged")); + $(''+(localChanged?'':'')+'').appendTo(localCell); } else { - localCell.addClass("node-diff-node-conflict"); - $('').appendTo(localCell); + localCell.addClass("red-ui-diff-status-conflict"); + $('').appendTo(localCell); } - element = $('').appendTo(localCell); + element = $('').appendTo(localCell); propertyElements['local.'+d] = RED.utils.createObjectElement(localNode[d], { path: d, @@ -949,19 +948,19 @@ RED.diff = (function() { } ).appendTo(element); } else { - localCell.addClass("node-diff-empty"); + localCell.addClass("red-ui-diff-empty"); } if (remoteNode !== undefined) { - remoteCell = $("",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); + remoteCell = $("",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row); if (remoteNode) { if (!conflict) { - remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged")); - $(''+(remoteChanged?'':'')+'').appendTo(remoteCell); + remoteCell.addClass("red-ui-diff-status-"+(remoteChanged?"changed":"unchanged")); + $(''+(remoteChanged?'':'')+'').appendTo(remoteCell); } else { - remoteCell.addClass("node-diff-node-conflict"); - $('').appendTo(remoteCell); + remoteCell.addClass("red-ui-diff-status-conflict"); + $('').appendTo(remoteCell); } - element = $('').appendTo(remoteCell); + element = $('').appendTo(remoteCell); propertyElements['remote.'+d] = RED.utils.createObjectElement(remoteNode[d], { path: d, @@ -974,12 +973,12 @@ RED.diff = (function() { } ).appendTo(element); } else { - remoteCell.addClass("node-diff-empty"); + remoteCell.addClass("red-ui-diff-empty"); } } if (localNode && remoteNode && typeof localNode[d] === "string") { if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) { - $('').click(function() { + $('').on("click", function() { showTextDiff(localNode[d],remoteNode[d]); }).appendTo(propertyNameCell); } @@ -990,10 +989,10 @@ RED.diff = (function() { return nodePropertiesDiv; } function createNodeConflictRadioBoxes(node,row,localDiv,remoteDiv,propertiesTable,hide,state,diff) { - var safeNodeId = "node-diff-selectbox-"+node.id.replace(/\./g,'-')+(propertiesTable?"-props":""); + var safeNodeId = "red-ui-diff-selectbox-"+node.id.replace(/\./g,'-')+(propertiesTable?"-props":""); var className = ""; if (node.z||propertiesTable) { - className = "node-diff-selectbox-tab-"+(propertiesTable?node.id:node.z).replace(/\./g,'-'); + className = "red-ui-diff-selectbox-tab-"+(propertiesTable?node.id:node.z).replace(/\./g,'-'); } var titleRow = !propertiesTable && (node.type === 'tab' || node.type === 'subflow'); var changeHandler = function(evt) { @@ -1001,44 +1000,44 @@ RED.diff = (function() { if (node.type === undefined) { // TODO: handle globals } else if (titleRow) { - className = "node-diff-selectbox-tab-"+node.id.replace(/\./g,'-'); + className = "red-ui-diff-selectbox-tab-"+node.id.replace(/\./g,'-'); $("."+className+"-"+this.value).prop('checked',true); if (this.value === 'local') { - $("."+className+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-local"); - $("."+className+"-"+this.value).closest(".node-diff-node-entry").removeClass("node-diff-select-remote"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("red-ui-diff-select-local"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("red-ui-diff-select-remote"); } else { - $("."+className+"-"+this.value).closest(".node-diff-node-entry").removeClass("node-diff-select-local"); - $("."+className+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-remote"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("red-ui-diff-select-local"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("red-ui-diff-select-remote"); } } else { // Individual node or properties table - var parentId = "node-diff-selectbox-"+(propertiesTable?node.id:node.z).replace(/\./g,'-'); + var parentId = "red-ui-diff-selectbox-"+(propertiesTable?node.id:node.z).replace(/\./g,'-'); $('#'+parentId+"-local").prop('checked',false); $('#'+parentId+"-remote").prop('checked',false); - var titleRowDiv = $('#'+parentId+"-local").closest(".node-diff-tab").find(".node-diff-tab-title"); - titleRowDiv.removeClass("node-diff-select-local"); - titleRowDiv.removeClass("node-diff-select-remote"); + var titleRowDiv = $('#'+parentId+"-local").closest(".red-ui-diff-list-flow").find(".red-ui-diff-list-flow-title"); + titleRowDiv.removeClass("red-ui-diff-select-local"); + titleRowDiv.removeClass("red-ui-diff-select-remote"); } if (this.value === 'local') { - row.removeClass("node-diff-select-remote"); - row.addClass("node-diff-select-local"); + row.removeClass("red-ui-diff-select-remote"); + row.addClass("red-ui-diff-select-local"); } else if (this.value === 'remote') { - row.addClass("node-diff-select-remote"); - row.removeClass("node-diff-select-local"); + row.addClass("red-ui-diff-select-remote"); + row.removeClass("red-ui-diff-select-local"); } refreshConflictHeader(diff); } - var localSelectDiv = $('Type
                            Name'+file.props.name+'
                            ').appendTo(nodeSection.content); + nodeSection.timestamp = $('
                             
                            ').appendTo(nodeSection.content); + var table = $('
                            ').appendTo(nodeSection.content); nodeSection.table = $('').appendTo(table); var bg = $('
                            ').appendTo(nodeSection.header); - $('') + + var nodeAutoRefreshSetting = RED.settings.get("editor.context.nodeRefresh",false); + nodeAutoRefresh = $('').prop("checked",nodeAutoRefreshSetting).appendTo(bg).toggleButton({ + baseClass: "red-ui-sidebar-header-button red-ui-button-small", + enabledLabel: "", + disabledLabel: "" + }).on("change", function() { + var value = $(this).prop("checked"); + RED.settings.set("editor.context.flowRefresh",value); + }); + RED.popover.tooltip(nodeAutoRefresh.next(),RED._("sidebar.context.autoRefresh")); + + + var manualRefreshNode = $('') .appendTo(bg) - .click(function(evt) { + .on("click", function(evt) { evt.stopPropagation(); evt.preventDefault(); updateNode(currentNode, true); }) - - // subflowSection = sections.add({ - // title: "Subflow", - // collapsible: true - // }); - // subflowSection.expand(); - // subflowSection.content.css({height:"100%"}); - // bg = $('
                            ').appendTo(subflowSection.header); - // $('') - // .appendTo(bg) - // .click(function(evt) { - // evt.stopPropagation(); - // evt.preventDefault(); - // }) - // - // subflowSection.container.hide(); + RED.popover.tooltip(manualRefreshNode,RED._("sidebar.context.refrsh")); flowSection = sections.add({ title: RED._("sidebar.context.flow"), @@ -90,17 +80,30 @@ RED.sidebar.context = (function() { }); flowSection.expand(); flowSection.content.css({height:"100%"}); - flowSection.timestamp = $('').appendTo(flowSection.content); - var table = $('
                            ').appendTo(flowSection.content); + flowSection.timestamp = $('
                             
                            ').appendTo(flowSection.content); + var table = $('
                            ').appendTo(flowSection.content); flowSection.table = $('').appendTo(table); bg = $('
                            ').appendTo(flowSection.header); - $('') + + var flowAutoRefreshSetting = RED.settings.get("editor.context.flowRefresh",false); + flowAutoRefresh = $('').prop("checked",flowAutoRefreshSetting).appendTo(bg).toggleButton({ + baseClass: "red-ui-sidebar-header-button red-ui-button-small", + enabledLabel: "", + disabledLabel: "" + }).on("change", function() { + var value = $(this).prop("checked"); + RED.settings.set("editor.context.flowRefresh",value); + }); + RED.popover.tooltip(flowAutoRefresh.next(),RED._("sidebar.context.autoRefresh")); + + var manualRefreshFlow = $('') .appendTo(bg) - .click(function(evt) { + .on("click", function(evt) { evt.stopPropagation(); evt.preventDefault(); - updateFlow(currentFlow); + updateFlow(currentFlow, true); }) + RED.popover.tooltip(manualRefreshFlow,RED._("sidebar.context.refrsh")); globalSection = sections.add({ title: RED._("sidebar.context.global"), @@ -108,19 +111,19 @@ RED.sidebar.context = (function() { }); globalSection.expand(); globalSection.content.css({height:"100%"}); - globalSection.timestamp = $('').appendTo(globalSection.content); - var table = $('
                            ').appendTo(globalSection.content); + globalSection.timestamp = $('
                             
                            ').appendTo(globalSection.content); + var table = $('
                            ').appendTo(globalSection.content); globalSection.table = $('').appendTo(table); bg = $('
                            ').appendTo(globalSection.header); - $('') + $('') .appendTo(bg) - .click(function(evt) { + .on("click", function(evt) { evt.stopPropagation(); evt.preventDefault(); updateEntry(globalSection,"context/global","global"); }) - + RED.popover.tooltip(bg,RED._("sidebar.context.refrsh")); RED.actions.add("core:show-context-tab",show); @@ -136,28 +139,6 @@ RED.sidebar.context = (function() { action: "core:show-context-tab" }); - // var toggleLiveButton = $("#sidebar-context-toggle-live"); - // toggleLiveButton.click(function(evt) { - // evt.preventDefault(); - // if ($(this).hasClass("selected")) { - // $(this).removeClass("selected"); - // $(this).find("i").removeClass("fa-pause"); - // $(this).find("i").addClass("fa-play"); - // } else { - // $(this).addClass("selected"); - // $(this).find("i").removeClass("fa-play"); - // $(this).find("i").addClass("fa-pause"); - // } - // }); - // RED.popover.tooltip(toggleLiveButton, function() { - // if (toggleLiveButton.hasClass("selected")) { - // return "Pause live updates" - // } else { - // return "Start live updates" - // } - // }); - - RED.events.on("view:selection-changed", function(event) { var selectedNode = event.nodes && event.nodes.length === 1 && event.nodes[0]; updateNode(selectedNode); @@ -167,42 +148,41 @@ RED.sidebar.context = (function() { updateFlow(RED.nodes.workspace(event.workspace)); }) - updateEntry(globalSection,"context/global","global"); - + $(globalSection.table).empty(); + $('').appendTo(globalSection.table).i18n(); + globalSection.timestamp.html(" "); } function updateNode(node,force) { currentNode = node; - if (force) { + if (force || nodeAutoRefresh.prop("checked")) { if (node) { updateEntry(nodeSection,"context/node/"+node.id,node.id); - // if (/^subflow:/.test(node.type)) { - // subflowSection.container.show(); - // updateEntry(subflowSection,"context/flow/"+node.id,node.id); - // } else { - // subflowSection.container.hide(); - // } } else { - // subflowSection.container.hide(); updateEntry(nodeSection) } } else { $(nodeSection.table).empty(); if (node) { - $('').appendTo(nodeSection.table).i18n(); + $('').appendTo(nodeSection.table).i18n(); } else { - $('').appendTo(nodeSection.table).i18n(); + $('').appendTo(nodeSection.table).i18n(); } nodeSection.timestamp.html(" "); - } } - function updateFlow(flow) { + function updateFlow(flow, force) { currentFlow = flow; - if (flow) { - updateEntry(flowSection,"context/flow/"+flow.id,flow.id); + if (force || flowAutoRefresh.prop("checked")) { + if (flow) { + updateEntry(flowSection,"context/flow/"+flow.id,flow.id); + } else { + updateEntry(flowSection) + } } else { - updateEntry(flowSection) + $(flowSection.table).empty(); + $('').appendTo(flowSection.table).i18n(); + flowSection.timestamp.html(" "); } } @@ -234,12 +214,12 @@ RED.sidebar.context = (function() { sortedData[keys[i]].forEach(function(v) { var k = keys[i]; var l2 = sortedData[k].length; - var propRow = $('').appendTo(container); + var propRow = $('').appendTo(container); var obj = $(propRow.children()[0]); obj.text(k); var tools = $(''); - var refreshItem = $('').appendTo(tools).click(function(e) { + var refreshItem = $('').appendTo(tools).on("click", function(e) { e.preventDefault(); e.stopPropagation(); $.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) { @@ -256,7 +236,8 @@ RED.sidebar.context = (function() { } }) }); - var deleteItem = $('').appendTo(tools).click(function(e) { + RED.popover.tooltip(refreshItem,RED._("sidebar.context.refrsh")); + var deleteItem = $('').appendTo(tools).on("click", function(e) { e.preventDefault(); e.stopPropagation(); var popover = RED.popover.create({ @@ -268,12 +249,12 @@ RED.sidebar.context = (function() { $('

                            ').appendTo(content); var row = $('

                            ').appendTo(content); var bg = $('').appendTo(row); - $('').appendTo(bg).click(function(e) { + $('').appendTo(bg).on("click", function(e) { e.preventDefault(); popover.close(); }); bg = $('').appendTo(row); - $('').appendTo(bg).click(function(e) { + $('').appendTo(bg).on("click", function(e) { e.preventDefault(); popover.close(); $.ajax({ @@ -284,7 +265,7 @@ RED.sidebar.context = (function() { if (data.format === 'undefined') { propRow.remove(); if (container.children().length === 0) { - $('').appendTo(container).i18n(); + $('').appendTo(container).i18n(); } } else { payload = data.msg; @@ -308,6 +289,7 @@ RED.sidebar.context = (function() { popover.open(); }); + RED.popover.tooltip(deleteItem,RED._("sidebar.context.delete")); var payload = v.msg; var format = v.format; RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), { @@ -316,12 +298,12 @@ RED.sidebar.context = (function() { tools: tools }).appendTo(propRow.children()[1]); if (contextStores.length > 1) { - $("",{class:"sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0])) + $("",{class:"red-ui-sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0])) } }); } if (l === 0) { - $('').appendTo(container).i18n(); + $('').appendTo(container).i18n(); } $(section.timestamp).text(new Date().toLocaleString()); }); @@ -332,7 +314,7 @@ RED.sidebar.context = (function() { refreshEntry(section,baseUrl,id); } else { $(container).empty(); - $('').appendTo(container).i18n(); + $('').appendTo(container).i18n(); } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js index 71c41b272..b8e3b150b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js @@ -40,11 +40,11 @@ RED.sidebar.info = (function() { function init() { content = document.createElement("div"); - content.className = "sidebar-node-info" + content.className = "red-ui-sidebar-info" RED.actions.add("core:show-info-tab",show); - var stackContainer = $("

                            ",{class:"sidebar-node-info-stack"}).appendTo(content); + var stackContainer = $("
                            ",{class:"red-ui-sidebar-info-stack"}).appendTo(content); sections = RED.stack.create({ container: stackContainer @@ -70,18 +70,18 @@ RED.sidebar.info = (function() { helpSection.expand(); helpSection.content.css("padding","6px"); - var tipContainer = $('
                            ').appendTo(content); - tipBox = $('
                            ').appendTo(tipContainer); - var tipButtons = $('
                            ').appendTo(tipContainer); + var tipContainer = $('
                            ').appendTo(content); + tipBox = $('
                            ').appendTo(tipContainer); + var tipButtons = $('
                            ').appendTo(tipContainer); - var tipRefresh = $('').appendTo(tipButtons); - tipRefresh.click(function(e) { + var tipRefresh = $('').appendTo(tipButtons); + tipRefresh.on("click", function(e) { e.preventDefault(); tips.next(); }) - var tipClose = $('').appendTo(tipButtons); - tipClose.click(function(e) { + var tipClose = $('').appendTo(tipButtons); + tipClose.on("click", function(e) { e.preventDefault(); RED.actions.invoke("core:toggle-show-tips"); RED.notify(RED._("sidebar.info.showTips")); @@ -128,10 +128,11 @@ RED.sidebar.info = (function() { $(propertiesSection.content).empty(); $(infoSection.content).empty(); $(helpSection.content).empty(); + infoSection.title.text(RED._("sidebar.info.desc")); var propRow; - var table = $('
                            ').appendTo(propertiesSection.content); + var table = $('
                            ').appendTo(propertiesSection.content); var tableBody = $('').appendTo(table); var subflowNode; @@ -139,12 +140,12 @@ RED.sidebar.info = (function() { var activeProject = RED.projects.getActiveProject(); if (activeProject) { - propRow = $('Project').appendTo(tableBody); + propRow = $(''+ RED._("sidebar.project.name") + '').appendTo(tableBody); $(propRow.children()[1]).text(activeProject.name||""); - $('').appendTo(tableBody); - var editProjectButton = $('') + $('').appendTo(tableBody); + var editProjectButton = $('') .appendTo(propRow.children()[1]) - .click(function(evt) { + .on("click", function(evt) { evt.preventDefault(); RED.projects.editProject(); }); @@ -177,7 +178,7 @@ RED.sidebar.info = (function() { helpSection.container.hide(); infoSection.container.hide(); // - show the count of selected nodes - propRow = $(''+RED._("sidebar.info.selection")+"").appendTo(tableBody); + propRow = $(''+RED._("sidebar.info.selection")+"").appendTo(tableBody); var counts = $('
                            ').appendTo($(propRow.children()[1])); if (types.flows > 0) { @@ -211,24 +212,24 @@ RED.sidebar.info = (function() { } if (node.type === "tab" || node.type === "subflow") { // If nothing is selected, but we're on a flow or subflow tab. - propRow = $(''+RED._("sidebar.info."+(node.type==='tab'?'flow':'subflow'))+'').appendTo(tableBody); + propRow = $(''+RED._("sidebar.info."+(node.type==='tab'?'flow':'subflow'))+'').appendTo(tableBody); RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]); - propRow = $(''+RED._("sidebar.info.tabName")+"").appendTo(tableBody); + propRow = $(''+RED._("sidebar.info.tabName")+"").appendTo(tableBody); $(propRow.children()[1]).text(node.label||node.name||""); if (node.type === "tab") { - propRow = $(''+RED._("sidebar.info.status")+'').appendTo(tableBody); + propRow = $(''+RED._("sidebar.info.status")+'').appendTo(tableBody); $(propRow.children()[1]).text((!!!node.disabled)?RED._("sidebar.info.enabled"):RED._("sidebar.info.disabled")) } } else { // An actual node is selected in the editor - build up its properties table - propRow = $(''+RED._("sidebar.info.node")+"").appendTo(tableBody); + propRow = $(''+RED._("sidebar.info.node")+"").appendTo(tableBody); RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]); if (node.type !== "subflow" && node.type !== "unknown" && node.name) { - propRow = $(''+RED._("common.label.name")+'').appendTo(tableBody); - $('').text(node.name).appendTo(propRow.children()[1]); + propRow = $(''+RED._("common.label.name")+'').appendTo(tableBody); + $('').text(node.name).appendTo(propRow.children()[1]); } if (!m) { - propRow = $(''+RED._("sidebar.info.type")+"").appendTo(tableBody); + propRow = $(''+RED._("sidebar.info.type")+"").appendTo(tableBody); $(propRow.children()[1]).text((node.type === "unknown")?node._orig.type:node.type); if (node.type === "unknown") { $('').prependTo($(propRow.children()[1])) @@ -246,11 +247,11 @@ RED.sidebar.info = (function() { }) } else if (node._def) { defaults = node._def.defaults; - propRow = $(''+RED._("sidebar.info.module")+"").appendTo(tableBody); + propRow = $(''+RED._("sidebar.info.module")+"").appendTo(tableBody); $(propRow.children()[1]).text(RED.nodes.getType(node.type).set.module); count++; } - $('').appendTo(tableBody); + $('').appendTo(tableBody); if (defaults) { for (var n in defaults) { @@ -258,7 +259,7 @@ RED.sidebar.info = (function() { var val = node[n]; var type = typeof val; count++; - propRow = $(''+n+"").appendTo(tableBody); + propRow = $(''+n+"").appendTo(tableBody); if (defaults[n].type) { var configNode = RED.nodes.node(val); if (!configNode) { @@ -268,12 +269,12 @@ RED.sidebar.info = (function() { var container = propRow.children()[1]; var div = $('',{class:""}).appendTo(container); - var nodeDiv = $('
                            ',{class:"palette_node palette_node_small"}).appendTo(div); + var nodeDiv = $('
                            ',{class:"red-ui-palette-node red-ui-palette-node-small"}).appendTo(div); var colour = RED.utils.getNodeColor(configNode.type,configNode._def); var icon_url = RED.utils.getNodeIcon(configNode._def); nodeDiv.css({'backgroundColor':colour, "cursor":"pointer"}); - var iconContainer = $('
                            ',{class:"palette_icon_container"}).appendTo(nodeDiv); - $('
                            ',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); + var iconContainer = $('
                            ',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv); + $('
                            ',{class:"red-ui-palette-icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); var nodeContainer = $('').css({"verticalAlign":"top","marginLeft":"6px"}).text(configLabel).appendTo(container); nodeDiv.on('dblclick',function() { @@ -288,18 +289,18 @@ RED.sidebar.info = (function() { } } if (count > 0) { - $(''+RED._("sidebar.info.showMore")+''+RED._("sidebar.info.showLess")+' ').appendTo(tableBody); + $(''+RED._("sidebar.info.showMore")+''+RED._("sidebar.info.showLess")+' ').appendTo(tableBody); } } if (node.type !== 'tab') { if (m) { $(''+RED._("sidebar.info.subflow")+'').appendTo(tableBody); - $(''+RED._("common.label.name")+''+RED.utils.sanitize(subflowNode.name)+'').appendTo(tableBody); + $(''+RED._("common.label.name")+''+RED.utils.sanitize(subflowNode.name)+'').appendTo(tableBody); } } } if (m) { - propRow = $(''+RED._("subflow.category")+'').appendTo(tableBody); + propRow = $(''+RED._("subflow.category")+'').appendTo(tableBody); var category = subflowNode.category||"subflows"; $(propRow.children()[1]).text(RED._("palette.label."+category,{defaultValue:category})) $(''+RED._("sidebar.info.instances")+""+subflowUserCount+'').appendTo(tableBody); @@ -313,9 +314,9 @@ RED.sidebar.info = (function() { if (subflowNode && node.type !== "subflow") { // Selected a subflow instance node. // - The subflow template info goes into help - helpText = (marked(subflowNode.info||"")||(''+RED._("sidebar.info.none")+'')); + helpText = (marked(subflowNode.info||"")||(''+RED._("sidebar.info.none")+'')); } else { - helpText = $("script[data-help-name='"+node.type+"']").html()||(''+RED._("sidebar.info.none")+''); + helpText = $("script[data-help-name='"+node.type+"']").html()||(''+RED._("sidebar.info.none")+''); } setInfoText(helpText, helpSection.content); } @@ -332,35 +333,35 @@ RED.sidebar.info = (function() { } setInfoText(infoText, infoSection.content); - $(".sidebar-node-info-stack").scrollTop(0); - $(".node-info-property-header").click(function(e) { + $(".red-ui-sidebar-info-stack").scrollTop(0); + $(".node-info-property-header").on("click", function(e) { e.preventDefault(); expandedSections["property"] = !expandedSections["property"]; $(this).toggleClass("expanded",expandedSections["property"]); - $(".node-info-property-row").toggle(expandedSections["property"]); + $(".red-ui-help-info-property-row").toggle(expandedSections["property"]); }); } // $('').appendTo(tableBody); - // propRow = $('Actions').appendTo(tableBody); + // propRow = $('Actions').appendTo(tableBody); // var actionBar = $(propRow.children()[1]); // // // var actionBar = $('
                            ',{style:"background: #fefefe; padding: 3px;"}).appendTo(propertiesSection.content); - // $('').appendTo(actionBar); - // $('').appendTo(actionBar); - // $('').appendTo(actionBar); - // $('').appendTo(actionBar); + // $('').appendTo(actionBar); + // $('').appendTo(actionBar); + // $('').appendTo(actionBar); + // $('').appendTo(actionBar); } function setInfoText(infoText,target) { - var info = addTargetToExternalLinks($('
                            '+infoText+'
                            ')).appendTo(target); - info.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "" ); + var info = addTargetToExternalLinks($('
                            '+infoText+'
                            ')).appendTo(target); + info.find(".red-ui-text-bidi-aware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "" ); var foldingHeader = "H3"; - info.find(foldingHeader).wrapInner('') - .find("a").prepend('').click(function(e) { + info.find(foldingHeader).wrapInner('') + .find("a").prepend('').on("click", function(e) { e.preventDefault(); var isExpanded = $(this).hasClass('expanded'); var el = $(this).parent().next(); @@ -420,7 +421,7 @@ RED.sidebar.info = (function() { }) } function startTips() { - $(".sidebar-node-info").addClass('show-tips'); + $(".red-ui-sidebar-info").addClass('show-tips'); if (enabled) { if (!startTimeout && !refreshTimeout) { if (tipCount === -1) { @@ -433,7 +434,7 @@ RED.sidebar.info = (function() { } } function stopTips() { - $(".sidebar-node-info").removeClass('show-tips'); + $(".red-ui-sidebar-info").removeClass('show-tips'); clearInterval(refreshTimeout); clearTimeout(startTimeout); refreshTimeout = null; @@ -464,9 +465,9 @@ RED.sidebar.info = (function() { propertiesSection.container.hide(); helpSection.container.hide(); infoSection.container.show(); - //helpSection.title.text(title||RED._("sidebar.info.info")); + infoSection.title.text(title||RED._("sidebar.info.desc")); setInfoText(html,infoSection.content); - $(".sidebar-node-info-stack").scrollTop(0); + $(".red-ui-sidebar-info-stack").scrollTop(0); } function refreshSelection(selection) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js index 9e39506e8..a7c9704d9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js @@ -16,76 +16,46 @@ RED.touch = RED.touch||{}; RED.touch.radialMenu = (function() { - - + + var touchMenu = null; var isActive = false; var isOutside = false; var activeOption = null; - + function createRadial(obj,pos,options) { isActive = true; try { - var w = $("body").width(); - var h = $("body").height(); - - touchMenu = d3.select("body").append("div") - .style({ - position:"absolute", - top: 0, - left:0, - bottom:0, - right:0, - "z-index": 1000 - }) + touchMenu = d3.select("body").append("div").classed("red-ui-editor-radial-menu",true) .on('touchstart',function() { hide(); d3.event.preventDefault(); }); - - - var menu = touchMenu.append("div") .style({ - position: "absolute", - top: (pos[1]-80)+"px", - left:(pos[0]-80)+"px", - "border-radius": "80px", - width: "160px", - height: "160px", - background: "rgba(255,255,255,0.6)", - border: "1px solid #666" + top: (pos[1]-80)+"px", + left:(pos[0]-80)+"px", }); - + var menuOpts = []; var createMenuOpt = function(x,y,opt) { - opt.el = menu.append("div") + opt.el = menu.append("div").classed("red-ui-editor-radial-menu-opt",true) .style({ - position: "absolute", top: (y+80-25)+"px", - left:(x+80-25)+"px", - "border-radius": "20px", - width: "50px", - height: "50px", - background: "#fff", - border: "2px solid #666", - "text-align": "center", - "line-height":"50px" - }); - + left:(x+80-25)+"px" + }) + .classed("red-ui-editor-radial-menu-opt-disabled",!!opt.disabled) + opt.el.html(opt.name); - - if (opt.disabled) { - opt.el.style({"border-color":"#ccc",color:"#ccc"}); - } + opt.x = x; opt.y = y; menuOpts.push(opt); - + opt.el.on('touchstart',function() { - opt.el.style("background","#999"); + opt.el.classed("red-ui-editor-radial-menu-opt-active",true) d3.event.preventDefault(); d3.event.stopPropagation(); }); @@ -96,7 +66,7 @@ RED.touch.radialMenu = (function() { d3.event.stopPropagation(); }); } - + var n = options.length; var dang = Math.max(Math.PI/(n-1),Math.PI/4); var ang = Math.PI; @@ -108,7 +78,7 @@ RED.touch.radialMenu = (function() { } ang += dang; } - + var hide = function() { isActive = false; @@ -116,11 +86,11 @@ RED.touch.radialMenu = (function() { touchMenu.remove(); touchMenu = null; } - + obj.on('touchend.radial',function() { obj.on('touchend.radial',null); obj.on('touchmenu.radial',null); - + if (activeOption) { try { activeOption.onselect(); @@ -133,8 +103,6 @@ RED.touch.radialMenu = (function() { } }); - - obj.on('touchmove.radial',function() { try { var touch0 = d3.event.touches.item(0); @@ -159,20 +127,20 @@ RED.touch.radialMenu = (function() { var d = Math.abs((p[0]*p[0])+(p[1]*p[1])); isOutside = (d > 80*80); } - + } catch(err) { RED._debug(err); } - + }); - + } catch(err) { RED._debug(err); } - } + } + - return { show: createRadial, active: function() { @@ -181,4 +149,3 @@ RED.touch.radialMenu = (function() { } })(); - diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js index 40199645f..33a186585 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js @@ -16,33 +16,37 @@ RED.tray = (function() { var stack = []; - var editorStack = $("#editor-stack"); + var editorStack; var openingTray = false; + var stackHidden = false; function resize() { } function showTray(options) { - var el = $('
                            '); - var header = $('
                            ').appendTo(el); - var bodyWrapper = $('
                            ').appendTo(el); - var body = $('
                            ').appendTo(bodyWrapper); - var footer = $('').appendTo(el); - var resizer = $('
                            ').appendTo(el); - // var growButton = $('').appendTo(resizer); - // var shrinkButton = $('').appendTo(resizer); + var el = $('
                            '); + // `editor-tray-header` is deprecated - use red-ui-tray-body instead + var header = $('
                            ').appendTo(el); + var bodyWrapper = $('
                            ').appendTo(el); + // `editor-tray-body` is deprecated - use red-ui-tray-body instead + var body = $('
                            ').appendTo(bodyWrapper); + // `editor-tray-footer` is deprecated - use red-ui-tray-footer instead + var footer = $('').appendTo(el); + var resizer = $('
                            ').appendTo(el); + // var growButton = $('').appendTo(resizer); + // var shrinkButton = $('').appendTo(resizer); if (options.title) { var titles = stack.map(function(e) { return e.options.title }); titles.push(options.title); - var title = '
                            • '+titles.join("
                            • ")+'
                            '; + var title = '
                            • '+titles.join("
                            • ")+'
                            '; - $('
                            '+title+'
                            ').appendTo(header); + $('
                            '+title+'
                            ').appendTo(header); } if (options.width === Infinity) { options.maximized = true; - resizer.addClass('editor-tray-resize-maximised'); + resizer.addClass('red-ui-tray-resize-maximised'); } - var buttonBar = $('
                            ').appendTo(header); + var buttonBar = $('
                            ').appendTo(header); var primaryButton; if (options.buttons) { for (var i=0;i $("#editor-stack").position().left-8) { - options.width = $("#editor-stack").position().left-8; + if (options.width > $("#red-ui-editor-stack").position().left-8) { + options.width = $("#red-ui-editor-stack").position().left-8; } el.width(options.width); } else { @@ -133,15 +137,15 @@ RED.tray = (function() { } tray.width = el.width(); - if (tray.width > $("#editor-stack").position().left-8) { - tray.width = Math.max(0/*tray.preferredWidth*/,$("#editor-stack").position().left-8); + if (tray.width > $("#red-ui-editor-stack").position().left-8) { + tray.width = Math.max(0/*tray.preferredWidth*/,$("#red-ui-editor-stack").position().left-8); el.width(tray.width); } - // tray.body.parent().width(Math.min($("#editor-stack").position().left-8,tray.width)); + // tray.body.parent().width(Math.min($("#red-ui-editor-stack").position().left-8,tray.width)); - $("#main-container").scrollLeft(0); + $("#red-ui-main-container").scrollLeft(0); el.css({ right: -(el.width()+10)+"px", transition: "right 0.25s ease" @@ -151,7 +155,7 @@ RED.tray = (function() { setTimeout(function() { setTimeout(function() { if (!options.width) { - el.width(Math.min(tray.preferredWidth,$("#editor-stack").position().left-8)); + el.width(Math.min(tray.preferredWidth,$("#red-ui-editor-stack").position().left-8)); } if (options.resize) { options.resize({width:el.width()}); @@ -163,7 +167,7 @@ RED.tray = (function() { // Delay resetting the flag, so we don't close prematurely openingTray = false; },200); - body.find(":focusable:first").focus(); + body.find(":focusable:first").trigger("focus"); },150); el.css({right:0}); @@ -184,28 +188,30 @@ RED.tray = (function() { function handleWindowResize() { if (stack.length > 0) { var tray = stack[stack.length-1]; - var trayHeight = tray.tray.height()-tray.header.outerHeight()-tray.footer.outerHeight(); - tray.body.height(trayHeight); - if (tray.options.maximized || tray.width > $("#editor-stack").position().left-8) { - tray.width = $("#editor-stack").position().left-8; + if (tray.options.maximized || tray.width > $("#red-ui-editor-stack").position().left-8) { + tray.width = $("#red-ui-editor-stack").position().left-8; tray.tray.width(tray.width); // tray.body.parent().width(tray.width); } else if (tray.width < tray.preferredWidth) { - tray.width = Math.min($("#editor-stack").position().left-8,tray.preferredWidth); + tray.width = Math.min($("#red-ui-editor-stack").position().left-8,tray.preferredWidth); tray.tray.width(tray.width); // tray.body.parent().width(tray.width); } + var trayHeight = tray.tray.height()-tray.header.outerHeight()-tray.footer.outerHeight(); + tray.body.height(trayHeight); if (tray.options.resize) { tray.options.resize({width:tray.width, height:trayHeight}); } + } } return { init: function init() { - $(window).resize(handleWindowResize); + editorStack = $("#red-ui-editor-stack"); + $(window).on("resize", handleWindowResize); RED.events.on("sidebar:resize",handleWindowResize); - $("#editor-shade").click(function() { + $("#red-ui-editor-shade").on("click", function() { if (!openingTray) { var tray = stack[stack.length-1]; if (tray && tray.primaryButton) { @@ -215,7 +221,19 @@ RED.tray = (function() { }); }, show: function show(options) { - if (stack.length > 0 && !options.overlay) { + if (!options) { + if (stack.length > 0) { + var tray = stack[stack.length-1]; + tray.tray.css({right:0}); + $("#red-ui-header-shade").show(); + $("#red-ui-editor-shade").show(); + $("#red-ui-palette-shade").show(); + $(".red-ui-sidebar-shade").show(); + stackHidden = false; + } + } else if (stackHidden) { + throw new Error("Cannot add to stack whilst hidden"); + } else if (stack.length > 0 && !options.overlay) { var oldTray = stack[stack.length-1]; if (options.width === "inherit") { options.width = oldTray.tray.width(); @@ -233,6 +251,19 @@ RED.tray = (function() { } }, + hide: function hide() { + if (stack.length > 0) { + var tray = stack[stack.length-1]; + tray.tray.css({ + right: -(tray.tray.width()+10)+"px" + }); + $("#red-ui-header-shade").hide(); + $("#red-ui-editor-shade").hide(); + $("#red-ui-palette-shade").hide(); + $(".red-ui-sidebar-shade").hide(); + stackHidden = true; + } + }, resize: handleWindowResize, close: function close(done) { if (stack.length > 0) { @@ -248,7 +279,7 @@ RED.tray = (function() { if (stack.length > 0) { var oldTray = stack[stack.length-1]; if (!oldTray.options.overlay) { - oldTray.tray.appendTo("#editor-stack"); + oldTray.tray.appendTo("#red-ui-editor-stack"); setTimeout(function() { handleWindowResize(); oldTray.tray.css({right:0}); @@ -267,10 +298,10 @@ RED.tray = (function() { done(); } if (stack.length === 0) { - $("#header-shade").hide(); - $("#editor-shade").hide(); - $("#palette-shade").hide(); - $(".sidebar-shade").hide(); + $("#red-ui-header-shade").hide(); + $("#red-ui-editor-shade").hide(); + $("#red-ui-palette-shade").hide(); + $(".red-ui-sidebar-shade").hide(); RED.events.emit("editor:close"); RED.view.focus(); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js b/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js index 1b608c91c..d41a6a426 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js @@ -13,6 +13,7 @@ RED.typeSearch = (function() { var activeFilter = ""; var addCallback; var cancelCallback; + var moveCallback; var typesUsed = {}; @@ -44,9 +45,16 @@ RED.typeSearch = (function() { } } + function moveDialog(dx,dy) { + var pos = dialog.position(); + pos.top = (pos.top + dy)+"px"; + pos.left = (pos.left + dx)+"px"; + dialog.css(pos); + moveCallback(dx,dy); + + } function createDialog() { - //shade = $('
                            ',{class:"red-ui-type-search-shade"}).appendTo("#main-container"); - dialog = $("
                            ",{id:"red-ui-type-search",class:"red-ui-search red-ui-type-search"}).appendTo("#main-container"); + dialog = $("
                            ",{id:"red-ui-type-search",class:"red-ui-search red-ui-type-search"}).appendTo("#red-ui-main-container"); var searchDiv = $("
                            ",{class:"red-ui-search-container"}).appendTo(dialog); searchInput = $('').attr("placeholder",RED._("search.addNode")).appendTo(searchDiv).searchBox({ delay: 50, @@ -56,7 +64,19 @@ RED.typeSearch = (function() { }); searchInput.on('keydown',function(evt) { var children = searchResults.children(":visible"); - if (children.length > 0) { + if (evt.keyCode === 40 && evt.shiftKey) { + evt.preventDefault(); + moveDialog(0,10); + } else if (evt.keyCode === 38 && evt.shiftKey) { + evt.preventDefault(); + moveDialog(0,-10); + } else if (evt.keyCode === 39 && evt.shiftKey) { + evt.preventDefault(); + moveDialog(10,0); + } else if (evt.keyCode === 37 && evt.shiftKey) { + evt.preventDefault(); + moveDialog(-10,0); + } else if (children.length > 0) { if (evt.keyCode === 40) { // Down if (selected < children.length-1) { @@ -69,7 +89,6 @@ RED.typeSearch = (function() { ensureSelectedIsVisible(); evt.preventDefault(); } else if (evt.keyCode === 38) { - // Up if (selected > 0) { if (selected < children.length) { $(children[selected]).removeClass('selected'); @@ -80,6 +99,7 @@ RED.typeSearch = (function() { ensureSelectedIsVisible(); evt.preventDefault(); } else if ((evt.metaKey || evt.ctrlKey) && evt.keyCode === 13 ) { + evt.preventDefault(); // (ctrl or cmd) and enter var index = Math.max(0,selected); if (index < children.length) { @@ -90,9 +110,13 @@ RED.typeSearch = (function() { } else { addCallback(n.type,true); } - $("#red-ui-type-search-input").val("").keyup(); + $("#red-ui-type-search-input").val("").trigger("keyup"); + setTimeout(function() { + $("#red-ui-type-search-input").focus(); + },100); } } else if (evt.keyCode === 13) { + evt.preventDefault(); // Enter var index = Math.max(0,selected); if (index < children.length) { @@ -100,11 +124,17 @@ RED.typeSearch = (function() { confirm($(children[index]).find(".red-ui-editableList-item-content").data('data')); } } + } else { + if (evt.keyCode === 13 ) { + // Stop losing focus if [Cmd]-Enter is pressed on an empty list + evt.stopPropagation(); + evt.preventDefault(); + } } }); searchResultsDiv = $("
                            ",{class:"red-ui-search-results-container"}).appendTo(dialog); - searchResults = $('
                              ',{id:"search-result-list", style:"position: absolute;top: 0;bottom: 0;left: 0;right: 0;"}).appendTo(searchResultsDiv).editableList({ + searchResults = $('
                                ',{style:"position: absolute;top: 0;bottom: 0;left: 0;right: 0;"}).appendTo(searchResultsDiv).editableList({ addButton: false, filter: function(data) { if (activeFilter === "" ) { @@ -138,14 +168,14 @@ RED.typeSearch = (function() { if (object.separator) { container.addClass("red-ui-search-result-separator") } - var div = $('',{href:'#',class:"red-ui-search-result"}).appendTo(container); + var div = $('
                                ',{class:"red-ui-search-result"}).appendTo(container); var nodeDiv = $('
                                ',{class:"red-ui-search-result-node"}).appendTo(div); var colour = RED.utils.getNodeColor(object.type,def); var icon_url = RED.utils.getNodeIcon(def); nodeDiv.css('backgroundColor',colour); - var iconContainer = $('
                                ',{class:"palette_icon_container"}).appendTo(nodeDiv); + var iconContainer = $('
                                ',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv); RED.utils.createIconElement(icon_url, iconContainer, false); if (def.inputs > 0) { @@ -162,7 +192,7 @@ RED.typeSearch = (function() { $('
                                ',{class:"red-ui-search-result-node-label"}).text(label).appendTo(contentDiv); - div.click(function(evt) { + div.on("click", function(evt) { evt.preventDefault(); confirm(object); }); @@ -208,28 +238,29 @@ RED.typeSearch = (function() { dialog.hide(); searchResultsDiv.hide(); } - $(document).off('mousedown.type-search'); - $(document).off('mouseup.type-search'); - $(document).off('click.type-search'); + $(document).off('mousedown.red-ui-type-search'); + $(document).off('mouseup.red-ui-type-search'); + $(document).off('click.red-ui-type-search'); setTimeout(function() { - $(document).on('mousedown.type-search',handleMouseActivity); - $(document).on('mouseup.type-search',handleMouseActivity); - $(document).on('click.type-search',handleMouseActivity); + $(document).on('mousedown.red-ui-type-search',handleMouseActivity); + $(document).on('mouseup.red-ui-type-search',handleMouseActivity); + $(document).on('click.red-ui-type-search',handleMouseActivity); },200); refreshTypeList(opts); addCallback = opts.add; cancelCallback = opts.cancel; + moveCallback = opts.move; RED.events.emit("type-search:open"); //shade.show(); - if ($("#main-container").height() - opts.y - 150 < 0) { + if ($("#red-ui-main-container").height() - opts.y - 150 < 0) { opts.y = opts.y - 235; } dialog.css({left:opts.x+"px",top:opts.y+"px"}).show(); searchResultsDiv.slideDown(300); setTimeout(function() { searchResultsDiv.find(".red-ui-editableList-container").scrollTop(0); - searchInput.focus(); + searchInput.trigger("focus"); },100); } function hide(fast) { @@ -245,9 +276,9 @@ RED.typeSearch = (function() { } RED.events.emit("type-search:close"); RED.view.focus(); - $(document).off('mousedown.type-search'); - $(document).off('mouseup.type-search'); - $(document).off('click.type-search'); + $(document).off('mousedown.red-ui-type-search'); + $(document).off('mouseup.red-ui-type-search'); + $(document).off('click.red-ui-type-search'); } } function getTypeLabel(type, def) { @@ -284,7 +315,7 @@ RED.typeSearch = (function() { function refreshTypeList(opts) { var i; searchResults.editableList('empty'); - searchInput.searchBox('value',''); + searchInput.searchBox('value','').focus(); selected = -1; var common = [ 'inject','debug','function','change','switch' diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js b/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js index 856074227..f0063513d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/userSettings.js @@ -34,7 +34,6 @@ RED.userSettings = (function() { return; } settingsVisible = true; - var tabContainer; var trayOptions = { title: RED._("menu.label.userSettings"), @@ -52,9 +51,9 @@ RED.userSettings = (function() { trayWidth = dimensions.width; }, open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); + var trayBody = tray.find('.red-ui-tray-body'); var settingsContent = $('
                                ').appendTo(trayBody); - var tabContainer = $('
                                ',{id:"user-settings-tabs-container"}).appendTo(settingsContent); + var tabContainer = $('
                                ',{class:"red-ui-settings-tabs-container"}).appendTo(settingsContent); $('
                                  ',{id:"user-settings-tabs"}).appendTo(tabContainer); var settingsTabs = RED.tabs.create({ @@ -62,7 +61,7 @@ RED.userSettings = (function() { vertical: true, onchange: function(tab) { setTimeout(function() { - $("#user-settings-tabs-content").children().hide(); + tabContents.children().hide(); $("#" + tab.id).show(); if (tab.pane.focus) { tab.pane.focus(); @@ -70,19 +69,19 @@ RED.userSettings = (function() { },50); } }); - var tabContents = $('
                                  ',{id:"user-settings-tabs-content"}).appendTo(settingsContent); + var tabContents = $('
                                  ',{class:"red-ui-settings-tabs-content"}).appendTo(settingsContent); panes.forEach(function(pane) { settingsTabs.addTab({ - id: "user-settings-tab-"+pane.id, + id: "red-ui-settings-tab-"+pane.id, label: pane.title, pane: pane }); pane.get().hide().appendTo(tabContents); }); settingsContent.i18n(); - settingsTabs.activateTab("user-settings-tab-"+(initialTab||'view')) - $("#sidebar-shade").show(); + settingsTabs.activateTab("red-ui-settings-tab-"+(initialTab||'view')) + $("#red-ui-sidebar-shade").show(); }, close: function() { settingsVisible = false; @@ -91,7 +90,7 @@ RED.userSettings = (function() { pane.close(); } }); - $("#sidebar-shade").hide(); + $("#red-ui-sidebar-shade").hide(); }, show: function() {} @@ -102,12 +101,25 @@ RED.userSettings = (function() { RED.tray.show(trayOptions); } + function localeToName(lc) { + var name = RED._("languages."+lc); + return {text: (name ? name : lc), val: lc}; + } + + function compText(a, b) { + return a.text.localeCompare(b.text); + } + var viewSettings = [ { + options: [ + {setting:"editor-language",local: true, label:"menu.label.view.language",options:function(done){ done([{val:'',text:RED._('menu.label.view.browserDefault')}].concat(RED.settings.theme("languages").map(localeToName).sort(compText))) }}, + ] + },{ title: "menu.label.view.grid", options: [ - {setting:"view-show-grid",oldSetting:"menu-menu-item-view-show-grid",label:"menu.label.view.showGrid",toggle:true,onchange:"core:toggle-show-grid"}, - {setting:"view-snap-grid",oldSetting:"menu-menu-item-view-snap-grid",label:"menu.label.view.snapGrid",toggle:true,onchange:"core:toggle-snap-grid"}, + {setting:"view-show-grid",oldSetting:"menu-menu-item-view-show-grid",label:"menu.label.view.showGrid", default: true, toggle:true,onchange:"core:toggle-show-grid"}, + {setting:"view-snap-grid",oldSetting:"menu-menu-item-view-snap-grid",label:"menu.label.view.snapGrid", default: true, toggle:true,onchange:"core:toggle-snap-grid"}, {setting:"view-grid-size",label:"menu.label.view.gridSize",type:"number",default: 20, onchange:RED.view.gridSize} ] }, @@ -131,20 +143,46 @@ RED.userSettings = (function() { function createViewPane() { - var pane = $('
                                  '); + var pane = $('
                                  '); var currentEditorSettings = RED.settings.get('editor') || {}; currentEditorSettings.view = currentEditorSettings.view || {}; viewSettings.forEach(function(section) { - $('

                                  ').text(RED._(section.title)).appendTo(pane); + if (section.title) { + $('

                                  ').text(RED._(section.title)).appendTo(pane); + } section.options.forEach(function(opt) { - var initialState = currentEditorSettings.view[opt.setting]; - var row = $('').appendTo(pane); + var initialState; + if (opt.local) { + initialState = localStorage.getItem(opt.setting); + } else { + initialState = currentEditorSettings.view[opt.setting]; + } + var row = $('
                                  ').appendTo(pane); var input; if (opt.toggle) { input = $('').appendTo(row).find("input"); input.prop('checked',initialState); + } else if (opt.options) { + $('').appendTo(row); + var select = $('').appendTo(row); + if (typeof opt.options === 'function') { + opt.options(function(options) { + options.forEach(function(opt) { + var val = opt; + var text = opt; + if (typeof opt !== 'string') { + val = opt.val; + text = opt.text; + } + $('
                                  ').addClass('selected').text('raw').appendTo(bufferOpts).click(function(e) { + $('
                                  ').text(stringEncoding).appendTo(sr);
                                  +                        var bufferOpts = $('').appendTo(headerHead);
                                  +                        var switchFormat = $('').text('raw').appendTo(bufferOpts).on("click", function(e) {
                                                               e.preventDefault();
                                                               e.stopPropagation();
                                                               formatBuffer(element,$(this),sourceId,path,true);
                                  @@ -435,7 +438,7 @@ RED.utils = (function() {
                                                       var row;
                                                       if (fullLength <= 10) {
                                                           for (i=0;i
                                  ').appendTo(arrayRows); + row = $('').appendTo(arrayRows); subElements[path+"["+i+"]"] = buildMessageElement( data[i], { @@ -454,16 +457,16 @@ RED.utils = (function() { } else { for (i=0;i
                                  ').appendTo(arrayRows); + row = $('').appendTo(arrayRows); header = $('').appendTo(row); - $(' ').appendTo(header); + $(' ').appendTo(header); makeExpandable(header, (function() { var min = minRange; var max = Math.min(fullLength-1,(minRange+9)); var parent = row; return function() { for (var i=min;i<=max;i++) { - var row = $('').appendTo(parent); + var row = $('').appendTo(parent); subElements[path+"["+i+"]"] = buildMessageElement( data[i], { @@ -484,10 +487,10 @@ RED.utils = (function() { })(), (function() { var path = path+"["+i+"]"; return function(state) {if (ontoggle) { ontoggle(path,state);}}})(), checkExpanded(strippedKey,expandPaths,minRange,Math.min(fullLength-1,(minRange+9)))); - $('').html("["+minRange+" … "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header); + $('').html("["+minRange+" … "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header); } if (fullLength < originalLength) { - $('').appendTo(arrayRows); + $('').appendTo(arrayRows); } } }, @@ -498,13 +501,13 @@ RED.utils = (function() { element.addClass('collapsed'); var keys = Object.keys(obj); if (key || keys.length > 0) { - $(' ').prependTo(header); + $(' ').prependTo(header); makeExpandable(header, function() { if (!key) { - $('').text('object').appendTo(header); + $('').text('object').appendTo(header); } for (i=0;i
                                  ').appendTo(element); + var row = $('').appendTo(element); var newPath = path; if (newPath !== undefined) { if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) { @@ -530,20 +533,20 @@ RED.utils = (function() { ).appendTo(row); } if (keys.length === 0) { - $('').text("empty").appendTo(element); + $('').text("empty").appendTo(element); } }, function(state) {if (ontoggle) { ontoggle(path,state);}}, checkExpanded(strippedKey,expandPaths)); } if (key) { - $('').text('object').appendTo(entryObj); + $('').text('object').appendTo(entryObj); } else { - headerHead = $('').appendTo(entryObj); + headerHead = $('').appendTo(entryObj); $('{ ').appendTo(headerHead); var keysLength = Math.min(keys.length,5); for (i=0;i').text(keys[i]).appendTo(headerHead); + $('').text(keys[i]).appendTo(headerHead); $(': ').appendTo(headerHead); buildMessageSummaryValue(obj[keys[i]]).appendTo(headerHead); if (i < keysLength-1) { @@ -554,12 +557,12 @@ RED.utils = (function() { $('').appendTo(headerHead); } if (keysLength === 0) { - $('empty').appendTo(headerHead); + $('empty').appendTo(headerHead); } $(' }').appendTo(headerHead); } } else { - $('').text(""+obj).appendTo(entryObj); + $('').text(""+obj).appendTo(entryObj); } if (exposeApi) { element.prop('expand', function() { return function(targetPath, state) { @@ -722,6 +725,62 @@ RED.utils = (function() { return result; } + function setMessageProperty(msg,prop,value,createMissing) { + if (typeof createMissing === 'undefined') { + createMissing = (typeof value !== 'undefined'); + } + if (prop.indexOf('msg.')===0) { + prop = prop.substring(4); + } + var msgPropParts = normalisePropertyExpression(prop); + var depth = 0; + var length = msgPropParts.length; + var obj = msg; + var key; + for (var i=0;i
                                  ').appendTo(container); + var spinner = $('
                                  ').appendTo(container); if (contain) { - spinner.addClass('projects-dialog-spinner-contain'); + spinner.addClass('red-ui-component-spinner-contain'); } return spinner; } @@ -923,12 +1006,12 @@ RED.utils = (function() { /** * 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 iconContainer - Icon container element with red-ui-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"); + var iconElement = iconContainer.find(".red-ui-palette-icon"); if (iconElement.length !== 0) { iconElement.remove(); } @@ -944,19 +1027,20 @@ RED.utils = (function() { if (fontAwesomeUnicode) { var faIconElement = $('').appendTo(iconContainer); var faLarge = isLarge ? "fa-lg " : ""; - faIconElement.addClass("palette_icon_fa fa fa-fw " + faLarge + iconPath.file); + faIconElement.addClass("red-ui-palette-icon-fa fa fa-fw " + faLarge + iconPath.file); return; } // If the specified name is not defined in font-awesome, show arrow-in icon. - iconUrl = RED.settings.apiRootUrl+"icons/node-red/arrow-in.png" + iconUrl = RED.settings.apiRootUrl+"icons/node-red/arrow-in.svg" } - var imageIconElement = $('
                                  ',{class:"palette_icon"}).appendTo(iconContainer); + var imageIconElement = $('
                                  ',{class:"red-ui-palette-icon"}).appendTo(iconContainer); imageIconElement.css("backgroundImage", "url("+iconUrl+")"); } return { createObjectElement: buildMessageElement, getMessageProperty: getMessageProperty, + setMessageProperty: setMessageProperty, normalisePropertyExpression: normalisePropertyExpression, validatePropertyExpression: validatePropertyExpression, separateIconPath: separateIconPath, @@ -964,6 +1048,7 @@ RED.utils = (function() { getNodeIcon: getNodeIcon, getNodeLabel: getNodeLabel, getNodeColor: getNodeColor, + clearNodeColorCache: clearNodeColorCache, addSpinnerOverlay: addSpinnerOverlay, decodeObject: decodeObject, parseContextKey: parseContextKey, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js index 8a162d7d4..a3001e474 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js @@ -36,10 +36,10 @@ if (!isShowing) { return; } - var navNode = navVis.selectAll(".navnode").data(RED.view.getActiveNodes(),function(d){return d.id}); + var navNode = navVis.selectAll(".red-ui-navigator-node").data(RED.view.getActiveNodes(),function(d){return d.id}); navNode.exit().remove(); navNode.enter().insert("rect") - .attr('class','navnode') + .attr('class','red-ui-navigator-node') .attr("pointer-events", "none"); navNode.each(function(d) { d3.select(this).attr("x",function(d) { return (d.x-d.w/2)/nav_scale }) @@ -57,8 +57,8 @@ function resizeNavBorder() { if (navBorder) { scaleFactor = RED.view.scale(); - chartSize = [ $("#chart").width(), $("#chart").height()]; - scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; + chartSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; + scrollPos = [$("#red-ui-workspace-chart").scrollLeft(),$("#red-ui-workspace-chart").scrollTop()]; navBorder.attr('x',scrollPos[0]/nav_scale) .attr('y',scrollPos[1]/nav_scale) .attr('width',chartSize[0]/nav_scale/scaleFactor) @@ -68,49 +68,40 @@ function toggle() { if (!isShowing) { isShowing = true; - $("#btn-navigate").addClass("selected"); + $("#red-ui-view-navigate").addClass("selected"); resizeNavBorder(); refreshNodes(); - $("#chart").on("scroll",onScroll); + $("#red-ui-workspace-chart").on("scroll",onScroll); navContainer.fadeIn(200); } else { isShowing = false; navContainer.fadeOut(100); - $("#chart").off("scroll",onScroll); - $("#btn-navigate").removeClass("selected"); + $("#red-ui-workspace-chart").off("scroll",onScroll); + $("#red-ui-view-navigate").removeClass("selected"); } } return { init: function() { - $(window).resize(resizeNavBorder); + $(window).on("resize", resizeNavBorder); RED.events.on("sidebar:resize",resizeNavBorder); RED.actions.add("core:toggle-navigator",toggle); var hideTimeout; navContainer = $('
                                  ').css({ "position":"absolute", - "bottom":$("#workspace-footer").height(), + "bottom":$("#red-ui-workspace-footer").height(), "right":0, zIndex: 1 - }).appendTo("#workspace").hide(); + }).appendTo("#red-ui-workspace").hide(); navBox = d3.select(navContainer[0]) .append("svg:svg") .attr("width", nav_width) .attr("height", nav_height) .attr("pointer-events", "all") - .style({ - position: "absolute", - bottom: 0, - right:0, - zIndex: 101, - "border-left": "1px solid #ccc", - "border-top": "1px solid #ccc", - background: "rgba(245,245,245,0.8)", - "box-shadow": "-1px 0 3px rgba(0,0,0,0.1)" - }); + .attr("id","red-ui-navigator-canvas") navBox.append("rect").attr("x",0).attr("y",0).attr("width",nav_width).attr("height",nav_height).style({ fill:"none", @@ -119,14 +110,14 @@ }).on("mousedown", function() { // Update these in case they have changed scaleFactor = RED.view.scale(); - chartSize = [ $("#chart").width(), $("#chart").height()]; + chartSize = [ $("#red-ui-workspace-chart").width(), $("#red-ui-workspace-chart").height()]; dimensions = [chartSize[0]/nav_scale/scaleFactor, chartSize[1]/nav_scale/scaleFactor]; var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); navBorder.attr('x',newX).attr('y',newY); isDragging = true; - $("#chart").scrollLeft(newX*nav_scale*scaleFactor); - $("#chart").scrollTop(newY*nav_scale*scaleFactor); + $("#red-ui-workspace-chart").scrollLeft(newX*nav_scale*scaleFactor); + $("#red-ui-workspace-chart").scrollTop(newY*nav_scale*scaleFactor); }).on("mousemove", function() { if (!isDragging) { return } if (d3.event.buttons === 0) { @@ -136,29 +127,27 @@ var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); navBorder.attr('x',newX).attr('y',newY); - $("#chart").scrollLeft(newX*nav_scale*scaleFactor); - $("#chart").scrollTop(newY*nav_scale*scaleFactor); + $("#red-ui-workspace-chart").scrollLeft(newX*nav_scale*scaleFactor); + $("#red-ui-workspace-chart").scrollTop(newY*nav_scale*scaleFactor); }).on("mouseup", function() { isDragging = false; }) - navBorder = navBox.append("rect") - .attr("stroke-dasharray","5,5") - .attr("pointer-events", "none") - .style({ - stroke: "#999", - strokeWidth: 1, - fill: "white", - }); + navBorder = navBox.append("rect").attr("class","red-ui-navigator-border") navVis = navBox.append("svg:g") + RED.statusBar.add({ + id: "view-navigator", + align: "right", + element: $('') + }) - $("#btn-navigate").click(function(evt) { + $("#red-ui-view-navigate").on("click", function(evt) { evt.preventDefault(); toggle(); }) - RED.popover.tooltip($("#btn-navigate"),RED._('actions.toggle-navigator'),'core:toggle-navigator'); + RED.popover.tooltip($("#red-ui-view-navigate"),RED._('actions.toggle-navigator'),'core:toggle-navigator'); }, refresh: refreshNodes, resize: resizeNavBorder, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 6f1b7f552..274bf3540 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -15,6 +15,17 @@ **/ + /*
                                  #red-ui-workspace-chart + * \- "outer" + * \- + * \- .red-ui-workspace-chart-event-layer "eventLayer" + * |- .red-ui-workspace-chart-background + * |- .red-ui-workspace-chart-grid "gridLayer" + * |- "linkLayer" + * |- "dragGroupLayer" + * \- "nodeLayer" + */ + RED.view = (function() { var space_width = 5000, space_height = 5000, @@ -67,8 +78,12 @@ RED.view = (function() { quickAddLink = null, showAllLinkPorts = -1; + var selectNodesOptions; + var clipboard = ""; + // Note: these are the permitted status colour aliases. The actual RGB values + // are set in the CSS - flow.scss/colors.scss var status_colours = { "red": "#c00", "green": "#5a8", @@ -80,206 +95,390 @@ RED.view = (function() { var PORT_TYPE_INPUT = 1; var PORT_TYPE_OUTPUT = 0; - var chart = $("#chart"); + var chart; + var outer; + var eventLayer; + var gridLayer; + var linkLayer; + var dragGroupLayer; + var nodeLayer; + var drag_lines; - var outer = d3.select("#chart") - .append("svg:svg") - .attr("width", space_width) - .attr("height", space_height) - .attr("pointer-events", "all") - .style("cursor","crosshair") - .on("mousedown", function() { - focusView(); - }) - .on("contextmenu", function(){ - d3.event.preventDefault(); - }); + function init() { - var vis = outer - .append("svg:g") - .on("dblclick.zoom", null) - .append("svg:g") - .attr('class','innerCanvas') - .on("mousemove", canvasMouseMove) - .on("mousedown", canvasMouseDown) - .on("mouseup", canvasMouseUp) - .on("mouseenter", function() { - if (lasso) { - if (d3.event.buttons !== 1) { - lasso.remove(); - lasso = null; + chart = $("#red-ui-workspace-chart"); + + outer = d3.select("#red-ui-workspace-chart") + .append("svg:svg") + .attr("width", space_width) + .attr("height", space_height) + .attr("pointer-events", "all") + .style("cursor","crosshair") + .on("mousedown", function() { + focusView(); + }) + .on("contextmenu", function(){ + d3.event.preventDefault(); + }); + + eventLayer = outer + .append("svg:g") + .on("dblclick.zoom", null) + .append("svg:g") + .attr('class','red-ui-workspace-chart-event-layer') + .on("mousemove", canvasMouseMove) + .on("mousedown", canvasMouseDown) + .on("mouseup", canvasMouseUp) + .on("mouseenter", function() { + if (lasso) { + if (d3.event.buttons !== 1) { + lasso.remove(); + lasso = null; + } + } else if (mouse_mode === RED.state.PANNING && d3.event.buttons !== 4) { + resetMouseVars(); } - } else if (mouse_mode === RED.state.PANNING && d3.event.buttons !== 4) { - resetMouseVars(); - } - }) - .on("touchend", function() { - clearTimeout(touchStartTime); - touchStartTime = null; - if (RED.touch.radialMenu.active()) { - return; - } - if (lasso) { - outer_background.attr("fill","#fff"); - } - canvasMouseUp.call(this); - }) - .on("touchcancel", canvasMouseUp) - .on("touchstart", function() { - var touch0; - if (d3.event.touches.length>1) { + }) + .on("touchend", function() { clearTimeout(touchStartTime); touchStartTime = null; - d3.event.preventDefault(); - touch0 = d3.event.touches.item(0); - var touch1 = d3.event.touches.item(1); - var a = touch0["pageY"]-touch1["pageY"]; - var b = touch0["pageX"]-touch1["pageX"]; - - var offset = $("#chart").offset(); - var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; - startTouchCenter = [ - (touch1["pageX"]+(b/2)-offset.left+scrollPos[0])/scaleFactor, - (touch1["pageY"]+(a/2)-offset.top+scrollPos[1])/scaleFactor - ]; - moveTouchCenter = [ - touch1["pageX"]+(b/2), - touch1["pageY"]+(a/2) - ] - startTouchDistance = Math.sqrt((a*a)+(b*b)); - } else { - var obj = d3.select(document.body); - touch0 = d3.event.touches.item(0); - var pos = [touch0.pageX,touch0.pageY]; - startTouchCenter = [touch0.pageX,touch0.pageY]; - startTouchDistance = 0; - var point = d3.touches(this)[0]; - touchStartTime = setTimeout(function() { - touchStartTime = null; - showTouchMenu(obj,pos); - //lasso = vis.append("rect") - // .attr("ox",point[0]) - // .attr("oy",point[1]) - // .attr("rx",2) - // .attr("ry",2) - // .attr("x",point[0]) - // .attr("y",point[1]) - // .attr("width",0) - // .attr("height",0) - // .attr("class","lasso"); - //outer_background.attr("fill","#e3e3f3"); - },touchLongPressTimeout); - } - }) - .on("touchmove", function(){ if (RED.touch.radialMenu.active()) { - d3.event.preventDefault(); return; } + canvasMouseUp.call(this); + }) + .on("touchcancel", canvasMouseUp) + .on("touchstart", function() { var touch0; - if (d3.event.touches.length<2) { - if (touchStartTime) { - touch0 = d3.event.touches.item(0); - var dx = (touch0.pageX-startTouchCenter[0]); - var dy = (touch0.pageY-startTouchCenter[1]); - var d = Math.abs(dx*dx+dy*dy); - if (d > 64) { - clearTimeout(touchStartTime); - touchStartTime = null; - } - } else if (lasso) { - d3.event.preventDefault(); - } - canvasMouseMove.call(this); - } else { + if (d3.event.touches.length>1) { + clearTimeout(touchStartTime); + touchStartTime = null; + d3.event.preventDefault(); touch0 = d3.event.touches.item(0); var touch1 = d3.event.touches.item(1); var a = touch0["pageY"]-touch1["pageY"]; var b = touch0["pageX"]-touch1["pageX"]; - var offset = $("#chart").offset(); - var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; - var moveTouchDistance = Math.sqrt((a*a)+(b*b)); - var touchCenter = [ + + var offset = chart.offset(); + var scrollPos = [chart.scrollLeft(),chart.scrollTop()]; + startTouchCenter = [ + (touch1["pageX"]+(b/2)-offset.left+scrollPos[0])/scaleFactor, + (touch1["pageY"]+(a/2)-offset.top+scrollPos[1])/scaleFactor + ]; + moveTouchCenter = [ touch1["pageX"]+(b/2), touch1["pageY"]+(a/2) - ]; - - if (!isNaN(moveTouchDistance)) { - oldScaleFactor = scaleFactor; - scaleFactor = Math.min(2,Math.max(0.3, scaleFactor + (Math.floor(((moveTouchDistance*100)-(startTouchDistance*100)))/10000))); - - var deltaTouchCenter = [ // Try to pan whilst zooming - not 100% - startTouchCenter[0]*(scaleFactor-oldScaleFactor),//-(touchCenter[0]-moveTouchCenter[0]), - startTouchCenter[1]*(scaleFactor-oldScaleFactor) //-(touchCenter[1]-moveTouchCenter[1]) + ] + startTouchDistance = Math.sqrt((a*a)+(b*b)); + } else { + var obj = d3.select(document.body); + touch0 = d3.event.touches.item(0); + var pos = [touch0.pageX,touch0.pageY]; + startTouchCenter = [touch0.pageX,touch0.pageY]; + startTouchDistance = 0; + var point = d3.touches(this)[0]; + touchStartTime = setTimeout(function() { + touchStartTime = null; + showTouchMenu(obj,pos); + //lasso = eventLayer.append("rect") + // .attr("ox",point[0]) + // .attr("oy",point[1]) + // .attr("rx",2) + // .attr("ry",2) + // .attr("x",point[0]) + // .attr("y",point[1]) + // .attr("width",0) + // .attr("height",0) + // .attr("class","nr-ui-view-lasso"); + },touchLongPressTimeout); + } + }) + .on("touchmove", function(){ + if (RED.touch.radialMenu.active()) { + d3.event.preventDefault(); + return; + } + var touch0; + if (d3.event.touches.length<2) { + if (touchStartTime) { + touch0 = d3.event.touches.item(0); + var dx = (touch0.pageX-startTouchCenter[0]); + var dy = (touch0.pageY-startTouchCenter[1]); + var d = Math.abs(dx*dx+dy*dy); + if (d > 64) { + clearTimeout(touchStartTime); + touchStartTime = null; + } + } else if (lasso) { + d3.event.preventDefault(); + } + canvasMouseMove.call(this); + } else { + touch0 = d3.event.touches.item(0); + var touch1 = d3.event.touches.item(1); + var a = touch0["pageY"]-touch1["pageY"]; + var b = touch0["pageX"]-touch1["pageX"]; + var offset = chart.offset(); + var scrollPos = [chart.scrollLeft(),chart.scrollTop()]; + var moveTouchDistance = Math.sqrt((a*a)+(b*b)); + var touchCenter = [ + touch1["pageX"]+(b/2), + touch1["pageY"]+(a/2) ]; - startTouchDistance = moveTouchDistance; - moveTouchCenter = touchCenter; + if (!isNaN(moveTouchDistance)) { + oldScaleFactor = scaleFactor; + scaleFactor = Math.min(2,Math.max(0.3, scaleFactor + (Math.floor(((moveTouchDistance*100)-(startTouchDistance*100)))/10000))); - $("#chart").scrollLeft(scrollPos[0]+deltaTouchCenter[0]); - $("#chart").scrollTop(scrollPos[1]+deltaTouchCenter[1]); - redraw(); + var deltaTouchCenter = [ // Try to pan whilst zooming - not 100% + startTouchCenter[0]*(scaleFactor-oldScaleFactor),//-(touchCenter[0]-moveTouchCenter[0]), + startTouchCenter[1]*(scaleFactor-oldScaleFactor) //-(touchCenter[1]-moveTouchCenter[1]) + ]; + + startTouchDistance = moveTouchDistance; + moveTouchCenter = touchCenter; + + chart.scrollLeft(scrollPos[0]+deltaTouchCenter[0]); + chart.scrollTop(scrollPos[1]+deltaTouchCenter[1]); + redraw(); + } } - } + }); + + // Workspace Background + eventLayer.append("svg:rect") + .attr("class","red-ui-workspace-chart-background") + .attr("width", space_width) + .attr("height", space_height); + + gridLayer = eventLayer.append("g").attr("class","red-ui-workspace-chart-grid"); + updateGrid(); + + linkLayer = eventLayer.append("g"); + dragGroupLayer = eventLayer.append("g"); + nodeLayer = eventLayer.append("g"); + drag_lines = []; + + RED.events.on("workspace:change",function(event) { + if (event.old !== 0) { + workspaceScrollPositions[event.old] = { + left:chart.scrollLeft(), + top:chart.scrollTop() + }; + } + var scrollStartLeft = chart.scrollLeft(); + var scrollStartTop = chart.scrollTop(); + + activeSubflow = RED.nodes.subflow(event.workspace); + + RED.menu.setDisabled("menu-item-workspace-edit", activeSubflow); + RED.menu.setDisabled("menu-item-workspace-delete",RED.workspaces.count() == 1 || activeSubflow); + + if (workspaceScrollPositions[event.workspace]) { + chart.scrollLeft(workspaceScrollPositions[event.workspace].left); + chart.scrollTop(workspaceScrollPositions[event.workspace].top); + } else { + chart.scrollLeft(0); + chart.scrollTop(0); + } + var scrollDeltaLeft = chart.scrollLeft() - scrollStartLeft; + var scrollDeltaTop = chart.scrollTop() - scrollStartTop; + if (mouse_position != null) { + mouse_position[0] += scrollDeltaLeft; + mouse_position[1] += scrollDeltaTop; + } + if (RED.workspaces.selection().length === 0) { + clearSelection(); + } + RED.nodes.eachNode(function(n) { + n.dirty = true; + n.dirtyStatus = true; + }); + updateSelection(); + updateActiveNodes(); + redraw(); }); - var outer_background = vis.append("svg:rect") - .attr("width", space_width) - .attr("height", space_height) - .attr("fill","#fff"); + RED.statusBar.add({ + id: "view-zoom-controls", + align: "right", + element: $(''+ + ''+ + ''+ + ''+ + '') + }) - var grid = vis.append("g"); - updateGrid(); + $("#red-ui-view-zoom-out").on("click", zoomOut); + RED.popover.tooltip($("#red-ui-view-zoom-out"),RED._('actions.zoom-out'),'core:zoom-out'); + $("#red-ui-view-zoom-zero").on("click", zoomZero); + RED.popover.tooltip($("#red-ui-view-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset'); + $("#red-ui-view-zoom-in").on("click", zoomIn); + RED.popover.tooltip($("#red-ui-view-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in'); + chart.on("DOMMouseScroll mousewheel", function (evt) { + if ( evt.altKey ) { + evt.preventDefault(); + evt.stopPropagation(); + var move = -(evt.originalEvent.detail) || evt.originalEvent.wheelDelta; + if (move <= 0) { zoomOut(); } + else { zoomIn(); } + } + }); + + // Handle nodes dragged from the palette + chart.droppable({ + accept:".red-ui-palette-node", + drop: function( event, ui ) { + d3.event = event; + var selected_tool = $(ui.draggable[0]).attr("data-palette-type"); + var result = addNode(selected_tool); + if (!result) { + return; + } + var historyEvent = result.historyEvent; + var nn = result.node; + + var showLabel = RED.utils.getMessageProperty(RED.settings.get('editor'),"view.view-node-show-label"); + if (showLabel !== undefined && !/^link (in|out)$/.test(nn._def.type) && !nn._def.defaults.hasOwnProperty("l")) { + nn.l = showLabel; + } + + var helperOffset = d3.touches(ui.helper.get(0))[0]||d3.mouse(ui.helper.get(0)); + var mousePos = d3.touches(this)[0]||d3.mouse(this); + + mousePos[1] += this.scrollTop + ((nn.h/2)-helperOffset[1]); + mousePos[0] += this.scrollLeft + ((nn.w/2)-helperOffset[0]); + mousePos[1] /= scaleFactor; + mousePos[0] /= scaleFactor; + + if (snapGrid) { + mousePos[0] = gridSize*(Math.ceil(mousePos[0]/gridSize)); + mousePos[1] = gridSize*(Math.ceil(mousePos[1]/gridSize)); + } + nn.x = mousePos[0]; + nn.y = mousePos[1]; + + var spliceLink = $(ui.helper).data("splice"); + if (spliceLink) { + // TODO: DRY - droppable/nodeMouseDown/canvasMouseUp/showQuickAddDialog + RED.nodes.removeLink(spliceLink); + var link1 = { + source:spliceLink.source, + sourcePort:spliceLink.sourcePort, + target: nn + }; + var link2 = { + source:nn, + sourcePort:0, + target: spliceLink.target + }; + RED.nodes.addLink(link1); + RED.nodes.addLink(link2); + historyEvent.links = [link1,link2]; + historyEvent.removedLinks = [spliceLink]; + } + + RED.history.push(historyEvent); + RED.nodes.add(nn); + RED.editor.validateNode(nn); + RED.nodes.dirty(true); + // auto select dropped node - so info shows (if visible) + clearSelection(); + nn.selected = true; + moving_set.push({n:nn}); + updateActiveNodes(); + updateSelection(); + redraw(); + + if (nn._def.autoedit) { + RED.editor.edit(nn); + } + } + }); + chart.on("focus", function() { + $("#red-ui-workspace-tabs").addClass("red-ui-workspace-focussed"); + }); + chart.on("blur", function() { + $("#red-ui-workspace-tabs").removeClass("red-ui-workspace-focussed"); + }); + + RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection); + RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();}); + RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard);}); + RED.actions.add("core:delete-selection",deleteSelection); + RED.actions.add("core:edit-selected-node",editSelection); + RED.actions.add("core:undo",RED.history.pop); + RED.actions.add("core:redo",RED.history.redo); + RED.actions.add("core:select-all-nodes",selectAll); + RED.actions.add("core:zoom-in",zoomIn); + RED.actions.add("core:zoom-out",zoomOut); + RED.actions.add("core:zoom-reset",zoomZero); + RED.actions.add("core:enable-selected-nodes", function() { setSelectedNodeState(false)}); + RED.actions.add("core:disable-selected-nodes", function() { setSelectedNodeState(true)}); + + RED.actions.add("core:toggle-show-grid",function(state) { + if (state === undefined) { + RED.userSettings.toggle("view-show-grid"); + } else { + toggleShowGrid(state); + } + }); + RED.actions.add("core:toggle-snap-grid",function(state) { + if (state === undefined) { + RED.userSettings.toggle("view-snap-grid"); + } else { + toggleSnapGrid(state); + } + }); + RED.actions.add("core:toggle-status",function(state) { + if (state === undefined) { + RED.userSettings.toggle("view-node-status"); + } else { + toggleStatus(state); + } + }); + + RED.view.navigator.init(); + RED.view.tools.init(); + } function updateGrid() { var gridTicks = []; for (var i=0;i 0) { - if (drag_lines[0].virtualLink) { - filter = {type:drag_lines[0].node.type === 'link in'?'link out':'link in'} - } else if (drag_lines[0].portType === PORT_TYPE_OUTPUT) { - filter = {input:true} - } else { - filter = {output:true} - } - - quickAddLink = { - node: drag_lines[0].node, - port: drag_lines[0].port, - portType: drag_lines[0].portType, - } - if (drag_lines[0].virtualLink) { - quickAddLink.virtualLink = true; - } - hideDragLines(); - } - var rebuildQuickAddLink = function() { - if (!quickAddLink) { - return; - } - if (!quickAddLink.el) { - quickAddLink.el = dragGroup.append("svg:path").attr("class", "drag_line"); - } - var numOutputs = (quickAddLink.portType === PORT_TYPE_OUTPUT)?(quickAddLink.node.outputs || 1):1; - var sourcePort = quickAddLink.port; - var portY = -((numOutputs-1)/2)*13 +13*sourcePort; - var sc = (quickAddLink.portType === PORT_TYPE_OUTPUT)?1:-1; - quickAddLink.el.attr("d",generateLinkPath(quickAddLink.node.x+sc*quickAddLink.node.w/2,quickAddLink.node.y+portY,point[0]-sc*node_width/2,point[1],sc)); - } - if (quickAddLink) { - rebuildQuickAddLink(); - } - - - var lastAddedX; - var lastAddedWidth; - - RED.typeSearch.show({ - x:d3.event.clientX-mainPos.left-node_width/2 - (ox-point[0]), - y:d3.event.clientY-mainPos.top+ node_height/2 + 5 - (oy-point[1]), - filter: filter, - cancel: function() { - if (quickAddLink) { - if (quickAddLink.el) { - quickAddLink.el.remove(); - } - quickAddLink = null; - } - quickAddActive = false; - if (ghostNode) { - ghostNode.remove(); - } - resetMouseVars(); - updateSelection(); - hideDragLines(); - redraw(); - }, - add: function(type,keepAdding) { - var result = addNode(type); - if (!result) { - return; - } - if (keepAdding) { - mouse_mode = RED.state.QUICK_JOINING; - } - - var nn = result.node; - var historyEvent = result.historyEvent; - nn.x = point[0]; - nn.y = point[1]; - var showLabel = RED.utils.getMessageProperty(RED.settings.get('editor'),"view.view-node-show-label"); - if (showLabel !== undefined && !/^link (in|out)$/.test(nn._def.type) && !nn._def.defaults.hasOwnProperty("l")) { - nn.l = showLabel; - } - if (quickAddLink) { - var drag_line = quickAddLink; - var src = null,dst,src_port; - if (drag_line.portType === PORT_TYPE_OUTPUT && (nn.inputs > 0 || drag_line.virtualLink) ) { - src = drag_line.node; - src_port = drag_line.port; - dst = nn; - } else if (drag_line.portType === PORT_TYPE_INPUT && (nn.outputs > 0 || drag_line.virtualLink)) { - src = nn; - dst = drag_line.node; - src_port = 0; - } - - if (src !== null) { - // Joining link nodes via virual wires. Need to update - // the src and dst links property - if (drag_line.virtualLink) { - historyEvent = { - t:'multi', - events: [historyEvent] - } - var oldSrcLinks = $.extend(true,{},{v:src.links}).v - var oldDstLinks = $.extend(true,{},{v:dst.links}).v - src.links.push(dst.id); - dst.links.push(src.id); - src.dirty = true; - dst.dirty = true; - - historyEvent.events.push({ - t:'edit', - node: src, - dirty: RED.nodes.dirty(), - changed: src.changed, - changes: { - links:oldSrcLinks - } - }); - historyEvent.events.push({ - t:'edit', - node: dst, - dirty: RED.nodes.dirty(), - changed: dst.changed, - changes: { - links:oldDstLinks - } - }); - src.changed = true; - dst.changed = true; - } else { - var link = {source: src, sourcePort:src_port, target: dst}; - RED.nodes.addLink(link); - historyEvent.links = [link]; - } - if (!keepAdding) { - quickAddLink.el.remove(); - quickAddLink = null; - if (mouse_mode === RED.state.QUICK_JOINING) { - if (drag_line.portType === PORT_TYPE_OUTPUT && nn.outputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_OUTPUT}]); - } else if (!quickAddLink && drag_line.portType === PORT_TYPE_INPUT && nn.inputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_INPUT}]); - } else { - resetMouseVars(); - } - } - } else { - quickAddLink.node = nn; - quickAddLink.port = 0; - } - } else { - hideDragLines(); - resetMouseVars(); - } - } else { - if (!keepAdding) { - if (mouse_mode === RED.state.QUICK_JOINING) { - if (nn.outputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_OUTPUT}]); - } else if (nn.inputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_INPUT}]); - } else { - resetMouseVars(); - } - } - } else { - if (nn.outputs > 0) { - quickAddLink = { - node: nn, - port: 0, - portType: PORT_TYPE_OUTPUT - } - } else if (nn.inputs > 0) { - quickAddLink = { - node: nn, - port: 0, - portType: PORT_TYPE_INPUT - } - } else { - resetMouseVars(); - } - } - } - - RED.history.push(historyEvent); - RED.nodes.add(nn); - RED.editor.validateNode(nn); - RED.nodes.dirty(true); - // auto select dropped node - so info shows (if visible) - clearSelection(); - nn.selected = true; - moving_set.push({n:nn}); - updateActiveNodes(); - updateSelection(); - redraw(); - // At this point the newly added node will have a real width, - // so check if the position needs nudging - if (lastAddedX !== undefined) { - var lastNodeRHEdge = lastAddedX + lastAddedWidth/2; - var thisNodeLHEdge = nn.x - nn.w/2; - var gap = thisNodeLHEdge - lastNodeRHEdge; - if (gap != gridSize *2) { - nn.x = nn.x + gridSize * 2 - gap; - nn.dirty = true; - nn.x = Math.ceil(nn.x / gridSize) * gridSize; - redraw(); - } - } - if (keepAdding) { - if (lastAddedX === undefined) { - // ghostLink.attr("opacity",1); - setTimeout(function() { - RED.typeSearch.refresh({filter:{input:true}}); - },100); - } - - lastAddedX = nn.x; - lastAddedWidth = nn.w; - - point[0] = nn.x + nn.w/2 + node_width/2 + gridSize * 2; - ghostNode.attr('transform','translate('+(point[0] - node_width/2)+','+(point[1] - node_height/2)+')'); - rebuildQuickAddLink(); - } else { - quickAddActive = false; - ghostNode.remove(); - } - } - }); - - updateActiveNodes(); - updateSelection(); - redraw(); + showQuickAddDialog(d3.mouse(this)); } } if (mouse_mode === 0 && !(d3.event.metaKey || d3.event.ctrlKey)) { if (!touchStartTime) { point = d3.mouse(this); - lasso = vis.append("rect") + lasso = eventLayer.append("rect") .attr("ox",point[0]) .attr("oy",point[1]) .attr("rx",1) @@ -1019,12 +788,318 @@ RED.view = (function() { .attr("y",point[1]) .attr("width",0) .attr("height",0) - .attr("class","lasso"); + .attr("class","nr-ui-view-lasso"); d3.event.preventDefault(); } } } + function showQuickAddDialog(point,spliceLink) { + var ox = point[0]; + var oy = point[1]; + + if (RED.settings.get("editor").view['view-snap-grid']) { + // eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','red') + point[0] = Math.round(point[0] / gridSize) * gridSize; + point[1] = Math.round(point[1] / gridSize) * gridSize; + // eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','blue') + } + + var mainPos = $("#red-ui-main-container").position(); + + if (mouse_mode !== RED.state.QUICK_JOINING) { + mouse_mode = RED.state.QUICK_JOINING; + $(window).on('keyup',disableQuickJoinEventHandler); + } + quickAddActive = true; + + if (ghostNode) { + ghostNode.remove(); + } + ghostNode = eventLayer.append("g").attr('transform','translate('+(point[0] - node_width/2)+','+(point[1] - node_height/2)+')'); + ghostNode.append("rect") + .attr("class","red-ui-flow-node-placeholder") + .attr("rx", 5) + .attr("ry", 5) + .attr("width",node_width) + .attr("height",node_height) + .attr("fill","none") + // var ghostLink = ghostNode.append("svg:path") + // .attr("class","red-ui-flow-link-link") + // .attr("d","M 0 "+(node_height/2)+" H "+(gridSize * -2)) + // .attr("opacity",0); + + var filter = undefined; + if (drag_lines.length > 0) { + if (drag_lines[0].virtualLink) { + filter = {type:drag_lines[0].node.type === 'link in'?'link out':'link in'} + } else if (drag_lines[0].portType === PORT_TYPE_OUTPUT) { + filter = {input:true} + } else { + filter = {output:true} + } + + quickAddLink = { + node: drag_lines[0].node, + port: drag_lines[0].port, + portType: drag_lines[0].portType, + } + if (drag_lines[0].virtualLink) { + quickAddLink.virtualLink = true; + } + hideDragLines(); + } + if (spliceLink) { + filter = {input:true, output:true} + } + + var rebuildQuickAddLink = function() { + if (!quickAddLink) { + return; + } + if (!quickAddLink.el) { + quickAddLink.el = dragGroupLayer.append("svg:path").attr("class", "red-ui-flow-drag-line"); + } + var numOutputs = (quickAddLink.portType === PORT_TYPE_OUTPUT)?(quickAddLink.node.outputs || 1):1; + var sourcePort = quickAddLink.port; + + if (vertical) { + var portX = -((numOutputs-1)/2)*13 +13*sourcePort; + }else{ + var portY = -((numOutputs-1)/2)*13 +13*sourcePort; + } + var sc = (quickAddLink.portType === PORT_TYPE_OUTPUT)?1:-1; + if (vertical) { + quickAddLink.el.attr("d",generateLinkPathV(quickAddLink.node.x+portX+sc*quickAddLink.node.w/2,quickAddLink.node.y,point[0]-sc*node_width/2,point[1],sc)); + }else{ + quickAddLink.el.attr("d",generateLinkPath(quickAddLink.node.x+sc*quickAddLink.node.w/2,quickAddLink.node.y+portY,point[0]-sc*node_width/2,point[1],sc)); + } + } + if (quickAddLink) { + rebuildQuickAddLink(); + } + + + var lastAddedX; + var lastAddedWidth; + + RED.typeSearch.show({ + x:d3.event.clientX-mainPos.left-node_width/2 - (ox-point[0]), + y:d3.event.clientY-mainPos.top+ node_height/2 + 5 - (oy-point[1]), + filter: filter, + move: function(dx,dy) { + if (ghostNode) { + var pos = d3.transform(ghostNode.attr("transform")).translate; + ghostNode.attr("transform","translate("+(pos[0]+dx)+","+(pos[1]+dy)+")") + point[0] += dx; + point[1] += dy; + rebuildQuickAddLink(); + } + }, + cancel: function() { + if (quickAddLink) { + if (quickAddLink.el) { + quickAddLink.el.remove(); + } + quickAddLink = null; + } + quickAddActive = false; + if (ghostNode) { + ghostNode.remove(); + } + resetMouseVars(); + updateSelection(); + hideDragLines(); + redraw(); + }, + add: function(type,keepAdding) { + var result = addNode(type); + if (!result) { + return; + } + if (keepAdding) { + mouse_mode = RED.state.QUICK_JOINING; + } + + var nn = result.node; + var historyEvent = result.historyEvent; + nn.x = point[0]; + nn.y = point[1]; + var showLabel = RED.utils.getMessageProperty(RED.settings.get('editor'),"view.view-node-show-label"); + if (showLabel !== undefined && !/^link (in|out)$/.test(nn._def.type) && !nn._def.defaults.hasOwnProperty("l")) { + nn.l = showLabel; + } + if (quickAddLink) { + var drag_line = quickAddLink; + var src = null,dst,src_port; + if (drag_line.portType === PORT_TYPE_OUTPUT && (nn.inputs > 0 || drag_line.virtualLink) ) { + src = drag_line.node; + src_port = drag_line.port; + dst = nn; + } else if (drag_line.portType === PORT_TYPE_INPUT && (nn.outputs > 0 || drag_line.virtualLink)) { + src = nn; + dst = drag_line.node; + src_port = 0; + } + + if (src !== null) { + // Joining link nodes via virual wires. Need to update + // the src and dst links property + if (drag_line.virtualLink) { + historyEvent = { + t:'multi', + events: [historyEvent] + } + var oldSrcLinks = $.extend(true,{},{v:src.links}).v + var oldDstLinks = $.extend(true,{},{v:dst.links}).v + src.links.push(dst.id); + dst.links.push(src.id); + src.dirty = true; + dst.dirty = true; + + historyEvent.events.push({ + t:'edit', + node: src, + dirty: RED.nodes.dirty(), + changed: src.changed, + changes: { + links:oldSrcLinks + } + }); + historyEvent.events.push({ + t:'edit', + node: dst, + dirty: RED.nodes.dirty(), + changed: dst.changed, + changes: { + links:oldDstLinks + } + }); + src.changed = true; + dst.changed = true; + } else { + var link = {source: src, sourcePort:src_port, target: dst}; + RED.nodes.addLink(link); + historyEvent.links = [link]; + } + if (!keepAdding) { + quickAddLink.el.remove(); + quickAddLink = null; + if (mouse_mode === RED.state.QUICK_JOINING) { + if (drag_line.portType === PORT_TYPE_OUTPUT && nn.outputs > 0) { + showDragLines([{node:nn,port:0,portType:PORT_TYPE_OUTPUT}]); + } else if (!quickAddLink && drag_line.portType === PORT_TYPE_INPUT && nn.inputs > 0) { + showDragLines([{node:nn,port:0,portType:PORT_TYPE_INPUT}]); + } else { + resetMouseVars(); + } + } + } else { + quickAddLink.node = nn; + quickAddLink.port = 0; + } + } else { + hideDragLines(); + resetMouseVars(); + } + } else { + if (!keepAdding) { + if (mouse_mode === RED.state.QUICK_JOINING) { + if (nn.outputs > 0) { + showDragLines([{node:nn,port:0,portType:PORT_TYPE_OUTPUT}]); + } else if (nn.inputs > 0) { + showDragLines([{node:nn,port:0,portType:PORT_TYPE_INPUT}]); + } else { + resetMouseVars(); + } + } + } else { + if (nn.outputs > 0) { + quickAddLink = { + node: nn, + port: 0, + portType: PORT_TYPE_OUTPUT + } + } else if (nn.inputs > 0) { + quickAddLink = { + node: nn, + port: 0, + portType: PORT_TYPE_INPUT + } + } else { + resetMouseVars(); + } + } + } + if (spliceLink) { + resetMouseVars(); + // TODO: DRY - droppable/nodeMouseDown/canvasMouseUp/showQuickAddDialog + RED.nodes.removeLink(spliceLink); + var link1 = { + source:spliceLink.source, + sourcePort:spliceLink.sourcePort, + target: nn + }; + var link2 = { + source:nn, + sourcePort:0, + target: spliceLink.target + }; + RED.nodes.addLink(link1); + RED.nodes.addLink(link2); + historyEvent.links = (historyEvent.links || []).concat([link1,link2]); + historyEvent.removedLinks = [spliceLink]; + } + RED.history.push(historyEvent); + RED.nodes.add(nn); + RED.editor.validateNode(nn); + RED.nodes.dirty(true); + // auto select dropped node - so info shows (if visible) + clearSelection(); + nn.selected = true; + moving_set.push({n:nn}); + updateActiveNodes(); + updateSelection(); + redraw(); + // At this point the newly added node will have a real width, + // so check if the position needs nudging + if (lastAddedX !== undefined) { + var lastNodeRHEdge = lastAddedX + lastAddedWidth/2; + var thisNodeLHEdge = nn.x - nn.w/2; + var gap = thisNodeLHEdge - lastNodeRHEdge; + if (gap != gridSize *2) { + nn.x = nn.x + gridSize * 2 - gap; + nn.dirty = true; + nn.x = Math.ceil(nn.x / gridSize) * gridSize; + redraw(); + } + } + if (keepAdding) { + if (lastAddedX === undefined) { + // ghostLink.attr("opacity",1); + setTimeout(function() { + RED.typeSearch.refresh({filter:{input:true}}); + },100); + } + + lastAddedX = nn.x; + lastAddedWidth = nn.w; + + point[0] = nn.x + nn.w/2 + node_width/2 + gridSize * 2; + ghostNode.attr('transform','translate('+(point[0] - node_width/2)+','+(point[1] - node_height/2)+')'); + rebuildQuickAddLink(); + } else { + quickAddActive = false; + ghostNode.remove(); + } + } + }); + + updateActiveNodes(); + updateSelection(); + redraw(); + } + function canvasMouseMove() { var i; var node; @@ -1081,6 +1156,11 @@ RED.view = (function() { return; } + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } + if (mouse_mode != RED.state.QUICK_JOINING && mouse_mode != RED.state.IMPORT_DRAGGING && !mousedown_node && selected_link == null) { return; } @@ -1174,8 +1254,8 @@ RED.view = (function() { if (moving_set.length === 1) { node = moving_set[0]; spliceActive = node.n.hasOwnProperty("_def") && - node.n._def.inputs > 0 && - node.n._def.outputs > 0 && + ((node.n.hasOwnProperty("inputs") && node.n.inputs > 0) || (!node.n.hasOwnProperty("inputs") && node.n._def.inputs > 0)) && + ((node.n.hasOwnProperty("outputs") && node.n.outputs > 0) || (!node.n.hasOwnProperty("outputs") && node.n._def.outputs > 0)) && RED.nodes.filterLinks({ source: node.n }).length === 0 && RED.nodes.filterLinks({ target: node.n }).length === 0; } @@ -1253,7 +1333,7 @@ RED.view = (function() { nodes = RED.view.getLinksAtPoint(mouseX,mouseY); } for (var i=0;i 0) { + historyEvent = { + t:"delete", + links: removedLinks, + dirty:RED.nodes.dirty() + }; + RED.history.push(historyEvent); + RED.nodes.dirty(true); + } hideDragLines(); } if (lasso) { @@ -1414,27 +1501,42 @@ RED.view = (function() { function zoomIn() { if (scaleFactor < 2) { - scaleFactor += 0.1; - RED.view.navigator.resize(); - redraw(); + zoomView(scaleFactor+0.1); } } function zoomOut() { if (scaleFactor > 0.3) { - scaleFactor -= 0.1; - RED.view.navigator.resize(); - redraw(); + zoomView(scaleFactor-0.1); } } - function zoomZero() { - scaleFactor = 1; + function zoomZero() { zoomView(1); } + + function zoomView(factor) { + var screenSize = [chart.width(),chart.height()]; + var scrollPos = [chart.scrollLeft(),chart.scrollTop()]; + var center = [(scrollPos[0] + screenSize[0]/2)/scaleFactor,(scrollPos[1] + screenSize[1]/2)/scaleFactor]; + scaleFactor = factor; + var newCenter = [(scrollPos[0] + screenSize[0]/2)/scaleFactor,(scrollPos[1] + screenSize[1]/2)/scaleFactor]; + var delta = [(newCenter[0]-center[0])*scaleFactor,(newCenter[1]-center[1])*scaleFactor] + chart.scrollLeft(scrollPos[0]-delta[0]); + chart.scrollTop(scrollPos[1]-delta[1]); + RED.view.navigator.resize(); redraw(); } + function selectAll() { + if (mouse_mode === RED.state.SELECTING_NODE && selectNodesOptions.single) { + return; + } RED.nodes.eachNode(function(n) { if (n.z == RED.workspaces.active()) { + if (mouse_mode === RED.state.SELECTING_NODE) { + if (selectNodesOptions.filter && !selectNodesOptions.filter(n)) { + return; + } + } if (!n.selected) { n.selected = true; n.dirty = true; @@ -1442,7 +1544,7 @@ RED.view = (function() { } } }); - if (activeSubflow) { + if (mouse_mode !== RED.state.SELECTING_NODE && activeSubflow) { activeSubflow.in.forEach(function(n) { if (!n.selected) { n.selected = true; @@ -1467,7 +1569,9 @@ RED.view = (function() { } selected_link = null; - updateSelection(); + if (mouse_mode !== RED.state.SELECTING_NODE) { + updateSelection(); + } redraw(); } @@ -1601,6 +1705,9 @@ RED.view = (function() { } } function deleteSelection() { + if (mouse_mode === RED.state.SELECTING_NODE) { + return; + } if (portLabelHover) { portLabelHover.remove(); portLabelHover = null; @@ -1737,7 +1844,7 @@ RED.view = (function() { ], dirty:RED.nodes.dirty() } - + RED.nodes.dirty(true); selected_link.source.changed = true; selected_link.target.changed = true; selected_link.target.links.splice(sourceIdIndex,1); @@ -1777,6 +1884,9 @@ RED.view = (function() { } function copySelection() { + if (mouse_mode === RED.state.SELECTING_NODE) { + return; + } var nodes = []; var selection = RED.workspaces.selection(); if (selection.length > 0) { @@ -1817,21 +1927,22 @@ RED.view = (function() { } } - function calculateTextWidth(str, className, offset) { return calculateTextDimensions(str,className,offset,0)[0]; } + var textDimensionPlaceholder = {}; function calculateTextDimensions(str,className,offsetW,offsetH) { - var sp = document.createElement("span"); - sp.className = className; - sp.style.position = "absolute"; - sp.style.top = "-1000px"; - sp.textContent = (str||""); - document.body.appendChild(sp); - var w = sp.offsetWidth; - var h = sp.offsetHeight; - document.body.removeChild(sp); + if (!textDimensionPlaceholder[className]) { + textDimensionPlaceholder[className] = document.createElement("span"); + textDimensionPlaceholder[className].className = className; + textDimensionPlaceholder[className].style.position = "absolute"; + textDimensionPlaceholder[className].style.top = "-1000px"; + document.getElementById("red-ui-editor").appendChild(textDimensionPlaceholder[className]); + } + textDimensionPlaceholder[className].textContent = (str||""); + var w = textDimensionPlaceholder[className].offsetWidth; + var h = textDimensionPlaceholder[className].offsetHeight; return [offsetW+w,offsetH+h]; } @@ -1843,7 +1954,7 @@ RED.view = (function() { mousedown_port_type = null; activeSpliceLink = null; spliceActive = false; - d3.select(".link_splice").classed("link_splice",false); + d3.select(".red-ui-flow-link-splice").classed("red-ui-flow-link-splice",false); if (spliceTimer) { clearTimeout(spliceTimer); spliceTimer = null; @@ -1863,11 +1974,14 @@ RED.view = (function() { function portMouseDown(d,portType,portIndex) { //console.log(d,portType,portIndex); // disable zoom - //vis.call(d3.behavior.zoom().on("zoom"), null); + //eventLayer.call(d3.behavior.zoom().on("zoom"), null); if (d3.event.button === 1) { return; } - + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } mousedown_node = d; mousedown_port_type = portType; mousedown_port_index = portIndex || 0; @@ -1885,6 +1999,10 @@ RED.view = (function() { } function portMouseUp(d,portType,portIndex) { + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } var i; if (mouse_mode === RED.state.QUICK_JOINING && drag_lines.length > 0) { if (drag_lines[0].node === d) { @@ -1946,7 +2064,7 @@ RED.view = (function() { } var link = {source: src, sourcePort:src_port, target: dst}; if (drag_line.virtualLink) { - if (/^link (in|out)$/.test(src.type) && /^link (in|out)$/.test(dst.type)) { + if (/^link (in|out)$/.test(src.type) && /^link (in|out)$/.test(dst.type) && src.type !== dst.type) { if (src.links.indexOf(dst.id) === -1 && dst.links.indexOf(src.id) === -1) { var oldSrcLinks = $.extend(true,{},{v:src.links}).v var oldDstLinks = $.extend(true,{},{v:dst.links}).v @@ -2072,7 +2190,7 @@ RED.view = (function() { function getElementPosition(node) { var d3Node = d3.select(node); - if (d3Node.attr('class') === 'innerCanvas') { + if (d3Node.attr('class') === 'red-ui-workspace-chart-event-layer') { return [0,0]; } var result = []; @@ -2112,19 +2230,23 @@ RED.view = (function() { return result; } function showTooltip(x,y,content,direction) { - var tooltip = vis.append("g") + var tooltip = eventLayer.append("g") .attr("transform","translate("+x+","+y+")") - .attr("class","port_tooltip"); + .attr("class","red-ui-flow-port-tooltip"); var lines = content.split("\n"); - var labelWidth = 0; - var labelHeight = 4; + var labelWidth = 6; + var labelHeight = 12; var labelHeights = []; - lines.forEach(function(l) { - var labelDimensions = calculateTextDimensions(l, "port_tooltip_label", 8,0); - labelWidth = Math.max(labelWidth,labelDimensions[0]); - labelHeights.push(0.8*labelDimensions[1]); - labelHeight += 0.8*labelDimensions[1]; + var lineHeight = 0; + lines.forEach(function(l,i) { + var labelDimensions = calculateTextDimensions(l||" ", "red-ui-flow-port-tooltip-label", 8,0); + labelWidth = Math.max(labelWidth,labelDimensions[0] + 6); + labelHeights.push(labelDimensions[1]); + if (i === 0) { + lineHeight = labelDimensions[1]; + } + labelHeight += labelDimensions[1]; }); var labelWidth1 = (labelWidth/2)-5-2; var labelWidth2 = labelWidth - 4; @@ -2133,35 +2255,40 @@ RED.view = (function() { var labelHeight2 = labelHeight - 4; var path; var lx; - var ly = -labelHeight/2-2; + var ly = -labelHeight/2; var anchor; if (direction === "left") { path = "M0 0 l -5 -5 v -"+(labelHeight1)+" q 0 -2 -2 -2 h -"+labelWidth+" q -2 0 -2 2 v "+(labelHeight2)+" q 0 2 2 2 h "+labelWidth+" q 2 0 2 -2 v -"+(labelHeight1)+" l 5 -5"; - lx = -10; + lx = -14; anchor = "end"; } else if (direction === "right") { path = "M0 0 l 5 -5 v -"+(labelHeight1)+" q 0 -2 2 -2 h "+labelWidth+" q 2 0 2 2 v "+(labelHeight2)+" q 0 2 -2 2 h -"+labelWidth+" q -2 0 -2 -2 v -"+(labelHeight1)+" l -5 -5" - lx = 10; + lx = 14; anchor = "start"; } else if (direction === "top") { path = "M0 0 l 5 -5 h "+(labelWidth1)+" q 2 0 2 -2 v -"+labelHeight+" q 0 -2 -2 -2 h -"+(labelWidth2)+" q -2 0 -2 2 v "+labelHeight+" q 0 2 2 2 h "+(labelWidth1)+" l 5 5" - lx = labelWidth/2 - 4; - ly = -labelHeight-labelHeight / 2 + 2; - anchor = "end"; + lx = -labelWidth/2 + 6; + ly = -labelHeight-lineHeight+12; + anchor = "start"; } tooltip.append("path").attr("d",path); lines.forEach(function(l,i) { ly += labelHeights[i]; - tooltip.append("svg:text").attr("class","port_tooltip_label") + // tooltip.append("path").attr("d","M "+(lx-10)+" "+ly+" l 20 0 m -10 -5 l 0 10 ").attr('r',2).attr("stroke","#f00").attr("stroke-width","1").attr("fill","none") + tooltip.append("svg:text").attr("class","red-ui-flow-port-tooltip-label") .attr("x", lx) .attr("y", ly) .attr("text-anchor",anchor) - .text(l) + .text(l||" ") }); return tooltip; } function portMouseOver(port,d,portType,portIndex) { + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } clearTimeout(portLabelHoverTimeout); var active = (mouse_mode!=RED.state.JOINING && mouse_mode != RED.state.QUICK_JOINING) || // Not currently joining - all ports active ( @@ -2190,18 +2317,26 @@ RED.view = (function() { ); },500); } - port.classed("port_hovered",active); + port.classed("red-ui-flow-port-hovered",active); } function portMouseOut(port,d,portType,portIndex) { + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } clearTimeout(portLabelHoverTimeout); if (portLabelHover) { portLabelHover.remove(); portLabelHover = null; } - port.classed("port_hovered",false); + port.classed("red-ui-flow-port-hovered",false); } function nodeMouseUp(d) { + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < 750) { mouse_mode = RED.state.DEFAULT; if (d.type != "subflow") { @@ -2230,7 +2365,7 @@ RED.view = (function() { portMouseUp(d, direction, 0); if (wasJoining) { - d3.selectAll(".port_hovered").classed("port_hovered",false); + d3.selectAll(".red-ui-flow-port-hovered").classed("red-ui-flow-port-hovered",false); } } @@ -2276,6 +2411,32 @@ RED.view = (function() { } else if (mouse_mode == RED.state.QUICK_JOINING) { d3.event.stopPropagation(); return; + } else if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + if (selectNodesOptions.single) { + selectNodesOptions.done(d); + return; + } + if (d.selected) { + d.selected = false; + for (i=0;i 30) { + scaleFactor = 30/largestEdge; + } + var width = img.width * scaleFactor; + var height = img.height * scaleFactor; + icon.attr("width",width); + icon.attr("height",height); + icon.attr("x",15-width/2); + } icon.attr("xlink:href",iconUrl); icon.style("display",null); //if ("right" == d._def.align) { @@ -2445,7 +2616,7 @@ RED.view = (function() { } function redraw() { - vis.attr("transform","scale("+scaleFactor+")"); + eventLayer.attr("transform","scale("+scaleFactor+")"); outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor); // Don't bother redrawing nodes if we're drawing links @@ -2454,14 +2625,14 @@ RED.view = (function() { var dirtyNodes = {}; if (activeSubflow) { - var subflowOutputs = nodeLayer.selectAll(".subflowoutput").data(activeSubflow.out,function(d,i){ return d.id;}); + var subflowOutputs = nodeLayer.selectAll(".red-ui-flow-subflow-port-output").data(activeSubflow.out,function(d,i){ return d.id;}); subflowOutputs.exit().remove(); - var outGroup = subflowOutputs.enter().insert("svg:g").attr("class","node subflowoutput").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); + var outGroup = subflowOutputs.enter().insert("svg:g").attr("class","red-ui-flow-node red-ui-flow-subflow-port-output").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); outGroup.each(function(d,i) { d.w=40; d.h=40; }); - outGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) + outGroup.append("rect").attr("class","red-ui-flow-subflow-port").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) // TODO: This is exactly the same set of handlers used for regular nodes - DRY .on("mouseup",nodeMouseUp) .on("mousedown",nodeMouseDown) @@ -2486,7 +2657,7 @@ RED.view = (function() { nodeMouseUp.call(this,d); }); var attr_output_translate = (vertical) ? 'translate(15,-5)' : 'translate(-5,15)'; - outGroup.append("g").attr('transform',attr_output_translate).append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) + outGroup.append("g").attr('transform',attr_output_translate).append("rect").attr("class","red-ui-flow-port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) .on("mousedown", function(d,i){portMouseDown(d,PORT_TYPE_INPUT,0);} ) .on("touchstart", function(d,i){portMouseDown(d,PORT_TYPE_INPUT,0);} ) .on("mouseup", function(d,i){portMouseUp(d,PORT_TYPE_INPUT,0);}) @@ -2494,17 +2665,17 @@ RED.view = (function() { .on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_INPUT,0);}) .on("mouseout",function(d){portMouseOut(d3.select(this),d,PORT_TYPE_INPUT,0);}); - outGroup.append("svg:text").attr("class","port_label").attr("x",20).attr("y",8).style("font-size","10px").text("output"); - outGroup.append("svg:text").attr("class","port_label port_index").attr("x",20).attr("y",24).text(function(d,i){ return i+1}); + outGroup.append("svg:text").attr("class","red-ui-flow-port-label").attr("x",20).attr("y",12).style("font-size","10px").text("output"); + outGroup.append("svg:text").attr("class","red-ui-flow-port-label red-ui-flow-port-index").attr("x",20).attr("y",28).text(function(d,i){ return i+1}); - var subflowInputs = nodeLayer.selectAll(".subflowinput").data(activeSubflow.in,function(d,i){ return d.id;}); + var subflowInputs = nodeLayer.selectAll(".red-ui-flow-subflow-port-input").data(activeSubflow.in,function(d,i){ return d.id;}); subflowInputs.exit().remove(); - var inGroup = subflowInputs.enter().insert("svg:g").attr("class","node subflowinput").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); + var inGroup = subflowInputs.enter().insert("svg:g").attr("class","red-ui-flow-node red-ui-flow-subflow-port-input").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); inGroup.each(function(d,i) { d.w=40; d.h=40; }); - inGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) + inGroup.append("rect").attr("class","red-ui-flow-subflow-port").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) // TODO: This is exactly the same set of handlers used for regular nodes - DRY .on("mouseup",nodeMouseUp) .on("mousedown",nodeMouseDown) @@ -2529,7 +2700,7 @@ RED.view = (function() { nodeMouseUp.call(this,d); }); var attr_input_translate = (vertical) ? 'translate(15,35)' : 'translate(35,15)'; - inGroup.append("g").attr('transform',attr_input_translate).append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) + inGroup.append("g").attr('transform',attr_input_translate).append("rect").attr("class","red-ui-flow-port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) .on("mousedown", function(d,i){portMouseDown(d,PORT_TYPE_OUTPUT,i);} ) .on("touchstart", function(d,i){portMouseDown(d,PORT_TYPE_OUTPUT,i);} ) .on("mouseup", function(d,i){portMouseUp(d,PORT_TYPE_OUTPUT,i);}) @@ -2537,17 +2708,17 @@ RED.view = (function() { .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);}); - 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","red-ui-flow-port-label").attr("x",18).attr("y",20).style("font-size","10px").text("input"); - var subflowStatus = nodeLayer.selectAll(".subflowstatus").data(activeSubflow.status?[activeSubflow.status]:[],function(d,i){ return d.id;}); + var subflowStatus = nodeLayer.selectAll(".red-ui-flow-subflow-port-status").data(activeSubflow.status?[activeSubflow.status]:[],function(d,i){ return d.id;}); subflowStatus.exit().remove(); - var statusGroup = subflowStatus.enter().insert("svg:g").attr("class","node subflowstatus").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); + var statusGroup = subflowStatus.enter().insert("svg:g").attr("class","red-ui-flow-node red-ui-flow-subflow-port-status").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); statusGroup.each(function(d,i) { d.w=40; d.h=40; }); - statusGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) + statusGroup.append("rect").attr("class","red-ui-flow-subflow-port").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) // TODO: This is exactly the same set of handlers used for regular nodes - DRY .on("mouseup",nodeMouseUp) .on("mousedown",nodeMouseDown) @@ -2572,7 +2743,7 @@ RED.view = (function() { nodeMouseUp.call(this,d); }); var attr_status_translate = (vertical) ? 'translate(15,-5)' : 'translate(-5,15)'; - statusGroup.append("g").attr('transform', attr_status_translate).append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) + statusGroup.append("g").attr('transform', attr_status_translate).append("rect").attr("class","red-ui-flow-port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) .on("mousedown", function(d,i){portMouseDown(d,PORT_TYPE_INPUT,0);} ) .on("touchstart", function(d,i){portMouseDown(d,PORT_TYPE_INPUT,0);} ) .on("mouseup", function(d,i){portMouseUp(d,PORT_TYPE_INPUT,0);}) @@ -2580,13 +2751,13 @@ RED.view = (function() { .on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_INPUT,0);}) .on("mouseout",function(d){portMouseOut(d3.select(this),d,PORT_TYPE_INPUT,0);}); - statusGroup.append("svg:text").attr("class","port_label").attr("x",22).attr("y",20).style("font-size","10px").text("status"); + statusGroup.append("svg:text").attr("class","red-ui-flow-port-label").attr("x",22).attr("y",20).style("font-size","10px").text("status"); subflowOutputs.each(function(d,i) { if (d.dirty) { var output = d3.select(this); - output.selectAll(".subflowport").classed("node_selected",function(d) { return d.selected; }) - output.selectAll(".port_index").text(function(d){ return d.i+1}); + output.classed("red-ui-flow-node-selected",function(d) { return d.selected; }) + output.selectAll(".red-ui-flow-port-index").text(function(d){ return d.i+1}); output.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); dirtyNodes[d.id] = d; d.dirty = false; @@ -2595,7 +2766,7 @@ RED.view = (function() { subflowInputs.each(function(d,i) { if (d.dirty) { var input = d3.select(this); - input.selectAll(".subflowport").classed("node_selected",function(d) { return d.selected; }) + input.classed("red-ui-flow-node-selected",function(d) { return d.selected; }) input.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); dirtyNodes[d.id] = d; d.dirty = false; @@ -2604,8 +2775,8 @@ RED.view = (function() { subflowStatus.each(function(d,i) { if (d.dirty) { var output = d3.select(this); - output.selectAll(".subflowport").classed("node_selected",function(d) { return d.selected; }) - output.selectAll(".port_index").text(function(d){ return d.i+1}); + output.classed("red-ui-flow-node-selected",function(d) { return d.selected; }) + output.selectAll(".red-ui-flow-port-index").text(function(d){ return d.i+1}); output.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); dirtyNodes[d.id] = d; d.dirty = false; @@ -2614,18 +2785,17 @@ RED.view = (function() { } else { - nodeLayer.selectAll(".subflowoutput").remove(); - nodeLayer.selectAll(".subflowinput").remove(); - nodeLayer.selectAll(".subflowstatus").remove(); + nodeLayer.selectAll(".red-ui-flow-subflow-port-output").remove(); + nodeLayer.selectAll(".red-ui-flow-subflow-port-input").remove(); + nodeLayer.selectAll(".red-ui-flow-subflow-port-status").remove(); } - var node = nodeLayer.selectAll(".nodegroup").data(activeNodes,function(d){return d.id}); + var node = nodeLayer.selectAll(".red-ui-flow-node-group").data(activeNodes,function(d){return d.id}); node.exit().remove(); var nodeEnter = node.enter().insert("svg:g") - .attr("class", "node nodegroup") - .classed("node_subflow",function(d) { return activeSubflow != null; }) - .classed("node_link",function(d) { return d.type === "link in" || d.type === "link out" }); + .attr("class", "red-ui-flow-node red-ui-flow-node-group") + .classed("red-ui-flow-subflow",function(d) { return activeSubflow != null; }); nodeEnter.each(function(d,i) { var node = d3.select(this); @@ -2633,13 +2803,16 @@ RED.view = (function() { var hideLabel = d.hasOwnProperty('l')?!d.l : isLink; node.attr("id",d.id); var l = RED.utils.getNodeLabel(d); - if (hideLabel) { - d.w = node_height; - } else { - if (vertical) { - d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "node_label", 50)+(d._def.inputs>0?7:0))/20)),(d.outputs||0) * 15 ); - }else{ - d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "node_label", 50)+(d._def.inputs>0?7:0))/20)) ); + + if (d.resize || d.w === undefined) { + if (hideLabel) { + d.w = node_height; + } else { + if (vertical) { + d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "red-ui-flow-node-label", 50)+(d._def.inputs>0?7:0))/20)),(d.outputs||0) * 15 ); + }else{ + d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "red-ui-flow-node-label", 50)+(d._def.inputs>0?7:0))/20)) ); + } } } if (vertical) { @@ -2648,28 +2821,28 @@ RED.view = (function() { d.h = Math.max(node_height,(d.outputs||0) * 15); } - if (d._def.badge) { - var badge = node.append("svg:g").attr("class","node_badge_group"); - var badgeRect = badge.append("rect").attr("class","node_badge").attr("rx",5).attr("ry",5).attr("width",40).attr("height",15); - badge.append("svg:text").attr("class","node_badge_label").attr("x",35).attr("y",11).attr("text-anchor","end").text(d._def.badge()); - if (d._def.onbadgeclick) { - badgeRect.attr("cursor","pointer") - .on("click",function(d) { d._def.onbadgeclick.call(d);d3.event.preventDefault();}); - } - } + // if (d._def.badge) { + // var badge = node.append("svg:g").attr("class","node_badge_group"); + // var badgeRect = badge.append("rect").attr("class","node_badge").attr("rx",5).attr("ry",5).attr("width",40).attr("height",15); + // badge.append("svg:text").attr("class","node_badge_label").attr("x",35).attr("y",11).attr("text-anchor","end").text(d._def.badge()); + // if (d._def.onbadgeclick) { + // badgeRect.attr("cursor","pointer") + // .on("click",function(d) { d._def.onbadgeclick.call(d);d3.event.preventDefault();}); + // } + // } if (d._def.button) { var nodeButtonGroup = node.append("svg:g") .attr("transform",function(d) { return "translate("+((d._def.align == "right") ? 94 : -25)+",2)"; }) - .attr("class",function(d) { return "node_button "+((d._def.align == "right") ? "node_right_button" : "node_left_button"); }); + .attr("class","red-ui-flow-node-button"); nodeButtonGroup.append("rect") + .attr("class","red-ui-flow-node-button-background") .attr("rx",5) .attr("ry",5) .attr("width",32) - .attr("height",node_height-4) - .attr("fill","#eee");//function(d) { return d._def.color;}) + .attr("height",node_height-4); nodeButtonGroup.append("rect") - .attr("class","node_button_button") + .attr("class","red-ui-flow-node-button-button") .attr("x",function(d) { return d._def.align == "right"? 11:5}) .attr("y",4) .attr("rx",4) @@ -2693,8 +2866,8 @@ RED.view = (function() { } var mainRect = node.append("rect") - .attr("class", "node") - .classed("node_unknown",function(d) { return d.type == "unknown"; }) + .attr("class", "red-ui-flow-node") + .classed("red-ui-flow-node-unknown",function(d) { return d.type == "unknown"; }) .attr("rx", 5) .attr("ry", 5) .attr("fill",function(d) { return RED.utils.getNodeColor(d.type,d._def); /*d._def.color;*/}) @@ -2721,9 +2894,14 @@ RED.view = (function() { nodeMouseUp.call(this,d); }) .on("mouseover",function(d) { - if (mouse_mode === 0) { - var nodeBody = d3.select(this); - nodeBody.classed("node_hovered",true); + if (mouse_mode === 0 || mouse_mode === RED.state.SELECTING_NODE) { + if (mouse_mode === RED.state.SELECTING_NODE && selectNodesOptions && selectNodesOptions.filter) { + if (selectNodesOptions.filter(d)) { + node.classed("red-ui-flow-node-hovered",true); + } + } else { + node.classed("red-ui-flow-node-hovered",true); + } clearTimeout(portLabelHoverTimeout); if (d.hasOwnProperty('l')?!d.l : (d.type === "link in" || d.type === "link out")) { portLabelHoverTimeout = setTimeout(function() { @@ -2754,10 +2932,10 @@ RED.view = (function() { var selectClass; var portType; if ((drag_lines[0].virtualLink && drag_lines[0].portType === PORT_TYPE_INPUT) || drag_lines[0].portType === PORT_TYPE_OUTPUT) { - selectClass = ".port_input .port"; + selectClass = ".red-ui-flow-port-input .red-ui-flow-port"; portType = PORT_TYPE_INPUT; } else { - selectClass = ".port_output .port"; + selectClass = ".red-ui-flow-port-output .red-ui-flow-port"; portType = PORT_TYPE_OUTPUT; } portMouseOver(d3.select(this.parentNode).selectAll(selectClass),d,portType,0); @@ -2765,8 +2943,7 @@ RED.view = (function() { } }) .on("mouseout",function(d) { - var nodeBody = d3.select(this); - nodeBody.classed("node_hovered",false); + node.classed("red-ui-flow-node-hovered",false); clearTimeout(portLabelHoverTimeout); if (portLabelHover) { portLabelHover.remove(); @@ -2777,10 +2954,10 @@ RED.view = (function() { var selectClass; var portType; if ((drag_lines[0].virtualLink && drag_lines[0].portType === PORT_TYPE_INPUT) || drag_lines[0].portType === PORT_TYPE_OUTPUT) { - selectClass = ".port_input .port"; + selectClass = ".red-ui-flow-port-input .red-ui-flow-port"; portType = PORT_TYPE_INPUT; } else { - selectClass = ".port_output .port"; + selectClass = ".red-ui-flow-port-output .red-ui-flow-port"; portType = PORT_TYPE_OUTPUT; } portMouseOut(d3.select(this.parentNode).selectAll(selectClass),d,portType,0); @@ -2794,33 +2971,27 @@ RED.view = (function() { if (d._def.icon) { var icon_url = RED.utils.getNodeIcon(d._def,d); var icon_group = node.append("g") - .attr("class","node_icon_group") + .attr("class","red-ui-flow-node-icon-group") .attr("x",0).attr("y",0); var icon_shade = icon_group.append("rect") .attr("x",0).attr("y",0) - .attr("class","node_icon_shade") + .attr("class","red-ui-flow-node-icon-shade") .attr("width","30") - .attr("stroke","none") - .attr("fill","#000") - .attr("fill-opacity","0.05") .attr("height",function(d){return Math.min(50,d.h-4);}); createIconAttributes(icon_url, icon_group, d); var icon_shade_border = icon_group.append("path") .attr("d",function(d) { return "M 30 1 l 0 "+(d.h-2)}) - .attr("class","node_icon_shade_border") - .attr("stroke-opacity","0.1") - .attr("stroke","#000") - .attr("stroke-width","1"); + .attr("class","red-ui-flow-node-icon-shade-border"); if ("right" == d._def.align) { - icon_group.attr("class","node_icon_group node_icon_group_"+d._def.align); + icon_group.attr("class","red-ui-flow-node-icon-group red-ui-flow-node-icon-group-"+d._def.align); icon_shade_border.attr("d",function(d) { return "M 0 1 l 0 "+(d.h-2)}) - //icon.attr("class","node_icon node_icon_"+d._def.align); - //icon.attr("class","node_icon_shade node_icon_shade_"+d._def.align); - //icon.attr("class","node_icon_shade_border node_icon_shade_border_"+d._def.align); + //icon.attr("class","red-ui-flow-node-icon red-ui-flow-node-icon-"+d._def.align); + //icon.attr("class","red-ui-flow-node-icon-shade red-ui-flow-node-icon-shade-"+d._def.align); + //icon.attr("class","red-ui-flow-node-icon-shade-border red-ui-flow-node-icon-shade-border-"+d._def.align); } //if (d.inputs > 0 && d._def.align == null) { @@ -2836,34 +3007,50 @@ RED.view = (function() { icon_group.style("pointer-events","none"); } var text = node.append("svg:text") - .attr("class","node_label") + .attr("class","red-ui-flow-node-label") .attr("x", 38) .attr("dy", ".35em") .attr("text-anchor","start") - .classed("hidden",hideLabel); + .classed("hide",hideLabel); if (d._def.align) { - text.attr("class","node_label node_label_"+d._def.align); + text.attr("class","red-ui-flow-node-label red-ui-flow-node-label-"+d._def.align); if (d._def.align === "right") { text.attr("text-anchor","end"); } } - var status = node.append("svg:g").attr("class","node_status_group").style("display","none"); - var statusRect = status.append("rect").attr("class","node_status") + var status = node.append("svg:g").attr("class","red-ui-flow-node-status-group").style("display","none"); + var statusRect = status.append("rect").attr("class","red-ui-flow-node-status") .attr("x",6).attr("y",1).attr("width",9).attr("height",9) .attr("rx",2).attr("ry",2).attr("stroke-width","3"); var statusLabel = status.append("svg:text") - .attr("class","node_status_label") + .attr("class","red-ui-flow-node-status-label") .attr("x",20).attr("y",10); - //node.append("circle").attr({"class":"centerDot","cx":0,"cy":0,"r":5}); - - //node.append("path").attr("class","node_error").attr("d","M 3,-3 l 10,0 l -5,-8 z"); - - //TODO: these ought to be SVG - node.append("image").attr("class","node_error hidden").attr("xlink:href","red/images/icons/node-error.png").attr("x",0).attr("y",-6).attr("width",10).attr("height",9); - node.append("image").attr("class","node_changed hidden").attr("xlink:href","red/images/icons/node-changed.png").attr("x",12).attr("y",-6).attr("width",10).attr("height",10); + node.append("g").attr("class","red-ui-flow-node-changed hide").attr("transform","translate(20, -2)").append("circle").attr("r",5); + var nodeErrorButton = node.append("g").attr("class","red-ui-flow-node-error hide").attr("transform","translate(0, -2)").append("path").attr("d","M -5,4 l 10,0 -5,-8 z"); + nodeErrorButton.on("mouseenter", function() { + if (d.validationErrors && d.validationErrors.length > 0) { + clearTimeout(portLabelHoverTimeout); + portLabelHoverTimeout = setTimeout(function() { + var pos = getElementPosition(nodeErrorButton.node()); + portLabelHoverTimeout = null; + portLabelHover = showTooltip( + (pos[0]), + (pos[1]), + RED._("editor.errors.invalidProperties")+"\n - "+d.validationErrors.join("\n - "), + "top" + ); + },500); + } + }).on("mouseleave", function() { + clearTimeout(portLabelHoverTimeout); + if (portLabelHover) { + portLabelHover.remove(); + portLabelHover = null; + } + }); }); node.each(function(d,i) { @@ -2876,13 +3063,13 @@ RED.view = (function() { var l = RED.utils.getNodeLabel(d); var ow = d.w; if (vertical) { - d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "node_label", 50)+(d._def.inputs>0?7:0))/20)),(d.outputs||0) * 15 ); + d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "red-ui-flow-node-label", 50)+(d._def.inputs>0?7:0))/20)),(d.outputs||0) * 15 ); d.h = node_height; }else{ if (hideLabel) { d.w = node_height; } else { - d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "node_label", 50)+(d._def.inputs>0?7:0))/20)) ); + d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "red-ui-flow-node-label", 50)+(d._def.inputs>0?7:0))/20)) ); } d.h = Math.max(node_height,(d.outputs||0) * 15); } @@ -2890,52 +3077,47 @@ RED.view = (function() { d.resize = false; } var thisNode = d3.select(this); - thisNode.classed("node_subflow",function(d) { return activeSubflow != null; }) + thisNode.classed("red-ui-flow-node-disabled", function(d) { return d.d === true}); + thisNode.classed("red-ui-flow-subflow",function(d) { return activeSubflow != null; }) //thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}}); thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); if (mouse_mode != RED.state.MOVING_ACTIVE) { - thisNode.selectAll(".node") + thisNode.classed("red-ui-flow-node-selected",function(d) { return d.selected }) + thisNode.selectAll(".red-ui-flow-node") .attr("width",function(d){return d.w}) .attr("height",function(d){return d.h}) - .classed("node_selected",function(d) { return d.selected; }) - .classed("node_highlighted",function(d) { return d.highlighted; }) + .classed("red-ui-flow-node-highlighted",function(d) { return d.highlighted; }) ; - //thisNode.selectAll(".node-gradient-top").attr("width",function(d){return d.w}); - //thisNode.selectAll(".node-gradient-bottom").attr("width",function(d){return d.w}).attr("y",function(d){return d.h-30}); - if ((!d._def.align && d.inputs !== 0 && d.outputs === 0) || "right" === d._def.align) { - thisNode.selectAll(".node_icon_group").classed("node_icon_group_right", true); - thisNode.selectAll(".node_label").classed("node_label_right", true).attr("text-anchor", "end"); + thisNode.selectAll(".red-ui-flow-node-icon-group").classed("red-ui-flow-node-icon-group-right", true); + thisNode.selectAll(".red-ui-flow-node-label").classed("red-ui-flow-node-label-right", true).attr("text-anchor", "end"); } else { - thisNode.selectAll(".node_icon_group").classed("node_icon_group_right", false); - thisNode.selectAll(".node_label").classed("node_label_right", false).attr("text-anchor", "start"); + thisNode.selectAll(".red-ui-flow-node-icon-group").classed("red-ui-flow-node-icon-group-right", false); + thisNode.selectAll(".red-ui-flow-node-label").classed("red-ui-flow-node-label-right", false).attr("text-anchor", "start"); } - thisNode.selectAll(".node_icon_group").attr("transform", function (d) { return "translate(0, 0)"; }); - thisNode.selectAll(".node_label").attr("x", function (d) { return 38; }); - thisNode.selectAll(".node_icon_group_right").attr("transform", function(d){return "translate("+(d.w-30)+",0)"}); - thisNode.selectAll(".node_label_right").attr("x", function(d){return d.w-38}); - //thisNode.selectAll(".node_icon_right").attr("x",function(d){return d.w-d3.select(this).attr("width")-1-(d.outputs>0?5:0);}); - //thisNode.selectAll(".node_icon_shade_right").attr("x",function(d){return d.w-30;}); - //thisNode.selectAll(".node_icon_shade_border_right").attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2)}); + thisNode.selectAll(".red-ui-flow-node-icon-group").attr("transform", function (d) { return "translate(0, 0)"; }); + thisNode.selectAll(".red-ui-flow-node-label").attr("x", function (d) { return 38; }); + thisNode.selectAll(".red-ui-flow-node-icon-group-right").attr("transform", function(d){return "translate("+(d.w-30)+",0)"}); + thisNode.selectAll(".red-ui-flow-node-label-right").attr("x", function(d){return d.w-38}); + //thisNode.selectAll(".red-ui-flow-node-icon-right").attr("x",function(d){return d.w-d3.select(this).attr("width")-1-(d.outputs>0?5:0);}); + //thisNode.selectAll(".red-ui-flow-node-icon-shade-right").attr("x",function(d){return d.w-30;}); + //thisNode.selectAll(".red-ui-flow-node-icon-shade-border-right").attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2)}); - var inputPorts = thisNode.selectAll(".port_input"); - if (isLink && showAllLinkPorts === -1 && !activeLinkNodes[d.id] && d.inputs === 0 && !inputPorts.empty()) { + var inputPorts = thisNode.selectAll(".red-ui-flow-port-input"); + if ((!isLink || (showAllLinkPorts === -1 && !activeLinkNodes[d.id])) && d.inputs === 0 && !inputPorts.empty()) { inputPorts.remove(); } else if (((isLink && (showAllLinkPorts===PORT_TYPE_INPUT||activeLinkNodes[d.id]))|| d.inputs === 1) && inputPorts.empty()) { - var inputGroup = thisNode.append("g").attr("class","port_input"); + var inputGroup = thisNode.append("g").attr("class","red-ui-flow-port-input"); var inputGroupPorts; if (d.type === "link in") { inputGroupPorts = inputGroup.append("circle") - .attr("cx",-1).attr("cy",5) + .attr("cx",vertical ? 5 : -1).attr("cy",vertical ? -1 : 5) .attr("r",5) - .attr("class","port link_port") - // inputGroupPorts = inputGroup.append("path") - // .attr("d","M 4 -1 h -3 a 6 6 0 1 0 0 12 h 3") - // .attr("class","port link_port") + .attr("class","red-ui-flow-port red-ui-flow-link-port") } else { - inputGroupPorts = inputGroup.append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) + inputGroupPorts = inputGroup.append("rect").attr("class","red-ui-flow-port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) } inputGroupPorts.on("mousedown",function(d){portMouseDown(d,PORT_TYPE_INPUT,0);}) .on("touchstart",function(d){portMouseDown(d,PORT_TYPE_INPUT,0);}) @@ -2961,21 +3143,18 @@ RED.view = (function() { var y = (d.h/2)-((numOutputs-1)/2)*13; } d.ports = d.ports || d3.range(numOutputs); - d._ports = thisNode.selectAll(".port_output").data(d.ports); - var output_group = d._ports.enter().append("g").attr("class","port_output"); + d._ports = thisNode.selectAll(".red-ui-flow-port-output").data(d.ports); + var output_group = d._ports.enter().append("g").attr("class","red-ui-flow-port-output"); var output_group_ports; if (d.type === "link out") { output_group_ports = output_group.append("circle") - .attr("cx",11).attr("cy",5) + .attr("cx",vertical ? 6 : 11).attr("cy", vertical ? 11 : 6) .attr("r",5) - .attr("class","port link_port") - // output_group_ports = output_group.append("path") - // .attr("d","M 6 -1 h 3 a 6 6 0 1 1 0 12 h -3") - // .attr("class","port link_port") + .attr("class","red-ui-flow-port red-ui-flow-link-port") } else { output_group_ports = output_group.append("rect") - .attr("class","port") + .attr("class","red-ui-flow-port") .attr("rx",3).attr("ry",3) .attr("width",10) .attr("height",10) @@ -3008,7 +3187,7 @@ RED.view = (function() { } }); } - thisNode.selectAll("text.node_label").text(function(d,i){ + thisNode.selectAll("text.red-ui-flow-node-label").text(function(d,i){ var l = ""; if (d._def.label) { l = d._def.label; @@ -3035,11 +3214,10 @@ RED.view = (function() { } s = " "+s; } - return "node_label"+ - (d._def.align?" node_label_"+d._def.align:"")+s; - }).classed("hidden",hideLabel); + return "red-ui-flow-node-label"+(d._def.align?" red-ui-flow-node-label-"+d._def.align:"")+s; + }).classed("hide",hideLabel); if (d._def.icon) { - var icon = thisNode.select(".node_icon"); + var icon = thisNode.select(".red-ui-flow-node-icon"); var faIcon = thisNode.select(".fa-lg"); var current_url; if (!icon.empty()) { @@ -3054,22 +3232,20 @@ RED.view = (function() { } else { faIcon.remove(); } - var iconGroup = thisNode.select(".node_icon_group"); + var iconGroup = thisNode.select(".red-ui-flow-node-icon-group"); 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(".red-ui-flow-node-changed") + .attr("transform",function(d){return "translate("+(d.w-10)+", -2)"}) + .classed("hide",function(d) { return !(d.changed||d.moved); }); - thisNode.selectAll(".node_changed") - .attr("x",function(d){return d.w-10}) - .classed("hidden",function(d) { return !(d.changed||d.moved); }); + thisNode.selectAll(".red-ui-flow-node-error") + .attr("transform",function(d){ return "translate("+(d.w-10-((d.changed||d.moved)?14:0))+", -2)"}) + .classed("hide",function(d) { return d.valid; }); - thisNode.selectAll(".node_error") - .attr("x",function(d){return d.w-10-((d.changed||d.moved)?13:0)}) - .classed("hidden",function(d) { return d.valid; }); - - thisNode.selectAll(".port_input").each(function(d,i) { + thisNode.selectAll(".red-ui-flow-port-input").each(function(d,i) { var port = d3.select(this); if (vertical) { port.attr("transform",function(d){return "translate("+((d.w/2)-5)+", -5)";}) @@ -3078,27 +3254,27 @@ RED.view = (function() { } }); - thisNode.selectAll(".node_icon").attr("y",function(d){return (d.h-d3.select(this).attr("height"))/2;}); - thisNode.selectAll(".node_icon_shade").attr("height",function(d){return d.h;}); - thisNode.selectAll(".node_icon_shade_border").attr("d", function (d) { + thisNode.selectAll(".red-ui-flow-node-icon").attr("y",function(d){return (d.h-d3.select(this).attr("height"))/2;}); + thisNode.selectAll(".red-ui-flow-node-icon-shade").attr("height",function(d){return d.h;}); + thisNode.selectAll(".red-ui-flow-node-icon-shade-border").attr("d", function (d) { return "M " + (((!d._def.align && d.inputs !== 0 && d.outputs === 0) || "right" === d._def.align) ? 0 : 30) + " 1 l 0 " + (d.h - 2); }); thisNode.selectAll(".fa-lg").attr("y",function(d){return (d.h+13)/2;}); - thisNode.selectAll(".node_button").attr("opacity",function(d) { + thisNode.selectAll(".red-ui-flow-node-button").attr("opacity",function(d) { return (!isButtonEnabled(d))?0.4:1 }); - thisNode.selectAll(".node_button_button").attr("cursor",function(d) { + thisNode.selectAll(".red-ui-flow-node-button-button").attr("cursor",function(d) { return (!isButtonEnabled(d))?"":"pointer"; }); - thisNode.selectAll(".node_button").attr("transform",function(d){ + thisNode.selectAll(".red-ui-flow-node-button").attr("transform",function(d){ var x = d._def.align == "right"?d.w-6:-25; if (d._def.button.toggle && !d[d._def.button.toggle]) { x = x - (d._def.align == "right"?8:-8); } return "translate("+x+",2)"; }); - thisNode.selectAll(".node_button rect").attr("fill-opacity",function(d){ + thisNode.selectAll(".red-ui-flow-node-button rect").attr("fill-opacity",function(d){ if (d._def.button.toggle) { return d[d._def.button.toggle]?1:0.2; } @@ -3107,85 +3283,76 @@ RED.view = (function() { 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"); + thisNode.selectAll(".red-ui-flow-node-button").style("display","none"); } else { - thisNode.selectAll(".node_button").style("display","inherit"); + thisNode.selectAll(".red-ui-flow-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) { - // 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) - //}); - - thisNode.selectAll(".node_badge_group").attr("transform",function(d){return "translate("+(d.w-40)+","+(d.h+3)+")";}); - thisNode.selectAll("text.node_badge_label").text(function(d,i) { - if (d._def.badge) { - if (typeof d._def.badge == "function") { - try { - return d._def.badge.call(d); - } catch(err) { - console.log("Definition error: "+d.type+".badge",err); - return ""; - } - } else { - return d._def.badge; - } - } - return ""; - }); + // thisNode.selectAll(".node_badge_group").attr("transform",function(d){return "translate("+(d.w-40)+","+(d.h+3)+")";}); + // thisNode.selectAll("text.node_badge_label").text(function(d,i) { + // if (d._def.badge) { + // if (typeof d._def.badge == "function") { + // try { + // return d._def.badge.call(d); + // } catch(err) { + // console.log("Definition error: "+d.type+".badge",err); + // return ""; + // } + // } else { + // return d._def.badge; + // } + // } + // return ""; + // }); } - if (!showStatus || !d.status) { - thisNode.selectAll(".node_status_group").style("display","none"); - } else { - var fill = status_colours[d.status.fill]; // Only allow our colours for now - if (d.status.shape == null && fill == null) { - thisNode.selectAll(".node_status").style("display","none"); - thisNode.selectAll(".node_status_group").style("display","inline").attr("transform","translate(-14,"+(d.h+3)+")"); + if (d.dirtyStatus) { + if (!showStatus || !d.status) { + thisNode.selectAll(".red-ui-flow-node-status-group").style("display","none"); } else { - thisNode.selectAll(".node_status_group").style("display","inline").attr("transform","translate(3,"+(d.h+3)+")"); - var style; - if (d.status.shape == null || d.status.shape == "dot") { - style = { - display: "inline", - fill: fill, - stroke: fill - }; - } else if (d.status.shape == "ring" ){ - style = { - display: "inline", - fill: "#fff", - stroke: fill - } + thisNode.selectAll(".red-ui-flow-node-status-group").style("display","inline"); + var fill = status_colours[d.status.fill]; // Only allow our colours for now + if (d.status.shape == null && fill == null) { + thisNode.selectAll(".red-ui-flow-node-status").style("display","none"); + thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(-14,"+(d.h+3)+")"); + } else { + thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(3,"+(d.h+3)+")"); + var statusClass = "red-ui-flow-node-status-"+(d.status.shape||"dot")+"-"+d.status.fill; + thisNode.selectAll(".red-ui-flow-node-status").style("display","inline").attr("class","red-ui-flow-node-status "+statusClass); + } + if (d.status.hasOwnProperty('text')) { + thisNode.selectAll(".red-ui-flow-node-status-label").text(d.status.text); + } else { + thisNode.selectAll(".red-ui-flow-node-status-label").text(""); } - thisNode.selectAll(".node_status").style(style); - } - if (d.status.text) { - thisNode.selectAll(".node_status_label").text(d.status.text); - } else { - thisNode.selectAll(".node_status_label").text(""); } + delete d.dirtyStatus; } d.dirty = false; } }); - var link = linkLayer.selectAll(".link").data( + var link = linkLayer.selectAll(".red-ui-flow-link").data( activeLinks, function(d) { return d.source.id+":"+d.sourcePort+":"+d.target.id+":"+d.target.i; } ); - var linkEnter = link.enter().insert("g",".node").attr("class","link"); + var linkEnter = link.enter().insert("g",".red-ui-flow-node").attr("class","red-ui-flow-link"); linkEnter.each(function(d,i) { var l = d3.select(this); d.added = true; - l.append("svg:path").attr("class","link_background link_path") - .classed("link_link", function(d) { return d.link }) + l.append("svg:path").attr("class","red-ui-flow-link-background red-ui-flow-link-path") + .classed("red-ui-flow-link-link", function(d) { return d.link }) .on("mousedown",function(d) { + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } mousedown_link = d; clearSelection(); selected_link = mousedown_link; @@ -3193,8 +3360,16 @@ RED.view = (function() { redraw(); focusView(); d3.event.stopPropagation(); + if (d3.event.metaKey || d3.event.ctrlKey) { + l.classed("red-ui-flow-link-splice",true); + showQuickAddDialog(d3.mouse(this), selected_link); + } }) .on("touchstart",function(d) { + if (mouse_mode === RED.state.SELECTING_NODE) { + d3.event.stopPropagation(); + return; + } mousedown_link = d; clearSelection(); selected_link = mousedown_link; @@ -3211,19 +3386,19 @@ RED.view = (function() { showTouchMenu(obj,pos); },touchLongPressTimeout); }) - l.append("svg:path").attr("class","link_outline link_path"); - l.append("svg:path").attr("class","link_line link_path") - .classed("link_link", function(d) { return d.link }) - .classed("link_subflow", function(d) { return !d.link && activeSubflow }); + l.append("svg:path").attr("class","red-ui-flow-link-outline red-ui-flow-link-path"); + l.append("svg:path").attr("class","red-ui-flow-link-line red-ui-flow-link-path") + .classed("red-ui-flow-link-link", function(d) { return d.link }) + .classed("red-ui-flow-subflow-link", function(d) { return !d.link && activeSubflow }); }); link.exit().remove(); - var links = linkLayer.selectAll(".link_path"); + var links = linkLayer.selectAll(".red-ui-flow-link-path"); links.each(function(d) { var link = d3.select(this); if (d.added || d===selected_link || d.selected || dirtyNodes[d.source.id] || dirtyNodes[d.target.id]) { - if (/link_line/.test(link.attr('class'))) { - link.classed("link_subflow", function(d) { return !d.link && activeSubflow }); + if (/red-ui-flow-link-line/.test(link.attr('class'))) { + link.classed("red-ui-flow-subflow-link", function(d) { return !d.link && activeSubflow }); } link.attr("d",function(d){ var numOutputs = d.source.outputs || 1; @@ -3250,22 +3425,23 @@ RED.view = (function() { } return path; }); + link.classed("red-ui-flow-node-disabled", function(d) { return d.source.d || d.target.d; }); } }) - link.classed("link_selected", function(d) { return d === selected_link || d.selected; }); - link.classed("link_unknown",function(d) { + link.classed("red-ui-flow-link-selected", function(d) { return d === selected_link || d.selected; }); + link.classed("red-ui-flow-link-unknown",function(d) { delete d.added; return d.target.type == "unknown" || d.source.type == "unknown" }); - var offLinks = linkLayer.selectAll(".link_flow_link_g").data( + var offLinks = linkLayer.selectAll(".red-ui-flow-link-off-flow").data( activeFlowLinks, function(d) { return d.node.id+":"+d.refresh } ); - var offLinksEnter = offLinks.enter().insert("g",".node").attr("class","link_flow_link_g"); + var offLinksEnter = offLinks.enter().insert("g",".red-ui-flow-node").attr("class","red-ui-flow-link-off-flow"); offLinksEnter.each(function(d,i) { var g = d3.select(this); var s = 1; @@ -3276,8 +3452,7 @@ RED.view = (function() { } var stemLength = s*30; var branchLength = s*20; - var l = g.append("svg:path").attr("class","link_flow_link") - .attr("class","link_link").attr("d","M 0 0 h "+stemLength); + var l = g.append("svg:path").attr("class","red-ui-flow-link-link").attr("d","M 0 0 h "+stemLength); var links = d.links; var flows = Object.keys(links); var tabOrder = RED.nodes.getWorkspaceOrder(); @@ -3287,10 +3462,10 @@ RED.view = (function() { var linkWidth = 10; var h = node_height; var y = -(flows.length-1)*h/2; - var linkGroups = g.selectAll(".link_group").data(flows); - var enterLinkGroups = linkGroups.enter().append("g").attr("class","link_group") - .on('mouseover', function() { if (mouse_mode !== 0) { return } d3.select(this).classed('link_group_active',true)}) - .on('mouseout', function() {if (mouse_mode !== 0) { return } d3.select(this).classed('link_group_active',false)}) + var linkGroups = g.selectAll(".red-ui-flow-link-group").data(flows); + var enterLinkGroups = linkGroups.enter().append("g").attr("class","red-ui-flow-link-group") + .on('mouseover', function() { if (mouse_mode !== 0) { return } d3.select(this).classed('red-ui-flow-link-group-active',true)}) + .on('mouseout', function() {if (mouse_mode !== 0) { return } d3.select(this).classed('red-ui-flow-link-group-active',false)}) .on('mousedown', function() { d3.event.preventDefault(); d3.event.stopPropagation(); }) .on('mouseup', function(f) { if (mouse_mode !== 0) { @@ -3309,8 +3484,8 @@ RED.view = (function() { }); enterLinkGroups.each(function(f) { var linkG = d3.select(this); - linkG.append("svg:path").attr("class","link_flow_link") - .attr("class","link_link") + linkG.append("svg:path") + .attr("class","red-ui-flow-link-link") .attr("d", "M "+stemLength+" 0 "+ "C "+(stemLength+(1.7*branchLength))+" "+0+ @@ -3318,7 +3493,7 @@ RED.view = (function() { (stemLength+branchLength*1.5)+" "+y+" " ); linkG.append("svg:path") - .attr("class","link_port") + .attr("class","red-ui-flow-link-port") .attr("d", "M "+(stemLength+branchLength*1.5+s*(linkWidth+7))+" "+(y-12)+" "+ "h "+(-s*linkWidth)+" "+ @@ -3328,14 +3503,14 @@ RED.view = (function() { "h "+(s*linkWidth) ); linkG.append("svg:path") - .attr("class","link_port") + .attr("class","red-ui-flow-link-port") .attr("d", "M "+(stemLength+branchLength*1.5+s*(linkWidth+10))+" "+(y-12)+" "+ "h "+(s*(linkWidth*3))+" "+ "M "+(stemLength+branchLength*1.5+s*(linkWidth+10))+" "+(y+12)+" "+ "h "+(s*(linkWidth*3)) ).style("stroke-dasharray","12 3 8 4 3"); - linkG.append("rect").attr("class","port link_port") + linkG.append("rect").attr("class","red-ui-flow-port red-ui-flow-link-port") .attr("x",stemLength+branchLength*1.5-4+(s*4)) .attr("y",y-4) .attr("rx",2) @@ -3355,7 +3530,7 @@ RED.view = (function() { label = tab.label || tab.id; } linkG.append("svg:text") - .attr("class","port_label") + .attr("class","red-ui-flow-port-label") .attr("x",stemLength+branchLength*1.5+(s*15)) .attr("y",y+1) .style("font-size","10px") @@ -3367,7 +3542,7 @@ RED.view = (function() { linkGroups.exit().remove(); }); offLinks.exit().remove(); - offLinks = linkLayer.selectAll(".link_flow_link_g"); + offLinks = linkLayer.selectAll(".red-ui-flow-link-off-flow"); offLinks.each(function(d) { var s = 1; if (d.node.type === "link in") { @@ -3380,12 +3555,12 @@ RED.view = (function() { } else { // JOINING - unselect any selected links - linkLayer.selectAll(".link_selected").data( + linkLayer.selectAll(".red-ui-flow-link-selected").data( activeLinks, function(d) { return d.source.id+":"+d.sourcePort+":"+d.target.id+":"+d.target.i; } - ).classed("link_selected", false); + ).classed("red-ui-flow-link-selected", false); } RED.view.navigator.refresh(); if (d3.event) { @@ -3401,12 +3576,12 @@ RED.view = (function() { // setting the focus var scrollX = window.parent.window.scrollX; var scrollY = window.parent.window.scrollY; - $("#chart").focus(); + chart.trigger("focus"); window.parent.window.scrollTo(scrollX,scrollY); } catch(err) { // In case we're iframed into a page of a different origin, just focus // the view following the inevitable DOMException - $("#chart").focus(); + chart.trigger("focus"); } } @@ -3417,6 +3592,9 @@ RED.view = (function() { * - attached to mouse for placing - "IMPORT_DRAGGING" */ function importNodes(newNodesStr,addNewFlow,touchImport) { + if (mouse_mode === RED.state.SELECTING_NODE) { + return; + } try { var activeSubflowChanged; if (activeSubflow) { @@ -3563,9 +3741,9 @@ RED.view = (function() { function toggleShowGrid(state) { if (state) { - grid.style("visibility","visible"); + gridLayer.style("visibility","visible"); } else { - grid.style("visibility","hidden"); + gridLayer.style("visibility","hidden"); } } function toggleSnapGrid(state) { @@ -3574,10 +3752,52 @@ RED.view = (function() { } function toggleStatus(s) { showStatus = s; - RED.nodes.eachNode(function(n) { n.dirty = true;}); + RED.nodes.eachNode(function(n) { n.dirtyStatus = true; n.dirty = true;}); //TODO: subscribe/unsubscribe here redraw(); } + function setSelectedNodeState(isDisabled) { + if (mouse_mode === RED.state.SELECTING_NODE) { + return; + } + var workspaceSelection = RED.workspaces.selection(); + var changed = false; + if (workspaceSelection.length > 0) { + // TODO: toggle workspace state + } else if (moving_set.length > 0) { + var historyEvents = []; + for (var i=0;i 0) { + RED.history.push({ + t:"multi", + events: historyEvents, + dirty:RED.nodes.dirty() + }) + RED.nodes.dirty(true) + } + } + RED.view.redraw(); + + } return { init: init, @@ -3629,7 +3849,7 @@ RED.view = (function() { }, getLinksAtPoint: function(x,y) { var result = []; - var links = outer.selectAll(".link_background")[0]; + var links = outer.selectAll(".red-ui-flow-link-background")[0]; for (var i=0;i= bb.x && y >= bb.y && x <= bb.x+bb.width && y <= bb.y+bb.height) { @@ -3648,13 +3868,13 @@ RED.view = (function() { node.dirty = true; RED.workspaces.show(node.z); - var screenSize = [$("#chart").width(),$("#chart").height()]; - var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; + var screenSize = [chart.width()/scaleFactor,chart.height()/scaleFactor]; + var scrollPos = [chart.scrollLeft()/scaleFactor,chart.scrollTop()/scaleFactor]; if (node.x < scrollPos[0] || node.y < scrollPos[1] || node.x > screenSize[0]+scrollPos[0] || node.y > screenSize[1]+scrollPos[1]) { - var deltaX = '-='+((scrollPos[0] - node.x) + screenSize[0]/2); - var deltaY = '-='+((scrollPos[1] - node.y) + screenSize[1]/2); - $("#chart").animate({ + var deltaX = '-='+(((scrollPos[0] - node.x) + screenSize[0]/2)*scaleFactor); + var deltaY = '-='+(((scrollPos[1] - node.y) + screenSize[1]/2)*scaleFactor); + chart.animate({ scrollLeft: deltaX, scrollTop: deltaY },200); @@ -3700,6 +3920,70 @@ RED.view = (function() { }, getActiveNodes: function() { return activeNodes; + }, + selectNodes: function(options) { + $("#red-ui-workspace-tabs-shade").show(); + $("#red-ui-palette-shade").show(); + $("#red-ui-sidebar-shade").show(); + $("#red-ui-header-shade").show(); + $("#red-ui-workspace").addClass("red-ui-workspace-select-mode"); + + mouse_mode = RED.state.SELECTING_NODE; + clearSelection(); + if (options.selected) { + console.log(options.selected); + options.selected.forEach(function(id) { + var n = RED.nodes.node(id); + if (n) { + n.selected = true; + n.dirty = true; + moving_set.push({n:n}); + } + }) + } + redraw(); + selectNodesOptions = options||{}; + var closeNotification = function() { + clearSelection(); + $("#red-ui-workspace-tabs-shade").hide(); + $("#red-ui-palette-shade").hide(); + $("#red-ui-sidebar-shade").hide(); + $("#red-ui-header-shade").hide(); + $("#red-ui-workspace").removeClass("red-ui-workspace-select-mode"); + resetMouseVars(); + notification.close(); + } + selectNodesOptions.done = function(selection) { + closeNotification(); + if (selectNodesOptions.onselect) { + selectNodesOptions.onselect(selection); + } + } + var buttons = [{ + text: RED._("common.label.cancel"), + click: function(e) { + closeNotification(); + if (selectNodesOptions.oncancel) { + selectNodesOptions.oncancel(); + } + } + }]; + if (!selectNodesOptions.single) { + buttons.push({ + text: RED._("common.label.done"), + class: "primary", + click: function(e) { + var selection = moving_set.map(function(n) { return n.n;}); + selectNodesOptions.done(selection); + } + }); + } + var notification = RED.notify(selectNodesOptions.prompt || RED._("workspace.selectNodes"),{ + modal: false, + fixed: true, + type: "compact", + buttons: buttons + }) } }; })(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js index 32196a4c4..bb64f848a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js @@ -28,7 +28,7 @@ RED.workspaces = (function() { var tabId = RED.nodes.id(); do { workspaceIndex += 1; - } while ($("#workspace-tabs a[title='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0); + } while ($("#red-ui-workspace-tabs a[title='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0); ws = {type:"tab",id:tabId,disabled: false,info:"",label:RED._('workspace.defaultName',{number:workspaceIndex})}; RED.nodes.addWorkspace(ws,targetIndex); @@ -60,10 +60,17 @@ RED.workspaces = (function() { function showEditWorkspaceDialog(id) { var workspace = RED.nodes.workspace(id); + if (!workspace) { + var subflow = RED.nodes.subflow(id); + if (subflow) { + RED.editor.editSubflow(subflow); + } + return; + } RED.view.state(RED.state.EDITING); var tabflowEditor; var trayOptions = { - title: RED._("workspace.editFlow",{name:workspace.label}), + title: RED._("workspace.editFlow",{name:RED.utils.sanitize(workspace.label)}), buttons: [ { id: "node-dialog-delete", @@ -107,8 +114,8 @@ RED.workspaces = (function() { changed = true; workspace.info = info; } - $("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',!!workspace.disabled); - $("#workspace").toggleClass("workspace-disabled",!!workspace.disabled); + $("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled); + $("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled); if (changed) { var historyEvent = { @@ -150,18 +157,27 @@ RED.workspaces = (function() { tabflowEditor.resize(); }, open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); + var trayFooter = tray.find(".red-ui-tray-footer"); + var trayBody = tray.find('.red-ui-tray-body'); + var trayFooterLeft = $('').appendTo(trayFooter) + var dialogForm = $('
                                  ').appendTo(trayBody); $('
                                  '+ ''+ ''+ '
                                  ').appendTo(dialogForm); - $('
                                  '+ - ''+ - ' '+ - ''+ - '
                                  ').appendTo(dialogForm); + + if (!workspace.hasOwnProperty("disabled")) { + workspace.disabled = false; + } + + $('').prop("checked",workspace.disabled).appendTo(trayFooterLeft).toggleButton({ + enabledIcon: "fa-circle-thin", + disabledIcon: "fa-ban", + invertState: true + }) + var row = $('
                                  '+ ''+ @@ -173,7 +189,7 @@ RED.workspaces = (function() { value: "" }); - $('#node-info-input-info-expand').click(function(e) { + $('#node-info-input-info-expand').on("click", function(e) { e.preventDefault(); var value = tabflowEditor.getValue(); RED.editor.editMarkdown({ @@ -190,36 +206,10 @@ RED.workspaces = (function() { }) }); - dialogForm.find('#node-input-disabled-btn').on("click",function(e) { - var i = $(this).find("i"); - if (i.hasClass('fa-toggle-off')) { - i.addClass('fa-toggle-on'); - i.removeClass('fa-toggle-off'); - $("#node-input-disabled").prop("checked",false); - $("#node-input-disabled-label").text(RED._("editor:workspace.enabled")); - } else { - i.addClass('fa-toggle-off'); - i.removeClass('fa-toggle-on'); - $("#node-input-disabled").prop("checked",true); - $("#node-input-disabled-label").text(RED._("editor:workspace.disabled")); - } - }) - if (workspace.hasOwnProperty("disabled")) { - $("#node-input-disabled").prop("checked",workspace.disabled); - if (workspace.disabled) { - dialogForm.find("#node-input-disabled-btn i").removeClass('fa-toggle-on').addClass('fa-toggle-off'); - $("#node-input-disabled-label").text(RED._("editor:workspace.disabled")); - } else { - $("#node-input-disabled-label").text(RED._("editor:workspace.enabled")); - } - } else { - workspace.disabled = false; - $("#node-input-disabled-label").text(RED._("editor:workspace.enabled")); - } $('').prependTo(dialogForm); - dialogForm.submit(function(e) { e.preventDefault();}); + dialogForm.on("submit", function(e) { e.preventDefault();}); $("#node-input-name").val(workspace.label); RED.text.bidi.prepareInput($("#node-input-name")); tabflowEditor.getSession().setValue(workspace.info || "", -1); @@ -241,7 +231,7 @@ RED.workspaces = (function() { var workspaceTabCount = 0; function createWorkspaceTabs() { workspace_tabs = RED.tabs.create({ - id: "workspace-tabs", + id: "red-ui-workspace-tabs", onchange: function(tab) { var event = { old: activeWorkspace @@ -250,7 +240,7 @@ RED.workspaces = (function() { event.workspace = activeWorkspace; RED.events.emit("workspace:change",event); window.location.hash = 'flow/'+tab.id; - $("#workspace").toggleClass("workspace-disabled",!!tab.disabled); + $("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!tab.disabled); RED.sidebar.config.refresh(); RED.view.focus(); }, @@ -268,9 +258,9 @@ RED.workspaces = (function() { if (tab.type === "tab") { workspaceTabCount++; } - $(' ').prependTo("#red-ui-tab-"+(tab.id.replace(".","-"))+" .red-ui-tab-label"); + $(' ').prependTo("#red-ui-tab-"+(tab.id.replace(".","-"))+" .red-ui-tab-label"); if (tab.disabled) { - $("#red-ui-tab-"+(tab.id.replace(".","-"))).addClass('workspace-disabled'); + $("#red-ui-tab-"+(tab.id.replace(".","-"))).addClass('red-ui-workspace-disabled'); } RED.menu.setDisabled("menu-item-workspace-delete",workspaceTabCount <= 1); if (workspaceTabCount === 1) { @@ -294,16 +284,16 @@ RED.workspaces = (function() { onselect: function(selectedTabs) { RED.view.select(false) if (selectedTabs.length === 0) { - $("#chart svg").css({"pointer-events":"auto",filter:"none"}) - $("#workspace-toolbar").css({"pointer-events":"auto",filter:"none"}) - $("#palette-container").css({"pointer-events":"auto",filter:"none"}) - $(".sidebar-shade").hide(); + $("#red-ui-workspace-chart svg").css({"pointer-events":"auto",filter:"none"}) + $("#red-ui-workspace-toolbar").css({"pointer-events":"auto",filter:"none"}) + $("#red-ui-palette-container").css({"pointer-events":"auto",filter:"none"}) + $(".red-ui-sidebar-shade").hide(); } else { RED.view.select(false) - $("#chart svg").css({"pointer-events":"none",filter:"opacity(60%)"}) - $("#workspace-toolbar").css({"pointer-events":"none",filter:"opacity(60%)"}) - $("#palette-container").css({"pointer-events":"none",filter:"opacity(60%)"}) - $(".sidebar-shade").show(); + $("#red-ui-workspace-chart svg").css({"pointer-events":"none",filter:"opacity(60%)"}) + $("#red-ui-workspace-toolbar").css({"pointer-events":"none",filter:"opacity(60%)"}) + $("#red-ui-palette-container").css({"pointer-events":"none",filter:"opacity(60%)"}) + $(".red-ui-sidebar-shade").show(); } }, minimumActiveTabWidth: 150, @@ -316,17 +306,25 @@ RED.workspaces = (function() { workspaceTabCount = 0; } function showWorkspace() { - $("#workspace .red-ui-tabs").show() - $("#chart").show() - $("#workspace-footer").children().show() + $("#red-ui-workspace .red-ui-tabs").show() + $("#red-ui-workspace-chart").show() + $("#red-ui-workspace-footer").children().show() } function hideWorkspace() { - $("#workspace .red-ui-tabs").hide() - $("#chart").hide() - $("#workspace-footer").children().hide() + $("#red-ui-workspace .red-ui-tabs").hide() + $("#red-ui-workspace-chart").hide() + $("#red-ui-workspace-footer").children().hide() } function init() { + $('
                                    ').appendTo("#red-ui-workspace"); + $('
                                    ').appendTo("#red-ui-workspace"); + $('
                                    ').appendTo("#red-ui-workspace"); + $('
                                    ').appendTo("#red-ui-workspace"); + $('').appendTo("#red-ui-workspace"); + $('
                                    ').appendTo("#red-ui-workspace"); + + createWorkspaceTabs(); RED.events.on("sidebar:resize",workspace_tabs.resize); @@ -337,13 +335,15 @@ RED.workspaces = (function() { deleteWorkspace(RED.nodes.workspace(activeWorkspace)); }); - $(window).resize(function() { + $(window).on("resize", function() { workspace_tabs.resize(); }); RED.actions.add("core:add-flow",function(opts) { addWorkspace(undefined,undefined,opts?opts.index:undefined)}); RED.actions.add("core:edit-flow",editWorkspace); RED.actions.add("core:remove-flow",removeWorkspace); + RED.actions.add("core:enable-flow",enableWorkspace); + RED.actions.add("core:disable-flow",disableWorkspace); RED.actions.add("core:list-flows",function() { RED.actions.invoke("core:search","type:tab "); @@ -356,6 +356,48 @@ RED.workspaces = (function() { showEditWorkspaceDialog(id||activeWorkspace); } + function enableWorkspace(id) { + setWorkspaceState(id,false); + } + function disableWorkspace(id) { + setWorkspaceState(id,true); + } + function setWorkspaceState(id,disabled) { + var workspace = RED.nodes.workspace(id||activeWorkspace); + if (!workspace) { + return; + } + if (workspace.disabled !== disabled) { + var changes = { disabled: workspace.disabled }; + workspace.disabled = disabled; + $("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled); + $("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled); + var historyEvent = { + t: "edit", + changes:changes, + node: workspace, + dirty: RED.nodes.dirty() + } + workspace.changed = true; + RED.history.push(historyEvent); + RED.nodes.dirty(true); + RED.sidebar.config.refresh(); + var selection = RED.view.selection(); + if (!selection.nodes && !selection.links) { + RED.sidebar.info.refresh(workspace); + } + if (changes.hasOwnProperty('disabled')) { + RED.nodes.eachNode(function(n) { + if (n.z === workspace.id) { + n.dirty = true; + } + }); + RED.view.redraw(); + } + } + } + + function removeWorkspace(ws) { if (!ws) { deleteWorkspace(RED.nodes.workspace(activeWorkspace)); @@ -398,7 +440,7 @@ RED.workspaces = (function() { if (!workspace_tabs.contains(id)) { var sf = RED.nodes.subflow(id); if (sf) { - addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.png",label:sf.name, closeable: true}); + addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.svg",label:sf.name, closeable: true}); } else { return; } @@ -419,6 +461,8 @@ RED.workspaces = (function() { }, resize: function() { workspace_tabs.resize(); - } + }, + enable: enableWorkspace, + disable: disableWorkspace } })(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/user.js b/packages/node_modules/@node-red/editor-client/src/js/user.js index 4d004a218..485670e4f 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/user.js +++ b/packages/node_modules/@node-red/editor-client/src/js/user.js @@ -30,7 +30,11 @@ RED.user = (function() { dialog.dialog({ autoOpen: false, - dialogClass: "ui-dialog-no-close", + classes: { + "ui-dialog": "red-ui-editor-dialog", + "ui-dialog-titlebar-close": "hide", + "ui-widget-overlay": "red-ui-editor-dialog" + }, modal: true, closeOnEscape: !!opts.cancelable, width: 600, @@ -59,7 +63,7 @@ RED.user = (function() { var r = row; return function(event) { if (event.keyCode == 13) { - r.next("div").find("input").focus(); + r.next("div").find("input").trigger("focus"); event.preventDefault(); } } @@ -69,12 +73,12 @@ RED.user = (function() { row.appendTo("#node-dialog-login-fields"); } $('
                                    '+RED._("user.loginFailed")+''+ - (opts.cancelable?''+RED._("common.label.cancel")+'':'')+ - '
                                    ').appendTo("#node-dialog-login-fields"); + (opts.cancelable?''+RED._("common.label.cancel")+'':'')+ + '
                                    ').appendTo("#node-dialog-login-fields"); $("#node-dialog-login-submit").button(); - $("#node-dialog-login-fields").submit(function(event) { + $("#node-dialog-login-fields").on("submit", function(event) { $("#node-dialog-login-submit").button("option","disabled",true); $("#node-dialog-login-failed").hide(); $(".login-spinner").show(); @@ -115,7 +119,7 @@ RED.user = (function() { var field = data.prompts[i]; var row = $("
                                    ",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields"); - var loginButton = $('',{style: "padding: 10px"}).appendTo(row).click(function() { + var loginButton = $('',{style: "padding: 10px"}).appendTo(row).on("click", function() { document.location = field.url; }); if (field.image) { @@ -138,7 +142,7 @@ RED.user = (function() { } if (opts.cancelable) { - $("#node-dialog-login-cancel").button().click(function( event ) { + $("#node-dialog-login-cancel").button().on("click", function( event ) { $("#node-dialog-login").dialog('destroy').remove(); }); } @@ -178,9 +182,9 @@ RED.user = (function() { } function updateUserMenu() { - $("#btn-usermenu-submenu li").remove(); + $("#red-ui-header-button-user-submenu li").remove(); if (RED.settings.user.anonymous) { - RED.menu.addItem("btn-usermenu",{ + RED.menu.addItem("red-ui-header-button-user",{ id:"usermenu-item-login", label:RED._("menu.label.login"), onselect: function() { @@ -194,11 +198,11 @@ RED.user = (function() { } }); } else { - RED.menu.addItem("btn-usermenu",{ + RED.menu.addItem("red-ui-header-button-user",{ id:"usermenu-item-username", label:""+RED.settings.user.username+"" }); - RED.menu.addItem("btn-usermenu",{ + RED.menu.addItem("red-ui-header-button-user",{ id:"usermenu-item-logout", label:RED._("menu.label.logout"), onselect: function() { @@ -213,8 +217,8 @@ RED.user = (function() { if (RED.settings.user) { if (!RED.settings.editorTheme || !RED.settings.editorTheme.hasOwnProperty("userMenu")) { - var userMenu = $('
                                  • ') - .prependTo(".header-toolbar"); + var userMenu = $('
                                  • ') + .prependTo(".red-ui-header-toolbar"); if (RED.settings.user.image) { $('').css({ backgroundImage: "url("+RED.settings.user.image+")", @@ -223,7 +227,7 @@ RED.user = (function() { $('').appendTo(userMenu.find("a")); } - RED.menu.init({id:"btn-usermenu", + RED.menu.init({id:"red-ui-header-button-user", options: [] }); updateUserMenu(); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ace.scss b/packages/node_modules/@node-red/editor-client/src/sass/ace.scss index b29b3ce2e..588af07b1 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ace.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ace.scss @@ -1,29 +1,68 @@ -.ace_gutter { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -.ace_scroller { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} +.red-ui-editor, .red-ui-editor-dialog { -#event-log-editor { + .ace_read-only { + .ace_scroller { + background: $text-editor-background-disabled; + color: $text-editor-color-disabled; + } + .ace_cursor { + color: transparent !important; + } + } + + + .ace_gutter { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } .ace_scroller { - background: #444; - color: #dd9; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; } - .ace_active-line { - background: #666 !important; - } - .ace_selection { - background: #999 !important; - } -} -.ace_tooltip { - background-image: none; - background: #fcffdc; - border-radius: 4px; - @include component-shadow; - border-color: $primary-border-color; + .ace_scroller { + background: $text-editor-background; + color: $text-editor-color; + } + .ace_marker-layer .ace_active-line { + background: $text-editor-active-line-background; + } + .ace_marker-layer .ace_selection { + background: $text-editor-selection-background; + border-radius: 1px; + } + .ace_gutter-cell { + color: $text-editor-color; + } + .ace_gutter-active-line { + background: $text-editor-gutter-active-line-background; + } + .ace_gutter { + background: $text-editor-gutter-background; + } + .ace_tooltip { + font-family: $primary-font; + line-height: 1.4em; + max-width: 400px; + white-space: normal; + background-image: none; + background: $popover-background; + color: $popover-color; + border-radius: 4px; + @include component-shadow; + border-color: $popover-background; + } + + #red-ui-event-log-editor { + .ace_scroller { + background: $event-log-background; + color: $event-log-color; + } + .ace_marker-layer .ace_active-line { + background: $event-log-active-line-background; + } + .ace_marker-layer .ace_selection { + background: $event-log-selection-background; + } + } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/base.scss b/packages/node_modules/@node-red/editor-client/src/sass/base.scss new file mode 100644 index 000000000..2aca0b8e1 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/sass/base.scss @@ -0,0 +1,263 @@ +/** +* 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-ui-editor { + font-size: $primary-font-size; + font-family: $primary-font; + padding: 0; + margin: 0; + background: $primary-background; + color: $primary-text-color; + line-height: 20px; +} + +#red-ui-editor { + position: absolute; + top: 0; left: 0; bottom: 0; right: 0; +} +#red-ui-editor-node-configs { + display: none; +} +#red-ui-main-container { + position: absolute; + top:40px; left:0; bottom: 0; right:0; + overflow:hidden; +} + +#red-ui-palette-shade, #red-ui-editor-shade, #red-ui-header-shade, #red-ui-sidebar-shade { + @include shade; + z-index: 2; +} +#red-ui-sidebar-shade { + left: -8px; + top: -1px; + bottom: -1px; +} +#red-ui-full-shade { + @include shade; + z-index: 15; +} +.red-ui-editor, +.red-ui-editor-dialog, +.red-ui-menu, +.red-ui-popover, +.red-ui-typedInput-options, +.red-ui-icon-picker { + a { + text-decoration: none; + color: $primary-text-color; + } + a:hover, + a:focus { + text-decoration: none; + color: $primary-text-color; + } + + p { + margin: 0 0 10px; + } + + small { + font-size: 85%; + } + + strong { + font-weight: bold; + } + + em { + font-style: italic; + } + + cite { + font-style: normal; + } + + ul, + ol { + padding: 0; + margin: 0 0 10px 25px; + } + + ul ul, + ul ol, + ol ol, + ol ul { + margin-bottom: 0; + } + + li { + line-height: 20px; + } + dl { + margin-bottom: 20px; + } + + dt, + dd { + line-height: 20px; + } + + dt { + font-weight: bold; + } + + dd { + margin-left: 10px; + } + + hr { + margin: 20px 0; + border: 0; + border-top: 1px solid $tertiary-border-color; + } + + + + i.spinner { + display: inline-block; + width: 14px; + height: 14px; + line-height: 14px; + vertical-align: text-top; + margin-top: 0px; + background: url(images/spin.svg) no-repeat 50% 50%; + background-size: contain + } + + code { + font-family: $monospace-font; + font-size: $primary-font-size; + padding: 0px; + margin: 1px; + color: $info-text-code-color; + white-space: nowrap; + } + + pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre-wrap; + background-color:$tertiary-background; + border: 1px solid $tertiary-border-color; + border-radius: 2px; + } + + pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; + } + + .pull-right { + float: right; + } + + .pull-left { + float: left; + } + .hide { + display: none; + } + .show { + display: block; + } + + img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; + } + + blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 4px solid $secondary-border-color; + color: $secondary-text-color; + + p { + font-size: 14px; + font-weight: inherit; + line-height: 1.25; + margin-bottom: 0; + } + } + + table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; + } +} + +.red-ui-component-spinner { + position: absolute; + top: 1px; + bottom: 1px; + left: 1px; + right: 1px; + text-align: center; + padding: 40px; + background: $secondary-background; + &:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + margin-right: -0.25em; + } + img { + display: inline-block; + vertical-align: middle; + width: 80px; + } + &.red-ui-component-spinner-sidebar { + background: $secondary-background; + padding:0; + img { + width: 40px; + } + } + &.projects-version-control-spinner-sidebar { + background: $secondary-background; + padding:0; + img { + width: 20px; + } + } + + &.red-ui-component-spinner-contain { + padding: 0; + img { + width: auto; + height: 100%; + max-height: 50px; + } + } +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/colors.scss b/packages/node_modules/@node-red/editor-client/src/sass/colors.scss index 3066e247c..8411343c5 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/colors.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/colors.scss @@ -14,60 +14,273 @@ * limitations under the License. **/ -$background-color: #f3f3f3; +$primary-font: 'Helvetica Neue', Arial, Helvetica, sans-serif; +$primary-font-size: 14px; +$monospace-font: Menlo, Consolas, 'DejaVu Sans Mono', Courier, monospace; -$form-placeholder-color: #bbbbbb; -$form-text-color: #444; +$primary-background: #f3f3f3;//#0ff; + +$secondary-background: #fff;//#ff0; +$secondary-background-selected: #efefef;//#e9e900; +$secondary-background-inactive: #f0f0f0;//#f0f000; +$secondary-background-hover: #ddd;//#dd0; +$secondary-background-disabled: #f9f9f9;//#fafa0; + +$tertiary-background: #f7f7f7;//#f0f; + +$shadow: rgba(0, 0, 0, 0.2); + +// Main body text +$primary-text-color: #555;//#0f0; +// UI control label text +$secondary-text-color: #888;//#00f; +$secondary-text-color-focus: #666;//#009; +$secondary-text-color-hover: #666;//#006; +$secondary-text-color-active: #666;//#006; +$secondary-text-color-selected: #666;//#00A; +$secondary-text-color-inactive: #666;//#006; +$secondary-text-color-disabled: #bbb;//#00C; +$secondary-text-color-disabled-active: #999;//#009; +$secondary-text-color-disabled-inactive: #aaa;//#00A; + +// Sub label text +$tertiary-text-color: #aaa;//#90f; +// Heading text +$header-text-color: #444;//#f00; + +$text-color-warning: #AD1625; +$text-color-green: #3a3; + +$primary-border-color: #bbbbbb;//#f00; +$secondary-border-color: #dddddd;//#0f0; +$tertiary-border-color: #ccc;//#00f; + +$form-background: $secondary-background; + +$form-placeholder-color: $tertiary-text-color; +$form-text-color: $primary-text-color; +$form-text-color-disabled: $secondary-text-color-disabled; $form-input-focus-color: rgba(85,150,230,0.8); -$form-input-border-color: #ccc; -$form-input-border-selected-color: #aaa; +$form-input-border-color: $tertiary-border-color; +$form-input-border-selected-color: #aaa;//#f0f; +$form-input-border-error-color: rgb(214, 97, 95); +$form-input-background: $secondary-background; +$form-input-background-disabled: $secondary-background-disabled; +$form-button-background: $secondary-background-selected; + +$form-tips-background: #ffe; + + +$text-editor-color: #4D4D4C;//#00f; +$text-editor-background: $secondary-background; +$text-editor-color-disabled: $secondary-text-color-inactive; +$text-editor-background-disabled: $secondary-background-disabled; +$text-editor-gutter-background: #f6f6f6;//#ee0; +$text-editor-gutter-color: #777;//#00e; +$text-editor-gutter-active-line-background: #dcdcdc;//#dd0; +$text-editor-active-line-background: #efefef;//#ee0; +$text-editor-selection-background: #D6D6D6;//#e0e; + +$event-log-background: #444; +$event-log-color: #dd9; +$event-log-active-line-background: #333; +$event-log-selection-background: #999; + + + + +$list-item-color: $primary-text-color; +$list-item-secondary-color: $secondary-text-color; +$list-item-background: $secondary-background; +$list-item-background-disabled: $secondary-background-inactive; +$list-item-background-hover: $secondary-background-hover; +$list-item-background-selected: $secondary-background-selected; +$list-item-border-selected: $secondary-text-color-selected; + +$tab-text-color-active: $header-text-color; +$tab-text-color-inactive: $secondary-text-color-inactive; +$tab-text-color-disabled-active: $secondary-text-color-disabled-active; +$tab-text-color-disabled-inactive: $secondary-text-color-disabled-inactive; + +$tab-badge-color: $tertiary-text-color; +$tab-background: $secondary-background; +$tab-background-active: $secondary-background; +$tab-background-selected: $secondary-background-selected; +$tab-background-inactive: $secondary-background-inactive; +$tab-background-hover: $secondary-background-hover; + +$palette-header-background: $primary-background; +$palette-header-color: $header-text-color; +$palette-content-background: $secondary-background; + + +$workspace-button-background: $secondary-background; +$workspace-button-background-hover: $secondary-background-hover; +$workspace-button-background-active: $secondary-background-selected; + +$workspace-button-color: $secondary-text-color; +$workspace-button-color-disabled: $secondary-text-color-disabled; +$workspace-button-color-focus: $secondary-text-color-focus; +$workspace-button-color-hover: $secondary-text-color-hover; +$workspace-button-color-active: $secondary-text-color-active; +$workspace-button-color-selected: $secondary-text-color-selected; + +$workspace-button-color-primary: #eee; +$workspace-button-background-primary: #AD1625; +$workspace-button-background-primary-hover: #6E0A1E; + +$workspace-button-color-focus-outline: $form-input-border-color; + +$shade-color: rgba(160,160,160,0.5); + + +$popover-background: #333; +$popover-color: #eee; +$popover-button-border-color: #bbb; +$popover-button-border-color-hover: #666; + + + +$diff-text-header-color: $secondary-text-color; +$diff-text-header-background: #ffd; +$diff-text-header-background-hover: #ffc; +$diff-state-added: #009900; +$diff-state-deleted: #f80000; +$diff-state-changed: #f89406; +$diff-state-changed-background: #fff2e1; +$diff-state-unchanged: #bbb; +$diff-state-unchanged-background: #fff; + +$diff-state-conflicted: purple; +$diff-state-moved: #3f81b3; +$diff-state-conflict: #9b45ce; +$diff-state-conflict-background: #ffdad4; + +$diff-state-added-background: #e7ffe3; +$diff-state-added-border: #b8daad; +$diff-state-added-header-background: #c0f6c0; +$diff-state-added-header-border: #aaeeaa; + +$diff-state-deleted-background: #ffe1e1; +$diff-state-deleted-border: #e4bcbc; +$diff-state-deleted-header-background: #ffcccc; +$diff-state-deleted-header-border: #eebbbb; + +$diff-merge-header-color: #800080; +$diff-merge-header-background: #e5f9ff; +$diff-merge-header-border-color: #b2edff; + +$menuBackground: $primary-background; +$menuDivider: $secondary-border-color; +$menuColor: $primary-text-color; +$menuActiveColor: $secondary-text-color-active; +$menuActiveBackground: $secondary-background-hover; +$menuDisabledColor: $secondary-text-color-disabled; +$menuHoverColor: $secondary-text-color-hover; +$menuHoverBackground: $secondary-background-hover; +$menuCaret: $tertiary-text-color; + +$view-navigator-background: rgba(245,245,245,0.8); + +$view-lasso-stroke: #ff7f0e; +$view-lasso-fill: rgba(20,125,255,0.1); + +$view-background: $secondary-background; +$view-select-mode-background: $secondary-background-selected; +$view-grid-color: #eee; + +$node-label-color: #333; +$node-border: #999; +$node-border-unknown: #f33; +$node-border-placeholder: #aaa; +$node-background-placeholder: #eee; + +$node-port-background: #d9d9d9; +$node-port-background-hover: #eee; +$node-icon-color: #fff; +$node-icon-background-color: rgba(0,0,0,0.05); +$node-icon-background-color-fill: #000; +$node-icon-background-color-opacity: 0.05; +$node-icon-border-color: #000; +$node-icon-border-color-opacity: 0.1; + + +$node-link-port-background: #eee; + +$node-status-error-border: rgb(145, 16, 2); +$node-status-error-background: rgb(255, 102, 0); +$node-status-changed-border: rgb(28, 102, 140); +$node-status-changed-background: rgb(0, 188, 255); + +$node-status-colors: ( + red: #c00, + green: #5a8, + yellow: #F9DF31, + blue: #53A3F3, + grey: #d3d3d3 +); $node-selected-color: #ff7f0e; $port-selected-color: #ff7f0e; -$link-color: #888; -$link-link-color: #ccc; + +$link-color: #999; +$link-link-color: #aaa; +$link-disabled-color: #ccc; $link-link-active-color: #ff7f0e; -$link-subflow-color: #bbb; $link-unknown-color: #f00; -$primary-border-color: #bbbbbb; -$secondary-border-color: #dddddd; +$clipboard-textarea-background: #F3E7E7; -$tab-background-active: #fff; -$tab-background-selected: #f9f9f9; -$tab-background-inactive: #f0f0f0; -$tab-background-hover: #ddd; -$palette-header-background: #f3f3f3; +$deploy-button-color: #eee; +$deploy-button-color-active: #ccc; +$deploy-button-color-disabled: #999; +$deploy-button-background: #8C101C; +$deploy-button-background-hover: #6E0A1E; +$deploy-button-background-active: #4C0A17; +$deploy-button-background-disabled: #444; +$deploy-button-background-disabled-hover: #555; -$workspace-button-background: #fff; -$workspace-button-background-hover: #ddd; -$workspace-button-background-active: #efefef; -$workspace-button-color: #888; -$workspace-button-color-disabled: #ccc; -$workspace-button-color-focus: #999; -$workspace-button-color-hover: #666; -$workspace-button-color-active: #666; -$workspace-button-color-selected: #AAA; -$workspace-button-toggle-color: #999; -$workspace-button-toggle-color-selected: #888; -$workspace-button-toggle-color-disabled: #ddd; +$header-background: #000; +$header-button-background-active: #121212; +$header-menu-color: #C7C7C7; +$header-menu-color-disabled: #666; +$header-menu-heading-color: #fff; +$header-menu-sublabel-color: #aeaeae; +$header-menu-background: #121212; +$header-menu-item-hover: #323232; +$header-menu-item-border-active: #777677; +$headerMenuItemDivider: #464646; +$headerMenuCaret: #C7C7C7; -$workspace-button-color-focus-outline: rgba(85,150,230,0.2); +$vcCommitShaColor: #c38888; -$typedInput-button-background: #efefef; -$typedInput-button-background-hover: #ddd; -$typedInput-button-background-active: #ddd; +$info-text-code-color: #AD1625; +$info-text-link-color: #0088cc; -$editor-button-color-primary: #eee; -$editor-button-background-primary: #AD1625; -$editor-button-background-primary-hover: #6E0A1E; -$editor-button-color: #999; -$editor-button-background: #fff; +$dnd-background: rgba(0,0,0,0.3); +$dnd-color: #fff; -$shade-color: rgba(160,160,160,0.5); +$notification-border-default: #325C80; +$notification-border-success: #4B8400; +$notification-border-warning: #D74108; +$notification-border-error: $text-color-warning; -$popover-background: #333; -$popover-color: #eee; +$debug-message-background: $secondary-background; +$debug-message-background-hover: $secondary-background-selected; + +$debug-message-text-color: #333; +$debug-message-text-color-meta: #a66; +$debug-message-text-color-object-key: #792e90; +$debug-message-text-color-msg-type-other: #2033d6; +$debug-message-text-color-msg-type-string: #b72828; +$debug-message-text-color-msg-type-null: #666; +$debug-message-text-color-msg-type-meta: #666; +$debug-message-text-color-msg-type-number: #2033d6; + +$debug-message-border: #eee; +$debug-message-border-hover: #999; +$debug-message-border-warning: #ffdf9d; +$debug-message-border-error: #f99; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/debug.scss b/packages/node_modules/@node-red/editor-client/src/sass/debug.scss index 456ef2559..d767aaed3 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/debug.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/debug.scss @@ -14,16 +14,17 @@ * limitations under the License. **/ -.debug-window { +.red-ui-debug-window { padding:0; margin:0; - background: #fff; + background: $secondary-background; line-height: 20px; + .red-ui-debug-msg-payload { + font-size: 14px; + } } -.debug-window .debug-message-payload { - font-size: 14px; -} -.debug-content { + +.red-ui-debug-content { position: absolute; top: 43px; bottom: 0px; @@ -31,234 +32,216 @@ right: 0px; overflow-y: scroll; } -.debug-filter-box { +.red-ui-debug-filter-box { position:absolute; top: 42px; left: 0px; right: 0px; z-index: 20; - background: #f9f9f9; + background: $tertiary-background; padding: 10px; - border-bottom: 1px solid #ddd; - box-shadow: 0 2px 6px rgba(0,0,0,0.1); + border-bottom: 1px solid $secondary-border-color; + box-shadow: 0 2px 6px $shadow; } -.debug-filter-row { +.red-ui-debug-filter-row { .red-ui-nodeList { margin: 10px 0; } } -.debug-message { +.red-ui-debug-msg { position: relative; - border-bottom: 1px solid #eee; - border-left: 8px solid #eee; - border-right: 8px solid #eee; + border-bottom: 1px solid $debug-message-border; + border-left: 8px solid $debug-message-border; + border-right: 8px solid $debug-message-border; padding: 2px; - &>.debug-message-meta .debug-message-tools { + &>.red-ui-debug-msg-meta .red-ui-debug-msg-tools { display: none; } - &.debug-message-hover { - border-right-color: #999; - &>.debug-message-meta .debug-message-tools { + &.red-ui-debug-msg-hover { + border-right-color: $debug-message-border-hover; + &>.red-ui-debug-msg-meta .red-ui-debug-msg-tools { display: inline-block; } } } -.debug-message-row { - .debug-message-tools-pin { +.red-ui-debug-msg-row { + .red-ui-debug-msg-tools-pin { display: none; } - &.debug-message-row-pinned .debug-message-tools-pin { + &.red-ui-debug-msg-row-pinned .red-ui-debug-msg-tools-pin { display: inline-block; } &:hover { - background: #f3f3f3; - &>.debug-message-tools { - .debug-message-tools-copy { + background: $debug-message-background-hover; + &>.red-ui-debug-msg-tools { + .red-ui-debug-msg-tools-copy { display: inline-block; } - .debug-message-tools-pin { + .red-ui-debug-msg-tools-pin { display: inline-block; } - .debug-message-tools-other { + .red-ui-debug-msg-tools-other { display: inline-block; } } } } -.debug-message-meta .debug-message-tools { - .editor-button-small { +.red-ui-debug-msg-meta .red-ui-debug-msg-tools { + .red-ui-button-small { font-size: 11px; } } -.debug-message-tools { +.red-ui-debug-msg-tools { .button-group:not(:last-child) { margin-right: 3px; } - .editor-button-small { + .red-ui-button-small { height: 16px; line-height: 14px; font-size: 8px; border-radius: 1px; padding: 0 3px; min-width: 18px; - i.fa-terminal { - // terminal icon is a bit thin, so darken its color for better contrast - color: darken($editor-button-color, 30%) !important; - } - &.selected { - color: darken($workspace-button-color-selected, 10%) !important; - background: darken($workspace-button-background-active,10%); - } } } -.debug-message-meta { - background: #fff; +.red-ui-debug-msg-meta { + background: $debug-message-background; font-size: 11px; - color: #707070; + color: $secondary-text-color-inactive; } -.debug-message-date { +.red-ui-debug-msg-date { padding: 1px 5px 1px 1px; } -.debug-message-topic { +.red-ui-debug-msg-topic { display: block; - color: #a66; + color: $debug-message-text-color-meta; } -.debug-message-name { +.red-ui-debug-msg-name { padding: 1px 5px; - color: #707070; + color: $secondary-text-color-inactive; } -.debug-message-tools { +.red-ui-debug-msg-tools { position: absolute; top: 3px; right: 1px; - .debug-message-tools-copy { + .red-ui-debug-msg-tools-copy { display: none; } - .debug-message-tools-other { + .red-ui-debug-msg-tools-other { display: none; } } -.debug-message-payload { +.red-ui-debug-msg-payload { display: block; padding: 2px; - background: #fff; + background: $debug-message-background; + font-family: $monospace-font; + font-size: 13px !important; } -.debug-message-level-log { - border-left-color: #eee; - border-right-color: #eee; +.red-ui-debug-msg-level-log { + border-left-color: $debug-message-border; + border-right-color: $debug-message-border; } -.debug-message-level-30 { - border-left-color: #ffdf9d; - border-right-color: #ffdf9d; +.red-ui-debug-msg-level-30 { + border-left-color: $debug-message-border-warning; + border-right-color: $debug-message-border-warning; } -.debug-message-level-20 { - border-left-color: #f99; - border-right-color: #f99; +.red-ui-debug-msg-level-20 { + border-left-color: $debug-message-border-error; + border-right-color: $debug-message-border-error; } -.debug-message-object-entry { +.red-ui-debug-msg-object-entry { position: relative; padding-left: 15px; } -.debug-message-element { - color: #333; - font-family: Menlo, monospace; - font-size: 13px !important; +.red-ui-debug-msg-element { + color: $debug-message-text-color; line-height: 1.3em; } -.debug-message-object-key { - color: #792e90; +.red-ui-debug-msg-object-key { + color: $debug-message-text-color-object-key; } -.debug-message-object-value { +.red-ui-debug-msg-object-value { } -.debug-message-object-handle { - color: #666; +.red-ui-debug-msg-object-handle { + color: $secondary-text-color; font-size: 1em; width: 1em; text-align: center; transition: transform 0.1s ease-in-out; transform: rotate(90deg); } -.debug-message-element:not(.debug-message-top-level)>.debug-message-expandable>.debug-message-object-handle { +.red-ui-debug-msg-element:not(.red-ui-debug-msg-top-level)>.red-ui-debug-msg-expandable>.red-ui-debug-msg-object-handle { margin-left: -1em; } -.debug-message-object-entry>.debug-message-expandable>.debug-message-object-handle { +.red-ui-debug-msg-object-entry>.red-ui-debug-msg-expandable>.red-ui-debug-msg-object-handle { margin-left: -1em; } -.debug-message-object-entry.collapsed>span>.debug-message-object-handle { +.red-ui-debug-msg-object-entry.collapsed>span>.red-ui-debug-msg-object-handle { transform: rotate(0deg); } -.debug-message-element.collapsed>span>.debug-message-object-handle { +.red-ui-debug-msg-element.collapsed>span>.red-ui-debug-msg-object-handle { transform: rotate(0deg); } -.debug-message-object-entry.collapsed > .debug-message-object-entry { +.red-ui-debug-msg-object-entry.collapsed > .red-ui-debug-msg-object-entry { display:none; } -.debug-message-element.collapsed .debug-message-object-entry { +.red-ui-debug-msg-element.collapsed .red-ui-debug-msg-object-entry { display:none; } -.debug-message-element:not(.collapsed)>.debug-message-expandable>.debug-message-object-value>.debug-message-object-header { +.red-ui-debug-msg-element:not(.collapsed)>.red-ui-debug-msg-expandable>.red-ui-debug-msg-object-value>.red-ui-debug-msg-object-header { display:none; } -.debug-message-element.collapsed .debug-message-buffer-opts { +.red-ui-debug-msg-element.collapsed .red-ui-debug-msg-buffer-opts { display: none; } -.debug-message-element.collapsed .debug-message-object-type-header { +.red-ui-debug-msg-element.collapsed .red-ui-debug-msg-object-type-header { display:none; } -.debug-message-object-entry pre { - font-family: Menlo, monospace; +.red-ui-debug-msg-object-entry pre { + font-family: $monospace-font; font-size: 13px; line-height: 1.2em; margin: 0 0 0 -1em; } -.debug-message-type-other { color: #2033d6; } -.debug-message-type-string { color: #b72828; } -.debug-message-type-null { color: #666; font-style: italic;} -.debug-message-type-meta { color: #666; font-style: italic;} -.debug-message-type-number { color: #2033d6; }; -.debug-message-type-number-toggle { cursor: pointer;} +.red-ui-debug-msg-type-other { color: $debug-message-text-color-msg-type-other; } +.red-ui-debug-msg-type-string { color: $debug-message-text-color-msg-type-string; } +.red-ui-debug-msg-type-null { color: $debug-message-text-color-msg-type-null; font-style: italic;} +.red-ui-debug-msg-type-meta { color: $debug-message-text-color-msg-type-meta; font-style: italic;} +.red-ui-debug-msg-type-number { color: $debug-message-text-color-msg-type-number; }; +.red-ui-debug-msg-type-number-toggle { cursor: pointer;} -.debug-message-row { +.red-ui-debug-msg-row { display: block; padding: 4px 2px 2px; position: relative; - &.debug-message-row-pinned { - background: #f6f6f6; + &.red-ui-debug-msg-row-pinned { + background: $secondary-background-selected; } } -.debug-message-expandable { +.red-ui-debug-msg-expandable { cursor: pointer; } -.debug-message-expandable:hover .debug-message-object-handle { - color: #b72828 !important; +.red-ui-debug-msg-expandable:hover .red-ui-debug-msg-object-handle { + color:$secondary-text-color-hover; } -.debug-message-buffer-opts a { - font-size: 9px; - color: #bbb; - border: 1px solid #bbb; - border-radius: 2px; - padding: 2px 5px; +.red-ui-debug-msg-buffer-opts { margin-left: 5px; } -.debug-message-buffer-opts a:hover { - text-decoration: none; - color: #999; - border: 1px solid #999; - background: #f3f3f3; -} -.debug-message-buffer-raw > .debug-message-string-rows { + +.red-ui-debug-msg-buffer-raw > .red-ui-debug-msg-string-rows { display: none; } -.debug-message-buffer-string > .debug-message-array-rows { +.red-ui-debug-msg-buffer-string > .red-ui-debug-msg-array-rows { display: none; } -.debug-message-type-string-swatch { +.red-ui-debug-msg-type-string-swatch { display: inline-block; width: 1.1em; height: 0.9em; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/diff.scss b/packages/node_modules/@node-red/editor-client/src/sass/diff.scss index 0a46364c6..a8b16ca11 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/diff.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/diff.scss @@ -15,7 +15,7 @@ **/ -.node-dialog-view-diff-panel { +.red-ui-diff-panel { padding: 5px; padding-top: 30px; position: relative; @@ -23,11 +23,11 @@ .red-ui-editableList-container { border-radius:1px; padding:0; - background: #f9f9f9; + background: $tertiary-background; } - .node-dialog-view-diff-diff { + .red-ui-diff-list { li { - background: #f9f9f9; + background: $tertiary-background; padding: 0px; border: none; min-height: 0; @@ -38,7 +38,7 @@ // padding-bottom: 5px; } } -.node-diff-container { +.red-ui-diff-container { position: absolute; top: 40px; right:0; @@ -47,7 +47,7 @@ overflow-y: scroll; } -.node-dialog-view-diff-headers { +.red-ui-diff-panel-headers { position: absolute; left:232px; right:12px; @@ -62,7 +62,7 @@ white-space: nowrap; text-overflow: ellipsis; width: 50%; - background: #f9f9f9; + background: $tertiary-background; text-align: center; border-top: 1px solid $secondary-border-color; border-color:$secondary-border-color; @@ -73,35 +73,35 @@ } } -.node-diff-toolbar { +.red-ui-diff-dialog-toolbar { box-sizing: border-box; - color: #666; + color: $secondary-text-color; text-align: right; padding: 8px 10px; - background: #f3f3f3; + background: $primary-background; border-bottom: 1px solid $secondary-border-color; white-space: nowrap; } -.node-diff-tab { - background: #fff; - border: 1px solid #ddd; +.red-ui-diff-list-flow { + background: $secondary-background; + border: 1px solid $secondary-border-color; border-radius: 1px; overflow: hidden; &.collapsed { - .node-diff-tab-title .node-diff-chevron { + .red-ui-diff-list-flow-title .red-ui-diff-list-chevron { transform: rotate(-90deg); } - .node-diff-node-entry { + .red-ui-diff-list-node { display: none; } } } -.node-diff-tab-stats { +.red-ui-diff-list-flow-stats { font-size: 0.9em; } -.node-diff-chevron { +.red-ui-diff-list-chevron { display: inline-block; width: 15px; text-align: center; @@ -109,30 +109,30 @@ transition: transform 0.1s ease-in-out; } -.node-diff-node-entry { +.red-ui-diff-list-node { margin-left: 20px; font-size: 0.9em; &:first-child { - border-top: 1px solid $secondary-border-color; + border-top: 1px solid $tertiary-border-color; } &:not(:last-child) { - border-bottom: 1px solid $secondary-border-color; + border-bottom: 1px solid $tertiary-border-color; } &.collapsed { - .node-diff-chevron { + .red-ui-diff-list-chevron { transform: rotate(-90deg); } - .node-diff-node-entry-properties { + .red-ui-diff-list-node-properties { display: none; } } &:not(.collapsed) { - .node-diff-node-entry-cell:not(:first-child) { + .red-ui-diff-list-node-cell:not(:first-child) { //display: none; } - .node-diff-node-entry-cell:first-child { + .red-ui-diff-list-node-cell:first-child { //width: 100% } } @@ -150,7 +150,7 @@ width: 100%; } td, th { - border-top: 1px solid #f3f3f3; + border-top: 1px solid $secondary-border-color; border-left: 1px solid $secondary-border-color; &:first-child { border-left: none; @@ -166,18 +166,18 @@ overflow:hidden; } &:hover { - background: #f9f9f9; + background: $secondary-background-selected; } } td { - .node-diff-status { + .red-ui-diff-status { margin-left: 0; } } - tr:not(.node-diff-property-header) { - .node-diff-status { + tr:not(.red-ui-diff-list-header) { + .red-ui-diff-status { width: 12px; margin-left: 0; margin-top: 0; @@ -186,8 +186,8 @@ } } } -.node-diff-three-way { - .node-diff-node-entry-cell { +.red-ui-diff-three-way { + .red-ui-diff-list-node-cell { width: calc((100% - 220px) / 2); &:first-child { width: 220px; @@ -197,8 +197,8 @@ width:50%; } - .node-diff-node-entry { - .node-diff-node-entry-cell { + .red-ui-diff-list-node { + .red-ui-diff-list-node-cell { width: calc((100% + 20px - 220px) / 2); &:first-child { width: 200px; @@ -208,131 +208,113 @@ } } -.node-diff-column { - display:inline-block; - height:100%; - width:50%; - box-sizing: border-box; - white-space:nowrap; - overflow: hidden; - &:first-child { - border-right: 1px solid $secondary-border-color - } -} - -.node-diff-tab-title { +.red-ui-diff-list-flow-title { cursor: pointer; padding: 0; - // background: #f6f6f6; &:hover { - background: #f9f9f9; + background: $secondary-background-selected; } } -.node-diff-tab-title-meta { +.red-ui-diff-list-flow-title-meta { vertical-align: middle; display: inline-block; padding-top: 2px; } -.node-diff-node-entry-header { +.red-ui-diff-list-node-header { cursor: pointer; &:hover { - background: #f9f9f9; + background: $secondary-background-selected; } } -.node-diff-node-entry-node { +.red-ui-diff-list-node-icon { vertical-align: middle; display: inline-block; margin: 5px; width: 18px; height: 15px; - background: #ddd; + background: $form-input-background; border-radius: 2px; - border: 1px solid #999; + border: 1px solid $node-border; background-position: 5% 50%; background-repeat: no-repeat; background-size: contain; position: relative; - .palette_icon { + .red-ui-palette-icon { background-position: 49% 50%; width: 15px; } - .palette_icon_fa { + .red-ui-palette-icon-fa { position: relative; top: -2.5px; left: 0px; } - .palette_icon_container { + .red-ui-palette-icon-container { width: 18px; } } -.node-diff-tab-empty { - .node-diff-chevron i { +.red-ui-diff-list-flow-empty { + .red-ui-diff-list-chevron i { display: none; } - .node-diff-tab-title { + .red-ui-diff-list-flow-title { cursor: default; &:hover { background: none; } } } -.node-diff-node-deleted { - //background: #fadddd; +.red-ui-diff-status-deleted { cursor: default !important; - .node-diff-status { - color: #f80000; + .red-ui-diff-status { + color: $diff-state-deleted; } - .node-diff-node-entry-node { + .red-ui-diff-list-node-node { opacity: 0.5; } - .node-diff-node-description { + .red-ui-diff-list-node-description { opacity: 0.5; text-decoration: line-through; } } -.node-diff-node-added { - //background: #eefaee; +.red-ui-diff-status-added { cursor: default !important; - .node-diff-status { - color: #009900; + .red-ui-diff-status { + color: $diff-state-added; } } -.node-diff-node-moved { - //background: #eefaee; - .node-diff-status { - color: #3f81b3; +.red-ui-diff-status-moved { + .red-ui-diff-status { + color: $diff-state-moved; } } -.node-diff-node-changed { - //background: #fff2ca; - .node-diff-status { - color: #f89406; +.red-ui-diff-status-changed { + .red-ui-diff-status { + color: $diff-state-changed; } } -.node-diff-node-unchanged { - //background: #fff2ca; - .node-diff-status { - color: #bbb; +.red-ui-diff-status-unchanged { + .red-ui-diff-status { + color: $diff-state-unchanged; } } -.node-diff-node-conflict { - .node-diff-status { - color: #9b45ce; +.red-ui-diff-status-conflict { + .red-ui-diff-status { + color: $diff-state-conflict; } } -.node-diff-node-entry-title { +.red-ui-diff-list-node-title { display: inline-block; - .node-diff-status { + .red-ui-diff-status { margin-left: 15px; } } -.node-diff-node-entry-properties { +.red-ui-diff-list-node-properties { margin: 0; - color: #666; + color: $primary-text-color; } -.node-diff-status { +.red-ui-diff-status { display: inline-block; height: 20px; margin-left: 5px; @@ -341,12 +323,12 @@ margin-bottom: 6px; text-align: center; } -.node-diff-element { +.red-ui-diff-list-element { display: inline-block; width: calc(100% - 20px); } -.node-diff-node-description { +.red-ui-diff-list-node-description { color: $form-text-color; margin-right: 5px; padding-top: 5px; @@ -357,23 +339,15 @@ clear: both; } } -.node-diff-node-meta { - float: right; - //font-size: 0.9em; - color: #999; - margin-top: 7px; - margin-right: 10px; -} -.node-diff-count { color: #999} -.node-diff-added { color: #009900} -.node-diff-deleted { color: #f80000} -.node-diff-changed { color: #f89406} -.node-diff-unchanged { color: #bbb} -.node-diff-conflicted { color: purple} +.red-ui-diff-state-added { color: $diff-state-added; } +.red-ui-diff-state-deleted { color: $diff-state-deleted; } +.red-ui-diff-state-changed { color: $diff-state-changed; } +.red-ui-diff-state-unchanged { color: $diff-state-unchanged; } +.red-ui-diff-state-conflicted { color: $diff-state-conflicted; } -.node-diff-node-entry-cell { +.red-ui-diff-list-node-cell { display: inline-block; vertical-align: top; box-sizing: border-box; @@ -385,35 +359,35 @@ overflow: hidden; position: relative; } -.node-diff-empty { - background: #f3f3f3; +.red-ui-diff-empty { + background: $secondary-background-disabled; background: repeating-linear-gradient( 20deg, - #fff, #fff 5px, - #f6f6f6 5px, - #f6f6f6 10px + $secondary-background, $secondary-background 5px, + $secondary-background-disabled 5px, + $secondary-background-disabled 10px ); } -.node-diff-node-entry-cell:first-child { +.red-ui-diff-list-node-cell:first-child { border-left: none; } -.node-diff-property-cell-label { +.red-ui-diff-list-cell-label { margin-left: 20px; vertical-align: top; box-sizing: border-box; padding-left: 8px; width: 120px; } -.node-diff-property-wires { +.red-ui-diff-list-wires { display: inline-block; - .node-diff-node-entry-node { + .red-ui-diff-list-node-node { width: 18px; height: 15px; } - .palette_icon_container { + .red-ui-palette-icon-container { width: 18px; } - .palette_icon { + .red-ui-palette-icon { width: 15px; } ul,li,ol { @@ -436,91 +410,84 @@ width: 30px; text-align: center; } - & > li:not(:last-child) { - border-bottom: 1px solid #999; - } } } -.node-diff-node-props .node-diff-node-entry-cell:first-child { +.red-ui-diff-list-node-props .red-ui-diff-list-node-cell:first-child { padding: 6px 0px; - span:not(.node-diff-chevron) { + span:not(.red-ui-diff-list-chevron) { margin-left: 5px; } } -.node-diff-property-cell { - // vertical-align: top; - // display:inline-block; - // - // box-sizing: border-box; - // padding: 1px 5px; - //min-height: 30px; - - &.node-diff-node-changed { - background: #fff2e1 !important; +.red-ui-diff-list-cell { + .red-ui-debug-msg-row:hover { + background: none; } - &.node-diff-node-conflict { - background: #ffdad4 !important; + &.red-ui-diff-status-changed { + background: $diff-state-changed-background; + } + &.red-ui-diff-status-conflict { + background: $diff-state-conflict-background; } } -.node-diff-selectbox { +label.red-ui-diff-selectbox { position: absolute; top:0; right:0; bottom:0; width: 35px; text-align: center; - border-left: 1px solid #eee; + border-left: 1px solid $secondary-border-color; margin:0; - input { + input[type="radio"] { margin-top: 8px; } &:hover { - background: #f3f3f3; + background: $secondary-background-hover; } } -.node-diff-node-entry-conflict.node-diff-select-remote { - .node-diff-node-remote { - background: #e7ffe3; +.red-ui-diff-list-node-conflict.red-ui-diff-select-remote { + .red-ui-diff-list-node-remote { + background: $diff-state-added-background; label { - border-left-color: #b8daad; + border-left-color: $diff-state-added-border; } } - .node-diff-node-local { - background: #ffe1e1; + .red-ui-diff-list-node-local { + background: $diff-state-deleted-background; label { - border-left-color: #e4bcbc; + border-left-color: $diff-state-deleted-border; } } } -.node-diff-node-entry-conflict.node-diff-select-local { - .node-diff-node-local { - background: #e7ffe3; +.red-ui-diff-list-node-conflict.red-ui-diff-select-local { + .red-ui-diff-list-node-local { + background: $diff-state-added-background; label { - border-left-color: #b8daad; + border-left-color: $diff-state-added-border; } } - .node-diff-node-remote { - background: #ffe1e1; + .red-ui-diff-list-node-remote { + background: $diff-state-deleted-background; label { - border-left-color: #e4bcbc; + border-left-color: $diff-state-deleted-border; } } } -ul.node-dialog-configm-deploy-list { +ul.red-ui-deploy-dialog-confirm-list { font-size: 0.9em; width: 400px; margin: 10px auto; text-align: left; } -.node-dialog-confirm-conflict-row { +.red-ui-deploy-dialog-confirm-conflict-row { img { vertical-align:middle; height: 30px; @@ -532,6 +499,12 @@ ul.node-dialog-configm-deploy-list { font-size: 30px; width: 30px; margin-right: 10px; + &.fa-check { + color: $text-color-green; + } + &.fa-exclamation { + color: $secondary-text-color; + } } div { vertical-align: middle; @@ -540,21 +513,21 @@ ul.node-dialog-configm-deploy-list { } } -#node-diff-toolbar-resolved-conflicts .node-diff-status { +#red-ui-diff-dialog-toolbar-resolved-conflicts .red-ui-diff-status { margin:0; } -.node-diff-text-diff-button { +.red-ui-diff-text-diff-button { float: right; margin: 2px 3px; line-height: 14px; height: 16px; } -.node-text-diff { +.red-ui-diff-text { height: 100%; overflow-y:auto; - table.node-text-diff-content { + table.red-ui-diff-text-content { margin: 10px; border: 1px solid $secondary-border-color; border-radius: 3px; @@ -565,99 +538,100 @@ ul.node-dialog-configm-deploy-list { word-wrap: break-word; } td.lineno { - font-family: monospace; + font-family: $monospace-font; text-align: right; - color: #999; - background: #f6f6f6; + color: $tertiary-text-color; + background: $tertiary-background; padding: 1px 5px; &.added { - background: #c0f6c0; + background: $diff-state-added-header-background; } &.removed { - background: #ffcccc; + background: $diff-state-deleted-header-background; } } td.lineno:nth-child(3) { border-left: 1px solid $secondary-border-color; } td.linetext { - font-family: monospace; + font-family: $monospace-font; white-space: pre-wrap; padding: 1px 5px; - border-left: 1px solid #ccc; + border-left: 1px solid $tertiary-border-color; span.prefix { width: 30px; display: inline-block; text-align: center; - color: #999; + color: $secondary-text-color; } &.added { - border-left-color: #aaeeaa + border-left-color: $diff-state-added-header-border; } &.removed { - border-left-color: #eebbbb + border-left-color: $diff-state-deleted-header-border; } } td.blank { - background: #f6f6f6; + background: $tertiary-background; } td.added { - background: #eefaee; + background: $diff-state-added-background; } td.removed { - background: #ffecec; + background: $diff-state-deleted-background; } tr.mergeHeader td { - color: #800080; - background: #e5f9ff; + color: $diff-merge-header-color; + background: $diff-merge-header-background; height: 26px; vertical-align: middle; } tr.mergeHeader-separator td { - color: #800080; - background: darken(#e5f9ff, 10%); + color: $diff-merge-header-color; + background: $diff-merge-header-border-color; height: 0px; } tr.mergeHeader-ours td { - border-top: 2px solid darken(#e5f9ff, 10%); + border-top: 2px solid $diff-merge-header-border-color; } tr.mergeHeader-theirs td { - border-bottom: 2px solid darken(#e5f9ff, 10%); + border-bottom: 2px solid $diff-merge-header-border-color; } td.unchanged { - color: #999; + background: $diff-state-unchanged-background; + color: $diff-state-unchanged; } tr.unchanged { - background: #fefefe; + background: $diff-state-unchanged-background; } tr.start-block { - border-top: 1px solid #f0f0f0; + border-top: 1px solid $secondary-border-color; } tr.end-block { - border-bottom: 1px solid #f0f0f0; + border-bottom: 1px solid $secondary-border-color; } - tr.node-text-diff-file-header td { + tr.red-ui-diff-text-file-header td { .filename { - font-family: monospace; + font-family: $monospace-font; } - background: #f3f3f3; + background: $primary-background; padding: 5px 10px 5px 0; - color: #333; + color: $primary-text-color; cursor: pointer; - i.node-diff-chevron { + i.red-ui-diff-list-chevron { width: 30px; } } - tr.node-text-diff-file-header.collapsed { - td i.node-diff-chevron { + tr.red-ui-diff-text-file-header.collapsed { + td i.red-ui-diff-list-chevron { transform: rotate(-90deg); } } - tr.node-text-diff-commit-header td { - background: #f3f3f3; + tr.red-ui-diff-text-commit-header td { + background: $primary-background; padding: 5px 10px; - color: #333; + color: $primary-text-color; h3 { font-size: 1.4em; margin: 0; @@ -665,7 +639,7 @@ ul.node-dialog-configm-deploy-list { .commit-summary { border-top: 1px solid $secondary-border-color; padding-top: 5px; - color: #999; + color: $secondary-text-color; } .commit-body { margin-bottom:15px; @@ -674,21 +648,21 @@ ul.node-dialog-configm-deploy-list { } } - tr.node-text-diff-header > td:not(.flow-diff) { - font-family: monospace; + tr.red-ui-diff-text-header > td:not(.red-ui-diff-flow-diff) { + font-family: $monospace-font; padding: 5px 10px; text-align: left; - color: #666; - background: #ffd; + color: $secondary-text-color; + background: $diff-text-header-background; height: 30px; vertical-align: middle; - border-top: 1px solid #f0f0f0; - border-bottom: 1px solid #f0f0f0; + border-top: 1px solid $secondary-border-color; + border-bottom: 1px solid $secondary-border-color; } - tr.node-text-diff-expand td { + tr.red-ui-diff-text-expand td { cursor: pointer; &:hover { - background: #ffc; + background: $diff-text-header-background; } } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/dragdrop.scss b/packages/node_modules/@node-red/editor-client/src/sass/dragdrop.scss index 7f3191682..1476cf890 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/dragdrop.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/dragdrop.scss @@ -14,24 +14,26 @@ * limitations under the License. **/ -#dropTarget { +#red-ui-drop-target { position: absolute; top: 0; bottom: 0; left: 0; right: 0; - background: rgba(0,0,0,0.1); + background: $dnd-background; display:table; width: 100%; height: 100%; display: none; z-index:100; -} -#dropTarget div { - display: table-cell; - vertical-align: middle; - text-align: center; - font-size: 40px; - color: #fff; -} -#dropTarget div i { - font-size: 80px; + div { + pointer-events: none; + display: table-cell; + vertical-align: middle; + text-align: center; + font-size: 40px; + color: $dnd-color; + i { + pointer-events: none; + font-size: 80px; + } + } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss b/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss index 06fc8e6e4..658094571 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/dropdownMenu.scss @@ -14,80 +14,164 @@ * limitations under the License. **/ +.red-ui-menu-dropdown { + font-family: $primary-font; + font-size: $primary-font-size; + position: absolute; + top: 100%; + width: 200px; + left: 0; + z-index: 1000; + display: none; + float: left; + margin: 2px 0 0; + margin-left: 0px !important; + padding: 5px 0; + list-style: none; + background: $menuBackground; + border: 1px solid $secondary-border-color; + box-shadow: 0 5px 10px $shadow; + + &.pull-right { + right: 0; + left: auto; + } + + .red-ui-menu-divider { + height: 1px; + margin: 9px 1px; + overflow: hidden; + background-color: $menuDivider; + } + & > li > a, + & > li > a:focus { + display: block; + padding: 4px 0 4px 32px; + clear: both; + font-weight: normal; + line-height: 20px; + color: $menuColor; + white-space: normal !important; + outline: none; + } + + & > .active > a, + & > .active > a:hover, + & > .active > a:focus { + color: $menuActiveColor; + text-decoration: none; + background-color: $menuActiveBackground; + outline: 0; + } + + & > .disabled > a, + & > .disabled > a:hover, + & > .disabled > a:focus { + color: $menuDisabledColor; + } + + & > .disabled > a:hover, + & > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; + } + + a { + img { + max-width: 14px; + } + .fa { + width: 20px; + margin-left: -25px; + margin-top: 3px; + text-align: center; + } + .fa-check-square { + display: none; + } + .fa-square { + display: inline-block; + } + &.active { + .fa-check-square { + display: inline-block; + } + .fa-square { + display: none; + } + } + } -.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a { - background: #999; } -.dropdown-menu { - background: #f3f3f3; - border-color: $secondary-border-color; - &>li>a { - color: #444; +.pull-right > .red-ui-menu-dropdown { + right: 0; + left: auto; +} + + +.red-ui-menu-dropdown > li > a:hover, +.red-ui-menu-dropdown > li > a:focus, +.red-ui-menu-dropdown-submenu:hover > a, +.red-ui-menu-dropdown-submenu:focus > a { + color: $menuHoverColor; + text-decoration: none; + background-color: $menuHoverBackground; +} + +.red-ui-menu-dropdown-submenu { + position: relative; + & > .red-ui-menu-dropdown { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + } + &:hover > .red-ui-menu-dropdown { + display: block; + } + & > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: $menuCaret; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; + } + &.pull-left { + float: none; + & > .red-ui-menu-dropdown { + left: -100%; + margin-left: 10px; + } } } - -.dropdown-menu * .fa-check-square { - display: none; - color: #e0e0e0; - margin-left: -25px; - margin-top: 3px; -} -.dropdown-menu * a.active > .fa-check-square { - display: inline-block; -} -.dropdown-menu * .fa-square { - display: inline-block; - color: #e0e0e0; - margin-left: -25px; - margin-top: 3px; -} -.dropdown-menu * a.active > .fa-square { +.red-ui-menu-dropdown-submenu>a:after { display: none; } - - -.dropdown-menu>li.disabled>a:hover>[class^="icon-"] { - background-image: url("vendor/bootstrap/img/glyphicons-halflings.png") !important; -} -/** Fix for unreachable dropdown menu **/ -.dropdown-menu { - border-radius: 0; - width: 200px !important; - margin-left: 0px !important; -} -.dropdown-menu > li > a > i { - width: 10px; - text-align: center; - margin-left: -8px; -} -.dropdown-menu > li > a { - padding-left: 38px ; - text-indent: -8px ; - white-space: normal !important; -} - -.dropdown-submenu>a:after { - display: none; -} -.dropdown-submenu>a:before { +.red-ui-menu-dropdown-submenu>a:before { display: block; float: left; width: 0; height: 0; margin-top: 5px; margin-left: -30px; + /* Caret Arrow */ border-color: transparent; - border-right-color: #e0e0e0; + border-right-color: $menuCaret; border-style: solid; border-width: 5px 5px 5px 0; content: " "; } -.dropdown-submenu.disabled > a:before { - border-right-color: #444; -} -.dropdown-submenu.pull-left>.dropdown-menu { - border-radius: 0; +.red-ui-menu-dropdown-submenu.disabled > a:before { + border-right-color: $menuCaret; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss index 2d39cc108..b13941f22 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss @@ -15,7 +15,7 @@ **/ -#editor-stack { +#red-ui-editor-stack { position: absolute; margin: 0; top: 0; @@ -24,7 +24,7 @@ width: 0; z-index: 5; } -.editor-tray { +.red-ui-tray { position:absolute; margin: 0; top: 0; @@ -32,37 +32,37 @@ width: auto; right: -1000px; bottom: 0; - background: #fff; + background: $secondary-background; border-left: 1px solid $secondary-border-color; border-bottom: 1px solid $primary-border-color; box-sizing: content-box; } -.editor-tray.open { +.red-ui-tray.open { right: 0; } -.editor-tray-body-wrapper { +.red-ui-tray-body-wrapper { width: 100%; box-sizing: border-box; overflow: auto; } -.editor-tray-body { +.red-ui-tray-body { position: relative; box-sizing: border-box; padding: 0.1px; // prevent margin collapsing - .dialog-form,#dialog-form, #node-config-dialog-edit-form { - margin: 20px; - height: calc(100% - 40px); - } + // .dialog-form,#dialog-form, #node-config-dialog-edit-form { + // margin: 20px; + // height: calc(100% - 40px); + // } } -.editor-tray-content { +.red-ui-tray-content { overflow: auto; position: relative; - .palette_icon_fa { + .red-ui-palette-icon-fa { top: 6px; left: 4px; } } -.editor-tray-header { +.red-ui-tray-header { @include disable-selection; position: relative; box-sizing: border-box; @@ -76,19 +76,34 @@ } } -.editor-tray-footer { +.red-ui-tray-footer { @include component-footer; height: 35px; + font-size: 14px !important; + line-height: 35px; + vertical-align: middle; - button { - @include editor-button; - padding: 3px 7px; - font-size: 11px; + button.red-ui-button { + padding: 0px 8px; + height: 26px; + line-height: 26px; + &.toggle:not(.selected) { + color: $workspace-button-color-selected !important; + background: $workspace-button-background-active; + } } + .red-ui-tray-footer-left { + display:inline-block; + margin-right: 20px; + float:left; + } + .red-ui-tray-footer-right { + float: right; + } } -.editor-tray-toolbar { +.red-ui-tray-toolbar { text-align: right; padding: 6px; @@ -100,11 +115,12 @@ } } -.editor-tray-titlebar { +.red-ui-tray-titlebar { + color: $header-text-color; border-bottom: 1px solid $secondary-border-color; padding: 8px; } -.editor-tray-breadcrumbs { +.red-ui-editor ul.red-ui-tray-breadcrumbs { list-style-type: none; margin: 0; padding:0; @@ -115,7 +131,7 @@ margin:0; &:not(:last-child) { - color: $editor-button-color; + color: $workspace-button-color; font-weight: normal; &:after { @@ -127,23 +143,24 @@ } } } -.editor-tray-resize-handle { +.red-ui-tray-resize-handle { position: absolute; top: 0px; bottom: 0px; width: 7px; left: -9px; - background: $background-color url(images/grip.png) no-repeat 50% 50%; + background: $primary-background url(images/grip.png) no-repeat 50% 50%; cursor: col-resize; border-left: 1px solid $primary-border-color; - box-shadow: -1px 0 6px rgba(0,0,0,0.1); + box-shadow: -1px 0 6px $shadow; - &.editor-tray-resize-maximised { - background: $background-color; + &.red-ui-tray-resize-maximised { + background: $primary-background; cursor: default; } } -.editor-tray-resize-button { +a.red-ui-tray-resize-button, +button.red-ui-tray-resize-button { @include workspace-button; display: block; height: 37px; @@ -151,66 +168,67 @@ border: none; border-bottom: 1px solid $secondary-border-color; margin: 0; - background: $background-color; + background: $primary-background; color: $workspace-button-color; } -#palette-shade, #editor-shade, #header-shade, #sidebar-shade { - @include shade; - z-index: 2; -} -#sidebar-shade { - left: -8px; - top: -1px; - bottom: -1px; -} -#full-shade { - @include shade; - z-index: 15; + +.red-ui-editor .red-ui-tray { + .dialog-form, #dialog-form, #node-config-dialog-edit-form { + margin: 20px; + height: calc(100% - 40px); + } } -.dialog-form,#dialog-form, #node-config-dialog-edit-form { - height: 100%; -} +.red-ui-editor,.red-ui-editor-dialog { -.input-error { - border-color: rgb(214, 97, 95) !important; -} + .dialog-form, #dialog-form, #node-config-dialog-edit-form { + margin: 0; + height:100%; + } -.form-row { - clear: both; - color: $form-text-color; - margin-bottom:12px; -} -.form-row label { - display: inline-block; - width: 100px; -} -.form-row input, .form-row div[contenteditable="true"] { - width:70%; -} + .input-error { + border-color: $form-input-border-error-color !important; + } -.form-tips { - background: #ffe; - padding: 8px; - border-radius: 2px; - border: 1px solid $secondary-border-color; - max-width: 450px; -} -.form-tips code { - border: none; - padding: auto; -} -.form-tips a { - text-decoration: underline; -} + .input-updated { + border-color: $node-selected-color !important; + } -.form-warning { - border-color: #d6615f; + .form-row { + clear: both; + color: $form-text-color; + margin-bottom:12px; + } + .form-row label { + display: inline-block; + width: 100px; + } + .form-row input, .form-row div[contenteditable="true"] { + width:70%; + } + .form-tips { + background: $form-tips-background; + padding: 8px; + border-radius: 2px; + border: 1px solid $secondary-border-color; + max-width: 450px; + } + .form-tips code { + border: none; + padding: auto; + } + .form-tips a { + text-decoration: underline; + } + + .form-warning { + border-color: $text-color-warning; + } } .node-text-editor { position: relative; - .node-text-editor-help { + .red-ui-editor-text-help { position: absolute; bottom: 0px; right: 1px; @@ -220,20 +238,24 @@ border-right: none; } } -.node-text-editor-container { - border:1px solid #ccc; +.red-ui-editor-text-container { + border:1px solid $tertiary-border-color; border-radius:5px; overflow: hidden; - font-size: 14px !important; - font-family: Menlo, Consolas, 'DejaVu Sans Mono', Courier, monospace !important; + font-size: $primary-font-size !important; + font-family: $monospace-font !important; height: 100%; - &.node-text-editor-container-toolbar { + &.red-ui-editor-text-container-toolbar { height: calc(100% - 40px); } } -.editor-button { +a.editor-button, // Deprecated: use .red-ui-button +button.editor-button, // Deprecated: use .red-ui-button +a.red-ui-button, +button.red-ui-button + { @include workspace-button; height: 34px; line-height: 32px; @@ -248,7 +270,11 @@ } -.editor-button-small { +a.editor-button-small, // Deprecated: use .red-ui-button-small +button.editor-button-small, // Deprecated: use .red-ui-button-small +a.red-ui-button-small, +button.red-ui-button-small +{ height: 20px; min-width: 20px; line-height: 18px; @@ -257,34 +283,21 @@ padding: 0 5px; } -#node-config-dialog-scope-container { - cursor: auto; - float: right; - font-size: 12px !important; - line-height: 35px; -} -#node-config-dialog-scope-warning { +#red-ui-editor-config-scope-warning { display: inline-block; margin-right: 5px; - color: #AD1625; + color: $text-color-warning; vertical-align: middle; } -#node-config-dialog-scope { +#red-ui-editor-config-scope { margin: 1px 0 0 0; padding: 0; height: 22px; width: 200px; } -#node-config-dialog-user-count { - vertical-align: middle; - display:inline-block; - margin-right: 20px; - float:left; - font-size: 12px; - line-height: 35px; -} -.node-input-expression-editor #dialog-form { + +.red-ui-editor .red-ui-tray .red-ui-editor-type-expression #dialog-form { margin: 0; height: 100%; .red-ui-panel { @@ -296,12 +309,12 @@ } } } -.node-input-expression-tab-content { +.red-ui-editor-type-expression-tab-content { position: relative; padding: 0 20px; } -#node-input-expression-help { +#red-ui-editor-type-expression-help { position: absolute; top: 35px; left:0; @@ -311,7 +324,7 @@ overflow: auto; box-sizing: border-box; } -#node-input-expression-panel-info { +#red-ui-editor-type-expression-panel-info { & > .form-row { margin: 0; & > div:first-child { @@ -319,47 +332,38 @@ } } } -.node-input-expression-legacy, .node-input-buffer-type { - font-size: 0.8em; +.red-ui-editor-type-expression-legacy { float: left; - cursor: pointer; - border: 1px solid white; - padding: 2px 5px; - border-radius: 2px; - &:hover { - border-color: $form-input-border-color; - } } -.node-input-buffer-type { - float: none; +.red-ui-editor-type-buffer-type { text-align: right; } -.node-input-markdown-editor #dialog-form { +.red-ui-editor .red-ui-tray .red-ui-editor-type-markdown-editor #dialog-form { margin: 0; height: 100%; .red-ui-panel { padding: 20px 20px 10px; &:last-child { padding-top: 60px; - background: #f9f9f9; + background: $primary-background; } } } -.node-input-markdown-panel-preview { +.red-ui-editor-type-markdown-panel-preview { padding: 10px; - border:1px solid #ccc; + border:1px solid $secondary-border-color; border-radius:5px; height: calc(100% - 21px); overflow-y: scroll; - background: #fff; + background: $secondary-background; } -#clipboard-hidden { +#red-ui-clipboard-hidden { position: absolute; top: -3000px; } -.node-label-form-row { +.form-row .red-ui-editor-node-label-form-row { margin: 5px 0 0 50px; label { margin-right: 20px; @@ -372,50 +376,42 @@ input { width: calc(100% - 100px); } - #node-settings-icon-module { + #red-ui-editor-node-icon-module { width: calc(55% - 50px); } - #node-settings-icon-file { + #red-ui-editor-node-icon-file { width: calc(45% - 55px); margin-left: 5px; } } -.node-label-form-none { +.red-ui-editor-node-label-form-none { span { padding-left: 50px; width: 100px; - color: #999; + color: $secondary-text-color; } } -.ace_read-only { - background: #eee !important; - .ace_cursor { - color: transparent !important; - } - -} -#node-settings-icon-button { +button.red-ui-button.red-ui-editor-node-appearance-button { position: relative; - padding-left: 30px; - width: calc(100% - 150px); + height: 35px !important; + text-align: left; + padding: 0 6px 0 3px; + >i { + width: 15px; + vertical-align: middle; + padding-left: 2px; + } .red-ui-search-result-node { - position: absolute; - top: 2px; - left: 2px; + vertical-align: middle; + float: none; + position: relative; + top: -1px; + } } -#node-settings-icon { - margin-left: 10px; - width: calc(100% - 163px); -} + .red-ui-icon-picker { - position: absolute; - border: 1px solid $primary-border-color; - box-shadow: 0 1px 6px -3px black; - background: white; - z-Index: 21; - display: none; select { box-sizing: border-box; margin: 3px; @@ -427,6 +423,16 @@ height: 200px; overflow-y: scroll; line-height: 0px; + position: relative; + &.red-ui-icon-list-dark { + .red-ui-palette-icon-fa { + color: $secondary-text-color; + } + .red-ui-palette-icon-container { + background: $secondary-background; + border-radius: 4px; + } + } } .red-ui-icon-list-icon { display: inline-block; @@ -434,16 +440,17 @@ padding: 4px; cursor: pointer; border-radius: 4px; + &:hover { - background: lighten($node-selected-color,20%); + background: $list-item-background-hover; } &.selected { - background: lighten($node-selected-color,20%); + background: $list-item-background-selected; .red-ui-search-result-node { - border-color: white; + // border-color: white; } } - .palette_icon_fa { + .red-ui-palette-icon-fa { top: 6px; left: 3px; } @@ -452,7 +459,7 @@ background: $palette-header-background; font-size: 0.9em; padding: 3px; - color: #666; + color: $secondary-text-color; clear: both; i { margin-right: 5px; @@ -460,9 +467,11 @@ } .red-ui-icon-meta { border-top: 1px solid $secondary-border-color; + background: $tertiary-background; + height: 24px; span { padding: 4px; - color: #666; + color: $secondary-text-color; font-size: 0.9em; } button { @@ -470,3 +479,520 @@ margin: 2px; } } + + +.red-ui-editor input.red-ui-editor-type-json-editor-key { + width: 150px; +} + +.red-ui-editor-type-json-editor { + height: calc(100% - 10px); + .red-ui-treeList-container { + background: $secondary-background; + } + .red-ui-treeList-label { + padding-top: 0; + padding-bottom: 0; + white-space: nowrap; + min-height: 35px; + .red-ui-treeList-icon:before { + content:''; + display: inline-block; + height: 35px; + vertical-align: middle; + } + > span, > span > span { + vertical-align: middle; + } + &:hover, &:hover .red-ui-treeList-sublabel-text { + background: $secondary-background-disabled; + .red-ui-editor-type-json-editor-item-gutter { + > span, > button { + display: inline-block; + } + } + } + &.selected { + .red-ui-editor-type-json-editor-item-gutter { + background: $secondary-background-hover; + } + &:hover { + .red-ui-editor-type-json-editor-item-gutter { + background: $secondary-background-selected; + } + } + } + &.red-ui-editor-type-json-root-node { + .red-ui-editor-type-json-editor-item-gutter { + > span, > button { + display: inline-block; + } + } + } + } +} +.red-ui-editor-type-json-editor-controls { + height: 34px; + line-height: 34px; + display: none; +} +.red-ui-editor-type-json-editor-key { + width: 100px; +} +.red-ui-editor-type-json-editor-label { + display: inline-block; + white-space: pre-wrap; +} +.red-ui-editor-type-json-editor-label-value { + min-width: 200px; +} +.red-ui-editor-type-json-editor-label-value, +.red-ui-editor-type-json-editor-label-key { + display: inline-block; + box-sizing: border-box; + min-height: 34px; + line-height: 30px; + padding: 0 2px; + border: 2px solid rgba(0,0,0,0); + border-radius: 3px; + &:not(.red-ui-editor-type-json-editor-label-array-key):hover { + border-color: $list-item-background-hover; + border-style: dashed; + } +} +.red-ui-editor-type-json-editor-item-gutter { + width: 48px; + padding-left: 4px; + + height: 100%; + line-height: 35px; + color: $tertiary-text-color; + background: $secondary-background-disabled; + > span { + display: inline-block; + height: 35px; + line-height: 35px; + width: 20px; + text-align:center; + } + > span, > button { + display: none; + } +} + + +.red-ui-editor-type-json-editor-item-handle { + cursor: move; +} +.red-ui-editor-type-json-tab-content { + position: relative; + height: calc(100% - 40px); +} + +button.red-ui-toggleButton.toggle { + text-align: left; +} + + +.red-ui-editor-subflow-env-ui-row { + margin-right: 3px; + >div { + display: grid; + grid-template-columns: 16px 40px 35% auto; + } + >div:first-child { + font-size: 0.9em; + color: $tertiary-text-color; + margin: 3px 0 -4px; + >div { + padding-left: 3px; + } + } + >div:last-child { + >div { + height: 40px; + line-height: 30px; + display: inline-block; + box-sizing: border-box; + // border-left: 2px dashed $secondary-border-color; + // border-bottom: 2px dashed $secondary-border-color; + // border: 1px dashed $secondary-border-color; + border-right: none; + &:not(:first-child) { + padding: 3px; + } + // &:last-child { + // border-right: 1px dashed $secondary-border-color; + // } + .placeholder-input { + position: relative; + padding: 0 3px; + line-height: 24px; + opacity: 0.8 + } + .red-ui-typedInput-value-label,.red-ui-typedInput-option-label { + select,.placeholder-input { + margin: 3px; + height: 26px; + width: calc(100% - 10px); + padding-left: 3px; + } + .placeholder-input { + span:first-child { + display:inline-block; + height: 100%; + width: 20px; + text-align:center; + border-right: 1px solid $secondary-border-color; + background: $tertiary-background; + } + } + input[type="checkbox"] { + margin-left: 8px; + margin-top: 0; + height: 100%; + } + } + } + >div:nth-child(1) { + border: none; + padding: 2px; + .red-ui-editableList-item-handle { + position:relative; + top: 0px; + color: $tertiary-text-color; + } + } + >div:nth-child(2) { + margin: 4px; + height: 32px; + border: 1px dashed $secondary-border-color; + text-align: center; + a { + display: block; + width: 100%; + height: 100%; + line-height: 32px; + &:hover { + background: $secondary-background-hover; + } + i { + height: 100%; + vertical-align: middle; + } + } + } + >div:nth-child(3) { + position: relative; + input { + width: 100%; + } + } + } +} + +span.red-ui-editor-subflow-env-lang-icon { + position: absolute; + display: inline-block; + background: $secondary-background; + opacity: 0.8; + width: 20px; + line-height: 32px; + height: 32px; + text-align: center; + top: 4px; + right: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + +} +// .red-ui-editor-subflow-ui-grid { +// width: 100%; +// .red-ui-editableList-container { +// border: none; +// border-radius: 0; +// } +// .red-ui-editableList-container li { +// border: none; +// padding: 0; +// &:not(:first-child) .red-ui-editableList-item-content >div:first-child >div { +// border-top: none; +// } +// &.ui-sortable-helper { +// border: 2px dashed $secondary-border-color; +// .red-ui-editableList-item-content { +// >div { +// border: none; +// opacity: 0.7 +// } +// +// } +// } +// } +// +// .red-ui-editableList-item-content { +// >div>div { +// display: inline-block; +// box-sizing: border-box; +// border-left: 1px dashed $secondary-border-color; +// border-bottom: 1px dashed $secondary-border-color; +// } +// >div:first-child { +// font-size: 0.9em; +// display: grid; +// grid-template-columns: 25px auto 20px; +// >div { +// border-top: 1px dashed $secondary-border-color; +// padding: 1px; +// } +// >div:nth-child(3) { +// border-top: none; +// border-bottom: none; +// // width: 20px; +// } +// } +// >div:last-child { +// display: grid; +// grid-template-columns: 25px 140px auto 20px; +// >div { +// height: 48px; +// line-height: 30px; +// // display: inline-block; +// // height: 48px; +// // line-height: 30px; +// // box-sizing: border-box; +// // +// // border-left: 2px dashed $secondary-border-color; +// border-top: none; +// // border-bottom: 2px dashed $secondary-border-color; +// &:not(:first-child) { +// padding: 6px 3px; +// } +// .placeholder-input { +// position: relative; +// padding: 0 3px; +// line-height: 24px; +// opacity: 0.8 +// } +// .red-ui-typedInput-value-label,.red-ui-typedInput-option-label { +// select,.placeholder-input { +// margin: 3px; +// height: 26px; +// width: calc(100% - 10px); +// padding-left: 3px; +// } +// input[type="checkbox"] { +// margin-left: 8px; +// margin-top: 0; +// height: 100%; +// } +// } +// } +// >div:nth-child(1) { +// text-align: center; +// a { +// display: block; +// width: 100%; +// height: 100%; +// line-height: 45px; +// &:hover { +// background: $secondary-background-hover; +// } +// } +// } +// >div:nth-child(2) { +// input { +// width: 100%; +// } +// // width: 140px; +// } +// >div:nth-child(3) { +// position: relative; +// .options-button { +// position: absolute; +// top: calc(50% - 10px); +// margin-right: 2px; +// right: 2px; +// } +// } +// >div:nth-child(4) { +// border-top: none; +// border-bottom: none; +// // width: 20px; +// } +// +// } +// } +// } +.red-ui-editor-subflow-ui-edit-panel { + padding-bottom: 3px; + background: $primary-background; + .red-ui-editableList-border { + border: none; + border-radius: 0; + border-bottom: 1px solid $secondary-border-color; + } + .red-ui-editableList-container { + } + .red-ui-editableList-addButton { + margin-left: 2px; + } + .red-ui-editableList-header { + background: $primary-background; + display: grid; + grid-template-columns: 50% 50%; + color: $secondary-text-color; + div:first-child { + padding-left: 23px; + } + div:last-child { + padding-left: 3px; + } + } + .red-ui-editableList-container { + padding: 0 1px; + li { + background: $secondary-background; + // border-bottom: none; + padding: 0; + .red-ui-editableList-item-content { + display: grid; + grid-template-columns: 50% 50%; + >div { + position:relative; + + } + } + input { + margin-bottom: 0; + border:none; + width: 100%; + border-right: 1px solid $secondary-border-color; + + border-radius: 0; + &:focus { + box-shadow: 0 0 0 1px inset $form-input-focus-color; + } + &:first-child { + border-left: 1px solid $secondary-border-color; + } + } + button.red-ui-typedInput-type-select, button.red-ui-typedInput-option-expand, button.red-ui-typedInput-option-trigger { + border-radius: 0; + height: 34px; + } + .red-ui-typedInput-container { + border-radius: 0; + border: none; + input.red-ui-typedInput-input { + height: 34px; + border-right: none; + } + } + + .red-ui-editor-subflow-env-lang-icon { + top: 1px; + right: 1px; + border-top-right-radius:0; + border-bottom-right-radius:0; + } + .red-ui-editableList-item-remove { + right: 3px; + } + } + } +} + +.node-input-env-locales-row { + position: relative; + top: -20px; + float: right; + select { + padding: 2px; + width: 160px; + height: auto; + min-width: 20px; + line-height: 18px; + font-size: 10px; + } +} +.node-input-env-container-row { + min-width: 470px; + position: relative; + .red-ui-editableList-item-content { + label { + margin-bottom: 0; + line-height: 32px; + span { + display: inline-block; + width: 20px; + text-align: center; + } + } + >div:first-child { + display: grid; + padding-left: 5px; + grid-template-columns: 40% auto 37px; + > :first-child { + width: calc(100% - 5px); + } + input { + width: calc(100% - 5px); + } + } + &.red-ui-editor-subflow-env-editable { + >div:first-child { + padding-left: 0; + grid-template-columns: 24px 40% auto 37px; + > a:first-child { + text-align: center; + line-height: 32px; + i.fa-angle-right { + transition: all 0.2s linear; + } + &.expanded { + i.fa-angle-right { + transform: rotate(90deg); + } + } + } + + } + } + } + .red-ui-editableList-border .red-ui-editableList-header { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + + background: $tertiary-background; + padding: 0; + >div { + display: grid; + grid-template-columns: 24px 40% auto 37px; + >div { + display: inline-block; + } + } + } + .red-ui-editableList-container { + padding: 0; + .red-ui-editableList-item-handle { + top: 25px; + } + .red-ui-editableList-item-remove { + top: 25px; + right: 5px; + } + } +} +#subflow-input-ui { + // .form-row { + // display: grid; + // grid-template-columns: 120px auto; + // label span { + // display: inline-block; + // width: 20px; + // text-align: center; + // } + // } +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/flow.scss b/packages/node_modules/@node-red/editor-client/src/sass/flow.scss index 26e7443df..4aae0869c 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/flow.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/flow.scss @@ -14,63 +14,32 @@ * limitations under the License. **/ -.hidden { - display: none; -} - -.lasso { +.nr-ui-view-lasso { stroke-width: 1px; - stroke: #ff7f0e; - fill: rgba(20,125,255,0.1); + stroke: $view-lasso-stroke; + fill: $view-lasso-fill; stroke-dasharray: 10 5; } -.group-box { - stroke-width: 1px; - stroke: #aaaaaa; - fill: rgba(208, 211, 238, 0.1); - stroke-dasharray: 3 3; -} -.group-box-active { - fill: #fff; - stroke: #ff7f0e; -} - -.group_label { - stroke-width: 0; - fill: #999; - font-size: 11px; - pointer-events: none; - -webkit-touch-callout: none; - @include disable-selection; -} - -.pull-right { - margin-left: 20px; -} - -.node_label_italic { +.node_label_italic, // deprecated: use red-ui-flow-node-label-italic +.red-ui-flow-node-label-italic { font-style: italic; } -.node_label_unknown { - font-style: italic; - fill: #e00 !important; +.red-ui-flow-node-label-white { + fill: $view-background !important; } -.node_label_white { - fill: #eee !important; -} -.node_label { +.red-ui-flow-node-label { stroke-width: 0; - fill: #333; + fill: $node-label-color; font-size: 14px; pointer-events: none; -webkit-touch-callout: none; @include disable-selection; } -.port_label { +.red-ui-flow-port-label { stroke-width: 0; - fill: #888; + fill: $secondary-text-color; font-size: 16px; alignment-baseline: middle; text-anchor: middle; @@ -80,234 +49,250 @@ } -.function_label { - font-size: 12px; -} -.node { - stroke: #999; +.red-ui-flow-node { + stroke: $node-border; cursor: move; stroke-width: 1; } -.node_unknown { - stroke-dasharray:10,4; - stroke: #f33; +.red-ui-workspace-select-mode { + g.red-ui-flow-node.red-ui-flow-node-hovered * { + cursor: pointer !important + } + g.red-ui-flow-node, g.red-ui-flow-link { + opacity: 0.5; + } + g.red-ui-flow-node.red-ui-flow-node-hovered:not(.red-ui-flow-node-selected) { + opacity: 0.9; + .red-ui-flow-node { + stroke-width: 2; + stroke: $node-selected-color !important; + stroke-dasharray: 10, 4; + } + } } -.node_placeholder { + +.red-ui-flow-node-unknown { stroke-dasharray:10,4; - stroke: #aaa; - fill: #eee; + stroke: $node-border-unknown; +} +.red-ui-flow-node-placeholder { + stroke-dasharray:10,4; + stroke: $node-border-placeholder; + fill: $node-background-placeholder; opacity: 0.5; stroke-width: 2; } - -.tool_arrow { - stroke-width: 1; - stroke: #999; - fill: #999; - cursor: pointer; +.red-ui-flow-node-icon-group { + .fa-lg { + stroke: none; + fill: $node-icon-color; + text-anchor: middle; + font-family: FontAwesome; + } } -.node_tools { - fill: #ddd; - stroke: #999; - cursor: move; - stroke-width: 1; - cursor: pointer; +.red-ui-flow-node-icon-shade { + stroke: none; + fill: $node-icon-background-color-fill; + fill-opacity: $node-icon-background-color-opacity; } -.node_tools_hovered { - stroke: #ff7f0e; - fill: #eee; +.red-ui-flow-node-icon-shade-border { + stroke-opacity: $node-icon-border-color-opacity; + stroke: $node-icon-border-color; + stroke-width: 1; } -.node_button { +.red-ui-flow-node-button { fill: inherit; - } -.port { - stroke: #999; +.red-ui-flow-node-button-background { + fill: $node-background-placeholder; +} + +.red-ui-flow-port { + stroke: $node-border; stroke-width: 1; - fill: #ddd; + fill: $node-port-background; cursor: crosshair; } -.port_highlight { - stroke: #6DA332; - stroke-width: 3; - fill: #fff; - pointer-events:none; - fill-opacity: 0.5; +.red-ui-flow-node-error { + fill: $node-status-error-background; + stroke: $node-status-error-border; + stroke-width:1px; + cursor: default; + stroke-linejoin: round; + stroke-linecap: round; +} +.red-ui-flow-node-changed { + fill: $node-status-changed-background; + stroke: $node-status-changed-border; + cursor: default; + stroke-width:1px; + stroke-linejoin: round; + stroke-linecap: round; } -.node_error { - stroke: #ff0000; - stroke-width: 2; - fill: #ff7f0e; +g.red-ui-flow-node-selected { + .red-ui-workspace-select-mode & { + opacity: 1; + } + .red-ui-flow-node,.red-ui-flow-subflow-port { + stroke-width: 2; + stroke: $node-selected-color !important; + } } - -.node_badge { - stroke: rgb(93, 114, 145); - stroke-width: 1; - fill: rgb(190, 209, 255); -} -.node_badge_label { - stroke-width:0; - fill: #fff; - font-size: 11px; - pointer-events: none; - -webkit-touch-callout: none; - @include disable-selection; - -} -.node_invalid { - stroke: #ff0000; -} -.node_selected { - stroke-width: 2; - stroke: $node-selected-color !important; -} -.node_highlighted { - border-color: #dd1616 !important; +.red-ui-flow-node-highlighted { + border-color: $node-selected-color !important; border-style: dashed !important; - stroke: #dd1616; + stroke: $node-selected-color; stroke-width: 2; - stroke-dasharray: 10, 4; -} -.node_hovered { + stroke-dasharray: 8, 3; } -.node_subflow .node { - stroke-dasharray:8, 3; +.red-ui-flow-subflow .red-ui-flow-node { } -.workspace-disabled { - .link_line { - stroke-dasharray: 10,5 !important; + +.red-ui-workspace-disabled { + .red-ui-flow-node { + stroke-dasharray: 8, 3; + fill-opacity: 0.5; + } + .red-ui-flow-link-line { + stroke-dasharray: 10,8 !important; stroke-width: 2 !important; - stroke: $link-subflow-color; + stroke: $link-disabled-color; } - .node { - stroke-dasharray: 10,4; + .red-ui-flow-port { + fill-opacity: 1; + stroke-dasharray: none; + } +} +.red-ui-flow-node-disabled { + &.red-ui-flow-node, .red-ui-flow-node { + stroke-dasharray: 8, 3; + fill-opacity: 0.5; + } + &.red-ui-flow-link-line { + stroke-dasharray: 10,8 !important; + stroke-width: 2 !important; + stroke: $link-disabled-color; + } + .red-ui-flow-port { + fill-opacity: 1; + stroke-dasharray: none; + } +} +@each $current-color in red green yellow blue grey { + .red-ui-flow-node-status-dot-#{$current-color} { + fill: map-get($node-status-colors,$current-color); + stroke: map-get($node-status-colors,$current-color); + } + .red-ui-flow-node-status-ring-#{$current-color} { + fill: $view-background; + stroke: map-get($node-status-colors,$current-color); } } -.node_quickadd * { - stroke-dasharray: 12,3; -} - -.node_status_label { +.red-ui-flow-node-status-label { @include disable-selection; stroke-width: 0; - fill: #888; + fill: $secondary-text-color; font-size:9pt; - stroke:#000; text-anchor:start; } -.port_hovered { - stroke: $port-selected-color !important; - fill: $port-selected-color !important; -} - -.port_quick_link { +.red-ui-flow-port-hovered { stroke: $port-selected-color; fill: $port-selected-color; } - -.subflowport { - stroke-dasharray: 5,5; - fill: #eee; - stroke: #999; +.red-ui-flow-subflow-port { + fill: $node-background-placeholder; + stroke: $node-border; } -.drag_line { +.red-ui-flow-drag-line { stroke: $node-selected-color !important; stroke-width: 3; fill: none; pointer-events: none; } -.drag_line_hidden { - stroke: $node-selected-color; - stroke-width: 0; - pointer-events: none; - fill: none; -} - -.link_line { +.red-ui-flow-link-line { stroke: $link-color; stroke-width: 3; fill: none; pointer-events: none; } -.link_link { +.red-ui-flow-link-link { stroke-width: 2; - stroke-dasharray: 10,5; stroke: $link-link-color; fill: none; - stroke-dasharray: 15,2; - // pointer-events: none; + stroke-dasharray: 25,4; } -.link_port { - fill: #eee; - stroke: $link-link-color; - stroke-width: 1; -} -.link_group_active .link_port { - stroke: $link-link-active-color; -} -.link_group:hover { - cursor: pointer; -} -.link_subflow { - stroke: $link-subflow-color; - stroke-dasharray: 10,5; +.red-ui-flow-link-off-flow { stroke-width: 2; } -.link_outline { - stroke: #fff; +.red-ui-flow-link-port { + fill: $node-link-port-background; + stroke: $link-link-color; + stroke-width: 1; +} +.red-ui-flow-link-group-active .red-ui-flow-link-port { + stroke: $link-link-active-color; +} +.red-ui-flow-link-group:hover { + cursor: pointer; +} + +.red-ui-flow-link-outline { + stroke: $view-background; stroke-width: 5; cursor: crosshair; fill: none; pointer-events: none; } -.link_background { - stroke: #fff; +.red-ui-flow-link-background { + stroke: $view-background; opacity: 0; stroke-width: 20; cursor: crosshair; fill: none; } -.link_splice > .link_line { +.red-ui-flow-link-splice > .red-ui-flow-link-line { stroke-dasharray: 15,8; } -g.link_selected path.link_line { +g.red-ui-flow-link-selected path.red-ui-flow-link-line { stroke: $node-selected-color; } -g.link_unknown path.link_line { +g.red-ui-flow-link-unknown path.red-ui-flow-link-line { stroke: $link-unknown-color; stroke-width: 2; stroke-dasharray: 10, 4; } -@keyframes port_tooltip_fadeIn { from { opacity:0; } to { opacity:1; } } +@keyframes red-ui-flow-port-tooltip-fadeIn { from { opacity:0; } to { opacity:1; } } -.port_tooltip { +.red-ui-flow-port-tooltip { opacity:0; - animation: 0.1s ease-in 0s 1 normal forwards port_tooltip_fadeIn; + animation: 0.1s ease-in 0s 1 normal forwards red-ui-flow-port-tooltip-fadeIn; pointer-events: none; - path { + path:first-child { fill: $popover-background; stroke: $popover-background; stroke-width: 1; } } -.port_tooltip_label { +.red-ui-flow-port-tooltip-label { stroke-width: 0; fill: $popover-color; + font-family: $primary-font; font-size: 12px; pointer-events: none; -webkit-touch-callout: none; + white-space: pre; @include disable-selection; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/forms.scss b/packages/node_modules/@node-red/editor-client/src/sass/forms.scss index 092bc7f6f..8b08d8996 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/forms.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/forms.scss @@ -1,1094 +1,735 @@ /** - * 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. - **/ +* 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. +**/ /*! - * Extracted from Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ - -button, -input, -select, -div[contenteditable="true"], -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} - -button, -div[contenteditable="true"], -input { - *overflow: visible; - line-height: normal; -} - -button::-moz-focus-inner, -div[contenteditable="true"]::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -label, -select, -button, -input[type="button"], -input[type="reset"], -input[type="submit"], -input[type="radio"], -input[type="checkbox"] { - cursor: pointer; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -form { - margin: 0 0 20px; -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: 40px; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -legend small { - font-size: 15px; - color: #999999; -} - - -label, -input, -div[contenteditable="true"], -button, -select, -textarea { - font-size: 14px; - font-weight: normal; - line-height: 20px; -} - -input, -div[contenteditable="true"], -button, -select, -textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -label { - display: block; - margin-bottom: 5px; -} - -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -div[contenteditable="true"], -.uneditable-input { - box-sizing: border-box; - display: inline-block; - height: 34px; - padding: 6px 6px; - margin-bottom: 10px; - font-size: 14px; - line-height: 20px; - color: #555555; - vertical-align: middle; - border-radius: 4px; -} - -input, -textarea, -div[contenteditable="true"], -.uneditable-input { - width: 206px; -} - -textarea { - height: auto; -} - -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -div[contenteditable="true"], -.uneditable-input { - background-color: #ffffff; - border: 1px solid $form-input-border-color; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -div[contenteditable="true"]:focus, -.uneditable-input:focus { - border-color: $form-input-focus-color; - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - // -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - // -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - // box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - *margin-top: 0; - line-height: normal; -} - -input[type="file"], -input[type="image"], -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { - width: auto; -} - -select, -input[type="file"] { - height: 34px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 34px; -} - -select { - width: 220px; - background-color: #ffffff; - border: 1px solid $form-input-border-color; -} - -select[multiple], -select[size] { - height: auto; -} - -select:focus, -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 2px auto $form-input-focus-color; - outline-offset: -3px; -} - -.uneditable-input, -.uneditable-textarea { - color: #999999; - cursor: not-allowed; - background-color: #fcfcfc; - border-color: #cccccc; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -} - -.uneditable-input { - overflow: hidden; - white-space: nowrap; -} - -.uneditable-textarea { - width: auto; - height: auto; -} - -input:-moz-placeholder, -textarea:-moz-placeholder { - color: $form-placeholder-color; -} - -input:-ms-input-placeholder, -div[contenteditable="true"]:-ms-input-placeholder, -textarea:-ms-input-placeholder { - color: $form-placeholder-color; -} - -input::-webkit-input-placeholder, -div[contenteditable="true"]::-webkit-input-placeholder, -textarea::-webkit-input-placeholder { - color: $form-placeholder-color; -} - -.radio, -.checkbox { - min-height: 20px; - padding-left: 20px; -} - -.radio input[type="radio"], -.checkbox input[type="checkbox"] { - float: left; - margin-left: -20px; -} - -.controls > .radio:first-child, -.controls > .checkbox:first-child { - padding-top: 5px; -} - -.radio.inline, -.checkbox.inline { - display: inline-block; - padding-top: 5px; - margin-bottom: 0; - vertical-align: middle; -} - -.radio.inline + .radio.inline, -.checkbox.inline + .checkbox.inline { - margin-left: 10px; -} - -.input-mini { - width: 60px; -} - -.input-small { - width: 90px; -} - -.input-medium { - width: 150px; -} - -.input-large { - width: 210px; -} - -.input-xlarge { - width: 270px; -} - -.input-xxlarge { - width: 530px; -} - -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"] { - float: none; - margin-left: 0; -} - -.input-append input[class*="span"], -.input-append .uneditable-input[class*="span"], -.input-prepend input[class*="span"], -.input-prepend .uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"], -.row-fluid .input-prepend [class*="span"], -.row-fluid .input-append [class*="span"] { - display: inline-block; -} - -input, -textarea, -div[contenteditable="true"], -.uneditable-input { - margin-left: 0; -} - -.controls-row [class*="span"] + [class*="span"] { - margin-left: 20px; -} - -input.span12, -textarea.span12, -.uneditable-input.span12 { - width: 926px; -} - -input.span11, -textarea.span11, -.uneditable-input.span11 { - width: 846px; -} - -input.span10, -textarea.span10, -.uneditable-input.span10 { - width: 766px; -} - -input.span9, -textarea.span9, -.uneditable-input.span9 { - width: 686px; -} - -input.span8, -textarea.span8, -.uneditable-input.span8 { - width: 606px; -} - -input.span7, -textarea.span7, -.uneditable-input.span7 { - width: 526px; -} - -input.span6, -textarea.span6, -.uneditable-input.span6 { - width: 446px; -} - -input.span5, -textarea.span5, -.uneditable-input.span5 { - width: 366px; -} - -input.span4, -textarea.span4, -.uneditable-input.span4 { - width: 286px; -} - -input.span3, -textarea.span3, -.uneditable-input.span3 { - width: 206px; -} - -input.span2, -textarea.span2, -.uneditable-input.span2 { - width: 126px; -} - -input.span1, -textarea.span1, -.uneditable-input.span1 { - width: 46px; -} - -.controls-row { - *zoom: 1; -} - -.controls-row:before, -.controls-row:after { - display: table; - line-height: 0; - content: ""; -} - -.controls-row:after { - clear: both; -} - -.controls-row [class*="span"], -.row-fluid .controls-row [class*="span"] { - float: left; -} - -.controls-row .checkbox[class*="span"], -.controls-row .radio[class*="span"] { - padding-top: 5px; -} - -label.disabled { - color: #bbb !important; - cursor: default; -} - -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: #eeeeee; -} - -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; -} - -.control-group.warning .control-label, -.control-group.warning .help-block, -.control-group.warning .help-inline { - color: #c09853; -} - -.control-group.warning .checkbox, -.control-group.warning .radio, -.control-group.warning input, -.control-group.warning div[contenteditable="true"], -.control-group.warning select, -.control-group.warning textarea { - color: #c09853; -} - -.control-group.warning input, -.control-group.warning div[contenteditable="true"], -.control-group.warning select, -.control-group.warning textarea { - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.warning input:focus, -.control-group.warning div[contenteditable="true"]:focus, -.control-group.warning select:focus, -.control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} - -.control-group.warning .input-prepend .add-on, -.control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} - -.control-group.error .control-label, -.control-group.error .help-block, -.control-group.error .help-inline { - color: #b94a48; -} - -.control-group.error .checkbox, -.control-group.error .radio, -.control-group.error input, -.control-group.error div[contenteditable="true"], -.control-group.error select, -.control-group.error textarea { - color: #b94a48; -} - -.control-group.error input, -.control-group.error div[contenteditable="true"], -.control-group.error select, -.control-group.error textarea { - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.error input:focus, -.control-group.error div[contenteditable="true"]:focus, -.control-group.error select:focus, -.control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} - -.control-group.error .input-prepend .add-on, -.control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} - -.control-group.success .control-label, -.control-group.success .help-block, -.control-group.success .help-inline { - color: #468847; -} - -.control-group.success .checkbox, -.control-group.success .radio, -.control-group.success input, -.control-group.success div[contenteditable="true"], -.control-group.success select, -.control-group.success textarea { - color: #468847; -} - -.control-group.success input, -.control-group.success div[contenteditable="true"], -.control-group.success select, -.control-group.success textarea { - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.success input:focus, -.control-group.success div[contenteditable="true"]:focus, -.control-group.success select:focus, -.control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} - -.control-group.success .input-prepend .add-on, -.control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} - -.control-group.info .control-label, -.control-group.info .help-block, -.control-group.info .help-inline { - color: #3a87ad; -} - -.control-group.info .checkbox, -.control-group.info .radio, -.control-group.info input, -.control-group.info div[contenteditable="true"], -.control-group.info select, -.control-group.info textarea { - color: #3a87ad; -} - -.control-group.info input, -.control-group.info div[contenteditable="true"], -.control-group.info select, -.control-group.info textarea { - border-color: #3a87ad; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.info input:focus, -.control-group.info div[contenteditable="true"]:focus, -.control-group.info select:focus, -.control-group.info textarea:focus { - border-color: #2d6987; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -} - -.control-group.info .input-prepend .add-on, -.control-group.info .input-append .add-on { - color: #3a87ad; - background-color: #d9edf7; - border-color: #3a87ad; -} - -input:focus:invalid, -div[contenteditable="true"]:focus:invalid, -textarea:focus:invalid, -select:focus:invalid { - color: #b94a48; - border-color: #ee5f5b; -} - -input:focus:invalid:focus, -div[contenteditable="true"]:focus:invalid:focus, -textarea:focus:invalid:focus, -select:focus:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} - -.form-actions { - padding: 19px 20px 20px; - margin-top: 20px; - margin-bottom: 20px; - background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; - *zoom: 1; -} - -.form-actions:before, -.form-actions:after { - display: table; - line-height: 0; - content: ""; -} - -.form-actions:after { - clear: both; -} - -.help-block, -.help-inline { - color: #595959; -} - -.help-block { - display: block; - margin-bottom: 10px; -} - -.help-inline { - display: inline-block; - *display: inline; - padding-left: 5px; - vertical-align: middle; - *zoom: 1; -} - -.input-append, -.input-prepend { - display: inline-block; - margin-bottom: 10px; - font-size: 0; - white-space: nowrap; - vertical-align: middle; -} - -.input-append input, -.input-prepend input, -.input-append div[contenteditable="true"], -.input-prepend div[contenteditable="true"], -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input, -.input-append .dropdown-menu, -.input-prepend .dropdown-menu, -.input-append .popover, -.input-prepend .popover { - font-size: 14px; -} - -.input-append input, -.input-prepend input, -.input-append div[contenteditable="true"], -.input-prepend div[contenteditable="true"], -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input { - position: relative; - margin-bottom: 0; - *margin-left: 0; - vertical-align: top; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append input:focus, -.input-prepend input:focus, -.input-append div[contenteditable="true"]:focus, -.input-prepend div[contenteditable="true"]:focus, -.input-append select:focus, -.input-prepend select:focus, -.input-append .uneditable-input:focus, -.input-prepend .uneditable-input:focus { - z-index: 2; -} - -.input-append .add-on, -.input-prepend .add-on { - display: inline-block; - width: auto; - height: 20px; - min-width: 16px; - padding: 4px 5px; - font-size: 14px; - font-weight: normal; - line-height: 20px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #eeeeee; - border: 1px solid #ccc; -} - -.input-append .add-on, -.input-prepend .add-on, -.input-append .btn, -.input-prepend .btn, -.input-append .btn-group > .dropdown-toggle, -.input-prepend .btn-group > .dropdown-toggle { - vertical-align: top; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-append .active, -.input-prepend .active { - background-color: #a9dba9; - border-color: #46a546; -} - -.input-prepend .add-on, -.input-prepend .btn { - margin-right: -1px; -} - -.input-prepend .add-on:first-child, -.input-prepend .btn:first-child { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input, -.input-append div[contenteditable="true"], -.input-append select, -.input-append .uneditable-input { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input + .btn-group .btn:last-child, -.input-append select + .btn-group .btn:last-child, -.input-append .uneditable-input + .btn-group .btn:last-child { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append .add-on, -.input-append .btn, -.input-append .btn-group { - margin-left: -1px; -} - -.input-append .add-on:last-child, -.input-append .btn:last-child, -.input-append .btn-group:last-child > .dropdown-toggle { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append input, -.input-prepend.input-append div[contenteditable="true"], -.input-prepend.input-append select, -.input-prepend.input-append .uneditable-input { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-prepend.input-append input + .btn-group .btn, -.input-prepend.input-append select + .btn-group .btn, -.input-prepend.input-append .uneditable-input + .btn-group .btn { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .add-on:first-child, -.input-prepend.input-append .btn:first-child { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-prepend.input-append .add-on:last-child, -.input-prepend.input-append .btn:last-child { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .btn-group:first-child { - margin-left: 0; -} - -input.search-query { - padding-right: 14px; - padding-right: 4px \9; - padding-left: 14px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -/* Allow for input prepend/append in search forms */ - -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.form-search .input-append .search-query { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search .input-append .btn { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .search-query { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .btn { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search div[contenteditable="true"], -.form-inline div[contenteditable="true"], -.form-horizontal div[contenteditable="true"], -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input, -.form-search .input-prepend, -.form-inline .input-prepend, -.form-horizontal .input-prepend, -.form-search .input-append, -.form-inline .input-append, -.form-horizontal .input-append { - display: inline-block; - *display: inline; - margin-bottom: 0; - vertical-align: middle; - *zoom: 1; -} - -.form-search .hide, -.form-inline .hide, -.form-horizontal .hide { - display: none; -} - -.form-search label, -.form-inline label, -.form-search .btn-group, -.form-inline .btn-group { - display: inline-block; -} - -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - margin-bottom: 0; -} - -.form-search .radio, -.form-search .checkbox, -.form-inline .radio, -.form-inline .checkbox { - padding-left: 0; - margin-bottom: 0; - vertical-align: middle; -} - -.form-search .radio input[type="radio"], -.form-search .checkbox input[type="checkbox"], -.form-inline .radio input[type="radio"], -.form-inline .checkbox input[type="checkbox"] { - float: left; - margin-right: 3px; - margin-left: 0; -} - -.control-group { - margin-bottom: 10px; -} - -legend + .control-group { - margin-top: 20px; - -webkit-margin-top-collapse: separate; -} - -.form-horizontal .control-group { - margin-bottom: 20px; - *zoom: 1; -} - -.form-horizontal .control-group:before, -.form-horizontal .control-group:after { - display: table; - line-height: 0; - content: ""; -} - -.form-horizontal .control-group:after { - clear: both; -} - -.form-horizontal .control-label { - float: left; - width: 160px; - padding-top: 5px; - text-align: right; -} - -.form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; - margin-left: 180px; - *margin-left: 0; -} - -.form-horizontal .controls:first-child { - *padding-left: 180px; -} - -.form-horizontal .help-block { - margin-bottom: 0; -} - -.form-horizontal input + .help-block, -.form-horizontal select + .help-block, -.form-horizontal textarea + .help-block, -.form-horizontal .uneditable-input + .help-block, -.form-horizontal .input-prepend + .help-block, -.form-horizontal .input-append + .help-block { - margin-top: 10px; -} - -.form-horizontal .form-actions { - padding-left: 180px; -} - -.form-row div[contenteditable="true"] { - white-space: nowrap; - overflow: hidden; +* Extracted from Bootstrap v2.3.2 +* +* Copyright 2013 Twitter, Inc +* Licensed under the Apache License v2.0 +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Designed and built with all the love in the world by @mdo and @fat. +*/ + +.red-ui-editor, .red-ui-editor-dialog { + + button, + input, + select, + div[contenteditable="true"], + textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; + } + + button, + div[contenteditable="true"], + input { + *overflow: visible; + line-height: normal; + } + + button::-moz-focus-inner, + div[contenteditable="true"]::-moz-focus-inner, + input::-moz-focus-inner { + padding: 0; + border: 0; + } + + button, + html input[type="button"], + input[type="reset"], + input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; + } + + label, + select, + button, + input[type="button"], + input[type="reset"], + input[type="submit"], + input[type="radio"], + input[type="checkbox"] { + cursor: pointer; + } + + input[type="search"] { + box-sizing: content-box; + } + + input[type="search"]::-webkit-search-decoration, + input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; + } + + textarea { + overflow: auto; + vertical-align: top; + } + + form { + margin: 0 0 20px; + } + + fieldset { + padding: 0; + margin: 0; + border: 0; + } + + legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: $tertiary-text-color; + border: 0; + border-bottom: 1px solid $secondary-border-color; + } + + legend small { + color: $tertiary-text-color; + } + + + label, + input, + div[contenteditable="true"], + button, + select, + textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; + } + + input, + div[contenteditable="true"], + button, + select, + textarea { + font-family: $primary-font; + } + + label { + display: block; + margin-bottom: 5px; + } + + select, + textarea, + input[type="text"], + input[type="password"], + input[type="datetime"], + input[type="datetime-local"], + input[type="date"], + input[type="month"], + input[type="time"], + input[type="week"], + input[type="number"], + input[type="email"], + input[type="url"], + input[type="search"], + input[type="tel"], + input[type="color"], + div[contenteditable="true"], + .uneditable-input, + .placeholder-input { + box-sizing: border-box; + display: inline-block; + height: 34px; + padding: 6px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: $form-text-color; + vertical-align: middle; + border-radius: 4px; + } + + input, + textarea, + div[contenteditable="true"], + .uneditable-input { + width: 206px; + } + + textarea { + height: auto; + } + + textarea, + input[type="text"], + input[type="password"], + input[type="datetime"], + input[type="datetime-local"], + input[type="date"], + input[type="month"], + input[type="time"], + input[type="week"], + input[type="number"], + input[type="email"], + input[type="url"], + input[type="search"], + input[type="tel"], + input[type="color"], + div[contenteditable="true"], + .uneditable-input, + .placeholder-input { + background-color: $form-input-background; + border: 1px solid $form-input-border-color; + } + + textarea:focus, + input[type="text"]:focus, + input[type="password"]:focus, + input[type="datetime"]:focus, + input[type="datetime-local"]:focus, + input[type="date"]:focus, + input[type="month"]:focus, + input[type="time"]:focus, + input[type="week"]:focus, + input[type="number"]:focus, + input[type="email"]:focus, + input[type="url"]:focus, + input[type="search"]:focus, + input[type="tel"]:focus, + input[type="color"]:focus, + div[contenteditable="true"]:focus, + .uneditable-input:focus { + border-color: $form-input-focus-color; + outline: 0; + outline: thin dotted \9; + } + + input[type="radio"], + input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; + } + + input[type="file"], + input[type="image"], + input[type="submit"], + input[type="reset"], + input[type="button"], + input[type="radio"], + input[type="checkbox"] { + width: auto; + } + + select, + input[type="file"] { + height: 34px; + line-height: 34px; + } + + select { + width: 220px; + background-color: $form-input-background; + border: 1px solid $form-input-border-color; + } + + select[multiple], + select[size] { + height: auto; + } + + select:focus, + input[type="file"]:focus, + input[type="radio"]:focus, + input[type="checkbox"]:focus { + outline: 2px auto $form-input-focus-color; + outline-offset: -3px; + } + + .uneditable-input, + .uneditable-textarea { + color: $form-text-color-disabled; + cursor: not-allowed; + background-color: $form-input-background-disabled; + border-color: $form-input-border-color; + } + + .uneditable-input { + overflow: hidden; + white-space: nowrap; + } + + .uneditable-textarea { + width: auto; + height: auto; + } + + input:-moz-placeholder, + textarea:-moz-placeholder { + color: $form-placeholder-color; + } + + input:-ms-input-placeholder, + div[contenteditable="true"]:-ms-input-placeholder, + textarea:-ms-input-placeholder { + color: $form-placeholder-color; + } + + input::-webkit-input-placeholder, + div[contenteditable="true"]::-webkit-input-placeholder, + textarea::-webkit-input-placeholder { + color: $form-placeholder-color; + } + + .radio, + .checkbox { + min-height: 20px; + padding-left: 20px; + } + + .radio input[type="radio"], + .checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; + } + + .controls > .radio:first-child, + .controls > .checkbox:first-child { + padding-top: 5px; + } + + .radio.inline, + .checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; + } + + .radio.inline + .radio.inline, + .checkbox.inline + .checkbox.inline { + margin-left: 10px; + } + + .input-mini { + width: 60px; + } + + .input-small { + width: 90px; + } + + .input-medium { + width: 150px; + } + + .input-large { + width: 210px; + } + + .input-xlarge { + width: 270px; + } + + .input-xxlarge { + width: 530px; + } + + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input[class*="span"], + .row-fluid input[class*="span"], + .row-fluid select[class*="span"], + .row-fluid textarea[class*="span"], + .row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; + } + + .input-append input[class*="span"], + .input-append .uneditable-input[class*="span"], + .input-prepend input[class*="span"], + .input-prepend .uneditable-input[class*="span"], + .row-fluid input[class*="span"], + .row-fluid select[class*="span"], + .row-fluid textarea[class*="span"], + .row-fluid .uneditable-input[class*="span"], + .row-fluid .input-prepend [class*="span"], + .row-fluid .input-append [class*="span"] { + display: inline-block; + } + + input, + textarea, + div[contenteditable="true"], + .uneditable-input { + margin-left: 0; + } + + label.disabled { + color: $form-text-color-disabled; + cursor: default; + } + + input[disabled], + select[disabled], + textarea[disabled], + input[readonly], + select[readonly], + textarea[readonly] { + cursor: not-allowed; + background-color: $form-input-background-disabled; + } + + input[type="radio"][disabled], + input[type="checkbox"][disabled], + input[type="radio"][readonly], + input[type="checkbox"][readonly] { + background-color: transparent; + } + + input:invalid, + div[contenteditable="true"]:invalid, + textarea:invalid, + select:invalid { + border-color: $form-input-border-error-color; + } + + input:focus:invalid, + div[contenteditable="true"]:focus:invalid, + textarea:focus:invalid, + select:focus:invalid { + border-color: $form-input-border-error-color; + } + + input:focus:invalid:focus, + div[contenteditable="true"]:focus:invalid:focus, + textarea:focus:invalid:focus, + select:focus:invalid:focus { + border-color: $form-input-border-error-color; + } + + .input-append, + .input-prepend { + display: inline-block; + margin-bottom: 10px; + font-size: 0; + white-space: nowrap; + vertical-align: middle; + } + + .input-append input, + .input-prepend input, + .input-append div[contenteditable="true"], + .input-prepend div[contenteditable="true"], + .input-append select, + .input-prepend select, + .input-append .uneditable-input, + .input-prepend .uneditable-input, + .input-append .red-ui-menu-dropdown, + .input-prepend .red-ui-menu-dropdown, + .input-append .popover, + .input-prepend .popover { + font-size: 14px; + } + + .input-append input, + .input-prepend input, + .input-append div[contenteditable="true"], + .input-prepend div[contenteditable="true"], + .input-append select, + .input-prepend select, + .input-append .uneditable-input, + .input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + border-radius: 0 4px 4px 0; + } + + .input-append input:focus, + .input-prepend input:focus, + .input-append div[contenteditable="true"]:focus, + .input-prepend div[contenteditable="true"]:focus, + .input-append select:focus, + .input-prepend select:focus, + .input-append .uneditable-input:focus, + .input-prepend .uneditable-input:focus { + z-index: 2; + } + + .input-append .add-on, + .input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + background-color: $form-button-background; + border: 1px solid $form-input-border-color; + } + + .input-append .add-on, + .input-prepend .add-on, + .input-append .btn, + .input-prepend .btn, + .input-append .btn-group > .dropdown-toggle, + .input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + border-radius: 0; + } + + .input-prepend .add-on, + .input-prepend .btn { + margin-right: -1px; + } + + .input-prepend .add-on:first-child, + .input-prepend .btn:first-child { + border-radius: 4px 0 0 4px; + } + + .input-append input, + .input-append div[contenteditable="true"], + .input-append select, + .input-append .uneditable-input { + border-radius: 4px 0 0 4px; + } + + .input-append input + .btn-group .btn:last-child, + .input-append select + .btn-group .btn:last-child, + .input-append .uneditable-input + .btn-group .btn:last-child { + border-radius: 0 4px 4px 0; + } + + .input-append .add-on, + .input-append .btn, + .input-append .btn-group { + margin-left: -1px; + } + + .input-append .add-on:last-child, + .input-append .btn:last-child, + .input-append .btn-group:last-child > .dropdown-toggle { + border-radius: 0 4px 4px 0; + } + + .input-prepend.input-append input, + .input-prepend.input-append div[contenteditable="true"], + .input-prepend.input-append select, + .input-prepend.input-append .uneditable-input { + border-radius: 0; + } + + .input-prepend.input-append input + .btn-group .btn, + .input-prepend.input-append select + .btn-group .btn, + .input-prepend.input-append .uneditable-input + .btn-group .btn { + border-radius: 0 4px 4px 0; + } + + .input-prepend.input-append .add-on:first-child, + .input-prepend.input-append .btn:first-child { + margin-right: -1px; + border-radius: 4px 0 0 4px; + } + + .input-prepend.input-append .add-on:last-child, + .input-prepend.input-append .btn:last-child { + margin-left: -1px; + border-radius: 0 4px 4px 0; + } + + .input-prepend.input-append .btn-group:first-child { + margin-left: 0; + } + + input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + border-radius: 15px; + } + + /* Allow for input prepend/append in search forms */ + + .form-search .input-append .search-query, + .form-search .input-prepend .search-query { + border-radius: 0; + } + + .form-search .input-append .search-query { + border-radius: 14px 0 0 14px; + } + + .form-search .input-append .btn { + border-radius: 0 14px 14px 0; + } + + .form-search .input-prepend .search-query { + border-radius: 0 14px 14px 0; + } + + .form-search .input-prepend .btn { + border-radius: 14px 0 0 14px; + } + + .form-search input, + .form-inline input, + .form-horizontal input, + .form-search div[contenteditable="true"], + .form-inline div[contenteditable="true"], + .form-horizontal div[contenteditable="true"], + .form-search textarea, + .form-inline textarea, + .form-horizontal textarea, + .form-search select, + .form-inline select, + .form-horizontal select, + .form-search .help-inline, + .form-inline .help-inline, + .form-horizontal .help-inline, + .form-search .uneditable-input, + .form-inline .uneditable-input, + .form-horizontal .uneditable-input, + .form-search .input-prepend, + .form-inline .input-prepend, + .form-horizontal .input-prepend, + .form-search .input-append, + .form-inline .input-append, + .form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; + } + + .form-search .hide, + .form-inline .hide, + .form-horizontal .hide { + display: none; + } + + .form-search label, + .form-inline label, + .form-search .btn-group, + .form-inline .btn-group { + display: inline-block; + } + + .form-search .input-append, + .form-inline .input-append, + .form-search .input-prepend, + .form-inline .input-prepend { + margin-bottom: 0; + } + + .form-search .radio, + .form-search .checkbox, + .form-inline .radio, + .form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; + } + + .form-search .radio input[type="radio"], + .form-search .checkbox input[type="checkbox"], + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; + } + + .control-group { + margin-bottom: 10px; + } + + legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; + } + + .form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; + } + + .form-horizontal .control-group:before, + .form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; + } + + .form-horizontal .control-group:after { + clear: both; + } + + .form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; + } + + .form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; + } + + .form-horizontal .controls:first-child { + *padding-left: 180px; + } + + .form-horizontal .help-block { + margin-bottom: 0; + } + + .form-horizontal input + .help-block, + .form-horizontal select + .help-block, + .form-horizontal textarea + .help-block, + .form-horizontal .uneditable-input + .help-block, + .form-horizontal .input-prepend + .help-block, + .form-horizontal .input-append + .help-block { + margin-top: 10px; + } + + .form-horizontal .form-actions { + padding-left: 180px; + } + + .form-row div[contenteditable="true"] { + white-space: nowrap; + overflow: hidden; + } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/header.scss b/packages/node_modules/@node-red/editor-client/src/sass/header.scss index e7d2170b0..4093e9bca 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/header.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/header.scss @@ -14,279 +14,268 @@ * limitations under the License. **/ -$activeButton: #121212; +.button { + @include disable-selection; +} -$deployButton: #8C101C; -$deployButtonHover: #6E0A1E; -$deployButtonActive: #4C0A17; - -$deployDisabledButton: #444; -$deployDisabledButtonHover: #555; -$deployDisabledButtonActive: #444; - -$headerMenuBackground: #121212; -$headerMenuItemHover: #323232; -$headerMenuItemDivider: #464646; - -#header { +#red-ui-header { position: absolute; top: 0; left: 0; width: 100%; height: 40px; - background: #000; + background: $header-background; box-sizing: border-box; padding: 0px 0px 0px 20px; - color: #C7C7C7; + color: $header-menu-color; font-size: 14px; -} -span.logo { - float: left; - margin-top: 5px; - font-size: 30px; - line-height: 30px; - text-decoration: none; + span.red-ui-header-logo { + float: left; + margin-top: 5px; + font-size: 30px; + line-height: 30px; + text-decoration: none; + white-space: nowrap; - span { - vertical-align: middle; - font-size: 16px !important; - } - img { - height: 18px; - } - - a { - color: inherit; - &:hover { - text-decoration: none; + span { + vertical-align: middle; + font-size: 16px !important; + &:not(:first-child) { + margin-left: 5px; + } } + img { + height: 18px; + } + + a { + color: inherit; + &:hover { + text-decoration: none; + } + } + } -} - -.header-toolbar { - padding: 0; - margin: 0; - list-style: none; - float: right; - - > li { - display: inline-block; + .red-ui-header-toolbar { padding: 0; margin: 0; - position: relative; + list-style: none; + float: right; - } -} + > li { + display: inline-block; + padding: 0; + margin: 0; + position: relative; -.button { - @include disable-selection; -} - -#header .button { - min-width: 20px; - text-align: center; - line-height: 40px; - display: inline-block; - font-size: 20px; - padding: 0px 12px; - text-decoration: none; - color: #C7C7C7; - margin: auto 5px; - vertical-align: middle; - border-left: 2px solid #000; - border-right: 2px solid #000; - - &:hover { - border-color: $headerMenuItemHover; - } -} - -#header .button-group { - display: inline-block; - margin: auto 15px; - vertical-align: middle; - clear: both; -} -#header .button-group > a { - display: inline-block; - position: relative; - float: left; - line-height: 22px; - font-size: 14px; - text-decoration: none; - padding: 4px 8px; - margin: 0; -} - -.deploy-button { - background: $deployButton; - color: #eee !important; - - &:hover { - background: $deployButtonHover; - } - - &:active { - background: $deployButtonActive; - color: #ccc !important; - } -} - -.deploy-button-spinner { - position: absolute; - left: 0; - top: 0; - right: 0; - bottom: 0; - text-align: center; - - img { - opacity: 0.8; - height: 100%; - } -} - -#btn-deploy { - - padding: 4px 12px; - - &.disabled { - cursor: default; - background: $deployDisabledButton; - color: #999 !important; - - .deploy-button-content>img { - opacity: 0.3; - } - - &+ #btn-deploy-options { - background: $deployDisabledButton; - color: #ddd; - } - &+ #btn-deploy-options:hover { - background: $deployDisabledButtonHover; - } - &+ #btn-deploy-options:active { - background: $deployDisabledButton; } } - .deploy-button-content>img { - margin-right: 8px; + .button { + min-width: 20px; + text-align: center; + line-height: 40px; + display: inline-block; + font-size: 20px; + padding: 0px 12px; + text-decoration: none; + color: $header-menu-color; + margin: auto 5px; + vertical-align: middle; + border-left: 2px solid $header-background; + border-right: 2px solid $header-background; + + &:hover { + border-color: $header-menu-item-hover; + } + &:active, &.active { + background: $header-button-background-active; + } + &:focus { + outline: none; + } + } + + .button-group { + display: inline-block; + margin: auto 15px; + vertical-align: middle; + clear: both; + & > a { + display: inline-block; + position: relative; + float: left; + line-height: 22px; + font-size: 14px; + text-decoration: none; + padding: 4px 8px; + margin: 0; + } + } + + .red-ui-deploy-button { + background: $deploy-button-background; + color: $deploy-button-color; + + &:hover { + background: $deploy-button-background-hover; + } + &:focus { + outline: none; + } + &:active { + background: $deploy-button-background-active; + color: $deploy-button-color-active; + } + } + + .red-ui-deploy-button-spinner { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + text-align: center; + + img { + opacity: 0.8; + height: 100%; + } + } + + #red-ui-header-button-deploy { + padding: 4px 12px; + &.disabled { + cursor: default; + background: $deploy-button-background-disabled; + color: $deploy-button-color-disabled; + + .red-ui-deploy-button-content>img { + opacity: 0.3; + } + &+ #red-ui-header-button-deploy-options { + background: $deploy-button-background-disabled; + color: $deploy-button-color-active; + } + &+ #red-ui-header-button-deploy-options:hover { + background: $deploy-button-background-disabled-hover; + } + &+ #red-ui-header-button-deploy-options:active { + background: $deploy-button-background-disabled; + } + } + + .red-ui-deploy-button-content>img { + margin-right: 8px; + } + } + + .red-ui-deploy-button-group.open { + #red-ui-header-button-deploy-options { + background: $header-button-background-active !important; + } + } + + li.open .button { + background: $header-button-background-active; + border-color: $header-button-background-active; + } + + + ul.red-ui-menu-dropdown { + background: $header-menu-background; + border: 1px solid $header-menu-background; + width: 250px !important; + margin-top: 0; + li a { + color: $header-menu-color; + padding: 3px 40px; + img { + max-width: 100%; + margin-right: 10px; + padding: 4px; + border: 3px solid transparent; + } + + &.active img { + border: 3px solid $header-menu-item-border-active; + } + + span.red-ui-menu-label-container { + width: 180px; + vertical-align: top; + display: inline-block; + text-indent: 0px; + } + span.red-ui-menu-label { + font-size: 14px; + display: inline-block; + text-indent: 0px; + } + span.red-ui-menu-sublabel { + color: $header-menu-sublabel-color; + font-size: 13px; + display: inline-block; + text-indent: 0px; + } + } + > li > a:hover, + > li > a:focus, + > li:hover > a, + > li:focus > a { + background: $header-menu-item-hover !important; + } + li.red-ui-menu-divider { + background: $headerMenuItemDivider; + } + li.disabled a { + color: $header-menu-color-disabled; + } + > li.disabled > a:hover, + > li.disabled > a:focus { + background: none !important; + } + } + .red-ui-menu-dropdown-submenu>a:before { + border-right-color: $headerMenuCaret; + } + + /* Deploy menu customisations */ + ul#red-ui-header-button-deploy-options-submenu { + width: 300px !important; + li a { + padding: 10px 30px; + color: $header-menu-heading-color; + span.red-ui-menu-label { + font-size: 16px; + display: inline-block; + text-indent: 0px; + } + > i.fa { + display: none; + } + } + } + /* User menu customisations */ + #usermenu-item-username > .red-ui-menu-label { + color: $header-menu-heading-color; + } + + #red-ui-header-button-user .user-profile { + background-position: center center; + background-repeat: no-repeat; + background-size: contain; + display: inline-block; + width: 40px; + height: 35px; + vertical-align: middle; } } -.deploy-button-group.open { - #btn-deploy-options { - background: $activeButton !important; +@media only screen and (max-width: 450px) { + span.red-ui-header-logo > span { + display: none; } } - - -#header .button { - &:active, &.active { - background: $activeButton; - } - &:focus { - outline: none; - } -} - -#header li.open .button { - background: $activeButton; - border-color: $activeButton; -} - - -#header ul.dropdown-menu { - background: $headerMenuBackground; - border: 1px solid rgba(0,0,0,0.2); - width: 250px !important; - margin-top: 0; -} - -#header ul.dropdown-menu li a { - color: #C7C7C7; - padding: 3px 40px; -} - -#header ul.dropdown-menu li a img { - margin-right: 10px; - padding: 4px; - border: 3px solid rgba(0,0,0,0); -} - -#header ul.dropdown-menu li a.active img { - border: 3px solid #777677; -} - -#header ul.dropdown-menu li a span.menu-label-container { - width: 180px; - vertical-align: top; - display: inline-block; - text-indent: 0px; -} -#header ul.dropdown-menu li a span.menu-label { - font-size: 14px; - display: inline-block; - text-indent: 0px; -} -#header ul.dropdown-menu li a span.menu-sublabel { - color: #aeaeae; - font-size: 13px; - display: inline-block; - text-indent: 0px; -} - -#header ul.dropdown-menu > li:hover > a, -#header ul.dropdown-menu > li:focus > a { - background: $headerMenuItemHover !important; -} - -#header ul.dropdown-menu li.divider { - background: $headerMenuItemDivider; - border-bottom-color: $headerMenuItemHover; -} -#header ul.dropdown-menu li.disabled a { - color: #666; -} - -#header ul.dropdown-menu > li.disabled:hover > a, -#header ul.dropdown-menu > li.disabled:focus > a { - background: none !important; -} - -/* Deploy menu customisations */ -#header ul#btn-deploy-options-submenu { - width: 300px !important; -} -#header ul#btn-deploy-options-submenu li a span.menu-label { - font-size: 16px; - display: inline-block; - text-indent: 0px; -} -#header ul#btn-deploy-options-submenu li a { - padding: 10px 30px; - color: #fff; -} -#header ul#btn-deploy-options-submenu li a > i.fa { - display: none !important; -} - -/* User menu customisations */ -#header ul#btn-usermenu-submenu li a#btn-username > .menu-label { - font-size: 16px; - color: #fff; -} - -#btn-usermenu .user-profile { - background-position: center center; - background-repeat: no-repeat; - background-size: contain; - display: inline-block; - width: 40px; - height: 35px; - vertical-align: middle; -} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss b/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss index eb2dc6a1d..b5b96162d 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/jquery.scss @@ -16,16 +16,20 @@ .ui-widget { font-size: 14px !important; - font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif !important; + font-family: $primary-font; } .ui-widget input, .ui-widget div[contenteditable="true"], .ui-widget select, .ui-widget textarea, .ui-widget button { font-size: 14px !important; - font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif !important; + font-family: $primary-font; } .ui-widget input, .ui-widget div[contenteditable="true"] { box-shadow: none; } +.ui-widget-header { + color: $header-text-color; +} + /* jQuery Theme overrides */ .ui-tabs .ui-tabs-panel { padding: 0px; @@ -39,7 +43,7 @@ .ui-dialog { border-radius: 1px; - background: #fff; + background: $secondary-background; padding: 0; @include component-shadow; } @@ -51,16 +55,20 @@ } .ui-dialog .ui-dialog-titlebar { padding: 10px; - background: #f3f3f3; + background: $primary-background; border: none; - border-bottom: 1px solid #999; + border-bottom: 1px solid $primary-border-color; border-radius: 0; } +.ui-dialog .ui-dialog-buttonpane.ui-widget-content { + background: $tertiary-background; + +} .ui-corner-all { border-radius: 1px; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { - background: #f3f3f3; + background: $primary-background; } .ui-dialog-no-close .ui-dialog-titlebar-close { display: none; @@ -80,8 +88,8 @@ padding: 6px 14px; margin-right: 8px; border-radius: 2px; - color: $editor-button-color; - background: $editor-button-background; + color: $workspace-button-color; + background: $workspace-button-background; &.leftButton { float: left; @@ -92,18 +100,18 @@ } &.primary { - border-color: $editor-button-background-primary; - color: $editor-button-color-primary !important; - background: $editor-button-background-primary; + border-color: $workspace-button-background-primary; + color: $workspace-button-color-primary !important; + background: $workspace-button-background-primary; &:not(.disabled):hover { - border-color: $editor-button-background-primary-hover; - background: $editor-button-background-primary-hover; - color: $editor-button-color-primary !important; + border-color: $workspace-button-background-primary-hover; + background: $workspace-button-background-primary-hover; + color: $workspace-button-color-primary !important; } &.disabled { border-color: $form-input-border-color; color: $workspace-button-color-disabled !important; - background: $editor-button-background; + background: $workspace-button-background; } } &.disabled { @@ -130,15 +138,12 @@ border: 1px solid $form-input-border-color; } .ui-spinner input { + background: $form-input-background; margin: 0 17px 0 0; padding: 6px; border: none; border-top-right-radius: 0px; border-bottom-right-radius: 0px; - - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); &:focus { outline: none; } @@ -150,3 +155,41 @@ z-index: 100; opacity: 1; } + +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-button, +html .ui-button.ui-state-disabled:hover, +html .ui-button.ui-state-disabled:active { + border: 1px solid $secondary-border-color; + background: $form-button-background; +} + +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus, +.ui-button:hover, .ui-button:focus { + border: 1px solid $secondary-border-color; + background: $workspace-button-background-hover; + color: $workspace-button-color-hover; +} + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + border: 1px solid $secondary-border-color; + background: $workspace-button-background-active; + font-weight: normal; + color: $workspace-button-color-active; +} + +.ui-state-active .ui-icon, .ui-button:active .ui-icon { + background-image: url(../vendor/jquery/css/base/images/ui-icons_777777_256x240.png); +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/keyboard.scss b/packages/node_modules/@node-red/editor-client/src/sass/keyboard.scss index 27eca649f..8c4e5a3a8 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/keyboard.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/keyboard.scss @@ -14,122 +14,113 @@ * limitations under the License. **/ -#keyboard-help-dialog { - font-size: 0.9em; - padding-top: 10px; -} - -#user-settings-tab-keyboard .red-ui-editableList-container { - border-radius: 0; - border: none; - padding: 0; -} - - -.keyboard-shortcut-entry.keyboard-shortcut-list-header { - padding:0 5px 0 5px; - div { - color: #666 !important; - } - .red-ui-searchBox-container { - width: calc(100% - 20px); - } - .keyboard-shortcut-entry-scope { - text-align: center; - } -} - -.keyboard-shortcut-list-header { - border-bottom: 1px solid $primary-border-color; - -} -.keyboard-shortcut-list { - position: absolute; - top:30px; - left:10px; - right:10px; - bottom:10px; - li { +#red-ui-settings-tab-keyboard { + .red-ui-editableList-container { + border-radius: 0; + border: none; padding: 0; - .red-ui-editableList-item-content { - padding: 8px; - cursor: pointer; + } + .keyboard-shortcut-list-header { + padding:0 5px 0 5px; + border-bottom: 1px solid $primary-border-color; + div { + color: $header-text-color !important; + } + .red-ui-searchBox-container { + width: calc(100% - 20px); + } + .keyboard-shortcut-entry-scope { + text-align: center; + } + + } + .keyboard-shortcut-list { + position: absolute; + top:30px; + left:10px; + right:10px; + bottom:10px; + li { + padding: 0; + .red-ui-editableList-item-content { + padding: 8px; + cursor: pointer; + } + } + li:hover { + background: $list-item-background-hover; } } - li:hover { - background: #f6f6f6; - } -} -.keyboard-shortcut-entry { - div { - display: inline-block; - } - // white-space: nowrap; + .keyboard-shortcut-entry { + div { + display: inline-block; + } + // white-space: nowrap; - select { - margin: 0; - width: calc(100% - 30px); - font-size: 0.9em; - margin-right: 5px; + select { + margin: 0; + width: calc(100% - 30px); + font-size: 0.9em; + margin-right: 5px; + } } -} -.keyboard-shortcut-entry-key { - width:160px; - vertical-align: middle; - input { - margin:0; - width: calc(100% - 5px); - } -} -.keyboard-shortcut-entry-text { - vertical-align: middle; - width: calc(100% - 160px - 100px - 10px); - overflow: hidden; - i { - color: #ccc; - margin-right: 5px; - } -} -.keyboard-shortcut-entry-scope { - width:100px; - color: #999; - vertical-align: middle; - text-align: right; -} -.keyboard-shortcut-entry:not(.keyboard-shortcut-list-header) { - .keyboard-shortcut-entry-scope { - font-size: 0.8em; - } -} -.keyboard-shortcut-entry-unassigned { - color: #999; .keyboard-shortcut-entry-key { - font-style: italic; - } -} -.keyboard-shortcut-entry-expanded { - .keyboard-shortcut-entry-key { - width: 150px; + width:160px; + vertical-align: middle; + input { + margin:0; + width: calc(100% - 5px); + } } .keyboard-shortcut-entry-text { + vertical-align: middle; + width: calc(100% - 160px - 100px - 10px); + overflow: hidden; + i { + color: $tertiary-text-color; + margin-right: 5px; + } } .keyboard-shortcut-entry-scope { - width: 110px; + width:100px; + color: $tertiary-text-color; + vertical-align: middle; + text-align: right; } - span { - display: none; + .keyboard-shortcut-entry:not(.keyboard-shortcut-list-header) { + .keyboard-shortcut-entry-scope { + font-size: 0.8em; + } + } + .keyboard-shortcut-entry-unassigned { + color: $tertiary-text-color; + .keyboard-shortcut-entry-key { + font-style: italic; + } + } + .keyboard-shortcut-entry-expanded { + background: $list-item-background-selected; + .keyboard-shortcut-entry-key { + width: 150px; + } + .keyboard-shortcut-entry-text { + } + .keyboard-shortcut-entry-scope { + width: 110px; + } + span { + display: none; + } } -} -.keyboard-shortcut-edit { } .help-key { - border: 1px solid #ddd; + border: 1px solid $tertiary-border-color; padding: 4px; border-radius: 3px; - background: #f6f6f6; - font-family: Courier, monospace; - box-shadow: #999 1px 1px 1px; + background: $tertiary-background; + font-family: $monospace-font; + box-shadow: $shade-color 1px 1px 1px; } .help-key-block { white-space: nowrap; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/library.scss b/packages/node_modules/@node-red/editor-client/src/sass/library.scss index cb0032cd0..60014b2e6 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/library.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/library.scss @@ -14,37 +14,141 @@ * limitations under the License. **/ -#node-select-library { - overflow: hidden; -} -#node-select-library ul { - list-style: none; - padding: 0px; - margin: 2px; -} -#node-select-library li { - cursor: pointer; -} -#node-select-library li.list-selected { - background: #eee; -} -#node-select-library li.list-hover { - background: #ffffd0; -} - -.clipboard-import-error { +.red-ui-clipboard-import-error { pre { margin: 10px 0; border: none; - color: #666; + color: $primary-text-color; span { padding: 5px 0; } span.error { padding: 5px; - background: #e25151; - color: white; + border: 1px solid $form-input-border-error-color; margin: 0 1px; } } } +.red-ui-clipboard-dialog-tab-clipboard { + padding: 10px; + textarea { + resize: none; + width: 100%; + border-radius: 4px; + font-family: $monospace-font !important; + font-size: 13px !important; + height: 300px; + line-height: 1.3em; + padding: 6px 10px; + background: $clipboard-textarea-background; + } +} + +.red-ui-clipboard-dialog-tabs { + position: absolute; + top:0; + left:0; + bottom:0; + width:120px; +} + +.red-ui-clipboard-dialog-tabs-content { + position: absolute; + top: 0; + left: 120px; + right: 0; + bottom: 0; + padding: 0; + background: $form-input-background; + &>div { + height: 100%; + } +} +.red-ui-clipboard-dialog-box { + height: 400px; + position:relative; + border:1px solid $primary-border-color; +} + +.red-ui-clipboard-dialog-tab-library { + .form-row { + margin-left: 10px; + } +} + +#red-ui-clipboard-dialog { + form { + margin-bottom: 0; + } + .form-row:last-child { + margin-bottom: 0; + } +} +#red-ui-clipboard-dialog-tab-library-name { + width: calc(100% - 120px); +} +#red-ui-clipboard-dialog-export-tab-library-browser { + height: calc(100% - 60px); + margin-bottom: 13px; + border-bottom: 1px solid $primary-border-color; + box-sizing: border-box; +} +#red-ui-clipboard-dialog-import-tab-library-browser { + height: 100%; + box-sizing: border-box; +} + + +.red-ui-library-browser { + position: relative; + height: 100%; + .red-ui-treeList-container { + background: $secondary-background; + border: none; + border-radius: 0; + li { + background: none; + } + label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + .red-ui-editableList-border { + border-radius: 0; + } + + .red-ui-treeList-label input.red-ui-treeList-input { + border-radius: 2px; + margin-top: -6px; + margin-bottom: -6px; + } +} + +#red-ui-library-dialog-save-browser { + height: calc(100% - 60px); + border: 1px solid $primary-border-color; + margin-bottom: 10px; +} +#red-ui-library-dialog-load-browser { + // border: 1px solid $primary-border-color; +} +#red-ui-library-dialog-load-panes { + border: 1px solid $primary-border-color; +} + + +#red-ui-library-dialog-load-preview { + height: 100%; +} + +#red-ui-library-dialog-load-preview-text { + box-sizing: border-box; +} +#red-ui-library-dialog-load-preview-details { + box-sizing: border-box; + .red-ui-help-info-row:first-child { + border-top: none; + } +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss b/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss index 8dd0fc3ae..dda9ef384 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/mixins.scss @@ -36,17 +36,10 @@ } -@mixin workspace-button { - @include disable-selection; - box-sizing: border-box; - display: inline-block; +@mixin reset-a-style { color: $workspace-button-color !important; background: $workspace-button-background; - border: 1px solid $form-input-border-color; - text-align: center; - margin:0; text-decoration: none; - cursor:pointer; &.disabled, &:disabled { cursor: default; @@ -67,11 +60,23 @@ background: $workspace-button-background-active; text-decoration: none; } - // &.selected:not(.disabled):not(:disabled) { - // color: $workspace-button-color-selected !important; - // background: $workspace-button-background-active; - // background: #9f9; - // } +} + +@mixin workspace-button { + @include disable-selection; + @include reset-a-style; + + box-sizing: border-box; + display: inline-block; + border: 1px solid $form-input-border-color; + text-align: center; + margin:0; + cursor:pointer; + + &.selected:not(.disabled):not(:disabled) { + color: $workspace-button-color-selected !important; + background: $workspace-button-background-active; + } .button-group &:not(:first-child) { border-left: none; border-top-left-radius: 0; @@ -104,24 +109,24 @@ } &.primary { - border-color: $editor-button-background-primary; - color: $editor-button-color-primary !important; - background: $editor-button-background-primary; + border-color: $workspace-button-background-primary; + color: $workspace-button-color-primary !important; + background: $workspace-button-background-primary; &.disabled, &.ui-state-disabled { background: none; - color: $editor-button-color !important; + color: $workspace-button-color !important; border-color: $form-input-border-color; } &:not(.disabled):not(.ui-button-disabled):hover { - border-color: $editor-button-background-primary-hover; - background: $editor-button-background-primary-hover; - color: $editor-button-color-primary !important; + border-color: $workspace-button-background-primary-hover; + background: $workspace-button-background-primary-hover; + color: $workspace-button-color-primary !important; } } &.secondary { background: none; &:not(:hover) { - border-color: rgba(0,0,0,0); + border-color: transparent; } } @@ -138,32 +143,17 @@ @mixin workspace-button-toggle { @include workspace-button; - - &.single { - color: $workspace-button-color !important; - background: $workspace-button-background; - - &.selected:not(.disabled):not(:disabled) { - color: $workspace-button-toggle-color !important; - background: $workspace-button-background-active; - } - } &:not(.single) { - color: $workspace-button-toggle-color !important; - background:$workspace-button-background-active; margin-bottom: 1px; - &.selected:not(.disabled):not(:disabled) { - color: $workspace-button-toggle-color-selected !important; - background: $workspace-button-background; border-bottom-width: 2px; border-bottom-color: $form-input-border-selected-color; margin-bottom: 0; cursor: default; } - } - &.disabled,&:disabled { - color: $workspace-button-toggle-color-disabled !important; + &:not(.selected) { + margin-top: 1px; + } } } @mixin editor-button { @@ -171,26 +161,8 @@ font-size: 14px; padding: 6px 14px; margin-right: 8px; - color: $editor-button-color !important; - background: $editor-button-background; - - // &.primary { - // border-color: $editor-button-background-primary; - // color: $editor-button-color-primary !important; - // background: $editor-button-background-primary; - // &.disabled, &.ui-state-disabled { - // background: none; - // color: $editor-button-color !important; - // border-color: $form-input-border-color; - // } - // &:not(.disabled):not(.ui-button-disabled):hover { - // border-color: $editor-button-background-primary-hover; - // background: $editor-button-background-primary-hover; - // color: $editor-button-color-primary !important; - // } - // } &:not(.disabled):hover { - //color: $editor-button-color; + //color: $workspace-button-color; } &.disabled { background: none; @@ -198,8 +170,6 @@ &.disabled:focus { outline: none; } - - &.leftButton { float: left; margin-top: 1px; @@ -214,15 +184,15 @@ @mixin component-footer { border-top: 1px solid $primary-border-color; - background: #f3f3f3; + background: $primary-background; text-align: right; position: absolute; bottom: 0; left: 0; right: 0; height: 25px; - line-height: 23px; - padding: 0 10px; + line-height: 25px; + padding: 0 6px; user-select: none; .button-group:not(:last-child) { @@ -233,10 +203,11 @@ @mixin component-footer-button { @include workspace-button; - font-size: 11px; - line-height: 17px; - width: 18px; - height: 18px; + font-size: 12px; + line-height: 18px; + width: 19px; + height: 19px; + padding: 0; &.text-button { width: auto; padding: 0 5px; @@ -244,10 +215,11 @@ } @mixin component-footer-button-toggle { @include workspace-button-toggle; - font-size: 11px; - line-height: 17px; - height: 18px; - width: 18px; + font-size: 12px; + line-height: 18px; + height: 19px; + width: 19px; + padding: 0; &.text-button { width: auto; padding: 0 5px; @@ -255,8 +227,7 @@ } @mixin component-shadow { - border: 1px solid $secondary-border-color; - box-shadow: 1px 1px 4px rgba(0,0,0,0.2); + box-shadow: 1px 1px 4px $shadow; } @@ -269,6 +240,6 @@ background: $shade-color; z-index: 5; } -.component-shade { +.red-ui-shade { @include shade } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss b/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss index 31a9d62ae..f7c64632f 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss @@ -14,7 +14,7 @@ * limitations under the License. **/ -#notifications { +#red-ui-notifications { z-index: 100; width: 500px; margin-left: -250px; @@ -22,45 +22,60 @@ position: absolute; top: 1px; } -.notification { +.red-ui-notification { box-sizing: border-box; position: relative; padding: 14px 18px; margin-bottom: 4px; - box-shadow: 0 1px 1px 1px rgba(0,0,0, 0.15); - background-color: #fff; - color: #666; - border: 1px solid #325C80; + box-shadow: 0 1px 1px 1px $shadow; + background-color: $secondary-background; + color: $primary-text-color; + border: 1px solid $notification-border-default; border-left-width: 16px; overflow: hidden; + .ui-dialog-buttonset { + margin-top: 20px; + } } -.notification p:first-child { +.red-ui-notification p:first-child { font-size: 1.1em; font-weight: 400; } -.notification a { +.red-ui-notification a { text-decoration: none; &:hover { text-decoration: underline; } } -.notification-success { - border-color: #4B8400; +.red-ui-notification-success { + border-color: $notification-border-success; } -.notification-warning { - border-color: #D74108; +.red-ui-notification-warning { + border-color: $notification-border-warning; } -.notification-error { - border-color: #AD1625; +.red-ui-notification-error { + border-color: $notification-border-error; } -.notification-shake-horizontal { - -webkit-animation: notification-shake-horizontal 0.3s steps(2, end) both; - animation: notification-shake-horizontal 0.3s steps(2, end) both; +.red-ui-notification-compact { + p { + margin: 0; + } + .ui-dialog-buttonset { + margin-top: 0; + position: absolute; + top: 8px; + right: 10px; + } } -@-webkit-keyframes notification-shake-horizontal { +.red-ui-notification-shake-horizontal { + -webkit-animation: red-ui-notification-shake-horizontal 0.3s steps(2, end) both; + animation: red-ui-notification-shake-horizontal 0.3s steps(2, end) both; +} + +@-webkit-keyframes red-ui-notification-shake-horizontal { 0%, 100% { -webkit-transform: translateX(0); @@ -88,7 +103,7 @@ // transform: translateX(-1px); // } } -@keyframes notification-shake-horizontal { +@keyframes red-ui-notification-shake-horizontal { 0%, 100% { -webkit-transform: translateX(0); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/palette-editor.scss b/packages/node_modules/@node-red/editor-client/src/sass/palette-editor.scss index b99b732b0..7e167e4a4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/palette-editor.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/palette-editor.scss @@ -14,11 +14,11 @@ * limitations under the License. **/ -#user-settings-tab-palette { +#red-ui-settings-tab-palette { height: 100%; } -#palette-editor { +#red-ui-palette-editor { text-align: left; position: absolute; top: 0px; @@ -27,7 +27,7 @@ left:0; padding: 0; box-sizing:border-box; - background: #fff; + background: $secondary-background; .red-ui-editableList-container { border: none; @@ -39,21 +39,25 @@ // border: none; // border-top: 1px solid $primary-border-color; padding: 0px; - .disabled { - background: #f3f3f3; + .red-ui-button { + min-width: 60px; + } - .palette-module-name { + .disabled { + // background: $secondary-background-inactive;//f3f3f3; + + .red-ui-palette-module-name { font-style: italic; - color: #aaa; + color: $tertiary-text-color; } - .palette-module-version { - color: #aaa; + .red-ui-palette-module-version { + color: $tertiary-text-color; } - .palette-module-errors .fa-warning { + .red-ui-palette-module-errors .fa-warning { opacity: 0.5; } - ul.palette-module-error-list li { - color: #aaa; + ul.red-ui-palette-module-error-list li { + color: $tertiary-text-color; } @@ -67,65 +71,55 @@ } } - .palette-editor-tab { + .red-ui-palette-editor-tab { position:absolute; top:35px; left:0; right:0; bottom:0 } - .palette-editor-toolbar { - background: #f3f3f3; + .red-ui-palette-editor-toolbar { + background: $primary-background; box-sizing: border-box; padding: 8px 10px; border-bottom: 1px solid $primary-border-color; text-align: right; } - .palette-module-shade-status { - color: #666; + .red-ui-palette-module-shade-status { + color: $secondary-text-color; } - .palette-module-updated { + .red-ui-palette-module-updated { margin-left: 10px; } - .palette-module-link { + .red-ui-palette-module-link { margin-left: 5px; } - .palette-module-description { + .red-ui-palette-module-description { margin-left: 20px; font-size: 0.9em; - color: #999; + color: $secondary-text-color; } - .palette-module-link { + .red-ui-palette-module-link { } - .palette-module-set-button-group { + .red-ui-palette-module-set-button-group { } - .palette-module-count { - border-radius: 4px; - background: #eee; - padding: 2px 8px; - font-size: 12px; - } - .palette-module-content { + .red-ui-palette-module-content { display: none; padding: 10px 3px; } - i.fa.palette-module-node-chevron { + i.fa.red-ui-palette-module-node-chevron { width: 8px; margin-right: 0; transform: rotate(0deg); transition: transform 0.2s ease-in-out; } .expanded { - i.fa.palette-module-node-chevron { + i.fa.red-ui-palette-module-node-chevron { transform: rotate(90deg); } - - .palette-module-set-button { - background:#f3f3f3 !important; - } } - .palette-module-set { + .red-ui-palette-module-set { border:1px solid $secondary-border-color; border-radius: 0; padding: 5px; @@ -143,35 +137,35 @@ } } - .palette-module-type { - color: #666; + .red-ui-palette-module-type { + color: $secondary-text-color; padding-left: 5px; font-size: 0.9em; @include enable-selection; } - .palette-module-type-swatch { + .red-ui-palette-module-type-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; - background: #fff; - border: 1px solid #fff; + background: $primary-background; + border: 1px dashed $secondary-border-color; } - .palette-module-set-button-group { + .red-ui-palette-module-set-button-group { position: absolute; right: 4px; top: 4px; } - .palette-module-set-disabled { - background: #eee; - .palette-module-type { - color: #999; + .red-ui-palette-module-set-disabled { + background: $list-item-background-disabled; + .red-ui-palette-module-type { + color: $secondary-text-color-disabled-active; } } - .palette-module-more { + .red-ui-palette-module-more { padding: 0 !important; margin-top: 10px; margin-bottom: 10px; @@ -180,7 +174,7 @@ display: block; text-align: center; padding: 12px 8px; - color: #AD1625; + color: $text-color-warning; &:hover { text-decoration: none; @@ -190,11 +184,11 @@ } } -.palette-module-meta { - color: #666; +.red-ui-palette-module-meta { + color: $secondary-text-color; position: relative; &.disabled { - color: #ccc; + color: $secondary-text-color-disabled; } .fa { @@ -203,23 +197,17 @@ margin-right: 5px; } } -.palette-module-name { +.red-ui-palette-module-name { + color: $primary-text-color; white-space: nowrap; @include enable-selection; } -.palette-module-version, .palette-module-updated, .palette-module-link { +.red-ui-palette-module-version, .red-ui-palette-module-updated, .red-ui-palette-module-link { font-style:italic; font-size: 0.8em; @include enable-selection; } -.palette-module-section { - padding:0 !important; - background: #f9f9f9 !important; - font-size: 0.9em; - color: #666; - -} -.palette-module-button-group { +.red-ui-palette-module-button-group { position: absolute; right: 0; bottom: 0; @@ -227,10 +215,10 @@ margin-left: 5px; } } -.palette-module-meta .fa-warning { - color: #AD1625; +.red-ui-palette-module-meta .fa-warning { + color: $text-color-warning; } -ul.palette-module-error-list { +ul.red-ui-palette-module-error-list { display: inline-block; list-style-type: none; margin: 0; @@ -241,11 +229,11 @@ ul.palette-module-error-list { } } -.palette-module-shade { +.red-ui-palette-module-shade { @include shade; text-align: center; padding-top: 20px; } -#palette-module-install-shade { +#red-ui-palette-module-install-shade { padding-top: 80px; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/palette.scss b/packages/node_modules/@node-red/editor-client/src/sass/palette.scss index 78b2a73ee..ea4b06c52 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/palette.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/palette.scss @@ -15,12 +15,12 @@ **/ -#palette { +#red-ui-palette{ position: absolute; top: 0px; bottom: 0px; left:0px; - background: #f3f3f3; + background: $primary-background; width: 180px; text-align: center; @include disable-selection; @@ -28,30 +28,18 @@ transition: width 0.2s ease-in-out; } -.palette-closed { - #palette { width: 8px; } - #palette-search { display: none; } - #palette-container { display: none; } - #palette-collapse-all { display: none; } - #palette-expand-all { display: none; } -} - -.palette-expanded { - & #palette { - width: 380px; - box-shadow: 1px 0 6px rgba(0,0,0,0.1); +.red-ui-palette-closed { + #red-ui-palette { + width: 8px; + .red-ui-component-footer { + display: none; + } } - & #workspace { left: 379px !important; } - & #palette-collapse-all { display: none; } - & #palette-expand-all { display: none; } - & #palette-container { display: none !important; } - & #palette-search { display: none !important; } - & #palette-edit { background: $workspace-button-background-active } - & #palette-editor { display: block !important } + #red-ui-palette-search { display: none; } + #red-ui-palette-container { display: none; } } - -.palette-scroll { +.red-ui-palette-scroll { position: absolute; top: 35px; right: 0; @@ -61,13 +49,13 @@ overflow-y: auto; box-sizing:border-box; } -#palette > .palette-spinner { +#red-ui-palette> .red-ui-palette-spinner { padding-top: 80px; } -.palette-search { +.red-ui-palette-search { position: relative; overflow: hidden; - background: #ffffff; + background: $secondary-background; text-align: center; height: 35px; padding: 3px; @@ -75,24 +63,18 @@ box-sizing:border-box; } -#palette-footer { - @include component-footer; +.red-ui-palette-category { + border-bottom: 1px solid $secondary-border-color; } -.palette-button { - @include component-footer-button; -} - -.palette-category { - border-bottom: 1px solid #ccc; -} -.palette-content { - background: #fff; +.red-ui-palette-content { + background: $palette-content-background; padding: 3px; } -.palette-header { +.red-ui-palette-header { position: relative; background: $palette-header-background; + color: $palette-header-color; cursor: pointer; text-align: left; padding: 9px; @@ -104,7 +86,7 @@ background: $palette-header-background !important; } } -.palette-header > i { +.red-ui-palette-header > i { position: absolute; left: 11px; top: 12px; @@ -115,15 +97,16 @@ -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); } -.palette-header i.expanded { +.red-ui-palette-header i.expanded { -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); -o-transform: rotate(0deg); } -.palette-header span { +.red-ui-palette-header span { clear: both; } -.palette_label { +.red-ui-palette-label { + color: $node-label-color; font-size: 13px; margin: 4px 0 4px 32px; line-height: 20px; @@ -131,66 +114,71 @@ text-align: center; @include disable-selection; } -.palette_label_right { +.red-ui-palette-label-right { margin: 4px 32px 4px 0; } -.palette_node { - display: block; - cursor:move; - background: #ddd; +.red-ui-palette-node { + // display: inline-block; + cursor: move; + background: $secondary-background; margin: 10px auto; height: 25px; border-radius: 5px; - border: 1px solid #999; + border: 1px solid $node-border; background-position: 5% 50%; background-repeat: no-repeat; width: 120px; background-size: contain; position: relative; + &:not(.red-ui-palette-node-config):first-child { + margin-top: 15px; + } + &:not(.red-ui-palette-node-config):last-child { + margin-bottom: 15px; + } } -.palette_node:hover { - border-color: $node-selected-color; - background-color: #eee; +.red-ui-palette-node:hover { + border-color: transparent; + box-shadow: 0 0 0 2px $node-selected-color; } -.palette_port { +.red-ui-palette-port { position: absolute; top:8px; left: -5px; box-sizing: border-box; -moz-box-sizing: border-box; - background:#d9d9d9; + background: $node-port-background; border-radius: 3px; width: 10px; height: 10px; - border: 1px solid #999; + border: 1px solid $node-border; } -.palette_port_output { +.red-ui-palette-port-output { left:auto; right: -6px; } -.palette_node:hover .palette_port { - border-color: #999; - background-color: #eee; +.red-ui-palette-node:hover .red-ui-palette-port { + background-color: $node-port-background-hover; } -.palette_icon_container { +.red-ui-palette-icon-container { position: absolute; text-align: center; top:0; bottom:0; left:0; width: 30px; - border-right: 1px solid rgba(0,0,0,0.1); - background-color: rgba(0,0,0,0.05); + border-right: 1px solid $node-icon-background-color; + background-color: $node-icon-background-color; } -.palette_icon_container_right { +.red-ui-palette-icon-container-right { left: auto; right: 0; border-right: none; - border-left: 1px solid rgba(0,0,0,0.1); + border-left: 1px solid $node-icon-background-color; } -.palette_icon { +.red-ui-palette-icon { display: inline-block; width: 20px; height: 100%; @@ -198,13 +186,13 @@ background-size: contain; background-repeat: no-repeat; } -.palette_icon_fa { +.red-ui-palette-icon-fa { color: white; position: absolute; top: 7px; left: 3px; } -.palette_node_small { +.red-ui-palette-node-small { display: inline-block; position: relative; width: 18px; @@ -213,15 +201,15 @@ vertical-align: middle; cursor: default; - .palette_icon_container { + .red-ui-palette-icon-container { width: 18px; border-right: none; } - .palette_icon { + .red-ui-palette-icon { margin-left: -1px; width: 15px; } - .palette_icon_fa { + .red-ui-palette-icon-fa { top: 2px; left: 1px; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/panels.scss b/packages/node_modules/@node-red/editor-client/src/sass/panels.scss index 00fc771eb..9f99db5d4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/panels.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/panels.scss @@ -30,7 +30,7 @@ height: 7px; box-sizing: border-box; cursor: ns-resize; - background: $background-color url(images/grip.png) no-repeat 50% 50%; + background: $primary-background url(images/grip.png) no-repeat 50% 50%; } @@ -41,13 +41,13 @@ .red-ui-panels.red-ui-panels-horizontal { height: 100%; - .red-ui-panel { + &>.red-ui-panel { vertical-align: top; display: inline-block; height: 100%; width: calc(50% - 4px); } - .red-ui-panels-separator { + &>.red-ui-panels-separator { vertical-align: top; border-top: none; border-bottom: none; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/popover.scss b/packages/node_modules/@node-red/editor-client/src/sass/popover.scss index d703b29a7..95097a30e 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/popover.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/popover.scss @@ -25,6 +25,7 @@ color: $popover-color; border-radius: 4px; z-index: 1000; + font-family: $primary-font; font-size: 14px; line-height: 1.4em; @include component-shadow; @@ -59,26 +60,26 @@ } .red-ui-popover.red-ui-popover-right:after { - border-color: rgba(136, 183, 213, 0); + border-color: transparent; border-right-color: $popover-background; border-width: 10px; margin-top: -10px; } .red-ui-popover.red-ui-popover-right:before { - border-color: rgba(194, 225, 245, 0); + border-color: transparent; border-right-color: $popover-background; border-width: 11px; margin-top: -11px; } .red-ui-popover.red-ui-popover-left:after { - border-color: rgba(136, 183, 213, 0); + border-color: transparent; border-left-color: $popover-background; border-width: 10px; margin-top: -10px; } .red-ui-popover.red-ui-popover-left:before { - border-color: rgba(194, 225, 245, 0); + border-color: transparent; border-left-color: $popover-background; border-width: 11px; margin-top: -11px; @@ -86,26 +87,26 @@ .red-ui-popover.red-ui-popover-bottom:after { - border-color: rgba(136, 183, 213, 0); + border-color: transparent; border-bottom-color: $popover-background; border-width: 10px; margin-left: -10px; } .red-ui-popover.red-ui-popover-bottom:before { - border-color: rgba(194, 225, 245, 0); + border-color: transparent; border-bottom-color: $popover-background; border-width: 11px; margin-left: -11px; } .red-ui-popover.red-ui-popover-top:after { - border-color: rgba(136, 183, 213, 0); + border-color: transparent; border-top-color: $popover-background; border-width: 10px; margin-left: -10px; } .red-ui-popover.red-ui-popover-top:before { - border-color: rgba(194, 225, 245, 0); + border-color: transparent; border-top-color: $popover-background; border-width: 11px; margin-left: -11px; @@ -140,27 +141,36 @@ .red-ui-popover-key { font-size: 11px; - font-family: monospace; + font-family: $monospace-font; margin-left: 3px; - border: 1px solid #999; + border: 1px solid $popover-color; border-radius:3px; padding: 1px 2px; } -.red-ui-popover .editor-button { - &:not(.primary) { - color: #444 !important; - border-color: rgba(0,0,0,0); - } +.red-ui-popover a.red-ui-button, +.red-ui-popover button.red-ui-button { &.primary { - border-color: #bbb; + border-color: $popover-button-border-color; } - &.primary:hover { - border-color: #666 !important; + &.primary:not(.disabled):not(.ui-button-disabled):hover { + border-color: $popover-button-border-color-hover; } } .red-ui-popover code { border: none; background: none; - color: #ccc; + color: $tertiary-text-color; +} + + +.red-ui-popover-panel { + @include component-shadow; + font-family: $primary-font; + font-size: $primary-font-size; + position: absolute; + box-sizing: border-box; + border: 1px solid $primary-border-color; + background: $secondary-background; + z-index: 2000; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/projects.scss b/packages/node_modules/@node-red/editor-client/src/sass/projects.scss index 3ef582bc3..9b1005f22 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/projects.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/projects.scss @@ -14,28 +14,28 @@ * limitations under the License. **/ -#projects-dialog { +#red-ui-projects-dialog { .red-ui-editableList-container { padding: 0px; } } -#project-settings-tab-settings { +#red-ui-project-settings-tab-settings { overflow-y: scroll; } -.sidebar-version-control-shade { - background: #f3f3f3; +.red-ui-sidebar-vc-shade { + background: $primary-background; } -.projects-edit-form form { +.red-ui-projects-edit-form form { margin: 0; .form-row { margin-bottom: 15px; label { - color: #555; + color: $primary-text-color; width: 100%; display: block; - &.projects-edit-form-inline-label { + &.red-ui-projects-edit-form-inline-label { font-weight: normal; color: inherit; width: auto; @@ -46,87 +46,34 @@ } input[type=checkbox], input[type=radio] { width: auto; - vertical-align: top; + vertical-align: middle; } } } -.projects-edit-form-sublabel { - color: #999; +.red-ui-projects-edit-form-sublabel { + color: $tertiary-text-color; text-align: right; margin-bottom: -15px; font-weight: normal; } -.project-settings-tab-pane { - & * .projects-edit-form-sublabel { +.red-ui-project-settings-tab-pane { + & * .red-ui-projects-edit-form-sublabel { margin-right: 50px; margin-top: -10px !important; margin-bottom: 5px; } } -.projects-dialog-spinner { - position: absolute; - top: 1px; - bottom: 1px; - left: 1px; - right: 1px; - text-align: center; - padding: 40px; - background: white; - &:before { - content: ''; - display: inline-block; - height: 100%; - vertical-align: middle; - margin-right: -0.25em; - } - img { - display: inline-block; - vertical-align: middle; - width: 80px; - } - &.projects-dialog-spinner-sidebar { - background: white; - padding:0; - img { - width: 40px; - } - } - &.projects-version-control-spinner-sidebar { - background: white; - padding:0; - img { - width: 20px; - } - } - &.projects-dialog-spinner-contain { - padding: 0; - img { - width: auto; - height: 100%; - max-height: 50px; - } - } - -} -.projects-dialog-screen-start { - .projects-dialog-screen-start-hero { - // background: url(https://nodered.org/images/title-wave.png) no-repeat 0% 100% #8f0000; - // background-size: contain; +.red-ui-projects-dialog-screen-start { + .red-ui-projects-dialog-screen-start-hero { text-align: center; font-size: 2em; padding: 10px; min-height: 60px; - color: #555; - h1 { - text-align: center; - color: #f0f0f0; - font-size: 2em; - font-weight: normal; - } + color: $primary-text-color; } - .projects-dialog-screen-start-body { + .red-ui-projects-dialog-screen-start-body { min-height: 400px; line-height: 1.6em; p { @@ -138,27 +85,20 @@ font-size: 1.2em; } } - button.editor-button { + button.red-ui-button { width: calc(50% - 80px); margin: 20px; height: auto; line-height: 2em; padding: 10px; - border-color: #aaa; - i { - color: #aaa; - } - &:hover i { - color: #999; - } } .button-group { text-align: center; } } -.projects-dialog-screen-create { +.red-ui-projects-dialog-screen-create { min-height: 500px; - button.projects-dialog-screen-create-type { + button.red-ui-projects-dialog-screen-create-type { height: auto; padding: 10px; } @@ -167,14 +107,70 @@ } } -.projects-dialog-screen-secret { +.red-ui-projects-dialog-screen-secret { min-height: auto; } -.projects-dialog-project-list-container { + +.red-ui-projects-dialog-credentials-box { + width: 550px; + > div { + vertical-align: top; + display: inline-block; + } +} +.red-ui-projects-dialog-credentials-box-right { + min-height:150px; + box-sizing: border-box; + float: right; + width: 331px; + margin-left: -1px; + padding: 15px; + margin-top: -15px; + border: 1px solid $secondary-border-color; + border-radius: 3px; +} +.red-ui-projects-dialog-credentials-box-left { + width: 220px; + > div { + padding: 7px 8px 3px 8px; + border: 1px solid $secondary-border-color; + border-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right-color: $form-background; + &.disabled { + border-color: $form-background; + border-right-color:$secondary-border-color; + } + i { + font-size: 1.4em; + margin-right: 8px; + vertical-align: middle; + } + label.red-ui-projects-edit-form-inline-label { + margin-left: 5px; + span { + vertical-align: middle; + } + } + input[type="radio"] { + vertical-align: middle; + margin-top:0; + margin-right: 10px; + } + + } +} +.red-ui-projects-dialog-credentials-box-enabled { +} +.red-ui-projects-dialog-credentials-box-disabled { +} + +.red-ui-projects-dialog-project-list-container { border: 1px solid $secondary-border-color; border-radius: 2px; } -.projects-dialog-project-list-inner-container { +.red-ui-projects-dialog-project-list-inner-container { height: 300px; overflow-y: scroll; position:relative; @@ -182,100 +178,100 @@ border: none; } } -.projects-dialog-project-list { +.red-ui-projects-dialog-project-list { li { padding: 0 !important; } } -.projects-dialog-project-list-entry { +.red-ui-projects-dialog-project-list-entry { padding: 12px 0; - border-left: 3px solid #fff; - border-right: 3px solid #fff; + + color: $list-item-color; + background: $list-item-background; + border-left: 3px solid $list-item-background; + border-right: 3px solid $list-item-background; + &.projects-list-entry-current { &:not(.selectable) { - background: #f9f9f9; + color: $form-text-color; + background: $list-item-background-selected; + border-left-color:$list-item-border-selected; + border-right-color:$list-item-border-selected; } i { - color: #999; + color: $secondary-text-color; } } &.selectable { cursor: pointer; - &:hover { - background: #f3f3f3; - // border-left-color: #aaa; - // border-right-color: #aaa; + &:hover:not(.selected) { + color: $form-text-color; + background: $list-item-background-hover; + border-left-color:$list-item-background-hover; + border-right-color:$list-item-background-hover; } } - .projects-dialog-project-list-entry-icon { + .red-ui-projects-dialog-project-list-entry-icon { i { - color: #ccc; + color: $tertiary-text-color; font-size: 2em; } } &.selected { - background: #efefef; - border-left-color:#999; - border-right-color:#999; + color: $form-text-color; + background: $list-item-background-selected; + border-left-color:$list-item-border-selected; + border-right-color:$list-item-border-selected; } span { display: inline-block; vertical-align:middle; } - .projects-dialog-project-list-entry-icon { + .red-ui-projects-dialog-project-list-entry-icon { margin: 0 10px 0 5px; } - .projects-dialog-project-list-entry-name { + .red-ui-projects-dialog-project-list-entry-name { font-size: 1.2em; } - .projects-dialog-project-list-entry-current { + .red-ui-projects-dialog-project-list-entry-current { float: right; margin-right: 20px; font-size: 0.9em; - color: #999; + color: $secondary-text-color; padding-top: 4px; } - .projects-dialog-project-list-entry-tools { + .red-ui-projects-dialog-project-list-entry-tools { position: absolute; top: 16px; right: 30px; display: none; - color: #999; + color: $secondary-text-color; } &:hover { - .projects-dialog-project-list-entry-tools { + .red-ui-projects-dialog-project-list-entry-tools { display: block; } } } -.projects-dialog-screen-create-type.editor-button.toggle.selected:not(.disabled):not(:disabled) { - background: #fff !important; - color: #666 !important; +.red-ui-projects-dialog-screen-create-type.red-ui-button.toggle.selected:not(.disabled):not(:disabled) { + color: $secondary-text-color-active !important; } -.projects-dialog-screen-input-status { +.red-ui-projects-dialog-screen-input-status { text-align: right; position: absolute; top: 2px; right: 8px; width: 70px; height: 30px; - color: #999; + color: $secondary-text-color; } -.sidebar-version-control { +.red-ui-sidebar-vc { height: 100%; } -.sidebar-version-control-stack-info { - height: 100px; - box-sizing: border-box; - border-bottom: 1px solid $secondary-border-color; - color: #333; - i { - color: #999; - } -} -.sidebar-version-control-stack { + +.red-ui-sidebar-vc-stack { position: absolute; top: 0px; bottom: 0; @@ -283,14 +279,14 @@ right: 0; overflow: hidden; - .palette-category { - &:not(.palette-category-expanded) button { + .red-ui-palette-category { + &:not(.expanded) button { display: none; } } } -#project-settings-tab-deps { +#red-ui-project-settings-tab-deps { .red-ui-editableList-container { padding: 0; } @@ -300,33 +296,31 @@ .red-ui-editableList-item-content { padding: 0px 6px; } - .palette-module-header { + .red-ui-palette-module-header { padding: 6px 4px; } - .palette-module-button { + .red-ui-palette-module-button { float: right; } - .palette-module-unused { + .red-ui-palette-module-unused { & > * { - color: #bbb; + color: $secondary-text-color; } - // border: 1px dashed #bbb; } - .palette-module-unknown { - border: 1px dashed #aaa; - background: #fafafa; + .red-ui-palette-module-unknown { + border: 1px dashed $secondary-border-color; + background: $secondary-background-inactive; } - .palette-module-not-installed { - border: 1px dashed #b07575; - background: #fee; + .red-ui-palette-module-not-installed { + border: 1px dashed $text-color-warning; i.fa-warning { - color: #b07575; //#b72828; + color: $text-color-warning; } } } -.project-settings-tab-pane { +.red-ui-project-settings-tab-pane { position: absolute; top:0; left:0; @@ -335,13 +329,13 @@ overflow-y: auto; padding: 8px 20px 20px; } -.sidebar-version-control { +.red-ui-sidebar-vc { .red-ui-editableList-container { - background: #f9f9f9; + background: $tertiary-background; padding: 0; li { padding:0; - background: #fff; + background: $secondary-background; } } .red-ui-editableList-border { @@ -350,7 +344,7 @@ } } -.sidebar-version-control-change-container { +.red-ui-sidebar-vc-change-container { position: relative; height: 50%; box-sizing: border-box; @@ -359,22 +353,22 @@ // border-bottom: 1px solid $primary-border-color; } } -.sidebar-version-control-merging { - .sidebar-version-control-change-container { +.red-ui-sidebar-vc-merging { + .red-ui-sidebar-vc-change-container { height: 33%; } } -.sidebar-version-control-slide-box { +.red-ui-sidebar-vc-slide-box { position:absolute; bottom: 0; left:0; right:0; height:0; transition: height 0.2s ease-in-out; - background: #f6f6f6; + background: $tertiary-background; box-sizing: border-box; overflow: hidden; - &.sidebar-version-control-slide-box-top { + &.red-ui-sidebar-vc-slide-box-top { z-index: 4; top: 0px; left: auto; @@ -383,15 +377,15 @@ border-left: 1px solid $primary-border-color; border-right: 1px solid $primary-border-color; border-bottom: 1px solid $primary-border-color; - box-shadow: 1px 1px 4px rgba(0,0,0,0.2); + box-shadow: 1px 1px 4px $shadow; - color: #666; - background: #f6f6f6; + color: $primary-text-color; + background: $tertiary-background; padding: 10px; box-sizing: border-box; } - &.sidebar-version-control-slide-box-bottom { + &.red-ui-sidebar-vc-slide-box-bottom { bottom: 0px; border-top: 1px solid $secondary-border-color; } @@ -406,7 +400,7 @@ } } -.projects-branch-list { +.red-ui-projects-branch-list { position: relative; .red-ui-searchBox-container { border-top: 1px solid $secondary-border-color; @@ -428,12 +422,12 @@ padding: 0; li { padding: 0; - background: #fff; + background: $secondary-background; } } } } -.uneditable-input .projects-branch-list { +.uneditable-input .red-ui-projects-branch-list { .red-ui-editableList { border-left: none; border-bottom: none; @@ -444,33 +438,34 @@ border-right: none; } } -.sidebar-version-control-slide-box-header { +.red-ui-sidebar-vc-slide-box-header { margin-bottom: 10px; } -.sidebar-version-control-slide-box-toolbar { +.red-ui-sidebar-vc-slide-box-toolbar { padding: 0 20px; text-align: right; } -.sidebar-version-control-branch-list-entry { +.red-ui-sidebar-vc-branch-list-entry { padding: 5px 8px; - color: #666; + margin: 0 1px; + color: $list-item-color; + background: $list-item-background; + border-left: 2px solid $list-item-background; + border-right: 2px solid $list-item-background; cursor: pointer; &.selected { - border-left-color:#999; - border-right-color:#999; + border-left-color:$list-item-border-selected; + border-right-color:$list-item-border-selected; } - border-left: 2px solid #fff; - border-right: 2px solid #fff; - margin: 0 1px; i { width: 16px; text-align: center} &.input-error { cursor: default; } &:not(.input-error):hover { - background: #f3f3f3; - border-left-color:#999; - border-right-color:#999; + background: $list-item-background-hover; + border-left-color:$list-item-border-selected; + border-right-color:$list-item-border-selected; } span { margin-left: 5px; @@ -478,11 +473,11 @@ span.current { float: right; font-size: 0.8em; - color: #999; + color: $tertiary-text-color; } } -.sidebar-version-control-change-entry { +.red-ui-sidebar-vc-change-entry { height: 20px; padding: 5px 10px; position: relative; @@ -496,7 +491,7 @@ pointer-events: none; } } - .sidebar-version-control-change-entry-tools { + .red-ui-sidebar-vc-change-entry-tools { position: absolute; top: 4px; right: 4px; @@ -507,19 +502,19 @@ } &:hover { - .sidebar-version-control-change-entry-tools { + .red-ui-sidebar-vc-change-entry-tools { display: block; } } - &.node-info-none { + &.red-ui-help-info-node { text-align: center; - background: #fefefe; + background: $list-item-background; white-space: normal; height: auto; } } -.sidebar-version-control-commit-entry { +.red-ui-sidebar-vc-commit-entry { min-height: 20px; padding: 5px 10px; position: relative; @@ -527,51 +522,51 @@ overflow: hidden; cursor: pointer; &:hover { - background: #eee; + background: $secondary-background-hover; } } -.sidebar-version-control-commit-more { - color: #999; +.red-ui-sidebar-vc-commit-more { + color: $secondary-text-color; text-align: center; padding: 10px; font-style: italic; } -.sidebar-version-control-commit-sha { +.red-ui-sidebar-vc-commit-sha { float: right; - font-family: monospace; - color: #c38888; + font-family: $monospace-font; + color: $vcCommitShaColor; display: inline-block; font-size: 0.85em; margin-left: 5px; } -.sidebar-version-control-commit-subject { - color: #666; +.red-ui-sidebar-vc-commit-subject { + color: $primary-text-color; } -.sidebar-version-control-commit-refs { +.red-ui-sidebar-vc-commit-refs { min-height: 22px; } -.sidebar-version-control-commit-ref { - color: #aaa; +.red-ui-sidebar-vc-commit-ref { + color: $tertiary-text-color; font-size: 0.7em; - border: 1px solid #ccc; + border: 1px solid $tertiary-border-color; border-radius: 10px; padding: 2px 5px; margin-right: 5px; } -.sidebar-version-control-commit-date { - color: #999; +.red-ui-sidebar-vc-commit-date { + color: $secondary-text-color; font-size: 0.85em; } -.sidebar-version-control-commit-user { +.red-ui-sidebar-vc-commit-user { float: right; - color: #999; + color: $secondary-text-color; font-size: 0.85em; } -.sidebar-version-control-commit-head { +.red-ui-sidebar-vc-commit-head { } -.sidebar-version-control-change-header { - color: #666; - background: #f6f6f6; +.red-ui-sidebar-vc-change-header { + color: $primary-text-color; + background: $tertiary-background; padding: 4px 10px; height: 30px; box-sizing: border-box; @@ -581,22 +576,22 @@ transition: all 0.2s ease-in-out; } } -.sidebar-version-control-repo-toolbar { - color: #666; - background: #f6f6f6; +.red-ui-sidebar-vc-repo-toolbar { + color: $primary-text-color; + background: $tertiary-background; padding: 10px; box-sizing: border-box; } -.sidebar-version-control-repo-count { +.red-ui-sidebar-vc-repo-count { margin-right: 8px; display: none; } -.sidebar-version-control-repo-action { +.red-ui-sidebar-vc-repo-action { text-align: left; width: 100%; } -.sidebar-version-control-repo-sub-action { +.red-ui-sidebar-vc-repo-sub-action { width: calc(50% - 5px); margin-right: 5px; &:not(:first-child) { @@ -605,13 +600,13 @@ } } -.project-file-listing-container > .red-ui-editableList > .red-ui-editableList-border { +.red-ui-projects-file-listing-container > .red-ui-editableList > .red-ui-editableList-border { border-radius: 0; border: none; border-top: 1px solid $secondary-border-color; } -.red-ui-editableList-container .projects-dialog-file-list { +.red-ui-editableList-container .red-ui-projects-dialog-file-list { .red-ui-editableList-border { border: none; } @@ -623,66 +618,68 @@ padding: 0; } } -.projects-dialog-file-list-entry { +.red-ui-projects-dialog-file-list-entry { padding: 3px 0; - border-left: 2px solid #fff; - border-right: 2px solid #fff; + border-left: 2px solid $list-item-background; + border-right: 2px solid $list-item-background; + background: $list-item-background; + &.projects-list-entry-current { &:not(.selectable) { - background: #f9f9f9; + background: $list-item-background-selected; } i { - color: #999; + color: $secondary-text-color-selected; } } &.selectable { cursor: pointer; &:hover { - background: #f3f3f3; - border-left-color:#999; - border-right-color:#999; + background: $list-item-background-hover; + border-left-color:$list-item-border-selected; + border-right-color:$list-item-border-selected; } } &.unselectable { - color: #ccc; + color: $secondary-text-color-disabled; } i { - color: #999; + color: $secondary-text-color; width: 16px; text-align: center; } &.selected { - background: #efefef; - border-left-color:#999; - border-right-color:#999; + background: $list-item-background-selected; + border-left-color:$list-item-border-selected; + border-right-color:$list-item-border-selected; } span { display: inline-block; vertical-align:middle; } - .projects-dialog-file-list-entry-folder { + .red-ui-projects-dialog-file-list-entry-folder { margin: 0 10px 0 0px; .fa-angle-right { - color: #333; + color: $primary-text-color; transition: all 0.2s ease-in-out; } } - .projects-dialog-file-list-entry-file { + .red-ui-projects-dialog-file-list-entry-file { margin: 0 10px 0 20px; } - .projects-dialog-file-list-entry-name { + .red-ui-projects-dialog-file-list-entry-name { font-size: 1em; } &.expanded .fa-angle-right { transform: rotate(90deg); } } -.projects-dialog-file-list-entry-file-type-git { color: #999 } +.red-ui-projects-dialog-file-list-entry-file-type-git { color: $tertiary-text-color } -.projects-dialog-remote-list { +.red-ui-projects-dialog-remote-list { .red-ui-editableList-container { padding: 0; li { @@ -694,87 +691,7 @@ } } -.projects-dialog-sshkey-list { - li { - padding: 0 !important; - } - &.projects-dialog-sshkey-list-small { - .projects-dialog-sshkey-list-entry { - padding: 6px 0; - i { - font-size: 1em; - } - } - .projects-dialog-sshkey-list-entry-name { - font-size: 1em; - } - .projects-dialog-sshkey-list-entry-current { - margin-right: 10px; - padding-top: 2px; - } - } -} -.red-ui-editableList-container { - .projects-dialog-sshkey-list { - li:last-child { - border-bottom: 0px none; - } - } -} -.projects-dialog-sshkey-list-entry { - padding: 12px 0; - border-left: 3px solid #fff; - border-right: 3px solid #fff; - &.sshkey-list-entry-current { - &:not(.selectable) { - background: #f9f9f9; - } - i { - color: #999; - } - } - &.selectable { - cursor: pointer; - &:hover { - background: #f3f3f3; - border-left-color: #aaa; - border-right-color: #aaa; - } - } - i { - color: #ccc; - font-size: 2em; - - } - &.selected { - background: #efefef; - border-left-color:#999; - border-right-color:#999; - } - span { - display: inline-block; - vertical-align:middle; - } - .projects-dialog-sshkey-list-entry-icon { - margin: 0 10px 0 5px; - } - .projects-dialog-sshkey-list-entry-name { - font-size: 1.2em; - } - .projects-dialog-sshkey-list-entry-current { - float: right; - margin-right: 20px; - font-size: 0.9em; - color: #999; - padding-top: 4px; - } - .projects-dialog-sshkey-list-button-remove { - position: absolute; - right: 4px; - } -} - -div.projects-dialog-ssh-public-key { +div.red-ui-projects-dialog-ssh-public-key { position: relative; padding: 15px 20px 0; pre { @@ -788,31 +705,31 @@ div.projects-dialog-ssh-public-key { } } -.projects-dialog-ssh-key-list { +.red-ui-projects-dialog-ssh-key-list { li { padding: 0 !important; } - .projects-dialog-ssh-key-header { + .red-ui-projects-dialog-ssh-key-header { padding: 10px 5px; cursor: pointer; &:hover { - background: #f3f3f3; + background: $list-item-background-hover; } } } -.projects-dialog-list { +.red-ui-projects-dialog-list { position: relative; .red-ui-editableList-container { padding: 1px; - background: #f6f6f6; + background: $tertiary-background; li:last-child { border-bottom: none; } } } -.projects-dialog-list-entry { +.red-ui-projects-dialog-list-entry { &.red-ui-search-empty { padding: 0; } @@ -824,7 +741,7 @@ div.projects-dialog-ssh-public-key { text-align: center; min-width: 30px; vertical-align: top; - color: #999; + color: $secondary-text-color; } .entry-name { min-width: 250px; @@ -833,7 +750,7 @@ div.projects-dialog-ssh-public-key { font-weight: bold; } .entry-detail { - color: #aaa; + color: $tertiary-text-color; font-size: 0.9em; } @@ -847,14 +764,14 @@ div.projects-dialog-ssh-public-key { margin-right: 10px; } } -.projects-dialog-list-dialog { +.red-ui-projects-dialog-list-dialog { position: relative; margin-top: 10px; margin-bottom: 20px; - background: white; + background: $secondary-background; border-radius: 4px; border: 1px solid $secondary-border-color; - .projects-edit-form-sublabel { + .red-ui-projects-edit-form-sublabel { margin-top: -8px !important; display: block !important; width: auto !important; @@ -865,11 +782,18 @@ div.projects-dialog-ssh-public-key { clear: both; } - .projects-dialog-list-dialog-header { + .red-ui-projects-dialog-list-dialog-header { font-weight: bold; - background: #f3f3f3; + background: $primary-background; margin-top: 0 !important; padding: 5px 10px; margin-bottom: 10px; } } + +#red-ui-settings-tab-gitconfig { + padding: 8px 20px 20px; +} +.red-ui-settings-section-description { + color: $secondary-text-color; +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/radialMenu.scss b/packages/node_modules/@node-red/editor-client/src/sass/radialMenu.scss new file mode 100644 index 000000000..114919460 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/sass/radialMenu.scss @@ -0,0 +1,54 @@ +/** +* 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-ui-editor-radial-menu { + font-size: $primary-font-size; + font-family: $primary-font; + position: absolute; + top: 0; + left:0; + bottom:0; + right:0; + z-index: 1000; + + & > div { + position: absolute; + border-radius: 80px; + width: 160px; + height: 160px; + background: $shadow; + border: 1px solid $primary-border-color; + } +} + +.red-ui-editor-radial-menu-opt { + position: absolute; + border-radius: 20px; + width: 50px; + height: 50px; + background: $secondary-background; + border: 2px solid $primary-border-color; + text-align: center; + line-height:50px +} + +.red-ui-editor-radial-menu-opt-disabled { + border-color: $tertiary-border-color; + color: $tertiary-border-color; +} +.red-ui-editor-radial-menu-opt-active { + background: $secondary-background-hover; +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/search.scss b/packages/node_modules/@node-red/editor-client/src/sass/search.scss index 3926d6f5f..0ec8b6525 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/search.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/search.scss @@ -19,22 +19,13 @@ display: none; position: absolute; width: 500px; - background: white; left: 50%; margin-left: -250px; top: 0px; border: 1px solid $primary-border-color; - box-shadow: 0 0 10px rgba(0,0,0,0.4); + box-shadow: 0 0 10px $shadow; +} - ol { - } -} -.red-ui-type-search-shade { - @include shade; - z-index: 20; - position: fixed; - background: rgba(255,255,255,0.05); -} .red-ui-type-search { box-shadow: 0 1px 6px -3px black; background: none; @@ -45,7 +36,7 @@ .red-ui-search-container { border-top-left-radius: 5px; border-top-right-radius: 5px; - border: 1px dashed #aaa; + border: 1px dashed $primary-border-color; border-bottom: none; padding: 0; } @@ -53,8 +44,8 @@ display: none; height: 150px; .red-ui-editableList-container { - border: 1px dashed #aaa; - border-top: 1px solid #ccc; + border: 1px dashed $primary-border-color; + border-top: 1px solid $secondary-border-color; } } .red-ui-search-result { @@ -62,14 +53,14 @@ font-size: 13px; border-left-width: 3px; border-right-width: 3px; - .palette_icon_fa { + .red-ui-palette-icon-fa { position: relative; top: -2.5px; left: 0px; } } .red-ui-search-result-separator { - border-bottom: 3px solid #ddd; + border-bottom: 3px solid $secondary-border-color; } .red-ui-search-result-node { position: relative; @@ -80,54 +71,49 @@ .red-ui-search-result-node-port { position: absolute; border-radius: 2px; - border: 1px solid #999; + border: 1px solid $node-border;; width: 6px; height: 7px; top:4px; left:-4px; - background: #eee; + background: $node-port-background; box-sizing: border-box; } .red-ui-search-result-node-output{ left: 16px; } - .palette_icon_container { + .red-ui-palette-icon-container { width: 18px; } - .palette_icon { + .red-ui-palette-icon { width: 15px; } .red-ui-search-result-description { margin-left:28px; } .red-ui-search-result-node-label { - color: #999; + color: $secondary-text-color; } } .red-ui-search-container { padding: 3px; + background: $form-input-background; border-bottom: 1px solid $secondary-border-color; } .red-ui-search-results-container { position:relative; height: 300px; padding: 5px; - background: #f9f9f9; + background: $primary-background; + .red-ui-search-results-list { + } .red-ui-editableList-container { - background: white; padding: 0; - background: #f9f9f9; + background: $primary-background; li { padding: 0; - &.selected { - background: #efefef; - .red-ui-search-result { - border-left-color:#999; - border-right-color:#999; - } - } } } } @@ -135,22 +121,28 @@ padding: 8px 2px 8px 5px; display: block; cursor: pointer; - color: $form-text-color; - border-left: 3px solid #fff; - border-right: 3px solid #fff; + color: $list-item-color; + background: $list-item-background; + border-left: 3px solid $list-item-background; + border-right: 3px solid $list-item-background; + li.selected & { + background: $list-item-background-selected; + border-left-color: $list-item-border-selected; + border-right-color: $list-item-border-selected; + } &:hover { text-decoration: none; color: $form-text-color; - background: #efefef; - border-left-color:#efefef; - border-right-color:#efefef; + background: $list-item-background-hover; + border-left-color:$list-item-background-hover; + border-right-color:$list-item-background-hover; } &:after { content: ""; display: table; clear: both; } - .palette_icon_fa { + .red-ui-palette-icon-fa { top: 6px; left: 3px; } @@ -161,37 +153,39 @@ width: 30px; float:left; height: 25px; - background: #ddd; border-radius: 5px; - border: 1px solid #999; + border: 1px solid $node-border; background-position: 5% 50%; background-repeat: no-repeat; background-size: contain; position: relative; - .palette_icon_container { + .red-ui-palette-icon-container { border-right: none; } } -.red-ui-search-result-description { +.red-ui-search-result-node-description { margin-left: 40px; margin-right: 5px; } .red-ui-search-result-node-label { - color: #222; + color: $primary-text-color; } .red-ui-search-result-node-type { font-style: italic; font-size: 0.9em; + color: $tertiary-text-color; } .red-ui-search-result-node-flow { float:right; font-size: 0.8em; + color: $tertiary-text-color; } .red-ui-search-result-node-id { display:none; font-size: 0.8em; + color: $tertiary-text-color; } .red-ui-search-empty { padding: 10px; @@ -199,3 +193,14 @@ font-style: italic; color: $form-placeholder-color; } + +.red-ui-search-result-action { + color: $primary-text-color; +} +.red-ui-search-result-action-key { + position: absolute; + top: 9px; + right: 0; + margin-right: 10px; + color: $tertiary-text-color; +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss index d06b3d3cc..d85527178 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss @@ -14,26 +14,25 @@ * limitations under the License. **/ -#sidebar { +#red-ui-sidebar { position: absolute; top: 0px; right: 0px; bottom: 0px; width: 315px; - background: #fff; + background: $primary-background; box-sizing: border-box; z-index: 10; @include component-border; } -#sidebar.closing { - background: #eee; - border-color: #900; +#red-ui-sidebar.closing { border-style: dashed; } -#sidebar-content { +#red-ui-sidebar-content { position: absolute; + background: $secondary-background; top: 35px; right: 0; bottom: 25px; @@ -41,23 +40,23 @@ overflow-y: auto; } -#sidebar-separator { +#red-ui-sidebar-separator { position: absolute; top: 5px; right: 315px; bottom:10px; width: 7px; z-index: 11; - background: $background-color url(images/grip.png) no-repeat 50% 50%; + background: $primary-background url(images/grip.png) no-repeat 50% 50%; cursor: col-resize; } -.sidebar-closed > #sidebar { display: none; } -.sidebar-closed > #sidebar-separator { right: 0px !important; } -.sidebar-closed > #workspace { right: 7px !important; } -.sidebar-closed > #editor-stack { right: 8px !important; } +.red-ui-sidebar-closed > #red-ui-sidebar { display: none; } +.red-ui-sidebar-closed > #red-ui-sidebar-separator { right: 0px !important; } +.red-ui-sidebar-closed > #red-ui-workspace { right: 7px !important; } +.red-ui-sidebar-closed > #red-ui-editor-stack { right: 8px !important; } -#sidebar .button { +#red-ui-sidebar .button { @include workspace-button; line-height: 18px; font-size: 12px; @@ -65,67 +64,79 @@ padding: 2px 8px; } -.sidebar-header { - color: #666; +.sidebar-header, /* Deprecated -> red-ui-sidebar-header */ +.red-ui-sidebar-header { + color: $primary-text-color; text-align: right; padding: 8px 10px; - background: #f3f3f3; + background: $primary-background; border-bottom: 1px solid $secondary-border-color; white-space: nowrap; } -#sidebar-footer { - @include component-footer; -} - +/* Deprecated -> red-ui-footer-button */ .sidebar-footer-button { @include component-footer-button; } +/* Deprecated -> red-ui-footer-button-toggle */ .sidebar-footer-button-toggle { @include component-footer-button-toggle; } -.sidebar-header-button { + +a.sidebar-header-button, +button.sidebar-header-button, /* Deprecated -> red-ui-sidebar-header-button */ +a.red-ui-sidebar-header-button, +button.red-ui-sidebar-header-button { @include workspace-button; font-size: 13px; line-height: 13px; padding: 5px 8px; + &.toggle { + @include workspace-button-toggle; + } } -.sidebar-header-button-toggle { + +a.sidebar-header-button-toggle, /* Deprecated -> red-ui-sidebar-header-button-toggle */ +button.sidebar-header-button-toggle, /* Deprecated -> red-ui-sidebar-header-button-toggle */ +a.red-ui-sidebar-header-button-toggle, +button.red-ui-sidebar-header-button-toggle { @include workspace-button-toggle; font-size: 13px; line-height: 13px; padding: 5px 8px; } -.sidebar-header-button:not(:first-child) { + +.sidebar-header-button:not(:first-child), /* Deprecated -> red-ui-sidebar-header-button */ +.red-ui-sidebar-header-button:not(:first-child) { border-left: none; } -.sidebar-shade { +.red-ui-sidebar-shade { @include shade; } -@mixin sidebar-control { +@mixin red-ui-sidebar-control { display: none; position: absolute; top: calc(50% - 26px); padding:15px 8px; - border:1px solid #ccc; - background:#f9f9f9; - color: #999; + border:1px solid $primary-border-color; + background:$primary-background; + color: $secondary-text-color; text-align: center; cursor: pointer; } -.sidebar-control-right { - @include sidebar-control; +.red-ui-sidebar-control-right { + @include red-ui-sidebar-control; right: calc(100%); border-top-left-radius: 5px; border-bottom-left-radius: 5px; } -.sidebar-control-left { - @include sidebar-control; +.red-ui-sidebar-control-left { + @include red-ui-sidebar-control; left: calc(100%); border-top-right-radius: 5px; border-bottom-right-radius: 5px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/style.scss b/packages/node_modules/@node-red/editor-client/src/sass/style.scss index a48291659..088e5c1b8 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/style.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/style.scss @@ -1,26 +1,26 @@ /** - * 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. - **/ +* 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. +**/ @import "colors"; @import "mixins"; +@import "base"; @import "forms"; @import "jquery"; -@import "bootstrap"; @import "ace"; @import "dropdownMenu"; @@ -66,86 +66,4 @@ @import "debug"; -body { - font-size: 14px; - font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; - padding-top: 100px; - background: $background-color; - color: #333333; -} - -#main-container { - position: absolute; - top:40px; left:0; bottom: 0; right:0; - overflow:hidden; -} - -i.spinner { - display: inline-block; - width: 14px; - height: 14px; - line-height: 14px; - vertical-align: text-top; - margin-top: 0px; - background: url(images/spin.svg) no-repeat 50% 50%; - background-size: contain -} - -code, pre { - padding: 0 3px 2px; - font-family: monospace; - font-size: 14px; - color: #333333; - border-radius: 1px; -} - -code { - padding: 0px 3px 2px 3px; - margin: 1px; - color: #AD1625; - white-space: nowrap; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; - border-radius: 2px; -} - -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - line-height: 20px; - word-break: break-all; - word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 2px; -} - -pre code { - padding: 0; - color: inherit; - white-space: pre; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} - -.hide { - display: none; -} - -blockquote { - padding: 0 0 0 15px; - margin: 0 0 20px; - border-left: 4px solid #ddd; - - p { - font-size: 14px; - font-weight: inherit; - line-height: 1.25; - color: #777; - } -} +@import "radialMenu"; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss index 78cd8628a..f88cbfd73 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss @@ -14,25 +14,32 @@ * limitations under the License. **/ -.sidebar-node-config { +.red-ui-sidebar-node-config { position: relative; - background: #f3f3f3; + background: $secondary-background; height: 100%; overflow-y:auto; @include disable-selection; } -.config-node-list { +ul.red-ui-sidebar-node-config-list { margin: 0; + padding: 0; list-style-type: none; - .palette_node { + li { + padding: 0; + margin: 0; + text-align: center; + } + .red-ui-palette-node { overflow: hidden; + &.selected { - border-color: $node-selected-color; - background-color: #eee; + border-color: transparent; + box-shadow: 0 0 0 2px $node-selected-color; } } - .palette_label { + .red-ui-palette-label { margin-left: 8px; line-height: 24px; text-align: left; @@ -40,10 +47,10 @@ overflow: hidden; text-overflow: ellipsis; } - .palette_icon_container { + .red-ui-palette-icon-container { font-size: 12px; line-height: 30px; - background-color: #e8e8e8; + background-color: $secondary-background-selected; border-top-right-radius: 4px; border-bottom-right-radius: 4px; a { @@ -52,41 +59,49 @@ bottom: 0; left: 0; right: 0; - color: #666; + color: $secondary-text-color; &:hover { text-decoration: none; - background: #ccc; + background: $secondary-background-hover; } } } } -.config_node { +.red-ui-palette-node-config { width: 160px; height: 30px; - background: #f3f3f3; - color: #666; + background: $primary-background; + color: $primary-text-color; cursor: pointer; } -.config_node_type { - color: #999; +ul.red-ui-sidebar-node-config-list li.red-ui-palette-node-config-type { + color: $secondary-text-color; text-align: right; padding-right: 3px; &:not(:first-child) { margin-top: 20px; } } -.config_node_none { - color: #ddd; +.red-ui-palette-node-config-none { + color: $tertiary-text-color; text-align:right; padding-right: 3px; } -.config_node_unused { - border-color: #aaa; - background: #f9f9f9; +.red-ui-palette-node-config-unused,.red-ui-palette-node-config-disabled { + border-color: $primary-border-color; + background: $secondary-background-inactive; border-style: dashed; - color: #aaa; + color: $tertiary-text-color; } -.config-node-filter-info { +.red-ui-palette-node-config-disabled { + opacity: 0.6; + font-style: italic; + i { + color: $secondary-text-color; + margin-right: 5px; + } +} +.red-ui-sidebar-node-config-filter-info { position: absolute; top: 0; right:0; @@ -95,6 +110,6 @@ padding: 0 8px; background: $palette-header-background; font-size: 0.8em; - color: #999; + color: $secondary-text-color; font-weight: normal; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-context.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-context.scss index 16404c136..46b09de43 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tab-context.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-context.scss @@ -14,7 +14,7 @@ * limitations under the License. **/ -.sidebar-context-stack { +.red-ui-sidebar-context-stack { position: absolute; top: 0; bottom: 0; @@ -22,33 +22,33 @@ right: 0; overflow-y: scroll; - .palette-category { - &:not(.palette-category-expanded) button { + .red-ui-palette-category { + &:not(.expanded) button { display: none; } } } -.sidebar-context-property { +.red-ui-sidebar-context-property { position: relative; - .debug-message-tools { + .red-ui-debug-msg-tools { right: 0px; margin-right: 5px; display: none; } - &:hover .debug-message-tools { + &:hover .red-ui-debug-msg-tools { display: inline-block; } } -.sidebar-context-updated { +.red-ui-sidebar-context-updated { text-align: right; font-size: 11px; - color: #bbb; + color: $tertiary-text-color; padding: 1px 3px; } -.sidebar-context-property-storename { +.red-ui-sidebar-context-property-storename { display: block; font-size: 0.8em; font-style: italic; - color: #aaa; + color: $tertiary-text-color; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss index a4d3eea3d..bc72f7532 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss @@ -14,19 +14,19 @@ * limitations under the License. **/ -.sidebar-node-info hr { +.red-ui-sidebar-info hr { margin: 10px 0; } -table.node-info { +table.red-ui-info-table { font-size: 14px; margin: 0 0 10px; width: 100%; } -table.node-info tr:not(.blank) { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; +table.red-ui-info-table tr:not(.blank) { + border-top: 1px solid $secondary-border-color; + border-bottom: 1px solid $secondary-border-color; } -.node-info-property-expand { +.red-ui-help-property-expand { font-size: 0.8em; text-align: right; line-height: 0.9em; @@ -35,12 +35,12 @@ table.node-info tr:not(.blank) { } } -table.node-info tr.blank { +table.red-ui-info-table tr.blank { border: none; th { text-align: left; font-weight: 500; - color: #444; + color: $primary-text-color; padding: 6px 3px 3px; } >* { @@ -52,16 +52,16 @@ table.node-info tr.blank { a { display: block; - color: #666; + color: $primary-text-color; &:hover,&:focus { - color: #666; + color: $primary-text-color; text-decoration: none; } &:not(.expanded) { - .node-info-property-show-more { + .red-ui-help-property-more { display: inline; } - .node-info-property-show-less { + .red-ui-help-property-less { display: none; } } @@ -72,10 +72,10 @@ table.node-info tr.blank { } &.expanded { - .node-info-property-show-more { + .red-ui-help-property-more { display: none; } - .node-info-property-show-less { + .red-ui-help-property-less { display: inline; } i { @@ -83,33 +83,43 @@ table.node-info tr.blank { } } } - &.node-info-info-row > td { - padding-left: 5px; - } } -.node-info-none { +.red-ui-help-info-none { font-style: italic; - color: #aaa; + color: $tertiary-text-color; } -table.node-info tr:not(.blank) td:first-child{ - color: #444; +table.red-ui-info-table tr:not(.blank) td:first-child{ + color: $header-text-color; vertical-align: top; width: 90px; padding: 3px 3px 3px 6px; - background:#f9f9f9; - border-right: 1px solid #ddd; + background:$tertiary-background; + border-right: 1px solid $secondary-border-color; } -table.node-info tr:not(.blank) td:last-child{ +table.red-ui-info-table tr:not(.blank) td:last-child{ padding: 3px 3px 3px 6px; - color: #666; + color: $primary-text-color; overflow-y: hidden; } -div.node-info { +div.red-ui-info-table { margin: 5px; } -.node-help { - font-size: 14px; +.red-ui-help { + font-size: $primary-font-size; line-height: 1.5em; + + a { + color: $info-text-link-color; + text-decoration: none; + } + + a:hover, + a:focus { + color: $info-text-link-color; + text-decoration: underline; + } + + h1 { font-weight: 500; font-size: 1.296em; @@ -138,24 +148,24 @@ div.node-info { & > span > p:first-child { } dl.message-properties { - border: 1px solid #ddd; + border: 1px solid $secondary-border-color; border-radius: 2px; margin: 5px auto 10px; &>dt { padding: 0px 3px 2px 3px; - font-family: monospace; + font-family: $monospace-font; font-weight: normal; margin: 5px 3px 1px; - color: #AD1625; + color: $text-color-warning; white-space: nowrap; &.optional { font-style: italic; } .property-type { - font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; - color: #666; + font-family: $primary-font; + color: $primary-text-color; font-style: italic; font-size: 11px; float: right; @@ -174,7 +184,7 @@ div.node-info { ol.node-ports { margin: 0; li { - border: 1px solid #ddd; + border: 1px solid $secondary-border-color; border-radius: 2px; list-style-position: inside; padding: 3px; @@ -184,14 +194,14 @@ div.node-info { } } } - .node-info-header { + .red-ui-help-info-header { i { width: 10px; text-align: center; transition: transform 0.2s ease-in-out; margin-right: 4px; } - color: #333; + color: $header-text-color; &:hover, &:focus { text-decoration: none; } @@ -203,7 +213,7 @@ div.node-info { } } -.sidebar-node-info-stack { +.red-ui-sidebar-info-stack { position: absolute; top: 0; bottom: 0; @@ -211,7 +221,7 @@ div.node-info { right: 0; overflow-y: scroll; } -.node-info-tips { +.red-ui-help-tips { display: none; position: absolute; left:0; @@ -220,21 +230,21 @@ div.node-info { height: 150px; box-sizing: border-box; border-top: 1px solid $secondary-border-color; - background-color: #fff; + background-color: $secondary-background; padding: 20px; - box-shadow: 0 5px 20px 0px rgba(0, 0, 0, 0.3); + box-shadow: 0 5px 20px 0px $shadow; overflow-y: auto; } -.sidebar-node-info.show-tips { - .sidebar-node-info-stack { +.red-ui-sidebar-info.show-tips { + .red-ui-sidebar-info-stack { bottom: 150px; } - .node-info-tips { + .red-ui-help-tips { display: block; } } -.node-info-tips:before { +.red-ui-help-tips:before { content: ''; display: inline-block; height: 100%; @@ -242,30 +252,30 @@ div.node-info { margin-right: -0.25em; /* Adjusts for spacing */ } -.node-info-tip { +.red-ui-help-tip { display: inline-block; vertical-align: middle; width: 100%; font-size: 16px; text-align: center; line-height: 1.9em; - color : #bbb; + color : $tertiary-text-color; @include disable-selection; cursor: default; } -.node-info-tips-buttons { +.red-ui-help-tips-buttons { position: absolute; top: 4px; right: 6px; a { - color: #ddd !important; - border-color: #d9d9d9 !important; + color: $secondary-text-color; + border-color: $secondary-border-color !important; margin-left: 4px; } } .node-info-property-config-node { - border: 1px solid #eee; + border: 1px solid $secondary-border-color; border-radius: 4px; padding: 2px 4px 2px; } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss b/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss index 489cce5f8..53358ac98 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tabs.scss @@ -16,7 +16,7 @@ .red-ui-tabs { position: relative; - background: #fff; + background: $tab-background; overflow: hidden; height: 35px; box-sizing: border-box; @@ -30,7 +30,6 @@ } } & ul { - //background: #9999ff; list-style-type: none; padding:0; margin: 0; @@ -71,7 +70,7 @@ padding-left: 12px; width: 100%; height: 100%; - color: #666; + color: $tab-text-color-inactive; } a:hover { text-decoration: none; @@ -86,14 +85,14 @@ &.active { background: $tab-background-active; font-weight: bold; - border-bottom: 1px solid #fff; + border-bottom: 1px solid $tab-background-active; z-index: 2; a { - color: #333; + color: $tab-text-color-active; } a.red-ui-tab-close { - color: #aaa; + color: $workspace-button-color; background: $tab-background-active; &:hover { background: $workspace-button-background-hover !important; @@ -111,7 +110,7 @@ font-weight: bold; .red-ui-tabs-badge-selected { display: inline; - background: white; + background: $tab-background; } .red-ui-tabs-badge-changed { display: none; @@ -159,7 +158,7 @@ height: 100%; border-right: 1px solid $primary-border-color; margin: 0; - background: #f3f3f3; + background: $tertiary-background; overflow: visible; .red-ui-tabs-scroll-container { @@ -181,10 +180,10 @@ border-right: 1px solid $primary-border-color; height: auto; &:not(:first-child) { - border-top: 1px solid $secondary-border-color; + border-top: 1px solid $secondary-border-color; } &:last-child { - border-bottom: 1px solid $secondary-border-color; + border-bottom: 1px solid $secondary-border-color; } a.red-ui-tab-label { @@ -192,7 +191,7 @@ } &.active { - border-right: 1px solid #fff; + border-right: 1px solid $tab-background-active; } } } @@ -213,7 +212,7 @@ top: 0; right: 0; height: 35px; - background: #fff; + background: $tab-background; border-bottom: 1px solid $primary-border-color; z-index: 2; @@ -235,7 +234,7 @@ top: 0; right: 0; height: 35px; - background: #fff; + background: $tab-background; border-bottom: 1px solid $primary-border-color; z-index: 2; a { @@ -245,13 +244,11 @@ width: 28px; margin: 4px 3px 3px; z-index: 2; - &.red-ui-tab-link-button { - &:not(.active) { - background: #eee; - } - } &.red-ui-tab-link-button-menu { - border-color: white; + border-color: $tab-background; + } + &:not(.single):not(.selected) { + margin-top: 4px; } } } @@ -262,7 +259,7 @@ height: 35px; width: 21px; display: block; - color: $link-color; + color: $workspace-button-color; font-size: 22px; text-align: center; margin:0; @@ -275,14 +272,12 @@ left:0; a { border-right: 1px solid $primary-border-color; - // box-shadow: 8px 0px 5px -2px rgba(0,0,0,0.1); } } .red-ui-tab-scroll-right { right: 0px; a { border-left: 1px solid $primary-border-color; - // box-shadow: -8px 0px 5px -2px rgba(0,0,0,0.1); } } @@ -324,7 +319,7 @@ i.red-ui-tab-icon { line-height: 28px; text-align: center; padding:0px; - color: #aaa; + color: $tab-badge-color; } .red-ui-tabs-badges i { @@ -358,9 +353,10 @@ i.red-ui-tab-icon { line-height: 28px; text-align: center; padding: 0px; - color: #aaa; + color: $workspace-button-color; &:hover { background: $workspace-button-background-hover !important; + color: $workspace-button-color-hover; opacity: 1; } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/checkboxSet.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/checkboxSet.scss index 0b8b95840..8858e477d 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/checkboxSet.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/checkboxSet.scss @@ -16,7 +16,7 @@ .red-ui-checkboxSet { width: 15px; display: inline-block; - color: #888; + color: $secondary-text-color; cursor: pointer; input { display:none; @@ -24,6 +24,6 @@ &.disabled { pointer-events: none; - color: #ddd; + color: $secondary-text-color-disabled; } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss index 8228d9d98..a5873f684 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/editableList.scss @@ -37,7 +37,7 @@ li { box-sizing: border-box; position: relative; - background: #fff; + background: $secondary-background; margin:0; padding:8px 0px; border-bottom: 1px solid $secondary-border-color; @@ -47,7 +47,7 @@ top: 50%; left: 2px; margin-top: -7px; - color: #eee; + color: $tertiary-text-color; cursor: move; } .red-ui-editableList-item-remove { @@ -68,7 +68,7 @@ margin-right: 28px; } &.red-ui-editableList-item-deleting { - background: #fee; + background: $secondary-background-inactive; } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/nodeList.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/nodeList.scss index e92e64e2f..01a7a4802 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/nodeList.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/nodeList.scss @@ -21,9 +21,9 @@ margin: 0; white-space: nowrap; border: none; - background: #fefefe; + background: $secondary-background; &:hover { - background: #f0f0f0; + background: $secondary-background-hover; } i.fa-angle-right { @@ -39,17 +39,17 @@ } .meta { float: right; - input[type="checkbox"] { + input[type="checkbox"].red-ui-treeList-checkbox { margin: 0; } } .red-ui-editableList-item-content.disabled { - color: #ccc; + color: $secondary-text-color-disabled; } &.red-ui-editableList-section-header { - background: #f0f0f0; + background: $primary-background; .red-ui-editableList-item-content.disabled { - color: #bbb; + color: $secondary-text-color-disabled; } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss index 975a80c79..2f0740d61 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss @@ -19,7 +19,7 @@ position: relative; i { font-size: 10px; - color: #666; + color: $secondary-text-color; } i.fa-search { position: absolute; @@ -32,7 +32,7 @@ right: 5px; top: 9px; } - input { + input.red-ui-searchBox-input { border-radius: 0; border: none; width: 100%; @@ -61,8 +61,8 @@ position: absolute; right: 18px; top: 4px; - background: #eee; - color: #666; + background: $primary-background; + color: $secondary-text-color; padding: 1px 8px; font-size: 9px; border-radius: 4px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/stack.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/stack.scss index f76dbe32f..a32bfad70 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/stack.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/stack.scss @@ -15,9 +15,9 @@ **/ .red-ui-stack { - background: white; - .palette-category { - background: white; + background: $secondary-background; + .red-ui-palette-category { + background: $secondary-background; &:last-child { border-bottom: none; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/treeList.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/treeList.scss index 2d090ae72..8911b1140 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/treeList.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/treeList.scss @@ -15,14 +15,16 @@ **/ .red-ui-treeList { - + &:focus { + outline: none !important; + } } .red-ui-treeList-container { width: 100%; height: 100%; position: relative; - background: #f9f9f9; + background: $tertiary-background; border: 1px solid $form-input-border-color; border-radius: 4px; @@ -49,59 +51,75 @@ transition: transform 0.1s ease-in-out; } .red-ui-editableList { - display: none; + // display: none; } &.expanded { & > .red-ui-treeList-label .fa-angle-right { transform: rotate(90deg) } - & > .red-ui-editableList { - display: block - } - & > .red-ui-treeList-spinner { - display: block; - } + // & > .red-ui-editableList { + // display: block + // } + // & > .red-ui-treeList-spinner { + // display: block; + // } } } } -label.red-ui-treeList-label { - display: block; - width: auto; -} .red-ui-treeList-label { @include disable-selection; padding: 6px 0; display: block; - color: $form-text-color; + color: $list-item-color; text-decoration: none; cursor: pointer; vertical-align: middle; margin: 0; + position: relative; - &:hover { - background: #f9f9f9; - color: $form-text-color; + &:hover, &:hover .red-ui-treeList-sublabel-text { + background: $list-item-background-hover; + color: $list-item-color; text-decoration: none; } - &:focus { + &:focus, &:focus .red-ui-treeList-sublabel-text { + background: $list-item-background-hover; outline: none; - color: $form-text-color; + color: $list-item-color; text-decoration: none; } - input { + &.selected, &.selected .red-ui-treeList-sublabel-text { + background: $list-item-background-selected; + outline: none; + color: $list-item-color; + } + + input.red-ui-treeList-checkbox { margin: 0; } } .red-ui-treeList-label-text { margin-left: 4px; } +.red-ui-treeList-sublabel-text { + top: 0; + bottom: 0; + right: 0; + padding: 0 10px 0 5px; + line-height: 32px; + font-size: 0.9em; + color: $list-item-secondary-color; + position: absolute; + background: $list-item-background; +} + + .red-ui-treeList-icon { display: inline-block; width: 20px; text-align: center; } .red-ui-treeList-spinner { - display: none; height: 32px; background: url(images/spin.svg) 50% 50% no-repeat; background-size: auto 20px; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss index b73c139f4..247b6dfe2 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss @@ -25,7 +25,7 @@ box-sizing: border-box; overflow:visible; position: relative; - .red-ui-typedInput-input { + .red-ui-typedInput-input-wrap { position: absolute; left:0; right:0; @@ -33,7 +33,7 @@ bottom:0; outline: red; } - input { + input.red-ui-typedInput-input { width: 100%; padding: 0 0 0 3px; margin:0; @@ -43,139 +43,170 @@ border-bottom-left-radius: 0; box-shadow: none; vertical-align: middle; - // backgroun/d: #f0fff0; } &.red-ui-typedInput-focus:not(.input-error) { border-color: $form-input-focus-color !important; } - - button { - text-align: left; - border: none; + .red-ui-typedInput-value-label { position: absolute; - box-sizing: border-box; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - padding: 0 1px 0 5px; - display:inline-block; - background: $typedInput-button-background; + display: inline-block; height: 32px; - line-height: 32px; - vertical-align: middle; - color: #555; - i.red-ui-typedInput-icon { - position: relative; - top: -3px; - margin-left: 1px; - margin-right: 2px; - margin-top: 1px; - vertical-align: middle; - &.fa-ellipsis-h { - top: -1px; - } - } - &.disabled { - cursor: default; - i.red-ui-typedInput-icon { - color: #bbb; - } - } - .red-ui-typedInput-type-label,.red-ui-typedInput-option-label { - display: inline-block; - height: 100%; - padding: 0 1px 0 5px; - } + box-sizing: border-box; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; - &:not(.disabled):hover { - text-decoration: none; - background: $typedInput-button-background-hover; - } - &:focus { - text-decoration: none; - outline: none; - box-shadow: inset 0 0 0 1px $form-input-focus-color; - } - &:not(.disabled):active { - background: $typedInput-button-background-active; - text-decoration: none; - } - &.red-ui-typedInput-full-width { - width: 100%; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - } - } - - button.red-ui-typedInput-option-expand { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - right: 0; - } - - button.red-ui-typedInput-option-trigger { - border-top-left-radius: 0px; - border-bottom-left-radius: 0px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - padding: 0 0 0 0; - position:absolute; - right: 0; - .red-ui-typedInput-option-label { - background:$typedInput-button-background; - position:absolute; - left:0; - right:23px; - top: 0; - padding: 0 5px 0 8px; - i.red-ui-typedInput-icon { - margin-right: 4px; - margin-top: 4px; - } - } - .red-ui-typedInput-option-caret { - top: 0; - position: absolute; - right: 0; - width: 17px; - padding-left: 6px; - } - &:focus { - box-shadow: none; - } - &:focus .red-ui-typedInput-option-caret { - box-shadow: inset 0 0 0 1px $form-input-focus-color; - } } } .red-ui-typedInput-options { @include component-shadow; + font-family: $primary-font; + font-size: $primary-font-size; + position: absolute; + max-height: 350px; + overflow-y: auto; border: 1px solid $primary-border-color; - background: #fff; + box-sizing: border-box; + background: $secondary-background; z-index: 2000; a { padding: 6px 18px 6px 6px; display: block; border-bottom: 1px solid $secondary-border-color; - color: #333; + color: $form-text-color; &:hover { text-decoration: none; - background: $typedInput-button-background-hover; + background: $workspace-button-background-hover; } &:focus { text-decoration: none; - background: $typedInput-button-background-active; + background: $workspace-button-background-active; outline: none; } &:active { text-decoration: none; - background: $typedInput-button-background-active; + background: $workspace-button-background-active; + } + input[type="checkbox"] { + margin-right: 6px; } } .red-ui-typedInput-icon { - margin-right: 4px; + margin-right: 6px; + } +} +button.red-ui-typedInput-type-select, +button.red-ui-typedInput-option-expand, +button.red-ui-typedInput-option-trigger + { + text-align: left; + border: none; + position: absolute; + box-sizing: border-box; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + padding: 0 1px 0 5px; + display:inline-block; + background: $form-button-background; + height: 32px; + line-height: 30px; + min-width: 23px; + vertical-align: middle; + color: $form-text-color; + i.red-ui-typedInput-icon { + margin-left: 1px; + margin-right: 2px; + vertical-align: middle; + } + &.disabled { + cursor: default; + i.red-ui-typedInput-icon { + color: $secondary-text-color-disabled; + } + } + .red-ui-typedInput-type-label,.red-ui-typedInput-option-label { + display: inline-block; + vertical-align: middle; + height: 100%; + padding: 0 1px 0 5px; + img { + max-width: none; + } + } + + &:not(.disabled):hover { + text-decoration: none; + background: $workspace-button-background-hover; + } + &:focus { + text-decoration: none; + outline: none; + box-shadow: inset 0 0 0 1px $form-input-focus-color; + } + &:not(.disabled):active { + background: $workspace-button-background-active; + text-decoration: none; + } + &.red-ui-typedInput-full-width { + width: 100%; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + &:before { + content:''; + display: inline-block; + height: 100%; + vertical-align: middle; + } +} +button.red-ui-typedInput-option-expand { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + right: 0; +} + +button.red-ui-typedInput-option-trigger { + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + padding: 0 0 0 0; + position:absolute; + right: 0; + .red-ui-typedInput-option-label { + background:$form-button-background; + color: $form-text-color; + position:absolute; + left:0; + right:23px; + top: 0; + padding: 0 5px 0 8px; + i.red-ui-typedInput-icon { + margin-right: 4px; + } + } + .red-ui-typedInput-option-caret { + top: 0; + position: absolute; + right: 0; + bottom: 0; + width: 17px; + padding-left: 5px; + &:before { + content:''; + display: inline-block; + height: 100%; + vertical-align: middle; + } + } + &:focus { + box-shadow: none; + } + &:focus .red-ui-typedInput-option-caret { + box-shadow: inset 0 0 0 1px $form-input-focus-color; } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/userSettings.scss b/packages/node_modules/@node-red/editor-client/src/sass/userSettings.scss index 61ccf8f2d..60afeebe4 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/userSettings.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/userSettings.scss @@ -14,15 +14,15 @@ * limitations under the License. **/ -#user-settings-tabs-container { +.red-ui-settings-tabs-container { position: absolute; top: 0; left: 0; bottom: 0; width: 120px; - background: #f3f3f3; + background: $tertiary-background; } -#user-settings-tabs-content { +.red-ui-settings-tabs-content { position: absolute; top: 0; left: 120px; @@ -60,7 +60,7 @@ } } -#user-settings-tab-view { +#red-ui-settings-tab-view { position: absolute; top:0; right: 0; @@ -69,10 +69,10 @@ padding: 8px 20px 20px; overflow-y: scroll; } -.user-settings-row { +.red-ui-settings-row { padding: 5px 10px 2px; } -.user-settings-section { +.red-ui-settings-section { position: relative; &:after { content: ""; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss b/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss index 726c67dee..f6255eacf 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/workspace.scss @@ -14,24 +14,7 @@ * limitations under the License. **/ - -#chart { - overflow: auto; - background: #e3e3e3; - position: absolute; - bottom:25px; - top: 35px; - left:0px; - right:0px; - box-sizing:border-box; - transition: right 0.2s ease; -} - -#chart:focus { - outline: none; -} - -#workspace { +#red-ui-workspace { position: absolute; margin: 0; top:0px; @@ -41,33 +24,70 @@ overflow: hidden; @include component-border; transition: left 0.1s ease-in-out; - } -.palette-closed #workspace { +#red-ui-workspace-chart { + overflow: auto; + position: absolute; + bottom:25px; + top: 35px; + left:0px; + right:0px; + box-sizing:border-box; + transition: right 0.2s ease; + &:focus { + outline: none; + } +} +#red-ui-workspace-tabs-shade { + @include shade; + z-index: 2; + bottom: auto; + height: 35px; +} + +.red-ui-workspace-chart-background { + fill: $view-background; +} +.red-ui-workspace-chart-grid line { + fill: none; + shape-rendering: crispEdges; + stroke: $view-grid-color; + stroke-width: 1px; +} +.red-ui-workspace-select-mode { + .red-ui-workspace-chart-background { + opacity: 0.7; + // fill: $view-select-mode-background; + } + .red-ui-workspace-chart-grid line { + opacity: 0.8; + } +} + +.red-ui-palette-closed #red-ui-workspace { left: 7px; } -.workspace-footer-button { - @include component-footer-button; -} -.workspace-footer-button-toggle { - @include component-footer-button-toggle; -} -#workspace-footer { - @include component-footer; -} +// .workspace-footer-button { +// @include component-footer-button; +// margin-left: 2px; +// margin-right: 2px; +// } +// +// .workspace-footer-button-toggle { +// @include component-footer-button-toggle; +// margin-left: 2px; +// margin-right: 2px; +// } -#workspace-tabs:not(.workspace-focussed) { +#red-ui-workspace-tabs:not(.red-ui-workspace-focussed) { opacity:0.8; - li.red-ui-tab.active a { - color:#666; - } } -.workspace-disabled-icon { +.red-ui-workspace-disabled-icon { display: none; } -.workspace-disabled { +.red-ui-workspace-disabled { &.red-ui-tab { border-top-style: dashed; border-left-style: dashed; @@ -75,14 +95,80 @@ a { font-style: italic; - color: #aaa !important; + color: $tab-text-color-disabled-inactive !important; } &.active a { font-weight: normal; - color: #999 !important; + color: $tab-text-color-disabled-active !important; } - .workspace-disabled-icon { + .red-ui-workspace-disabled-icon { display: inline; } } } + + +#red-ui-navigator-canvas { + position: absolute; + bottom: 0; + right:0; + zIndex: 101; + border-left: 1px solid $primary-border-color; + border-top: 1px solid $primary-border-color; + background: $view-navigator-background; + box-shadow: -1px 0 3px $shadow; +} +.red-ui-navigator-border { + stroke-dasharray: 5,5; + pointer-events: none; + stroke: $secondary-border-color; + strokeWidth: 1; + fill: $view-background; +} + +.red-ui-component-footer { + @include component-footer; + + > .button-group { + display: inline-block; + > .red-ui-footer-button { + margin-top: -1px; + } + } +} + +a.red-ui-footer-button, +button.red-ui-footer-button { + @include component-footer-button; +} + +a.red-ui-footer-button-toggle, +button.red-ui-footer-button-toggle { + @include component-footer-button-toggle; +} + +.red-ui-statusbar-widget { + margin: 0 2px; + display: inline-block; + vertical-align: middle; + height: 100%; + line-height: 20px; +} + +.red-ui-statusbar-bucket { + position: absolute; + top: 0; + bottom: 0; +} +.red-ui-statusbar-bucket-left { + left: 10px; + .red-ui-statusbar-widget:first-child { + margin-left: 0; + } +} +.red-ui-statusbar-bucket-right { + right: 10px; + .red-ui-statusbar-widget:last-child { + margin-right: 0; + } +} diff --git a/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss b/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss index 3224707fe..fbc0dbdeb 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/workspaceToolbar.scss @@ -15,7 +15,7 @@ **/ -#workspace-toolbar { +#red-ui-workspace-toolbar { display: none; color: $workspace-button-color; font-size: 12px; @@ -27,7 +27,7 @@ padding: 7px; height: 40px; box-sizing: border-box; - background: #fff; + background: $secondary-background; border-bottom: 1px solid $secondary-border-color; white-space: nowrap; transition: right 0.2s ease; @@ -77,7 +77,7 @@ margin: 0; height: 24px; font-size: 12px; - background: #f9f9f9; + background: $form-input-background; line-height: 22px; box-sizing: border-box; } diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.css b/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.css deleted file mode 100644 index d82cf6e7c..000000000 --- a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.css +++ /dev/null @@ -1,5038 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -audio:not([controls]) { - display: none; -} - -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -a:hover, -a:active { - outline: 0; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - width: auto\9; - height: auto; - max-width: 100%; - vertical-align: middle; - border: 0; - -ms-interpolation-mode: bicubic; -} - -#map_canvas img, -.google-maps img { - max-width: none; -} - -body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 20px; - color: #333333; - background-color: #ffffff; -} - -a { - color: #0088cc; - text-decoration: none; -} - -a:hover, -a:focus { - color: #005580; - text-decoration: underline; -} - -.img-rounded { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.img-polaroid { - padding: 4px; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} - -.img-circle { - -webkit-border-radius: 500px; - -moz-border-radius: 500px; - border-radius: 500px; -} - -.row { - margin-left: -20px; - *zoom: 1; -} - -.row:before, -.row:after { - display: table; - line-height: 0; - content: ""; -} - -.row:after { - clear: both; -} - -[class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; -} - -.container, -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.span12 { - width: 940px; -} - -.span11 { - width: 860px; -} - -.span10 { - width: 780px; -} - -.span9 { - width: 700px; -} - -.span8 { - width: 620px; -} - -.span7 { - width: 540px; -} - -.span6 { - width: 460px; -} - -.span5 { - width: 380px; -} - -.span4 { - width: 300px; -} - -.span3 { - width: 220px; -} - -.span2 { - width: 140px; -} - -.span1 { - width: 60px; -} - -.offset12 { - margin-left: 980px; -} - -.offset11 { - margin-left: 900px; -} - -.offset10 { - margin-left: 820px; -} - -.offset9 { - margin-left: 740px; -} - -.offset8 { - margin-left: 660px; -} - -.offset7 { - margin-left: 580px; -} - -.offset6 { - margin-left: 500px; -} - -.offset5 { - margin-left: 420px; -} - -.offset4 { - margin-left: 340px; -} - -.offset3 { - margin-left: 260px; -} - -.offset2 { - margin-left: 180px; -} - -.offset1 { - margin-left: 100px; -} - -.row-fluid { - width: 100%; - *zoom: 1; -} - -.row-fluid:before, -.row-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.row-fluid:after { - clear: both; -} - -.row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.127659574468085%; - *margin-left: 2.074468085106383%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.row-fluid [class*="span"]:first-child { - margin-left: 0; -} - -.row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.127659574468085%; -} - -.row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; -} - -.row-fluid .span11 { - width: 91.48936170212765%; - *width: 91.43617021276594%; -} - -.row-fluid .span10 { - width: 82.97872340425532%; - *width: 82.92553191489361%; -} - -.row-fluid .span9 { - width: 74.46808510638297%; - *width: 74.41489361702126%; -} - -.row-fluid .span8 { - width: 65.95744680851064%; - *width: 65.90425531914893%; -} - -.row-fluid .span7 { - width: 57.44680851063829%; - *width: 57.39361702127659%; -} - -.row-fluid .span6 { - width: 48.93617021276595%; - *width: 48.88297872340425%; -} - -.row-fluid .span5 { - width: 40.42553191489362%; - *width: 40.37234042553192%; -} - -.row-fluid .span4 { - width: 31.914893617021278%; - *width: 31.861702127659576%; -} - -.row-fluid .span3 { - width: 23.404255319148934%; - *width: 23.351063829787233%; -} - -.row-fluid .span2 { - width: 14.893617021276595%; - *width: 14.840425531914894%; -} - -.row-fluid .span1 { - width: 6.382978723404255%; - *width: 6.329787234042553%; -} - -.row-fluid .offset12 { - margin-left: 104.25531914893617%; - *margin-left: 104.14893617021275%; -} - -.row-fluid .offset12:first-child { - margin-left: 102.12765957446808%; - *margin-left: 102.02127659574467%; -} - -.row-fluid .offset11 { - margin-left: 95.74468085106382%; - *margin-left: 95.6382978723404%; -} - -.row-fluid .offset11:first-child { - margin-left: 93.61702127659574%; - *margin-left: 93.51063829787232%; -} - -.row-fluid .offset10 { - margin-left: 87.23404255319149%; - *margin-left: 87.12765957446807%; -} - -.row-fluid .offset10:first-child { - margin-left: 85.1063829787234%; - *margin-left: 84.99999999999999%; -} - -.row-fluid .offset9 { - margin-left: 78.72340425531914%; - *margin-left: 78.61702127659572%; -} - -.row-fluid .offset9:first-child { - margin-left: 76.59574468085106%; - *margin-left: 76.48936170212764%; -} - -.row-fluid .offset8 { - margin-left: 70.2127659574468%; - *margin-left: 70.10638297872339%; -} - -.row-fluid .offset8:first-child { - margin-left: 68.08510638297872%; - *margin-left: 67.9787234042553%; -} - -.row-fluid .offset7 { - margin-left: 61.70212765957446%; - *margin-left: 61.59574468085106%; -} - -.row-fluid .offset7:first-child { - margin-left: 59.574468085106375%; - *margin-left: 59.46808510638297%; -} - -.row-fluid .offset6 { - margin-left: 53.191489361702125%; - *margin-left: 53.085106382978715%; -} - -.row-fluid .offset6:first-child { - margin-left: 51.063829787234035%; - *margin-left: 50.95744680851063%; -} - -.row-fluid .offset5 { - margin-left: 44.68085106382979%; - *margin-left: 44.57446808510638%; -} - -.row-fluid .offset5:first-child { - margin-left: 42.5531914893617%; - *margin-left: 42.4468085106383%; -} - -.row-fluid .offset4 { - margin-left: 36.170212765957444%; - *margin-left: 36.06382978723405%; -} - -.row-fluid .offset4:first-child { - margin-left: 34.04255319148936%; - *margin-left: 33.93617021276596%; -} - -.row-fluid .offset3 { - margin-left: 27.659574468085104%; - *margin-left: 27.5531914893617%; -} - -.row-fluid .offset3:first-child { - margin-left: 25.53191489361702%; - *margin-left: 25.425531914893618%; -} - -.row-fluid .offset2 { - margin-left: 19.148936170212764%; - *margin-left: 19.04255319148936%; -} - -.row-fluid .offset2:first-child { - margin-left: 17.02127659574468%; - *margin-left: 16.914893617021278%; -} - -.row-fluid .offset1 { - margin-left: 10.638297872340425%; - *margin-left: 10.53191489361702%; -} - -.row-fluid .offset1:first-child { - margin-left: 8.51063829787234%; - *margin-left: 8.404255319148938%; -} - -[class*="span"].hide, -.row-fluid [class*="span"].hide { - display: none; -} - -[class*="span"].pull-right, -.row-fluid [class*="span"].pull-right { - float: right; -} - -.container { - margin-right: auto; - margin-left: auto; - *zoom: 1; -} - -.container:before, -.container:after { - display: table; - line-height: 0; - content: ""; -} - -.container:after { - clear: both; -} - -.container-fluid { - padding-right: 20px; - padding-left: 20px; - *zoom: 1; -} - -.container-fluid:before, -.container-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.container-fluid:after { - clear: both; -} - -p { - margin: 0 0 10px; -} - -.lead { - margin-bottom: 20px; - font-size: 21px; - font-weight: 200; - line-height: 30px; -} - -small { - font-size: 85%; -} - -strong { - font-weight: bold; -} - -em { - font-style: italic; -} - -cite { - font-style: normal; -} - -.muted { - color: #999999; -} - -a.muted:hover, -a.muted:focus { - color: #808080; -} - -.text-warning { - color: #c09853; -} - -a.text-warning:hover, -a.text-warning:focus { - color: #a47e3c; -} - -.text-error { - color: #b94a48; -} - -a.text-error:hover, -a.text-error:focus { - color: #953b39; -} - -.text-info { - color: #3a87ad; -} - -a.text-info:hover, -a.text-info:focus { - color: #2d6987; -} - -.text-success { - color: #468847; -} - -a.text-success:hover, -a.text-success:focus { - color: #356635; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 10px 0; - font-family: inherit; - font-weight: bold; - line-height: 20px; - color: inherit; - text-rendering: optimizelegibility; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - line-height: 1; - color: #999999; -} - -h1, -h2, -h3 { - line-height: 40px; -} - -h1 { - font-size: 38.5px; -} - -h2 { - font-size: 31.5px; -} - -h3 { - font-size: 24.5px; -} - -h4 { - font-size: 17.5px; -} - -h5 { - font-size: 14px; -} - -h6 { - font-size: 11.9px; -} - -h1 small { - font-size: 24.5px; -} - -h2 small { - font-size: 17.5px; -} - -h3 small { - font-size: 14px; -} - -h4 small { - font-size: 14px; -} - -.page-header { - padding-bottom: 9px; - margin: 20px 0 30px; - border-bottom: 1px solid #eeeeee; -} - -ul, -ol { - padding: 0; - margin: 0 0 10px 25px; -} - -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} - -li { - line-height: 20px; -} - -ul.unstyled, -ol.unstyled { - margin-left: 0; - list-style: none; -} - -ul.inline, -ol.inline { - margin-left: 0; - list-style: none; -} - -ul.inline > li, -ol.inline > li { - display: inline-block; - *display: inline; - padding-right: 5px; - padding-left: 5px; - *zoom: 1; -} - -dl { - margin-bottom: 20px; -} - -dt, -dd { - line-height: 20px; -} - -dt { - font-weight: bold; -} - -dd { - margin-left: 10px; -} - -.dl-horizontal { - *zoom: 1; -} - -.dl-horizontal:before, -.dl-horizontal:after { - display: table; - line-height: 0; - content: ""; -} - -.dl-horizontal:after { - clear: both; -} - -.dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; -} - -.dl-horizontal dd { - margin-left: 180px; -} - -hr { - margin: 20px 0; - border: 0; - border-top: 1px solid #eeeeee; - border-bottom: 1px solid #ffffff; -} - -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 0 0 0 15px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - margin-bottom: 0; - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} - -blockquote small { - display: block; - line-height: 20px; - color: #999999; -} - -blockquote small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} - -blockquote.pull-right small:before { - content: ''; -} - -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} - -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} - -address { - display: block; - margin-bottom: 20px; - font-style: normal; - line-height: 20px; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; -} - -.table { - width: 100%; - margin-bottom: 20px; -} - -.table th, -.table td { - padding: 8px; - line-height: 20px; - text-align: left; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table th { - font-weight: bold; -} - -.table thead th { - vertical-align: bottom; -} - -.table caption + thead tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child th, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child th, -.table thead:first-child tr:first-child td { - border-top: 0; -} - -.table tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table .table { - background-color: #ffffff; -} - -.table-condensed th, -.table-condensed td { - padding: 4px 5px; -} - -.table-bordered { - border: 1px solid #dddddd; - border-collapse: separate; - *border-collapse: collapse; - border-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.table-bordered th, -.table-bordered td { - border-left: 1px solid #dddddd; -} - -.table-bordered caption + thead tr:first-child th, -.table-bordered caption + tbody tr:first-child th, -.table-bordered caption + tbody tr:first-child td, -.table-bordered colgroup + thead tr:first-child th, -.table-bordered colgroup + tbody tr:first-child th, -.table-bordered colgroup + tbody tr:first-child td, -.table-bordered thead:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} - -.table-bordered thead:first-child tr:first-child > th:first-child, -.table-bordered tbody:first-child tr:first-child > td:first-child, -.table-bordered tbody:first-child tr:first-child > th:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered thead:first-child tr:first-child > th:last-child, -.table-bordered tbody:first-child tr:first-child > td:last-child, -.table-bordered tbody:first-child tr:first-child > th:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:first-child, -.table-bordered tbody:last-child tr:last-child > td:first-child, -.table-bordered tbody:last-child tr:last-child > th:first-child, -.table-bordered tfoot:last-child tr:last-child > td:first-child, -.table-bordered tfoot:last-child tr:last-child > th:first-child { - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:last-child, -.table-bordered tbody:last-child tr:last-child > td:last-child, -.table-bordered tbody:last-child tr:last-child > th:last-child, -.table-bordered tfoot:last-child tr:last-child > td:last-child, -.table-bordered tfoot:last-child tr:last-child > th:last-child { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomleft: 0; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomright: 0; -} - -.table-bordered caption + thead tr:first-child th:first-child, -.table-bordered caption + tbody tr:first-child td:first-child, -.table-bordered colgroup + thead tr:first-child th:first-child, -.table-bordered colgroup + tbody tr:first-child td:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered caption + thead tr:first-child th:last-child, -.table-bordered caption + tbody tr:first-child td:last-child, -.table-bordered colgroup + thead tr:first-child th:last-child, -.table-bordered colgroup + tbody tr:first-child td:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} - -.table-hover tbody tr:hover > td, -.table-hover tbody tr:hover > th { - background-color: #f5f5f5; -} - -table td[class*="span"], -table th[class*="span"], -.row-fluid table td[class*="span"], -.row-fluid table th[class*="span"] { - display: table-cell; - float: none; - margin-left: 0; -} - -.table td.span1, -.table th.span1 { - float: none; - width: 44px; - margin-left: 0; -} - -.table td.span2, -.table th.span2 { - float: none; - width: 124px; - margin-left: 0; -} - -.table td.span3, -.table th.span3 { - float: none; - width: 204px; - margin-left: 0; -} - -.table td.span4, -.table th.span4 { - float: none; - width: 284px; - margin-left: 0; -} - -.table td.span5, -.table th.span5 { - float: none; - width: 364px; - margin-left: 0; -} - -.table td.span6, -.table th.span6 { - float: none; - width: 444px; - margin-left: 0; -} - -.table td.span7, -.table th.span7 { - float: none; - width: 524px; - margin-left: 0; -} - -.table td.span8, -.table th.span8 { - float: none; - width: 604px; - margin-left: 0; -} - -.table td.span9, -.table th.span9 { - float: none; - width: 684px; - margin-left: 0; -} - -.table td.span10, -.table th.span10 { - float: none; - width: 764px; - margin-left: 0; -} - -.table td.span11, -.table th.span11 { - float: none; - width: 844px; - margin-left: 0; -} - -.table td.span12, -.table th.span12 { - float: none; - width: 924px; - margin-left: 0; -} - -.table tbody tr.success > td { - background-color: #dff0d8; -} - -.table tbody tr.error > td { - background-color: #f2dede; -} - -.table tbody tr.warning > td { - background-color: #fcf8e3; -} - -.table tbody tr.info > td { - background-color: #d9edf7; -} - -.table-hover tbody tr.success:hover > td { - background-color: #d0e9c6; -} - -.table-hover tbody tr.error:hover > td { - background-color: #ebcccc; -} - -.table-hover tbody tr.warning:hover > td { - background-color: #faf2cc; -} - -.table-hover tbody tr.info:hover > td { - background-color: #c4e3f3; -} - -[class^="icon-"], -[class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - margin-top: 1px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("../img/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; -} - -/* White icons with optional class, or on hover/focus/active states of certain elements */ - -.icon-white, -.nav-pills > .active > a > [class^="icon-"], -.nav-pills > .active > a > [class*=" icon-"], -.nav-list > .active > a > [class^="icon-"], -.nav-list > .active > a > [class*=" icon-"], -.navbar-inverse .nav > .active > a > [class^="icon-"], -.navbar-inverse .nav > .active > a > [class*=" icon-"], -.dropdown-menu > li > a:hover > [class^="icon-"], -.dropdown-menu > li > a:focus > [class^="icon-"], -.dropdown-menu > li > a:hover > [class*=" icon-"], -.dropdown-menu > li > a:focus > [class*=" icon-"], -.dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"], -.dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:focus > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"], -.dropdown-submenu:focus > a > [class*=" icon-"] { - background-image: url("../img/glyphicons-halflings-white.png"); -} - -.icon-glass { - background-position: 0 0; -} - -.icon-music { - background-position: -24px 0; -} - -.icon-search { - background-position: -48px 0; -} - -.icon-envelope { - background-position: -72px 0; -} - -.icon-heart { - background-position: -96px 0; -} - -.icon-star { - background-position: -120px 0; -} - -.icon-star-empty { - background-position: -144px 0; -} - -.icon-user { - background-position: -168px 0; -} - -.icon-film { - background-position: -192px 0; -} - -.icon-th-large { - background-position: -216px 0; -} - -.icon-th { - background-position: -240px 0; -} - -.icon-th-list { - background-position: -264px 0; -} - -.icon-ok { - background-position: -288px 0; -} - -.icon-remove { - background-position: -312px 0; -} - -.icon-zoom-in { - background-position: -336px 0; -} - -.icon-zoom-out { - background-position: -360px 0; -} - -.icon-off { - background-position: -384px 0; -} - -.icon-signal { - background-position: -408px 0; -} - -.icon-cog { - background-position: -432px 0; -} - -.icon-trash { - background-position: -456px 0; -} - -.icon-home { - background-position: 0 -24px; -} - -.icon-file { - background-position: -24px -24px; -} - -.icon-time { - background-position: -48px -24px; -} - -.icon-road { - background-position: -72px -24px; -} - -.icon-download-alt { - background-position: -96px -24px; -} - -.icon-download { - background-position: -120px -24px; -} - -.icon-upload { - background-position: -144px -24px; -} - -.icon-inbox { - background-position: -168px -24px; -} - -.icon-play-circle { - background-position: -192px -24px; -} - -.icon-repeat { - background-position: -216px -24px; -} - -.icon-refresh { - background-position: -240px -24px; -} - -.icon-list-alt { - background-position: -264px -24px; -} - -.icon-lock { - background-position: -287px -24px; -} - -.icon-flag { - background-position: -312px -24px; -} - -.icon-headphones { - background-position: -336px -24px; -} - -.icon-volume-off { - background-position: -360px -24px; -} - -.icon-volume-down { - background-position: -384px -24px; -} - -.icon-volume-up { - background-position: -408px -24px; -} - -.icon-qrcode { - background-position: -432px -24px; -} - -.icon-barcode { - background-position: -456px -24px; -} - -.icon-tag { - background-position: 0 -48px; -} - -.icon-tags { - background-position: -25px -48px; -} - -.icon-book { - background-position: -48px -48px; -} - -.icon-bookmark { - background-position: -72px -48px; -} - -.icon-print { - background-position: -96px -48px; -} - -.icon-camera { - background-position: -120px -48px; -} - -.icon-font { - background-position: -144px -48px; -} - -.icon-bold { - background-position: -167px -48px; -} - -.icon-italic { - background-position: -192px -48px; -} - -.icon-text-height { - background-position: -216px -48px; -} - -.icon-text-width { - background-position: -240px -48px; -} - -.icon-align-left { - background-position: -264px -48px; -} - -.icon-align-center { - background-position: -288px -48px; -} - -.icon-align-right { - background-position: -312px -48px; -} - -.icon-align-justify { - background-position: -336px -48px; -} - -.icon-list { - background-position: -360px -48px; -} - -.icon-indent-left { - background-position: -384px -48px; -} - -.icon-indent-right { - background-position: -408px -48px; -} - -.icon-facetime-video { - background-position: -432px -48px; -} - -.icon-picture { - background-position: -456px -48px; -} - -.icon-pencil { - background-position: 0 -72px; -} - -.icon-map-marker { - background-position: -24px -72px; -} - -.icon-adjust { - background-position: -48px -72px; -} - -.icon-tint { - background-position: -72px -72px; -} - -.icon-edit { - background-position: -96px -72px; -} - -.icon-share { - background-position: -120px -72px; -} - -.icon-check { - background-position: -144px -72px; -} - -.icon-move { - background-position: -168px -72px; -} - -.icon-step-backward { - background-position: -192px -72px; -} - -.icon-fast-backward { - background-position: -216px -72px; -} - -.icon-backward { - background-position: -240px -72px; -} - -.icon-play { - background-position: -264px -72px; -} - -.icon-pause { - background-position: -288px -72px; -} - -.icon-stop { - background-position: -312px -72px; -} - -.icon-forward { - background-position: -336px -72px; -} - -.icon-fast-forward { - background-position: -360px -72px; -} - -.icon-step-forward { - background-position: -384px -72px; -} - -.icon-eject { - background-position: -408px -72px; -} - -.icon-chevron-left { - background-position: -432px -72px; -} - -.icon-chevron-right { - background-position: -456px -72px; -} - -.icon-plus-sign { - background-position: 0 -96px; -} - -.icon-minus-sign { - background-position: -24px -96px; -} - -.icon-remove-sign { - background-position: -48px -96px; -} - -.icon-ok-sign { - background-position: -72px -96px; -} - -.icon-question-sign { - background-position: -96px -96px; -} - -.icon-info-sign { - background-position: -120px -96px; -} - -.icon-screenshot { - background-position: -144px -96px; -} - -.icon-remove-circle { - background-position: -168px -96px; -} - -.icon-ok-circle { - background-position: -192px -96px; -} - -.icon-ban-circle { - background-position: -216px -96px; -} - -.icon-arrow-left { - background-position: -240px -96px; -} - -.icon-arrow-right { - background-position: -264px -96px; -} - -.icon-arrow-up { - background-position: -289px -96px; -} - -.icon-arrow-down { - background-position: -312px -96px; -} - -.icon-share-alt { - background-position: -336px -96px; -} - -.icon-resize-full { - background-position: -360px -96px; -} - -.icon-resize-small { - background-position: -384px -96px; -} - -.icon-plus { - background-position: -408px -96px; -} - -.icon-minus { - background-position: -433px -96px; -} - -.icon-asterisk { - background-position: -456px -96px; -} - -.icon-exclamation-sign { - background-position: 0 -120px; -} - -.icon-gift { - background-position: -24px -120px; -} - -.icon-leaf { - background-position: -48px -120px; -} - -.icon-fire { - background-position: -72px -120px; -} - -.icon-eye-open { - background-position: -96px -120px; -} - -.icon-eye-close { - background-position: -120px -120px; -} - -.icon-warning-sign { - background-position: -144px -120px; -} - -.icon-plane { - background-position: -168px -120px; -} - -.icon-calendar { - background-position: -192px -120px; -} - -.icon-random { - width: 16px; - background-position: -216px -120px; -} - -.icon-comment { - background-position: -240px -120px; -} - -.icon-magnet { - background-position: -264px -120px; -} - -.icon-chevron-up { - background-position: -288px -120px; -} - -.icon-chevron-down { - background-position: -313px -119px; -} - -.icon-retweet { - background-position: -336px -120px; -} - -.icon-shopping-cart { - background-position: -360px -120px; -} - -.icon-folder-close { - width: 16px; - background-position: -384px -120px; -} - -.icon-folder-open { - width: 16px; - background-position: -408px -120px; -} - -.icon-resize-vertical { - background-position: -432px -119px; -} - -.icon-resize-horizontal { - background-position: -456px -118px; -} - -.icon-hdd { - background-position: 0 -144px; -} - -.icon-bullhorn { - background-position: -24px -144px; -} - -.icon-bell { - background-position: -48px -144px; -} - -.icon-certificate { - background-position: -72px -144px; -} - -.icon-thumbs-up { - background-position: -96px -144px; -} - -.icon-thumbs-down { - background-position: -120px -144px; -} - -.icon-hand-right { - background-position: -144px -144px; -} - -.icon-hand-left { - background-position: -168px -144px; -} - -.icon-hand-up { - background-position: -192px -144px; -} - -.icon-hand-down { - background-position: -216px -144px; -} - -.icon-circle-arrow-right { - background-position: -240px -144px; -} - -.icon-circle-arrow-left { - background-position: -264px -144px; -} - -.icon-circle-arrow-up { - background-position: -288px -144px; -} - -.icon-circle-arrow-down { - background-position: -312px -144px; -} - -.icon-globe { - background-position: -336px -144px; -} - -.icon-wrench { - background-position: -360px -144px; -} - -.icon-tasks { - background-position: -384px -144px; -} - -.icon-filter { - background-position: -408px -144px; -} - -.icon-briefcase { - background-position: -432px -144px; -} - -.icon-fullscreen { - background-position: -456px -144px; -} - -.dropup, -.dropdown { - position: relative; -} - -.dropdown-toggle { - *margin-bottom: -3px; -} - -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 20px; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - outline: 0; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} - -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.open { - *z-index: 1000; -} - -.open > .dropdown-menu { - display: block; -} - -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: ""; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px 6px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} - -.dropup .dropdown-submenu > .dropdown-menu { - top: auto; - bottom: 0; - margin-top: 0; - margin-bottom: -2px; - -webkit-border-radius: 5px 5px 5px 0; - -moz-border-radius: 5px 5px 5px 0; - border-radius: 5px 5px 5px 0; -} - -.dropdown-submenu > a:after { - display: block; - float: right; - width: 0; - height: 0; - margin-top: 5px; - margin-right: -10px; - border-color: transparent; - border-left-color: #cccccc; - border-style: solid; - border-width: 5px 0 5px 5px; - content: " "; -} - -.dropdown-submenu:hover > a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.dropdown .dropdown-menu .nav-header { - padding-right: 20px; - padding-left: 20px; -} - -.typeahead { - z-index: 1051; - margin-top: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-large { - padding: 24px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.well-small { - padding: 9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -.collapse.in { - height: auto; -} - -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 20px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.btn { - display: inline-block; - *display: inline; - padding: 4px 12px; - margin-bottom: 0; - *margin-left: .3em; - font-size: 14px; - line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - *background-color: #e6e6e6; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #cccccc; - *border: 0; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-bottom-color: #b3b3b3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn:hover, -.btn:focus, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - color: #333333; - background-color: #e6e6e6; - *background-color: #d9d9d9; -} - -.btn:active, -.btn.active { - background-color: #cccccc \9; -} - -.btn:first-child { - *margin-left: 0; -} - -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn.active, -.btn:active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn.disabled, -.btn[disabled] { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-large { - padding: 11px 19px; - font-size: 17.5px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.btn-large [class^="icon-"], -.btn-large [class*=" icon-"] { - margin-top: 4px; -} - -.btn-small { - padding: 2px 10px; - font-size: 11.9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-small [class^="icon-"], -.btn-small [class*=" icon-"] { - margin-top: 0; -} - -.btn-mini [class^="icon-"], -.btn-mini [class*=" icon-"] { - margin-top: -1px; -} - -.btn-mini { - padding: 0 6px; - font-size: 10.5px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} - -.btn-primary { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #006dcc; - *background-color: #0044cc; - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); - background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-repeat: repeat-x; - border-color: #0044cc #0044cc #002a80; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - color: #ffffff; - background-color: #0044cc; - *background-color: #003bb3; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #003399 \9; -} - -.btn-warning { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #faa732; - *background-color: #f89406; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - color: #ffffff; - background-color: #f89406; - *background-color: #df8505; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #c67605 \9; -} - -.btn-danger { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #da4f49; - *background-color: #bd362f; - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-repeat: repeat-x; - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - color: #ffffff; - background-color: #bd362f; - *background-color: #a9302a; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} - -.btn-success { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #5bb75b; - *background-color: #51a351; - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); - background-repeat: repeat-x; - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - color: #ffffff; - background-color: #51a351; - *background-color: #499249; -} - -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} - -.btn-info { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #49afcd; - *background-color: #2f96b4; - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-repeat: repeat-x; - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - color: #ffffff; - background-color: #2f96b4; - *background-color: #2a85a0; -} - -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} - -.btn-inverse { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #363636; - *background-color: #222222; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-inverse:hover, -.btn-inverse:focus, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - color: #ffffff; - background-color: #222222; - *background-color: #151515; -} - -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} - -button.btn, -input[type="submit"].btn { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn::-moz-focus-inner, -input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} - -button.btn.btn-large, -input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; -} - -button.btn.btn-small, -input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn.btn-mini, -input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; -} - -.btn-link, -.btn-link:active, -.btn-link[disabled] { - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-link { - color: #0088cc; - cursor: pointer; - border-color: transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-link:hover, -.btn-link:focus { - color: #005580; - text-decoration: underline; - background-color: transparent; -} - -.btn-link[disabled]:hover, -.btn-link[disabled]:focus { - color: #333333; - text-decoration: none; -} - -.btn-group { - position: relative; - display: inline-block; - *display: inline; - *margin-left: .3em; - font-size: 0; - white-space: nowrap; - vertical-align: middle; - *zoom: 1; -} - -.btn-group:first-child { - *margin-left: 0; -} - -.btn-group + .btn-group { - margin-left: 5px; -} - -.btn-toolbar { - margin-top: 10px; - margin-bottom: 10px; - font-size: 0; -} - -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group { - margin-left: 5px; -} - -.btn-group > .btn { - position: relative; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group > .btn + .btn { - margin-left: -1px; -} - -.btn-group > .btn, -.btn-group > .dropdown-menu, -.btn-group > .popover { - font-size: 14px; -} - -.btn-group > .btn-mini { - font-size: 10.5px; -} - -.btn-group > .btn-small { - font-size: 11.9px; -} - -.btn-group > .btn-large { - font-size: 17.5px; -} - -.btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active { - z-index: 2; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group > .btn + .dropdown-toggle { - *padding-top: 5px; - padding-right: 8px; - *padding-bottom: 5px; - padding-left: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group > .btn-mini + .dropdown-toggle { - *padding-top: 2px; - padding-right: 5px; - *padding-bottom: 2px; - padding-left: 5px; -} - -.btn-group > .btn-small + .dropdown-toggle { - *padding-top: 5px; - *padding-bottom: 4px; -} - -.btn-group > .btn-large + .dropdown-toggle { - *padding-top: 7px; - padding-right: 12px; - *padding-bottom: 7px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; -} - -.btn-group.open .btn-primary.dropdown-toggle { - background-color: #0044cc; -} - -.btn-group.open .btn-warning.dropdown-toggle { - background-color: #f89406; -} - -.btn-group.open .btn-danger.dropdown-toggle { - background-color: #bd362f; -} - -.btn-group.open .btn-success.dropdown-toggle { - background-color: #51a351; -} - -.btn-group.open .btn-info.dropdown-toggle { - background-color: #2f96b4; -} - -.btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222222; -} - -.btn .caret { - margin-top: 8px; - margin-left: 0; -} - -.btn-large .caret { - margin-top: 6px; -} - -.btn-large .caret { - border-top-width: 5px; - border-right-width: 5px; - border-left-width: 5px; -} - -.btn-mini .caret, -.btn-small .caret { - margin-top: 8px; -} - -.dropup .btn-large .caret { - border-bottom-width: 5px; -} - -.btn-primary .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret, -.btn-inverse .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.btn-group-vertical { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - -.btn-group-vertical > .btn { - display: block; - float: none; - max-width: 100%; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group-vertical > .btn + .btn { - margin-top: -1px; - margin-left: 0; -} - -.btn-group-vertical > .btn:first-child { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.btn-group-vertical > .btn:last-child { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.btn-group-vertical > .btn-large:first-child { - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; -} - -.btn-group-vertical > .btn-large:last-child { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 20px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.alert, -.alert h4 { - color: #c09853; -} - -.alert h4 { - margin: 0; -} - -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 20px; -} - -.alert-success { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-success h4 { - color: #468847; -} - -.alert-danger, -.alert-error { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.alert-danger h4, -.alert-error h4 { - color: #b94a48; -} - -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-info h4 { - color: #3a87ad; -} - -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} - -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} - -.alert-block p + p { - margin-top: 5px; -} - -.nav { - margin-bottom: 20px; - margin-left: 0; - list-style: none; -} - -.nav > li > a { - display: block; -} - -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > li > a > img { - max-width: none; -} - -.nav > .pull-right { - float: right; -} - -.nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 20px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} - -.nav li + .nav-header { - margin-top: 9px; -} - -.nav-list { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 0; -} - -.nav-list > li > a, -.nav-list .nav-header { - margin-right: -15px; - margin-left: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -.nav-list > li > a { - padding: 3px 15px; -} - -.nav-list > .active > a, -.nav-list > .active > a:hover, -.nav-list > .active > a:focus { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} - -.nav-list [class^="icon-"], -.nav-list [class*=" icon-"] { - margin-right: 2px; -} - -.nav-list .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.nav-tabs, -.nav-pills { - *zoom: 1; -} - -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - line-height: 0; - content: ""; -} - -.nav-tabs:after, -.nav-pills:after { - clear: both; -} - -.nav-tabs > li, -.nav-pills > li { - float: left; -} - -.nav-tabs > li > a, -.nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} - -.nav-tabs { - border-bottom: 1px solid #ddd; -} - -.nav-tabs > li { - margin-bottom: -1px; -} - -.nav-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 20px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover, -.nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #dddddd; -} - -.nav-tabs > .active > a, -.nav-tabs > .active > a:hover, -.nav-tabs > .active > a:focus { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} - -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.nav-pills > .active > a, -.nav-pills > .active > a:hover, -.nav-pills > .active > a:focus { - color: #ffffff; - background-color: #0088cc; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li > a { - margin-right: 0; -} - -.nav-tabs.nav-stacked { - border-bottom: 0; -} - -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; -} - -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.nav-tabs.nav-stacked > li > a:hover, -.nav-tabs.nav-stacked > li > a:focus { - z-index: 2; - border-color: #ddd; -} - -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} - -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} - -.nav-tabs .dropdown-menu { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.nav-pills .dropdown-menu { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.nav .dropdown-toggle .caret { - margin-top: 6px; - border-top-color: #0088cc; - border-bottom-color: #0088cc; -} - -.nav .dropdown-toggle:hover .caret, -.nav .dropdown-toggle:focus .caret { - border-top-color: #005580; - border-bottom-color: #005580; -} - -/* move down carets for tabs */ - -.nav-tabs .dropdown-toggle .caret { - margin-top: 8px; -} - -.nav .active .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} - -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.nav > .dropdown.active > a:hover, -.nav > .dropdown.active > a:focus { - cursor: pointer; -} - -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover, -.nav > li.dropdown.open.active > a:focus { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} - -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret, -.nav li.dropdown.open a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} - -.tabs-stacked .open > a:hover, -.tabs-stacked .open > a:focus { - border-color: #999999; -} - -.tabbable { - *zoom: 1; -} - -.tabbable:before, -.tabbable:after { - display: table; - line-height: 0; - content: ""; -} - -.tabbable:after { - clear: both; -} - -.tab-content { - overflow: auto; -} - -.tabs-below > .nav-tabs, -.tabs-right > .nav-tabs, -.tabs-left > .nav-tabs { - border-bottom: 0; -} - -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} - -.tab-content > .active, -.pill-content > .active { - display: block; -} - -.tabs-below > .nav-tabs { - border-top: 1px solid #ddd; -} - -.tabs-below > .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} - -.tabs-below > .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.tabs-below > .nav-tabs > li > a:hover, -.tabs-below > .nav-tabs > li > a:focus { - border-top-color: #ddd; - border-bottom-color: transparent; -} - -.tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover, -.tabs-below > .nav-tabs > .active > a:focus { - border-color: transparent #ddd #ddd #ddd; -} - -.tabs-left > .nav-tabs > li, -.tabs-right > .nav-tabs > li { - float: none; -} - -.tabs-left > .nav-tabs > li > a, -.tabs-right > .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} - -.tabs-left > .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} - -.tabs-left > .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.tabs-left > .nav-tabs > li > a:hover, -.tabs-left > .nav-tabs > li > a:focus { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} - -.tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover, -.tabs-left > .nav-tabs .active > a:focus { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} - -.tabs-right > .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} - -.tabs-right > .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.tabs-right > .nav-tabs > li > a:hover, -.tabs-right > .nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} - -.tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover, -.tabs-right > .nav-tabs .active > a:focus { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} - -.nav > .disabled > a { - color: #999999; -} - -.nav > .disabled > a:hover, -.nav > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; -} - -.navbar { - *position: relative; - *z-index: 2; - margin-bottom: 20px; - overflow: visible; -} - -.navbar-inner { - min-height: 40px; - padding-right: 20px; - padding-left: 20px; - background-color: #fafafa; - background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); - background-repeat: repeat-x; - border: 1px solid #d4d4d4; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); - *zoom: 1; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -} - -.navbar-inner:before, -.navbar-inner:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-inner:after { - clear: both; -} - -.navbar .container { - width: auto; -} - -.nav-collapse.collapse { - height: auto; - overflow: visible; -} - -.navbar .brand { - display: block; - float: left; - padding: 10px 20px 10px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - color: #777777; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .brand:hover, -.navbar .brand:focus { - text-decoration: none; -} - -.navbar-text { - margin-bottom: 0; - line-height: 40px; - color: #777777; -} - -.navbar-link { - color: #777777; -} - -.navbar-link:hover, -.navbar-link:focus { - color: #333333; -} - -.navbar .divider-vertical { - height: 40px; - margin: 0 9px; - border-right: 1px solid #ffffff; - border-left: 1px solid #f2f2f2; -} - -.navbar .btn, -.navbar .btn-group { - margin-top: 5px; -} - -.navbar .btn-group .btn, -.navbar .input-prepend .btn, -.navbar .input-append .btn, -.navbar .input-prepend .btn-group, -.navbar .input-append .btn-group { - margin-top: 0; -} - -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} - -.navbar-form:before, -.navbar-form:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-form:after { - clear: both; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 5px; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .btn { - display: inline-block; - margin-bottom: 0; -} - -.navbar-form input[type="image"], -.navbar-form input[type="checkbox"], -.navbar-form input[type="radio"] { - margin-top: 3px; -} - -.navbar-form .input-append, -.navbar-form .input-prepend { - margin-top: 5px; - white-space: nowrap; -} - -.navbar-form .input-append input, -.navbar-form .input-prepend input { - margin-top: 0; -} - -.navbar-search { - position: relative; - float: left; - margin-top: 5px; - margin-bottom: 0; -} - -.navbar-search .search-query { - padding: 4px 14px; - margin-bottom: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.navbar-static-top { - position: static; - margin-bottom: 0; -} - -.navbar-static-top .navbar-inner { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - margin-bottom: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - border-width: 0 0 1px; -} - -.navbar-fixed-bottom .navbar-inner { - border-width: 1px 0 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner { - padding-right: 0; - padding-left: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.navbar-fixed-top { - top: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar-fixed-bottom { - bottom: 0; -} - -.navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} - -.navbar .nav.pull-right { - float: right; - margin-right: 0; -} - -.navbar .nav > li { - float: left; -} - -.navbar .nav > li > a { - float: none; - padding: 10px 15px 10px; - color: #777777; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .nav .dropdown-toggle .caret { - margin-top: 8px; -} - -.navbar .nav > li > a:focus, -.navbar .nav > li > a:hover { - color: #333333; - text-decoration: none; - background-color: transparent; -} - -.navbar .nav > .active > a, -.navbar .nav > .active > a:hover, -.navbar .nav > .active > a:focus { - color: #555555; - text-decoration: none; - background-color: #e5e5e5; - -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -} - -.navbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-right: 5px; - margin-left: 5px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #ededed; - *background-color: #e5e5e5; - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-repeat: repeat-x; - border-color: #e5e5e5 #e5e5e5 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} - -.navbar .btn-navbar:hover, -.navbar .btn-navbar:focus, -.navbar .btn-navbar:active, -.navbar .btn-navbar.active, -.navbar .btn-navbar.disabled, -.navbar .btn-navbar[disabled] { - color: #ffffff; - background-color: #e5e5e5; - *background-color: #d9d9d9; -} - -.navbar .btn-navbar:active, -.navbar .btn-navbar.active { - background-color: #cccccc \9; -} - -.navbar .btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} - -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} - -.navbar .nav > li > .dropdown-menu:before { - position: absolute; - top: -7px; - left: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; -} - -.navbar .nav > li > .dropdown-menu:after { - position: absolute; - top: -6px; - left: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - border-left: 6px solid transparent; - content: ''; -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:before { - top: auto; - bottom: -7px; - border-top: 7px solid #ccc; - border-bottom: 0; - border-top-color: rgba(0, 0, 0, 0.2); -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:after { - top: auto; - bottom: -6px; - border-top: 6px solid #ffffff; - border-bottom: 0; -} - -.navbar .nav li.dropdown > a:hover .caret, -.navbar .nav li.dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle, -.navbar .nav li.dropdown.active > .dropdown-toggle, -.navbar .nav li.dropdown.open.active > .dropdown-toggle { - color: #555555; - background-color: #e5e5e5; -} - -.navbar .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.navbar .pull-right > li > .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:before, -.navbar .nav > li > .dropdown-menu.pull-right:before { - right: 12px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:after, -.navbar .nav > li > .dropdown-menu.pull-right:after { - right: 13px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { - right: 100%; - left: auto; - margin-right: -1px; - margin-left: 0; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.navbar-inverse .navbar-inner { - background-color: #1b1b1b; - background-image: -moz-linear-gradient(top, #222222, #111111); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); - background-image: -webkit-linear-gradient(top, #222222, #111111); - background-image: -o-linear-gradient(top, #222222, #111111); - background-image: linear-gradient(to bottom, #222222, #111111); - background-repeat: repeat-x; - border-color: #252525; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); -} - -.navbar-inverse .brand, -.navbar-inverse .nav > li > a { - color: #999999; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.navbar-inverse .brand:hover, -.navbar-inverse .nav > li > a:hover, -.navbar-inverse .brand:focus, -.navbar-inverse .nav > li > a:focus { - color: #ffffff; -} - -.navbar-inverse .brand { - color: #999999; -} - -.navbar-inverse .navbar-text { - color: #999999; -} - -.navbar-inverse .nav > li > a:focus, -.navbar-inverse .nav > li > a:hover { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .nav .active > a, -.navbar-inverse .nav .active > a:hover, -.navbar-inverse .nav .active > a:focus { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .navbar-link { - color: #999999; -} - -.navbar-inverse .navbar-link:hover, -.navbar-inverse .navbar-link:focus { - color: #ffffff; -} - -.navbar-inverse .divider-vertical { - border-right-color: #222222; - border-left-color: #111111; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .nav li.dropdown > a:hover .caret, -.navbar-inverse .nav li.dropdown > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .navbar-search .search-query { - color: #ffffff; - background-color: #515151; - border-color: #111111; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} - -.navbar-inverse .navbar-search .search-query:-moz-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:focus, -.navbar-inverse .navbar-search .search-query.focused { - padding: 5px 15px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - outline: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -} - -.navbar-inverse .btn-navbar { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e0e0e; - *background-color: #040404; - background-image: -moz-linear-gradient(top, #151515, #040404); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); - background-image: -webkit-linear-gradient(top, #151515, #040404); - background-image: -o-linear-gradient(top, #151515, #040404); - background-image: linear-gradient(to bottom, #151515, #040404); - background-repeat: repeat-x; - border-color: #040404 #040404 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.navbar-inverse .btn-navbar:hover, -.navbar-inverse .btn-navbar:focus, -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active, -.navbar-inverse .btn-navbar.disabled, -.navbar-inverse .btn-navbar[disabled] { - color: #ffffff; - background-color: #040404; - *background-color: #000000; -} - -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active { - background-color: #000000 \9; -} - -.breadcrumb { - padding: 8px 15px; - margin: 0 0 20px; - list-style: none; - background-color: #f5f5f5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.breadcrumb > li { - display: inline-block; - *display: inline; - text-shadow: 0 1px 0 #ffffff; - *zoom: 1; -} - -.breadcrumb > li > .divider { - padding: 0 5px; - color: #ccc; -} - -.breadcrumb > .active { - color: #999999; -} - -.pagination { - margin: 20px 0; -} - -.pagination ul { - display: inline-block; - *display: inline; - margin-bottom: 0; - margin-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - *zoom: 1; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.pagination ul > li { - display: inline; -} - -.pagination ul > li > a, -.pagination ul > li > span { - float: left; - padding: 4px 12px; - line-height: 20px; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - border-left-width: 0; -} - -.pagination ul > li > a:hover, -.pagination ul > li > a:focus, -.pagination ul > .active > a, -.pagination ul > .active > span { - background-color: #f5f5f5; -} - -.pagination ul > .active > a, -.pagination ul > .active > span { - color: #999999; - cursor: default; -} - -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover, -.pagination ul > .disabled > a:focus { - color: #999999; - cursor: default; - background-color: transparent; -} - -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { - border-left-width: 1px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.pagination ul > li:last-child > a, -.pagination ul > li:last-child > span { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.pagination-centered { - text-align: center; -} - -.pagination-right { - text-align: right; -} - -.pagination-large ul > li > a, -.pagination-large ul > li > span { - padding: 11px 19px; - font-size: 17.5px; -} - -.pagination-large ul > li:first-child > a, -.pagination-large ul > li:first-child > span { - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.pagination-large ul > li:last-child > a, -.pagination-large ul > li:last-child > span { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.pagination-mini ul > li:first-child > a, -.pagination-small ul > li:first-child > a, -.pagination-mini ul > li:first-child > span, -.pagination-small ul > li:first-child > span { - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - -moz-border-radius-topleft: 3px; -} - -.pagination-mini ul > li:last-child > a, -.pagination-small ul > li:last-child > a, -.pagination-mini ul > li:last-child > span, -.pagination-small ul > li:last-child > span { - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; -} - -.pagination-small ul > li > a, -.pagination-small ul > li > span { - padding: 2px 10px; - font-size: 11.9px; -} - -.pagination-mini ul > li > a, -.pagination-mini ul > li > span { - padding: 0 6px; - font-size: 10.5px; -} - -.pager { - margin: 20px 0; - text-align: center; - list-style: none; - *zoom: 1; -} - -.pager:before, -.pager:after { - display: table; - line-height: 0; - content: ""; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -.pager .next > a, -.pager .next > span { - float: right; -} - -.pager .previous > a, -.pager .previous > span { - float: left; -} - -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - cursor: default; - background-color: #fff; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; -} - -.modal-backdrop, -.modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.modal { - position: fixed; - top: 10%; - left: 50%; - z-index: 1050; - width: 560px; - margin-left: -280px; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - -.modal.fade { - top: -25%; - -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; - -moz-transition: opacity 0.3s linear, top 0.3s ease-out; - -o-transition: opacity 0.3s linear, top 0.3s ease-out; - transition: opacity 0.3s linear, top 0.3s ease-out; -} - -.modal.fade.in { - top: 10%; -} - -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} - -.modal-header .close { - margin-top: 2px; -} - -.modal-header h3 { - margin: 0; - line-height: 30px; -} - -.modal-body { - position: relative; - max-height: 400px; - padding: 15px; - overflow-y: auto; -} - -.modal-form { - margin-bottom: 0; -} - -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - line-height: 0; - content: ""; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 11px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} - -.tooltip-inner { - max-width: 200px; - padding: 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-right-color: #000000; - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-left-color: #000000; - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.popover.top { - margin-top: -10px; -} - -.popover.right { - margin-left: 10px; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover.left { - margin-left: -10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.popover-title:empty { - display: none; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.top .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} - -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-top-color: #ffffff; - border-bottom-width: 0; -} - -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} - -.popover.right .arrow:after { - bottom: -10px; - left: 1px; - border-right-color: #ffffff; - border-left-width: 0; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; -} - -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, 0.25); - border-right-width: 0; -} - -.popover.left .arrow:after { - right: 1px; - bottom: -10px; - border-left-color: #ffffff; - border-right-width: 0; -} - -.thumbnails { - margin-left: -20px; - list-style: none; - *zoom: 1; -} - -.thumbnails:before, -.thumbnails:after { - display: table; - line-height: 0; - content: ""; -} - -.thumbnails:after { - clear: both; -} - -.row-fluid .thumbnails { - margin-left: 0; -} - -.thumbnails > li { - float: left; - margin-bottom: 20px; - margin-left: 20px; -} - -.thumbnail { - display: block; - padding: 4px; - line-height: 20px; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #0088cc; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} - -.thumbnail > img { - display: block; - max-width: 100%; - margin-right: auto; - margin-left: auto; -} - -.thumbnail .caption { - padding: 9px; - color: #555555; -} - -.media, -.media-body { - overflow: hidden; - *overflow: visible; - zoom: 1; -} - -.media, -.media .media { - margin-top: 15px; -} - -.media:first-child { - margin-top: 0; -} - -.media-object { - display: block; -} - -.media-heading { - margin: 0 0 5px; -} - -.media > .pull-left { - margin-right: 10px; -} - -.media > .pull-right { - margin-left: 10px; -} - -.media-list { - margin-left: 0; - list-style: none; -} - -.label, -.badge { - display: inline-block; - padding: 2px 4px; - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; - background-color: #999999; -} - -.label { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.badge { - padding-right: 9px; - padding-left: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -.label:empty, -.badge:empty { - display: none; -} - -a.label:hover, -a.label:focus, -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.label-important, -.badge-important { - background-color: #b94a48; -} - -.label-important[href], -.badge-important[href] { - background-color: #953b39; -} - -.label-warning, -.badge-warning { - background-color: #f89406; -} - -.label-warning[href], -.badge-warning[href] { - background-color: #c67605; -} - -.label-success, -.badge-success { - background-color: #468847; -} - -.label-success[href], -.badge-success[href] { - background-color: #356635; -} - -.label-info, -.badge-info { - background-color: #3a87ad; -} - -.label-info[href], -.badge-info[href] { - background-color: #2d6987; -} - -.label-inverse, -.badge-inverse { - background-color: #333333; -} - -.label-inverse[href], -.badge-inverse[href] { - background-color: #1a1a1a; -} - -.btn .label, -.btn .badge { - position: relative; - top: -1px; -} - -.btn-mini .label, -.btn-mini .badge { - top: 0; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress .bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - color: #ffffff; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(to bottom, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress .bar + .bar { - -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); -} - -.progress-striped .bar { - background-color: #149bdf; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} - -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-danger .bar, -.progress .bar-danger { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); -} - -.progress-danger.progress-striped .bar, -.progress-striped .bar-danger { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-success .bar, -.progress .bar-success { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(to bottom, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); -} - -.progress-success.progress-striped .bar, -.progress-striped .bar-success { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-info .bar, -.progress .bar-info { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); -} - -.progress-info.progress-striped .bar, -.progress-striped .bar-info { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-warning .bar, -.progress .bar-warning { - background-color: #faa732; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); -} - -.progress-warning.progress-striped .bar, -.progress-striped .bar-warning { - background-color: #fbb450; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.accordion { - margin-bottom: 20px; -} - -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.accordion-heading { - border-bottom: 0; -} - -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} - -.accordion-toggle { - cursor: pointer; -} - -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} - -.carousel { - position: relative; - margin-bottom: 20px; - line-height: 1; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - line-height: 1; -} - -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} - -.carousel-inner > .active { - left: 0; -} - -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel-inner > .next { - left: 100%; -} - -.carousel-inner > .prev { - left: -100%; -} - -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} - -.carousel-inner > .active.left { - left: -100%; -} - -.carousel-inner > .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.right { - right: 15px; - left: auto; -} - -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-indicators { - position: absolute; - top: 15px; - right: 15px; - z-index: 5; - margin: 0; - list-style: none; -} - -.carousel-indicators li { - display: block; - float: left; - width: 10px; - height: 10px; - margin-left: 5px; - text-indent: -999px; - background-color: #ccc; - background-color: rgba(255, 255, 255, 0.25); - border-radius: 5px; -} - -.carousel-indicators .active { - background-color: #fff; -} - -.carousel-caption { - position: absolute; - right: 0; - bottom: 0; - left: 0; - padding: 15px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} - -.carousel-caption h4, -.carousel-caption p { - line-height: 20px; - color: #ffffff; -} - -.carousel-caption h4 { - margin: 0 0 5px; -} - -.carousel-caption p { - margin-bottom: 0; -} - -.hero-unit { - padding: 60px; - margin-bottom: 30px; - font-size: 18px; - font-weight: 200; - line-height: 30px; - color: inherit; - background-color: #eeeeee; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; - color: inherit; -} - -.hero-unit li { - line-height: 30px; -} - -.pull-right { - float: right; -} - -.pull-left { - float: left; -} - -.hide { - display: none; -} - -.show { - display: block; -} - -.invisible { - visibility: hidden; -} - -.affix { - position: fixed; -} diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.min.css b/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.min.css deleted file mode 100644 index df96c8648..000000000 --- a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/css/bootstrap.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/img/glyphicons-halflings-white.png b/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/img/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a2..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/img/glyphicons-halflings.png b/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/img/glyphicons-halflings.png deleted file mode 100644 index a99699932..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/img/glyphicons-halflings.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/js/bootstrap.min.js b/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/js/bootstrap.min.js deleted file mode 100644 index 848258d38..000000000 --- a/packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/js/bootstrap.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! -* Bootstrap.js by @fat & @mdo -* Copyright 2013 Twitter, Inc. -* http://www.apache.org/licenses/LICENSE-2.0.txt -*/ -!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('