From 742ec385e14130940fe84bb066adb468fffd2def Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 19 Oct 2017 13:56:47 +0300 Subject: [PATCH 1/4] fix(menu) when click on ".." show full menu --- client/modules/menu.js | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/client/modules/menu.js b/client/modules/menu.js index ddfbd495..b65eccb7 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -84,6 +84,25 @@ function MenuProto(Position) { 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 show(position) { const {x, y} = getPosition(position); @@ -104,8 +123,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 +236,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; } From ebc09c5be2d5a13b0c9e53828984c4fdac3ed87c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 19 Oct 2017 13:56:47 +0300 Subject: [PATCH 2/4] fix(menu) when click on ".." show full menu --- client/modules/menu.js | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/client/modules/menu.js b/client/modules/menu.js index b65eccb7..a51af6f4 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -68,21 +68,40 @@ 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) From 4394902782a321d6c219782ce14703ce6047bb42 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 19 Oct 2017 15:30:12 +0300 Subject: [PATCH 3/4] feature(package) lint:js:eslint:client -> lint:client --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 32b38780..3d6ef564 100644 --- a/package.json +++ b/package.json @@ -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 .", From f293420ff3db24f170e6cee7a3f004dd8926dc31 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 19 Oct 2017 15:41:32 +0300 Subject: [PATCH 4/4] chore(package) v8.1.0 --- ChangeLog | 15 +++++++++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) 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/package.json b/package.json index 3d6ef564..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",