Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit eca77ed

Browse files
Merge pull request #140 from symfony-cmf/fix_dnd
do not stop events any more, just deactivate
2 parents b8fddf7 + c8cd82c commit eca77ed

File tree

6 files changed

+27
-11
lines changed

6 files changed

+27
-11
lines changed

.travis.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,44 @@ php:
55
- 7.0
66
- 7.1
77

8-
sudo: false
8+
sudo: required
9+
dist: trusty
910

1011
cache:
1112
directories:
1213
- $HOME/.composer/cache/files
1314
# node_modules are not cached, because we don't shrinkwrap the deps.
1415
# - node_modules
1516

16-
env: LANG=php
17+
env:
18+
- LANG=php
19+
- NODE_RELEASE=6.x
1720

1821
matrix:
1922
include:
2023
- php: 5.6
21-
env: LANG=js
24+
env:
25+
- LANG=js
26+
- NODE_RELEASE=6.x
27+
exclude:
28+
- php: 5.6
29+
env: NODE_RELEASE=6.x
30+
- php: 7.0
31+
env: NODE_RELEASE=6.x
32+
- php: 7.1
33+
env: NODE_RELEASE=6.x
2234
fast_finish: true
2335

2436
before_install:
2537
- if [ "$LANG" = "php" ]; then phpenv config-rm xdebug.ini || true; fi
26-
- if [ "$LANG" = "js" ]; then npm install -g bower && npm set progress=false; fi
2738

2839
install:
29-
- if [ "$LANG" = "js" ]; then npm install; bower install; fi
40+
- if [ "$LANG" = "js" ]; then npm run travis:install; fi
3041
- if [ "$LANG" = "php" ]; then composer update --prefer-dist; fi
3142

3243
script:
3344
- if [ "$LANG" = "js" ]; then npm test; fi
34-
- if [ "$LANG" = "php" ]; then phpunit; fi
45+
- if [ "$LANG" = "php" ]; then vendor/bin/simple-phpunit; fi
3546

3647
notifications:
3748
irc: "irc.freenode.org#symfony-cmf"

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"symfony-cmf/resource-rest-bundle": "1.0.*"
1717
},
1818
"require-dev": {
19-
"symfony/form": "^2.8|^3.0"
19+
"symfony/form": "^2.8|^3.0",
20+
"symfony/phpunit-bridge": "^3.2"
2021
},
2122
"minimum-stability": "RC",
2223
"prefer-stable": true,

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = function(config) {
4848
reporters: ['dots'],
4949

5050
webpack: webpackConfig,
51-
webpackMiddleware: { noInfo: true },
51+
webpackMiddleware: { noInfo: true, stats: 'errors-only'},
5252

5353
// web server port
5454
port: 9876,

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"webpack": "^1.12.9"
2525
},
2626
"scripts": {
27+
"update:nodejs": "sudo rm -rf ~/.nvm - curl -sL 'https://deb.nodesource.com/setup_${NODE_RELEASE}' | sudo -E bash && sudo apt-get install -y nodejs",
28+
"pretravis:install": "npm run update:nodejs && npm install -g bower && npm set progress=false",
29+
"travis:install": "npm install && bower install",
2730
"test": "\"node_modules/karma/bin/karma\" start --single-run --browsers PhantomJS",
2831
"build": "sh _build.sh"
2932
},

src/Resources/assets/js/adapter/fancytree.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,10 @@ export class FancytreeAdapter {
295295
};
296296

297297
// We do not want to do anything on activation atm.
298-
this.$tree.fancytree('option', 'beforeActivate', (event, data) => {
298+
this.$tree.fancytree('option', 'activate', (event, data) => {
299299
if (!this.boundToInput) {
300-
return false;
300+
data.node.setActive(false);
301+
data.node.setFocus(false);
301302
}
302303
});
303304
}

src/Resources/public/js/cmf_tree_browser.fancytree.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)