diff --git a/ChangeLog b/ChangeLog index d784f5f6..32dd4dfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2017.10.19, v8.1.0 + +fix: +- (menu) when click on ".." show full menu +- (menu) when click on ".." show full menu +- (menu) show menu on F9 when current is ".." +- (menu) title: Menu -> Cloud Commander +- (menu) uploadTo: when error - do nothing, everything already done + +feature: +- (package) lint:js:eslint:client -> lint:client +- (cloud) filepicker v2 +- (client) log: return str + + 2017.10.13, v8.0.5 feature: diff --git a/HELP.md b/HELP.md index 41ceb3a7..ed0411d2 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v8.0.5 +# Cloud Commander v8.1.0 ### [Main][MainURL] [Blog][BlogURL] Live(![Heroku][Heroku_LIVE_IMG] [Heroku][HerokuURL], ![Now][NOW_LIVE_IMG] [Now][NowURL]) @@ -681,6 +681,7 @@ There is a lot ways to be involved in `Cloud Commander` development: Version history --------------- +- *2017.10.19*, **[v8.1.0](//github.com/coderaiser/cloudcmd/releases/tag/v8.1.0)** - *2017.10.13*, **[v8.0.5](//github.com/coderaiser/cloudcmd/releases/tag/v8.0.5)** - *2017.10.10*, **[v8.0.4](//github.com/coderaiser/cloudcmd/releases/tag/v8.0.4)** - *2017.10.06*, **[v8.0.3](//github.com/coderaiser/cloudcmd/releases/tag/v8.0.3)** diff --git a/README.md b/README.md index 83a2bb4f..ac7000d9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v8.0.5 [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Now status][BuildAppveyorIMGURL]][BuildAppveyorURL] [![Package Quality][PackageQualityIMGURL]][PackageQualityURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] [![OpenCollective](https://opencollective.com/cloudcmd/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/cloudcmd/sponsors/badge.svg)](#sponsors) +# Cloud Commander v8.1.0 [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Now status][BuildAppveyorIMGURL]][BuildAppveyorURL] [![Package Quality][PackageQualityIMGURL]][PackageQualityURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] [![OpenCollective](https://opencollective.com/cloudcmd/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/cloudcmd/sponsors/badge.svg)](#sponsors) ### [Main][MainURL] [Blog][BlogURL] Live([Heroku][HerokuURL], [Now][NowURL]) diff --git a/client/modules/menu.js b/client/modules/menu.js index ddfbd495..a51af6f4 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -68,22 +68,60 @@ function MenuProto(Position) { return { x: position.x, y: position.y, - } + }; if (Position) return { x: Position.x, y: Position.y, - } + }; if (position) return { x: position.x, y: position.y, - } + }; return getCurrentPosition(); + } + + function getMenuNameByEl(el) { + if (!el) + return 'context'; + + const name = DOM.getCurrentName(el); + + if (name === '..') + return 'context'; + + return 'contextFile'; + } + + function getMenuByName(name) { + if (name === 'context') + return MenuContext; + + return MenuContextFile; + } + + function getMenuNameByEl(el) { + if (!el) + return 'context'; + + const name = DOM.getCurrentName(el); + + if (name === '..') + return 'context' + + return 'contextFile' }; + function getMenuByName(name) { + if (name === 'context') + return MenuContext; + + return MenuContextFile; + } + function show(position) { const {x, y} = getPosition(position); @@ -104,8 +142,9 @@ function MenuProto(Position) { MenuContext = new MenuIO(fm, options, menuData); MenuContextFile = new MenuIO(fm, optionsFile, menuDataFile); - const is = DOM.getCurrentByPosition({x, y}); - const menu = is ? MenuContextFile : MenuContext; + const el = DOM.getCurrentByPosition({x, y}); + const menuName = getMenuNameByEl(el); + const menu = getMenuByName(menuName); menu.show(x, y); @@ -216,11 +255,14 @@ function MenuProto(Position) { function beforeShow(callback, params) { const name = params.name; - let notShow = DOM.getCurrentByPosition({ + let el = DOM.getCurrentByPosition({ x: params.x, y: params.y }); + const menuName = getMenuNameByEl(el); + let notShow = menuName === 'contextFile'; + if (params.name === 'contextFile') { notShow = !notShow; } diff --git a/package.json b/package.json index 32b38780..955b5c2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "8.0.5", + "version": "8.1.0", "author": "coderaiser (https://github.com/coderaiser)", "description": "Orthodox web file manager with console and editor", "homepage": "http://cloudcmd.io", @@ -52,13 +52,13 @@ "lint": "redrun lint:*", "lint:css": "stylelint css/*.css", "lint:js": "redrun lint:js:*", - "lint:js:server": "eslint --rule 'no-console:0' -c .eslintrc.server $npm_package_config_dirs", + "lint:server": "eslint --rule 'no-console:0' -c .eslintrc.server $npm_package_config_dirs", "lint:js:dev": "eslint --rule 'no-console:0' $npm_package_config_dirs_dev", "lint:js:jshint": "jshint bin client server", "lint:js:jscs": "jscs --esnext $npm_package_config_dirs", - "lint:js:eslint:client": "eslint --rule 'no-console:0' --env browser client", - "fix:js:eslint:client": "redrun eslint:client -- --fix", - "fix:js:eslint:server": "redrun eslint:server -- --fix", + "lint:client": "eslint --rule 'no-console:0' --env browser client", + "fix:lint:client": "redrun lint:client -- --fix", + "fix:lint:server": "redrun eslint:server -- --fix", "test": "tape 'test/**/*.js'", "test:client": "tape 'test/client/**/*.js'", "spell": "yaspeller .",