Fix rtl stylesheet
This commit is contained in:
parent
bf08083330
commit
a8cb1967b0
@ -14,11 +14,22 @@ export default {
|
||||
this.isRTL = true;
|
||||
this.getDocClasses().add('rtl');
|
||||
this.getDocClasses().add('menu-on-right');
|
||||
this.toggleBootstrapRTL(true);
|
||||
},
|
||||
disableRTL() {
|
||||
this.isRTL = false;
|
||||
this.getDocClasses().remove('rtl');
|
||||
this.getDocClasses().remove('menu-on-right');
|
||||
this.toggleBootstrapRTL(false);
|
||||
},
|
||||
toggleBootstrapRTL(value) {
|
||||
for (let i=0; i < document.styleSheets.length; i++){
|
||||
let styleSheet = document.styleSheets[i];
|
||||
let { href } = styleSheet;
|
||||
if(href && href.endsWith('bootstrap-rtl.css')){
|
||||
styleSheet.disabled = !value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user