| 1 | efrain | 1 | Description of Twitter bootstrap import into Moodle
 | 
        
           |  |  | 2 |   | 
        
           |  |  | 3 | Twitter bootstrap
 | 
        
           |  |  | 4 | -----------------
 | 
        
           |  |  | 5 |   | 
        
           |  |  | 6 | Sass:
 | 
        
           |  |  | 7 | This theme uses Bootstrap frontend toolkit.
 | 
        
           |  |  | 8 | The Bootstrap repository is available on:
 | 
        
           |  |  | 9 |   | 
        
           |  |  | 10 | https://github.com/twbs/bootstrap
 | 
        
           |  |  | 11 |   | 
        
           |  |  | 12 | To update to the latest release of twitter bootstrap:
 | 
        
           |  |  | 13 |   | 
        
           |  |  | 14 | * download bootstrap to your home folder
 | 
        
           |  |  | 15 | * remove folder theme/boost/scss/bootstrap
 | 
        
           |  |  | 16 | * copy the scss files from ~/bootstrap/scss to theme/boost/scss/bootstrap
 | 
        
           |  |  | 17 | * comment out left: 0; from .popover {} in scss/bootstrap/_popover.scss. In RTL mode this prevents popovers from showing and it is not required in LTR mode.
 | 
        
           |  |  | 18 | * comment out this line in theme/boost/scss/_print.scss
 | 
        
           |  |  | 19 |     @page {
 | 
        
           |  |  | 20 |        size: $print-page-size;
 | 
        
           |  |  | 21 |     }
 | 
        
           |  |  | 22 |   It breaks when compiled with phpscss.
 | 
        
           |  |  | 23 | * update ./thirdpartylibs.xml
 | 
        
           |  |  | 24 | * follow the instructions in admin/tool/component_library/readme_moodle.txt to update the Bootstrap documentation there.
 | 
        
           |  |  | 25 |   | 
        
           |  |  | 26 | Javascript:
 | 
        
           |  |  | 27 |   | 
        
           |  |  | 28 | * remove folder theme/boost/amd/src/bootstrap
 | 
        
           |  |  | 29 | * copy the js files from ~/bootstrap/js/src to theme/boost/amd/src/bootstrap (including the subfolder)
 | 
        
           |  |  | 30 | * copy index.js from ~/bootstrap/js to theme/boost/amd/src
 | 
        
           |  |  | 31 | * edit theme/boost/amd/src/index.js and update import path (src -> bootstrap)
 | 
        
           |  |  | 32 | * Moodle core includes the popper.js library, make sure each of the new Bootstrap js files
 | 
        
           |  |  | 33 | includes the 'core/popper' library instead of 'popper.js'. For current version these files were: tooltip.js and dropdown.js
 | 
        
           |  |  | 34 | * update ./thirdpartylibs.xml to include all new Bootstrap js files
 | 
        
           |  |  | 35 | * run "grunt ignorefiles" to prevent linting errors appearing from the new Bootstrap js files.
 | 
        
           |  |  | 36 | * in folder theme/boost run "grunt amd" to compile the bootstrap JS
 | 
        
           |  |  | 37 | * in folder theme/boost run "grunt css" to compile scss
 |