3
0
Fork 0

update lib to allow set value through javascrpti if switcher is readonly or disabled

7.0
Pierre Verkest 2015-10-01 23:16:04 +02:00
parent 7decad6070
commit af3d1ac503
2 changed files with 2 additions and 3 deletions

View File

@ -7,3 +7,5 @@ from: https://github.com/nostalgiaz/bootstrap-switch
directories at this [revision](https://github.com/nostalgiaz/bootstrap-switch/ directories at this [revision](https://github.com/nostalgiaz/bootstrap-switch/
tree/a39a1e9d6059822235bf4a9c0e7700a7e6a5ad19/dist) the september 30th 2015. tree/a39a1e9d6059822235bf4a9c0e7700a7e6a5ad19/dist) the september 30th 2015.
The default library doesn't allow to change value through javascript if
switcher is set `readonly` or `disabled`.

View File

@ -135,9 +135,6 @@
if (typeof value === "undefined") { if (typeof value === "undefined") {
return this.options.state; return this.options.state;
} }
if (this.options.disabled || this.options.readonly) {
return this.$element;
}
if (this.options.state && !this.options.radioAllOff && this.$element.is(":radio")) { if (this.options.state && !this.options.radioAllOff && this.$element.is(":radio")) {
return this.$element; return this.$element;
} }