From 1ade42b8fe07bbf9f105caf32881c61104a37831 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 16 Nov 2020 14:06:42 +0300 Subject: [PATCH] Help: add files --- .../help/de/search/js/keyboard-switch.js | 30 +++++++++++++++++++ .../help/fr/search/js/keyboard-switch.js | 30 +++++++++++++++++++ .../help/fr/search/js/keyboard-switch.js | 30 +++++++++++++++++++ .../help/fr/search/js/keyboard-switch.js | 30 +++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 apps/documenteditor/main/resources/help/de/search/js/keyboard-switch.js create mode 100644 apps/documenteditor/main/resources/help/fr/search/js/keyboard-switch.js create mode 100644 apps/presentationeditor/main/resources/help/fr/search/js/keyboard-switch.js create mode 100644 apps/spreadsheeteditor/main/resources/help/fr/search/js/keyboard-switch.js diff --git a/apps/documenteditor/main/resources/help/de/search/js/keyboard-switch.js b/apps/documenteditor/main/resources/help/de/search/js/keyboard-switch.js new file mode 100644 index 000000000..267160c5e --- /dev/null +++ b/apps/documenteditor/main/resources/help/de/search/js/keyboard-switch.js @@ -0,0 +1,30 @@ +$(function(){ + function shortcutToggler(enabled,disabled,enabled_opt,disabled_opt){ + var selectorTD_en = '.keyboard_shortcuts_table tr td:nth-child(' + enabled + ')', + selectorTD_dis = '.keyboard_shortcuts_table tr td:nth-child(' + disabled + ')'; + $(disabled_opt).removeClass('enabled').addClass('disabled'); + $(enabled_opt).removeClass('disabled').addClass('enabled'); + $(selectorTD_dis).hide(); + $(selectorTD_en).show().each(function() { + if($(this).text() == ''){ + $(this).parent('tr').hide(); + } else { + $(this).parent('tr').show(); + } + }); + } + if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) { + shortcutToggler(3,2,'.mac_option','.pc_option'); + $('.mac_option').removeClass('right_option').addClass('left_option'); + $('.pc_option').removeClass('left_option').addClass('right_option'); + } else { + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + $('.shortcut_toggle').on('click', function() { + if($(this).hasClass('mac_option')){ + shortcutToggler(3,2,'.mac_option','.pc_option'); + } else if ($(this).hasClass('pc_option')){ + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + }); +}); \ No newline at end of file diff --git a/apps/documenteditor/main/resources/help/fr/search/js/keyboard-switch.js b/apps/documenteditor/main/resources/help/fr/search/js/keyboard-switch.js new file mode 100644 index 000000000..267160c5e --- /dev/null +++ b/apps/documenteditor/main/resources/help/fr/search/js/keyboard-switch.js @@ -0,0 +1,30 @@ +$(function(){ + function shortcutToggler(enabled,disabled,enabled_opt,disabled_opt){ + var selectorTD_en = '.keyboard_shortcuts_table tr td:nth-child(' + enabled + ')', + selectorTD_dis = '.keyboard_shortcuts_table tr td:nth-child(' + disabled + ')'; + $(disabled_opt).removeClass('enabled').addClass('disabled'); + $(enabled_opt).removeClass('disabled').addClass('enabled'); + $(selectorTD_dis).hide(); + $(selectorTD_en).show().each(function() { + if($(this).text() == ''){ + $(this).parent('tr').hide(); + } else { + $(this).parent('tr').show(); + } + }); + } + if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) { + shortcutToggler(3,2,'.mac_option','.pc_option'); + $('.mac_option').removeClass('right_option').addClass('left_option'); + $('.pc_option').removeClass('left_option').addClass('right_option'); + } else { + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + $('.shortcut_toggle').on('click', function() { + if($(this).hasClass('mac_option')){ + shortcutToggler(3,2,'.mac_option','.pc_option'); + } else if ($(this).hasClass('pc_option')){ + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + }); +}); \ No newline at end of file diff --git a/apps/presentationeditor/main/resources/help/fr/search/js/keyboard-switch.js b/apps/presentationeditor/main/resources/help/fr/search/js/keyboard-switch.js new file mode 100644 index 000000000..267160c5e --- /dev/null +++ b/apps/presentationeditor/main/resources/help/fr/search/js/keyboard-switch.js @@ -0,0 +1,30 @@ +$(function(){ + function shortcutToggler(enabled,disabled,enabled_opt,disabled_opt){ + var selectorTD_en = '.keyboard_shortcuts_table tr td:nth-child(' + enabled + ')', + selectorTD_dis = '.keyboard_shortcuts_table tr td:nth-child(' + disabled + ')'; + $(disabled_opt).removeClass('enabled').addClass('disabled'); + $(enabled_opt).removeClass('disabled').addClass('enabled'); + $(selectorTD_dis).hide(); + $(selectorTD_en).show().each(function() { + if($(this).text() == ''){ + $(this).parent('tr').hide(); + } else { + $(this).parent('tr').show(); + } + }); + } + if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) { + shortcutToggler(3,2,'.mac_option','.pc_option'); + $('.mac_option').removeClass('right_option').addClass('left_option'); + $('.pc_option').removeClass('left_option').addClass('right_option'); + } else { + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + $('.shortcut_toggle').on('click', function() { + if($(this).hasClass('mac_option')){ + shortcutToggler(3,2,'.mac_option','.pc_option'); + } else if ($(this).hasClass('pc_option')){ + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + }); +}); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/resources/help/fr/search/js/keyboard-switch.js b/apps/spreadsheeteditor/main/resources/help/fr/search/js/keyboard-switch.js new file mode 100644 index 000000000..267160c5e --- /dev/null +++ b/apps/spreadsheeteditor/main/resources/help/fr/search/js/keyboard-switch.js @@ -0,0 +1,30 @@ +$(function(){ + function shortcutToggler(enabled,disabled,enabled_opt,disabled_opt){ + var selectorTD_en = '.keyboard_shortcuts_table tr td:nth-child(' + enabled + ')', + selectorTD_dis = '.keyboard_shortcuts_table tr td:nth-child(' + disabled + ')'; + $(disabled_opt).removeClass('enabled').addClass('disabled'); + $(enabled_opt).removeClass('disabled').addClass('enabled'); + $(selectorTD_dis).hide(); + $(selectorTD_en).show().each(function() { + if($(this).text() == ''){ + $(this).parent('tr').hide(); + } else { + $(this).parent('tr').show(); + } + }); + } + if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) { + shortcutToggler(3,2,'.mac_option','.pc_option'); + $('.mac_option').removeClass('right_option').addClass('left_option'); + $('.pc_option').removeClass('left_option').addClass('right_option'); + } else { + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + $('.shortcut_toggle').on('click', function() { + if($(this).hasClass('mac_option')){ + shortcutToggler(3,2,'.mac_option','.pc_option'); + } else if ($(this).hasClass('pc_option')){ + shortcutToggler(2,3,'.pc_option','.mac_option'); + } + }); +}); \ No newline at end of file