fix csp warning about unsafe-inline style-src

Showing and hiding an off-canvas menu with content-security-policy enabled (via ember-cli) results in the following~

    [Report Only] Refused to apply inline style because it violates the following Content Security Policy directive~

Changing the way that OffCanvas.hide() restors the style addresses this warning. e.g., `$(this).attr('style', ...)`~

For more information about content-security-policy, see http://content-security-policy.com/.
This commit is contained in:
pbatey
2015-07-10 14:07:57 -06:00
parent f96d55965a
commit c8523caf13

View File

@@ -236,7 +236,8 @@
elements.removeClass('canvas-sliding')
elements.add(this.$element).add('body').each(function() {
$(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style')
$(this).style = $(this).data('offcanvas-style')
$(this).removeData('offcanvas-style')
})
this.$element.trigger('hidden.bs.offcanvas')