Fix for firmware flasher checkboxes not restoring saved state issue #274.

pull/3/head
Kristjan Vaga 9 years ago
parent 4e8fc955b0
commit 168b412089

@ -239,36 +239,39 @@ GUI_control.prototype.tab_switch_cleanup = function (callback) {
GUI_control.prototype.content_ready = function (callback) {
$('.togglesmall').each(function(index, html) {
var switchery = new Switchery(html,
{
$('.togglesmall').each(function(index, elem) {
var switchery = new Switchery(elem, {
size: 'small',
color: '#59aa29',
secondaryColor: '#c4c4c4'
});
$(html).removeClass('togglesmall');
$(elem).on("change", function (evt) {
switchery.setPosition();
});
$(elem).removeClass('togglesmall');
});
$('.toggle').each(function(index, html) {
var switchery = new Switchery(html,
{
$('.toggle').each(function(index, elem) {
var switchery = new Switchery(elem, {
color: '#59aa29',
secondaryColor: '#c4c4c4'
});
$(html).removeClass('toggle');
$(elem).on("change", function (evt) {
switchery.setPosition();
});
$(elem).removeClass('toggle');
});
$('.togglemedium').each(function(index, html) {
var switchery = new Switchery(html,
{
$('.togglemedium').each(function(index, elem) {
var switchery = new Switchery(elem, {
className: 'switcherymid',
color: '#59aa29',
secondaryColor: '#c4c4c4'
});
$(html).removeClass('togglemedium');
$(elem).on("change", function (evt) {
switchery.setPosition();
});
$(elem).removeClass('togglemedium');
});
// Build link to in-use CF version documentation

@ -424,6 +424,8 @@ TABS.firmware_flasher.initialize = function (callback) {
chrome.storage.local.set({'no_reboot_sequence': status});
});
$('input.updating').change();
});
chrome.storage.local.get('flash_manual_baud', function (result) {
@ -436,7 +438,6 @@ TABS.firmware_flasher.initialize = function (callback) {
// bind UI hook so the status is saved on change
$('input.flash_manual_baud').change(function() {
var status = $(this).is(':checked');
chrome.storage.local.set({'flash_manual_baud': status});
});
@ -507,6 +508,7 @@ TABS.firmware_flasher.initialize = function (callback) {
$('input.erase_chip').change(function () {
chrome.storage.local.set({'erase_chip': $(this).is(':checked')});
});
});
$(document).keypress(function (e) {

Loading…
Cancel
Save