Skip to content

Commit e735587

Browse files
committed
update floatThead and drop CSP unsafe-inline requirement
Closes #90
1 parent 94b4dc6 commit e735587

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

app/components/poll-evaluation-participants-table.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ export default Ember.Component.extend({
88
* adding floatThead jQuery plugin to poll table
99
* https://mkoryak.github.io/floatThead/
1010
*
11-
* scrollingTop:
12-
* Offset from the top of the window where the floating header will
11+
* top:
12+
* Offset from the top of the `window` where the floating header will
1313
* 'stick' when scrolling down
1414
* Since we are adding a browser horizontal scrollbar on top, scrollingTop
1515
* has to be set to height of horizontal scrollbar which depends on
1616
* used browser
1717
*/
1818
Ember.$('.user-selections-table').floatThead({
19-
'scrollingTop': this.getScrollbarHeight
19+
top: this.getScrollbarHeight
2020
});
2121

2222
/*

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"sjcl": "~1.0.0",
99
"bootstrap": "~3.3.5",
1010
"bootstrap-datepicker": "~1.4.0",
11-
"floatThead": "1.2.12",
11+
"floatThead": "^1.4.3",
1212
"jstimezonedetect": "~1.0.5",
1313
"ember-cli-moment-shim": "~0.2.0",
1414
"moment-timezone": ">= 0.1.0",

config/environment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = function(environment) {
1818
'font-src': "'self'",
1919
'connect-src': "'self'",
2020
'img-src': "'self'",
21-
'style-src': "'self' 'unsafe-inline'",
21+
'style-src': "'self'",
2222
'media-src': "'self'"
2323
},
2424

public/.htaccess

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Content Security Policy-Headers
22
# you have to enable apache module headers to get them working
3-
#Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';"
4-
#Header set X-Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';"
5-
#Header set X-Webkit-CSP "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';"
3+
#Header set Content-Security-Policy "default-src 'self';"
4+
#Header set X-Content-Security-Policy "default-src 'self';"
5+
#Header set X-Webkit-CSP "default-src 'self';"

tests/acceptance/view-evaluation-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ test('evaluation is correct for MakeAPoll', function(assert) {
243243
'has a table showing user selections'
244244
);
245245
assert.deepEqual(
246-
find('.user-selections-table thead th').map((i, el) => $(el).text().trim()).get(),
246+
find('.user-selections-table.floatThead-table thead th').map((i, el) => $(el).text().trim()).get(),
247247
['', 'first option', 'second option'],
248248
'dates are used as table headers'
249249
);

0 commit comments

Comments
 (0)