~openerp-dev/openerp-web/saas-3--watcher-jke

« back to all changes in this revision

Viewing changes to addons/web_kanban_sparkline/static/lib/jquery.sparkline/jquery.sparkline.js

  • Committer: Kersten Jeremy
  • Date: 2014-03-25 17:21:47 UTC
  • Revision ID: jke@openerp.com-20140325172147-6ymq1ixebawj4ce2
[FIX] IE9 - Catch error when we try to load a new stylesheet but that we have already reached the max number of sheet in IE9 : 31 

Show diffs side-by-side

added added

removed removed

Lines of Context:
582
582
        var tag;
583
583
        //if ('\v' == 'v') /* ie only */ {
584
584
        if (document.createStyleSheet) {
585
 
            document.createStyleSheet().cssText = css;
 
585
            try {
 
586
                document.createStyleSheet().cssText = css;
 
587
            } catch(err) {
 
588
                console.log('Failed - IE9 limit 31 sheets CSS');
 
589
            }
586
590
        } else {
587
591
            tag = document.createElement('style');
588
592
            tag.type = 'text/css';