diff --git a/apps/common/main/lib/component/CheckBox.js b/apps/common/main/lib/component/CheckBox.js index 354046ecb..369333734 100644 --- a/apps/common/main/lib/component/CheckBox.js +++ b/apps/common/main/lib/component/CheckBox.js @@ -121,6 +121,7 @@ define([ this.$chk = me.$el.find('input[type=checkbox]'); this.$label = me.$el.find('label.checkbox-indeterminate'); this.$chk.on('click', this.onItemCheck.bind(this)); + this.$label.on('keydown', this.onKeyDown.bind(this)); this.rendered = true; } @@ -194,6 +195,18 @@ define([ setCaption: function(text) { this.$label.find('span').text(text); + }, + + onKeyDown: function(e) { + if (e.isDefaultPrevented()) + return; + + if (e.keyCode === Common.UI.Keys.SPACE) + this.onItemCheck(e); + }, + + focus: function() { + this.$label && this.$label.focus(); } }); }); \ No newline at end of file diff --git a/apps/common/main/lib/component/FocusManager.js b/apps/common/main/lib/component/FocusManager.js index b14d9b595..1bd20b9e6 100644 --- a/apps/common/main/lib/component/FocusManager.js +++ b/apps/common/main/lib/component/FocusManager.js @@ -58,7 +58,19 @@ Common.UI.FocusManager = new(function() { } fields.forEach(function(field) { if (field) { - var item = (field.cmp && typeof field.selector == 'string') ? field : {cmp: field, selector: '.form-control'}; + // var item = (field.cmp && typeof field.selector == 'string') ? field : {cmp: field, selector: '.form-control'}; + var item = {}; + if (field.cmp && typeof field.selector == 'string') + item = field; + else { + item.cmp = field; + if (field instanceof Common.UI.ListView) + item.selector = '.listview'; + else if (field instanceof Common.UI.CheckBox) + item.selector = '.checkbox-indeterminate'; + else + item.selector = '.form-control'; + } item.el = (item.cmp.$el || $(item.cmp.el || item.cmp)).find(item.selector).addBack().filter(item.selector); item.el && item.el.attr && item.el.attr('tabindex', _tabindex.toString()); arr.push(item); diff --git a/apps/common/main/resources/less/checkbox.less b/apps/common/main/resources/less/checkbox.less index d74abea46..3d2211c1c 100644 --- a/apps/common/main/resources/less/checkbox.less +++ b/apps/common/main/resources/less/checkbox.less @@ -20,6 +20,11 @@ position: absolute; left: 0; margin-top: auto; + + + span { + border: @scaled-one-px-value-ie dotted transparent; + border: @scaled-one-px-value dotted transparent; + } } &:checked:not(:indeterminate) { @@ -65,4 +70,18 @@ } } } + + &:focus { + input[type=checkbox] { + + label { + border-color: @border-control-focus-ie; + border-color: @border-control-focus; + + + span { + border-color: @border-control-focus-ie; + border-color: @border-control-focus; + } + } + } + } } diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index e9f6cbcd7..3f068031b 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -122,18 +122,32 @@
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +