Skip to content

Commit

Permalink
Issue #24 Clearing Status between keyboards
Browse files Browse the repository at this point in the history
 - use $status.html() to clear DOM. $status.val() causes the DOM to stop
   updating.
 - also provide a slightly friendlier message when we don't have a
   default for a particular keyboard.
  • Loading branch information
yanfali authored and jackhumbert committed Mar 31, 2018
1 parent 2ecf418 commit dca9350
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $(document).ready(() => {
render_layout($layout.val());
});
} else {
$status.append('\n* No default for this keyboard... yet!');
$status.append(`\n* Sorry there is no default for the ${$keyboard.val()} keyboard... yet!`);
}
}

Expand Down Expand Up @@ -278,6 +278,7 @@ $(document).ready(() => {
function switchKeyboardLayout() {
// reset_keymap();
window.location.hash = '#/' + $keyboard.val() + '/' + $layout.val();
$status.html(''); // clear the DOM not the value otherwise weird things happen
// load_layouts($keyboard).val());
}

Expand Down

0 comments on commit dca9350

Please sign in to comment.