Merge branch 'feature/focus-manager' into develop

This commit is contained in:
Julia Radzhabova 2021-04-15 18:23:04 +03:00
commit 5afd6e7609
63 changed files with 528 additions and 169 deletions

View file

@ -95,7 +95,7 @@ define([
value : 'unchecked',
template : _.template('<label class="checkbox-indeterminate"><input id="<%= id %>" type="checkbox" class="checkbox__native">' +
'<label for="<%= id %>" class="checkbox__shape"></label><span><%= labelText %></span></label>'),
'<label for="<%= id %>" class="checkbox__shape"></label><span></span></label>'),
initialize : function(options) {
Common.UI.BaseView.prototype.initialize.call(this, options);
@ -108,7 +108,6 @@ define([
var me = this;
if (!me.rendered) {
var elem = this.template({
labelText: this.options.labelText,
id: Common.UI.getId('chb-')
});
if (parentEl) {
@ -120,7 +119,9 @@ define([
this.$chk = me.$el.find('input[type=checkbox]');
this.$label = me.$el.find('label.checkbox-indeterminate');
this.$span = me.$label.find('span');
this.$chk.on('click', this.onItemCheck.bind(this));
this.$label.on('keydown', this.onKeyDown.bind(this));
this.rendered = true;
}
@ -131,6 +132,8 @@ define([
if (this.options.value!==undefined)
this.setValue(this.options.value, true);
this.setCaption(this.options.labelText);
// handle events
return this;
},
@ -143,6 +146,10 @@ define([
if (disabled !== this.disabled) {
this.$label.toggleClass('disabled', disabled);
(disabled) ? this.$chk.attr({disabled: disabled}) : this.$chk.removeAttr('disabled');
if (this.tabindex!==undefined) {
disabled && (this.tabindex = this.$label.attr('tabindex'));
this.$label.attr('tabindex', disabled ? "-1" : this.tabindex);
}
}
this.disabled = disabled;
@ -193,7 +200,28 @@ define([
},
setCaption: function(text) {
this.$label.find('span').text(text);
this.$span.text(text);
this.$span.css('visibility', text ? 'visible' : 'hidden');
},
onKeyDown: function(e) {
if (e.isDefaultPrevented())
return;
if (e.keyCode === Common.UI.Keys.SPACE)
this.onItemCheck(e);
},
focus: function() {
this.$label && this.$label.focus();
},
setTabIndex: function(tabindex) {
if (!this.rendered)
return;
this.tabindex = tabindex.toString();
!this.disabled && this.$label.attr('tabindex', this.tabindex);
}
});
});

View file

@ -58,9 +58,26 @@ 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 = {};
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 if (field instanceof Common.UI.RadioBox)
item.selector = '.radiobox';
else if (field instanceof Common.UI.TreeView)
item.selector = '.treeview';
else if (field instanceof Common.UI.Button)
item.selector = 'button';
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());
item.el && item.el.attr && (item.cmp.setTabIndex ? item.cmp.setTabIndex(_tabindex) : item.el.attr('tabindex', _tabindex.toString()));
arr.push(item);
}
});

View file

@ -72,7 +72,7 @@ define([
rendered : false,
template : _.template('<label class="radiobox"><input type="radio" name="<%= name %>" id="<%= id %>" class="button__radiobox">' +
'<label for="<%= id %>" class="radiobox__shape"></label><span><%= labelText %></span></label>'),
'<label for="<%= id %>" class="radiobox__shape"></label><span></span></label>'),
initialize : function(options) {
Common.UI.BaseView.prototype.initialize.call(this, options);
@ -89,6 +89,8 @@ define([
if (this.options.checked!==undefined)
this.setValue(this.options.checked, true);
this.setCaption(this.options.labelText);
// handle events
this.$radio.on('click', _.bind(this.onItemCheck, this));
},
@ -103,6 +105,8 @@ define([
this.$radio = el.find('input[type=radio]');
this.$label = el.find('label.radiobox');
this.$span = this.$label.find('span');
this.$label.on('keydown', this.onKeyDown.bind(this));
this.rendered = true;
return this;
@ -116,6 +120,10 @@ define([
this.$label.toggleClass('disabled', disabled);
this.$radio.toggleClass('disabled', disabled);
(disabled) ? this.$radio.attr({disabled: disabled}) : this.$radio.removeAttr('disabled');
if (this.tabindex!==undefined) {
disabled && (this.tabindex = this.$label.attr('tabindex'));
this.$label.attr('tabindex', disabled ? "-1" : this.tabindex);
}
}
this.disabled = disabled;
@ -152,7 +160,28 @@ define([
},
setCaption: function(text) {
this.$label.find('span').text(text);
this.$span.text(text);
this.$span.css('visibility', text ? 'visible' : 'hidden');
},
onKeyDown: function(e) {
if (e.isDefaultPrevented())
return;
if (e.keyCode === Common.UI.Keys.SPACE)
this.onItemCheck(e);
},
focus: function() {
this.$label && this.$label.focus();
},
setTabIndex: function(tabindex) {
if (!this.rendered)
return;
this.tabindex = tabindex.toString();
!this.disabled && this.$label.attr('tabindex', this.tabindex);
}
});
});

View file

@ -56,6 +56,12 @@ function onDropDownKeyDown(e) {
e.stopPropagation();
}
}
} else if ($this.hasClass('move-focus')) {
if (!(/^(27|13|9|32)/.test(e.keyCode) && !e.ctrlKey && !e.altKey)) {
patchDropDownKeyDown.call(this, e);
e.preventDefault();
e.stopPropagation();
}
} else {
patchDropDownKeyDown.call(this, e);
e.preventDefault();

View file

@ -337,6 +337,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.btnsCategory[0].on('click', _.bind(this.onMathCategoryClick, this, false));
this.btnsCategory[1].on('click', _.bind(this.onRecCategoryClick, this, false));
this.btnsCategory[2].on('click', _.bind(this.onAutoformatCategoryClick, this, false));
this.afterRender();
},
@ -351,10 +352,12 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
},
getFocusedComponents: function() {
return [
this.inputReplace, this.inputBy, {cmp: this.mathList, selector: '.listview'}, // 0 tab
this.inputRecFind, {cmp: this.mathRecList, selector: '.listview'} // 1 tab
];
var arr = [
this.chReplaceType, this.inputReplace, this.inputBy, this.mathList, this.btnReset, this.btnEdit, this.btnDelete, // 0 tab
this.inputRecFind, this.mathRecList, this.btnResetRec, this.btnAddRec, this.btnDeleteRec // 1 tab
];
arr = arr.concat(this.chNewRows ? [this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
return arr;
},
getSettings: function() {
@ -395,6 +398,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
var value = this.getActiveCategory();
if (value==0) this.onMathCategoryClick(true);
else if (value==1) this.onRecCategoryClick(true);
else if (value==2) this.onAutoformatCategoryClick(true);
},
close: function() {
@ -417,6 +421,13 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
}
},
onAutoformatCategoryClick: function(delay) {
var me = this;
_.delay(function(){
me.chNewRows ? me.chNewRows.focus() : me.chQuotes.focus();
},delay ? 50 : 0);
},
onDelete: function() {
var rec = this.mathList.getSelectedRec();
if (rec) {

View file

@ -79,8 +79,8 @@ define([
var me = this,
$window = me.getChild(),
items = this.options.items,
checked = true,
checkedIndex = -1;
checked = true;
this.checkedIndex = -1;
if (items) {
for (var i=0; i<items.length; i++) {
var item = items[i];
@ -98,14 +98,22 @@ define([
}));
if ((checked || item.checked)&& !item.disabled) {
checked = false;
checkedIndex = i;
this.checkedIndex = i;
}
}
(checkedIndex>=0) && this.radio[checkedIndex].setValue(true);
(this.checkedIndex>=0) && this.radio[this.checkedIndex].setValue(true);
}
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
getFocusedComponents: function() {
return this.radio;
},
getDefaultFocusableComponent: function () {
return (this.checkedIndex>=0) ? this.radio[this.checkedIndex] : null;
},
_handleInput: function(state) {
if (this.options.handler) {
this.options.handler.call(this, this, state);

View file

@ -143,7 +143,7 @@ define([
},
getFocusedComponents: function() {
return [this.inputName, this.inputTitle, this.inputEmail, this.textareaInstructions];
return [this.inputName, this.inputTitle, this.inputEmail, this.textareaInstructions, this.chDate];
},
getDefaultFocusableComponent: function () {

View file

@ -339,6 +339,11 @@
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control;
.border-radius(@border-radius-small);
&:focus:not(.disabled) {
border-color: @border-control-focus-ie;
border-color: @border-control-focus;
}
}
&:before,
@ -735,6 +740,11 @@
padding-right: 10px;
}
&:focus:not(.disabled) {
border-color: @border-control-focus-ie;
border-color: @border-control-focus;
}
&:hover:not(.disabled),
.over:not(.disabled) {
background-color: @highlight-button-hover-ie !important;

View file

@ -20,6 +20,12 @@
position: absolute;
left: 0;
margin-top: auto;
+ span {
outline: @scaled-one-px-value-ie dotted transparent;
outline: @scaled-one-px-value dotted transparent;
display: inline-block;
}
}
&:checked:not(:indeterminate) {
@ -65,4 +71,18 @@
}
}
}
&:focus:not(.disabled) {
input[type=checkbox] {
+ label {
border-color: @border-control-focus-ie;
border-color: @border-control-focus;
+ span {
outline-color: @border-control-focus-ie;
outline-color: @border-control-focus;
}
}
}
}
}

View file

@ -23,6 +23,12 @@
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control;
border-radius: 50%;
+ span {
outline: @scaled-one-px-value-ie dotted transparent;
outline: @scaled-one-px-value dotted transparent;
display: inline-block;
}
}
&:checked {
@ -49,4 +55,18 @@
}
}
}
&:focus:not(.disabled) {
input[type=radio] {
+ label {
border-color: @border-control-focus-ie;
border-color: @border-control-focus;
+ span {
outline-color: @border-control-focus-ie;
outline-color: @border-control-focus;
}
}
}
}
}

View file

@ -122,34 +122,48 @@
<div class="padding-small">
<label class="header"><%= scope.textEffects %></label>
</div>
<div>
<div class="padding-large" style="display: inline-block;">
<div class="padding-small" id="paragraphadv-checkbox-strike"></div>
<div class="padding-small" id="paragraphadv-checkbox-double-strike"></div>
<div id="paragraphadv-checkbox-superscript"></div>
<table cols="2">
<tr>
<td class="padding-small">
<div id="paragraphadv-checkbox-strike"></div>
</td>
<td class="padding-small" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-subscript"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="paragraphadv-checkbox-double-strike"></div>
</td>
<td class="padding-small" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-small-caps"></div>
</td>
</tr>
<tr>
<td class="padding-large">
<div id="paragraphadv-checkbox-superscript"></div>
</td>
<td class="padding-large" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-all-caps"></div>
</td>
</tr>
</table>
<div class="padding-small">
<label class="header"><%= scope.textCharacterSpacing %></label>
</div>
<div class="padding-large">
<div style="display: inline-block;">
<label class="input-label"><%= scope.textSpacing %></label>
<div id="paragraphadv-spin-spacing"></div>
</div>
<div class="padding-large" style="display: inline-block; padding-left: 40px;">
<div class="padding-small" id="paragraphadv-checkbox-subscript"></div>
<div class="padding-small" id="paragraphadv-checkbox-small-caps"></div>
<div id="paragraphadv-checkbox-all-caps"></div>
<div class="text-only" style="display: inline-block; margin-left: 15px;">
<label class="input-label"><%= scope.textPosition %></label>
<div id="paragraphadv-spin-position"></div>
</div>
</div>
<div class="padding-small">
<label class="header"><%= scope.textCharacterSpacing %></label>
</div>
<div class="padding-large">
<div style="display: inline-block;">
<label class="input-label"><%= scope.textSpacing %></label>
<div id="paragraphadv-spin-spacing"></div>
</div>
<div class="text-only" style="display: inline-block; margin-left: 15px;">
<label class="input-label"><%= scope.textPosition %></label>
<div id="paragraphadv-spin-position"></div>
</div>
</div>
<div class="doc-content-color" style="outline: 1px solid #cbcbcb;">
<div id="paragraphadv-font-img" style="width: 300px; height: 80px; position: relative; margin: 0 auto;"></div>
</div>
<div class="doc-content-color" style="outline: 1px solid #cbcbcb;">
<div id="paragraphadv-font-img" style="width: 300px; height: 80px; position: relative; margin: 0 auto;"></div>
</div>
</div>
</div>
<div id="id-adv-paragraph-tabs" class="settings-panel">

View file

@ -92,7 +92,7 @@ define([
'<td class="padding-large">',
'<button type="button" class="btn btn-text-default" id="bookmarks-btn-goto" style="margin-right: 5px;">', me.textGoto,'</button>',
'<div style="display: inline-block; position: relative;">',
'<button type="button" class="btn btn-text-default auto dropdown-toggle" id="bookmarks-btn-link" style="min-width: 75px;" data-toggle="dropdown">', me.textGetLink,'</button>',
'<button type="button" class="btn btn-text-default auto dropdown-toggle move-focus" id="bookmarks-btn-link" style="min-width: 75px;" data-toggle="dropdown">', me.textGetLink,'</button>',
'<div id="id-clip-copy-box" class="dropdown-menu" style="width: 291px; left: -80px; padding: 10px;">',
'<div id="id-dlg-clip-copy"></div>',
'<button id="id-dlg-copy-btn" class="btn btn-text-default" style="margin-left: 5px; width: 86px;">' + me.textCopy + '</button>',
@ -249,7 +249,7 @@ define([
},
getFocusedComponents: function() {
return [this.txtName, {cmp: this.bookmarksList, selector: '.listview'}];
return [this.txtName, this.radioName, this.radioLocation, this.bookmarksList, this.btnAdd, this.btnGoto, this.btnGetLink, this.btnDelete, this.chHidden];
},
afterRender: function() {

View file

@ -238,7 +238,9 @@ define([
}
}
}
})).show();
})).on('close', function() {
me.cmbLabel.focus();
}).show();
}, this));
this.btnDelete = new Common.UI.Button({
@ -353,7 +355,7 @@ define([
},
getFocusedComponents: function() {
return [this.txtCaption, this.cmbPosition, this.cmbLabel, this.cmbNumbering, this.cmbChapter, this.cmbSeparator];
return [this.txtCaption, this.cmbPosition, this.cmbLabel, this.btnAdd, this.btnDelete, this.chExclude, this.cmbNumbering, this.chChapter, this.cmbChapter, this.cmbSeparator];
},
getDefaultFocusableComponent: function () {

View file

@ -130,7 +130,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbRowCol, this.spnCount];
return [this.cmbRowCol, this.spnCount, this.radioBefore, this.radioAfter];
},
getDefaultFocusableComponent: function () {

View file

@ -357,9 +357,10 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
getFocusedComponents: function() {
return [
this.txtName, this.txtTag, this.txtPlaceholder, this.cmbShow, // 0 tab
{cmp: this.list, selector: '.listview'}, // 2 tab
this.txtDate, {cmp: this.listFormats, selector: '.listview'}, this.cmbLang // 3 tab
this.txtName, this.txtTag, this.txtPlaceholder, this.cmbShow, this.btnApplyAll, // 0 tab
this.chLockDelete , this.chLockEdit, // 1 tab
this.list, // 2 tab
this.txtDate, this.listFormats, this.cmbLang // 3 tab
];
},
@ -370,6 +371,8 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
setTimeout(function(){
if (index==0) {
me.txtName.focus();
} else if (index==1) {
me.chLockDelete.focus();
} else if (index==2) {
me.list.focus();
} else if (index==3)

View file

@ -131,7 +131,7 @@ define([
},
getFocusedComponents: function() {
return [this.spnColumns, this.spnSpacing];
return [this.spnColumns, this.spnSpacing, this.chSeparator];
},
getDefaultFocusableComponent: function () {

View file

@ -154,6 +154,7 @@ define([
Common.localStorage.setItem("de-settings-datetime-default", value);
Common.Utils.InternalSettings.set("de-settings-datetime-default", value);
}
this.listFormats.focus();
}, this)
});
}, this));
@ -176,7 +177,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbLang, {cmp: this.listFormats, selector: '.listview'}];
return [this.cmbLang, this.listFormats, this.chUpdate, this.btnDefault];
},
getDefaultFocusableComponent: function () {

View file

@ -718,7 +718,7 @@ define([
getFocusedComponents: function() {
return [
this.cmbWidth, this.spnWidth, this.cmbHeight, this.spnHeight, this.cmbHAlign, this.cmbHRelative, this.spnX, this.cmbVAlign, this.cmbVRelative, this.spnY, // 0 tab
this.cmbWidth, this.spnWidth, this.cmbHeight, this.spnHeight, this.cmbHAlign, this.cmbHRelative, this.spnX, this.cmbVAlign, this.cmbVRelative, this.spnY, this.chMove, // 0 tab
this.cmbFonts, this.spnRowHeight, this.numDistance, // 1 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight // 3 tab
];

View file

@ -188,7 +188,7 @@ define([
},
getFocusedComponents: function() {
return [this.inputUrl, {cmp: this.internalList, selector: '.treeview'}, this.inputDisplay, this.inputTip];
return [this.inputUrl, this.internalList, this.inputDisplay, this.inputTip];
},
ShowHideElem: function(value) {

View file

@ -1154,14 +1154,15 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
getFocusedComponents: function() {
return [
this.spnWidth, this.spnHeight, // 0 tab
this.spnShapeWidth , this.spnShapeWidthPc, this.cmbWidthPc, this.spnShapeHeight, this.spnShapeHeightPc, this.cmbHeightPc, // 1 tab
this.spnAngle, // 2 tab
this.spnWidth, this.spnHeight, this.btnOriginalSize, // 0 tab
this.radioHSize, this.spnShapeWidth , this.spnShapeWidthPc, this.radioHSizePc, this.cmbWidthPc,
this.radioVSize, this.spnShapeHeight, this.spnShapeHeightPc, this.radioVSizePc, this.cmbHeightPc, this.chRatio, // 1 tab
this.spnAngle, this.chFlipHor, this.chFlipVert, // 2 tab
this.spnTop, this.spnLeft, this.spnBottom, this.spnRight, // 3 tab
this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition, this.spnXPc, this.cmbHPositionPc,
this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, this.spnYPc, this.cmbVPositionPc, // 4 tab
this.radioHAlign, this.radioHPosition, this.radioHPositionPc, this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition, this.spnXPc, this.cmbHPositionPc,
this.radioVAlign, this.radioVPosition, this.radioVPositionPc, this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, this.spnYPc, this.cmbVPositionPc, this.chMove, this.chOverlap, // 4 tab
this.cmbCapType, this.cmbJoinType, // 5 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 6 tab
this.chAutofit, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 6 tab
this.inputAltTitle, this.textareaAltDescription // 7 tab
];
},
@ -1176,7 +1177,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
me.spnWidth.focus();
break;
case 1:
me.spnShapeWidth.focus();
if (!me.spnShapeWidth.isDisabled())
me.spnShapeWidth.focus();
else
me.spnShapeWidthPc.focus();
break;
case 2:
me.spnAngle.focus();
@ -1196,7 +1200,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
me.cmbCapType.focus();
break;
case 6:
me.spnMarginTop.focus();
me.chAutofit.focus();
break;
case 7:
me.inputAltTitle.focus();

View file

@ -163,6 +163,7 @@ define([
el: $('#line-numbers-combo-apply'),
cls: 'input-group-nr',
menuStyle: 'min-width: 150px;',
takeFocusOnClose: true,
editable: false,
data: [
{ displayValue: this.textSection, value: Asc.c_oAscSectionApplyType.Current },
@ -177,6 +178,14 @@ define([
this.updateMetricUnit();
},
getFocusedComponents: function() {
return [this.chAddLineNumbering, this.spnStartAt, this.spnFromText, this.spnCountBy, this.rbRestartEachPage, this.rbRestartEachSection, this.rbContinuous, this.cmbApply];
},
getDefaultFocusableComponent: function () {
return this.chAddLineNumbering;
},
afterRender: function() {
},

View file

@ -340,7 +340,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbFormat, this.cmbAlign, this.cmbSize, {cmp: this.levelsList, selector: '.listview'}];
return [this.btnEdit, this.cmbFormat, this.cmbAlign, this.cmbSize, this.levelsList];
},
getDefaultFocusableComponent: function () {

View file

@ -291,7 +291,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbFootnote, this.cmbEndnote, this.cmbFormat, this.spnStart, this.cmbNumbering, this.txtCustom, this.cmbApply];
return [this.radioFootnote, this.cmbFootnote, this.radioEndnote, this.cmbEndnote, this.cmbFormat, this.spnStart, this.cmbNumbering, this.txtCustom, this.cmbApply];
},
getDefaultFocusableComponent: function () {

View file

@ -88,6 +88,14 @@ define([
});
},
getFocusedComponents: function() {
return [this.chFootnote, this.chEndnote];
},
getDefaultFocusableComponent: function () {
return this.chFootnote;
},
_handleInput: function(state) {
if (this.options.handler) {
this.options.handler.call(this, this, state);

View file

@ -680,9 +680,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.cmbTextAlignment, this.cmbOutlinelevel, this.numIndentsLeft, this.numIndentsRight, this.cmbSpecial, this.numSpecialBy,
this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, // 0 tab
this.numSpacing, this.numPosition, // 3 tab
this.numDefaultTab, this.numTab, this.cmbAlign, this.cmbLeader, {cmp: this.tabList, selector: '.listview'}, // 4 tab
this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, this.chAddInterval, // 0 tab
this.chBreakBefore, this.chKeepLines, this.chOrphan, this.chKeepNext, this.chLineNumbers, // 1 tab
this.chStrike, this.chSubscript, this.chDoubleStrike, this.chSmallCaps, this.chSuperscript, this.chAllCaps, this.numSpacing, this.numPosition, // 3 tab
this.numDefaultTab, this.numTab, this.cmbAlign, this.cmbLeader, this.tabList, this.btnAddTab, this.btnRemoveTab, this.btnRemoveAll,// 4 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight // 5 tab
];
},
@ -696,8 +697,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
case 0:
me.cmbTextAlignment.focus();
break;
case 1:
me.chBreakBefore.focus();
break;
case 3:
me.numSpacing.focus();
me.chStrike.focus();
break;
case 4:
me.numDefaultTab.focus();

View file

@ -204,6 +204,7 @@ define([
style : 'width: 85px;',
menuStyle : 'min-width: 85px;',
editable : false,
takeFocusOnClose: true,
cls : 'input-group-nr',
data : [
{ value: Asc.c_oAscTabLeader.None, displayValue: this.textNone },
@ -271,6 +272,7 @@ define([
cls: 'input-group-nr',
menuStyle: 'min-width: 100%;max-height: 233px;',
editable: false,
takeFocusOnClose: true,
data: []
});
this.cmbCaptions.on('selected', _.bind(function(combo, record) {
@ -283,6 +285,7 @@ define([
cls: 'input-group-nr',
menuStyle: 'min-width: 100%;max-height: 233px;',
editable: false,
takeFocusOnClose: true,
data: []
});
this.cmbTOFStyles.on('selected', _.bind(function(combo, record) {
@ -373,6 +376,7 @@ define([
store: this.stylesLevels,
simpleAddMode: true,
showLast: false,
tabindex: 1,
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
itemTemplate: _.template([
'<div id="<%= id %>" class="list-item">',
@ -413,6 +417,7 @@ define([
cls: 'input-group-nr',
menuStyle: 'min-width: 95px;',
editable: false,
takeFocusOnClose: true,
data: arr
});
this.cmbStyles.setValue(this.type==1 ? Asc.c_oAscTOFStylesType.Current : Asc.c_oAscTOCStylesType.Current);
@ -447,12 +452,17 @@ define([
this.afterRender();
},
afterRender: function() {
this._setDefaults(this.props);
getFocusedComponents: function() {
return [ this.chPages, this.chAlign, this.cmbLeader, this.chLinks, this.radioLevels, this.radioStyles, this.spnLevels, this.stylesList, this.cmbStyles,
this.radioCaption, this.radioStyle, this.cmbCaptions, this.cmbTOFStyles, this.chFullCaption];
},
show: function() {
Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments);
getDefaultFocusableComponent: function () {
return this.chPages;
},
afterRender: function() {
this._setDefaults(this.props);
},
close: function() {

View file

@ -1010,10 +1010,10 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
getFocusedComponents: function() {
return [
this.nfWidth, this.cmbUnit, this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, this.nfSpacing, // 0 tab
this.nfPrefWidth, this.cmbPrefWidthUnit, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 1 tab
this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition,
this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, // 3 tab
this.chWidth, this.nfWidth, this.cmbUnit, this.chAutofit, this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, this.chAllowSpacing, this.nfSpacing, // 0 tab
this.chPrefWidth, this.nfPrefWidth, this.cmbPrefWidthUnit, this.chCellMargins, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, this.chWrapText, // 1 tab
this.radioHAlign, this.cmbHAlign , this.radioHPosition, this.cmbHRelative, this.spnX, this.cmbHPosition,
this.radioVAlign, this.cmbVAlign , this.radioVPosition, this.cmbVRelative, this.spnY, this.cmbVPosition, this.chMove, this.chOverlap, // 3 tab
this.spnIndentLeft, this.spnDistanceTop, this.spnDistanceLeft, this.spnDistanceBottom, this.spnDistanceRight, // 4 tab
this.inputAltTitle, this.textareaAltDescription // 5 tab
];
@ -1035,8 +1035,8 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
me.onCellCategoryClick(btn);
if (!me.nfPrefWidth.isDisabled())
me.nfPrefWidth.focus();
else if (!me.spnMarginTop.isDisabled())
me.spnMarginTop.focus();
else
me.chPrefWidth.focus();
break;
case 3:
if (!me.cmbHAlign.isDisabled())

View file

@ -383,7 +383,7 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
},
getFocusedComponents: function() {
return [ this.cmbLang, this.cmbText, this.cmbFonts, this.cmbFontSize, this.cmbScale ];
return [ this.radioNone, this.radioText, this.cmbLang, this.cmbText, this.cmbFonts, this.chTransparency, this.radioDiag, this.radioHor, this.radioImage, this.cmbFontSize, this.cmbScale ];
},
getDefaultFocusableComponent: function () {
@ -391,6 +391,8 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
return this.cmbLang;
else if (!this.cmbScale.isDisabled())
return this.cmbScale;
else
return this.radioNone;
},
focusControls: function() {

View file

@ -58,18 +58,32 @@
<div class="padding-small">
<label class="header"><%= scope.textEffects %></label>
</div>
<div>
<div class="padding-large" style="display: inline-block;">
<div class="padding-small" id="paragraphadv-checkbox-strike"></div>
<div class="padding-small" id="paragraphadv-checkbox-double-strike"></div>
<div id="paragraphadv-checkbox-superscript"></div>
</div>
<div class="padding-large" style="display: inline-block; padding-left: 40px;">
<div class="padding-small" id="paragraphadv-checkbox-subscript"></div>
<div class="padding-small" id="paragraphadv-checkbox-small-caps"></div>
<div id="paragraphadv-checkbox-all-caps"></div>
</div>
</div>
<table cols="2">
<tr>
<td class="padding-small">
<div id="paragraphadv-checkbox-strike"></div>
</td>
<td class="padding-small" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-subscript"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="paragraphadv-checkbox-double-strike"></div>
</td>
<td class="padding-small" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-small-caps"></div>
</td>
</tr>
<tr>
<td class="padding-large">
<div id="paragraphadv-checkbox-superscript"></div>
</td>
<td class="padding-large" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-all-caps"></div>
</td>
</tr>
</table>
<div class="padding-small">
<label class="header"><%= scope.textCharacterSpacing %></label>
</div>

View file

@ -154,6 +154,7 @@ define([
Common.localStorage.setItem("pe-settings-datetime-default", value);
Common.Utils.InternalSettings.set("pe-settings-datetime-default", value);
}
this.listFormats.focus();
}, this)
});
}, this));
@ -176,7 +177,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbLang, {cmp: this.listFormats, selector: '.listview'}];
return [this.cmbLang, this.listFormats, this.chUpdate, this.btnDefault];
},
getDefaultFocusableComponent: function () {

View file

@ -188,7 +188,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
},
getFocusedComponents: function() {
return [ this.cmbFormat, this.cmbLang, this.inputFixed, this.inputFooter ];
return [ this.chDateTime, this.radioUpdate, this.cmbFormat, this.cmbLang, this.radioFixed, this.inputFixed, this.chSlide, this.chFooter, this.inputFooter, this.chNotTitle ];
},
getDefaultFocusableComponent: function () {
@ -198,6 +198,8 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
return this.inputFixed;
else if (!this.inputFooter.isDisabled())
return this.inputFooter;
else
return this.chDateTime;
},
focusControls: function() {

View file

@ -191,7 +191,7 @@ define([
},
getFocusedComponents: function() {
return [this.inputUrl, {cmp: this.internalList, selector: '.treeview'}, this.inputDisplay, this.inputTip];
return [this.inputUrl, this.internalList, this.inputDisplay, this.inputTip];
},
setSettings: function (props) {

View file

@ -222,8 +222,8 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.spnWidth, this.spnHeight, this.spnX, this.spnY,// 0 tab
this.spnAngle, // 1 tab
this.spnWidth, this.spnHeight, this.btnOriginalSize, this.spnX, this.spnY,// 0 tab
this.spnAngle, this.chFlipHor, this.chFlipVert, // 1 tab
this.inputAltTitle, this.textareaAltDescription // 2 tab
];
},

View file

@ -409,8 +409,8 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
return [
this.cmbTextAlignment, this.numIndentsLeft, this.numIndentsRight, this.cmbSpecial, this.numSpecialBy,
this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, // 0 tab
this.numSpacing, // 1 tab
this.numDefaultTab, this.numTab, this.cmbAlign, {cmp: this.tabList, selector: '.listview'} // 2 tab
this.chStrike, this.chSubscript, this.chDoubleStrike, this.chSmallCaps, this.chSuperscript, this.chAllCaps, this.numSpacing, // 1 tab
this.numDefaultTab, this.numTab, this.cmbAlign, this.tabList, this.btnAddTab, this.btnRemoveTab, this.btnRemoveAll // 2 tab
];
},
@ -424,7 +424,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
me.cmbTextAlignment.focus();
break;
case 1:
me.numSpacing.focus();
me.chStrike.focus();
break;
case 2:
me.numDefaultTab.focus();

View file

@ -522,9 +522,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.spnWidth, this.spnHeight, // 0 tab
this.spnAngle, // 1 tab
this.spnAngle, this.chFlipHor, this.chFlipVert, // 1 tab
this.cmbCapType, this.cmbJoinType, // 2 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 3 tab
this.radioNofit, this.radioShrink, this.radioFit, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 3 tab
this.spnColumns, this.spnSpacing, // 4 tab
this.inputAltTitle, this.textareaAltDescription // 5 tab
];

View file

@ -85,6 +85,14 @@ define([
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
getFocusedComponents: function() {
return [ this.chLoop ];
},
getDefaultFocusableComponent: function () {
return this.chLoop;
},
_handleInput: function(state) {
if (this.options.handler) {
this.options.handler.call(this, this, state);

View file

@ -317,7 +317,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight,
this.chCellMargins, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight,
this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, // 0 tab
this.inputAltTitle, this.textareaAltDescription // 1 tab
];

View file

@ -23,8 +23,8 @@
<td class="padding-large">
<button type="button" class="btn btn-text-default" id="format-manager-btn-new" style="min-width: 100px;margin-right:5px;"><%= scope.textNew %></button>
<button type="button" class="btn btn-text-default" id="format-manager-btn-edit" style="min-width: 100px;margin-right:5px;"><%= scope.textEdit %></button>
<div id="format-manager-btn-up" style="display: inline-block;border: 1px solid #cfcfcf;border-radius: 1px;"></div>
<div id="format-manager-btn-down" style="display: inline-block;border: 1px solid #cfcfcf;border-radius: 1px;"></div>
<div id="format-manager-btn-up" style="display: inline-block;"></div>
<div id="format-manager-btn-down" style="display: inline-block;"></div>
</td>
<td class="padding-large" style="text-align: right;width:90px;">
<button type="button" class="btn btn-text-default" id="format-manager-btn-delete" style="min-width: 100px;"><%= scope.textDelete %></button>

View file

@ -58,18 +58,32 @@
<div class="padding-small">
<label class="header"><%= scope.textEffects %></label>
</div>
<div>
<div class="padding-large" style="display: inline-block;">
<div class="padding-small" id="paragraphadv-checkbox-strike"></div>
<div class="padding-small" id="paragraphadv-checkbox-double-strike"></div>
<div id="paragraphadv-checkbox-superscript"></div>
</div>
<div class="padding-large" style="display: inline-block; padding-left: 40px;">
<div class="padding-small" id="paragraphadv-checkbox-subscript"></div>
<div class="padding-small" id="paragraphadv-checkbox-small-caps"></div>
<div id="paragraphadv-checkbox-all-caps"></div>
</div>
</div>
<table cols="2">
<tr>
<td class="padding-small">
<div id="paragraphadv-checkbox-strike"></div>
</td>
<td class="padding-small" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-subscript"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="paragraphadv-checkbox-double-strike"></div>
</td>
<td class="padding-small" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-small-caps"></div>
</td>
</tr>
<tr>
<td class="padding-large">
<div id="paragraphadv-checkbox-superscript"></div>
</td>
<td class="padding-large" style="padding-left: 40px;">
<div id="paragraphadv-checkbox-all-caps"></div>
</td>
</tr>
</table>
<div class="padding-small">
<label class="header"><%= scope.textCharacterSpacing %></label>
</div>

View file

@ -190,7 +190,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbCondition1, this.cmbValue1, this.cmbCondition2, this.cmbValue2];
return [this.cmbCondition1, this.cmbValue1, this.rbAnd, this.rbOr, this.cmbCondition2, this.cmbValue2];
},
getDefaultFocusableComponent: function () {
@ -854,7 +854,8 @@ define([
cls : 'input-group-nr',
data : [],
scrollAlwaysVisible: true,
editable : false
editable : false,
takeFocusOnClose: true
});
this.cmbFieldsDesc = new Common.UI.ComboBox({
@ -865,13 +866,23 @@ define([
data : [],
scrollAlwaysVisible: true,
editable : false,
disabled: true
disabled: true,
takeFocusOnClose: true
});
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.loadDefaults();
},
getFocusedComponents: function() {
return [this.radioAsc, this.cmbFieldsAsc, this.radioDesc, this.cmbFieldsDesc];
},
getDefaultFocusableComponent: function () {
return !this.cmbFieldsAsc.isDisabled() ? this.cmbFieldsAsc : this.cmbFieldsDesc;
},
show: function () {
Common.UI.Window.prototype.show.call(this);
},

View file

@ -150,7 +150,8 @@ define([
store: new Common.UI.DataViewStore(),
emptyText: '',
scrollAlwaysVisible: true,
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>')
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>'),
tabindex:1
});
this.seriesList.onKeyDown = _.bind(this.onListKeyDown, this, 'series');
this.seriesList.on('item:select', _.bind(this.onSelectSeries, this));
@ -199,7 +200,8 @@ define([
store: new Common.UI.DataViewStore(),
emptyText: '',
scrollAlwaysVisible: true,
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>')
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>'),
tabindex:1
});
this.btnEditCategory = new Common.UI.Button({
@ -210,17 +212,16 @@ define([
this.afterRender();
},
afterRender: function() {
this._setDefaults(this.chartSettings);
getFocusedComponents: function() {
return [this.txtDataRange, this.seriesList, this.btnAdd, this.btnEdit, this.btnDelete, this.btnUp, this.btnDown, this.btnSwitch, this.categoryList, this.btnEditCategory];
},
show: function() {
Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments);
getDefaultFocusableComponent: function () {
return this.txtDataRange;
},
var me = this;
_.delay(function(){
me.txtDataRange.cmpEl.find('input').focus();
},50);
afterRender: function() {
this._setDefaults(this.chartSettings);
},
close: function () {

View file

@ -1016,20 +1016,23 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
getFocusedComponents: function() {
return [
this.cmbChartTitle, this.cmbLegendPos, this.cmbDataLabels, this.txtSeparator, // 1 tab
this.cmbChartTitle, this.cmbLegendPos, this.cmbDataLabels, this.chSeriesName, this.chCategoryName, this.chValue, this.txtSeparator, // 1 tab
this.cmbVertTitle[0], this.cmbVertGrid[0],
this.cmbMinType[0], this.spnMinValue[0], this.cmbMaxType[0], this.spnMaxValue[0], this.cmbVCrossType[0], this.spnVAxisCrosses[0],
this.cmbUnits[0] , this.cmbVMajorType[0], this.cmbVMinorType[0], this.cmbVLabelPos[0], // 2 tab
this.chVertHide[0], this.cmbMinType[0], this.spnMinValue[0], this.cmbMaxType[0], this.spnMaxValue[0], this.cmbVCrossType[0], this.spnVAxisCrosses[0],
this.chVReverse[0], this.cmbUnits[0] , this.cmbVMajorType[0], this.cmbVMinorType[0], this.cmbVLabelPos[0], // 2 tab
this.cmbVertTitle[1], this.cmbVertGrid[1],
this.cmbMinType[1] , this.spnMinValue[1], this.cmbMaxType[1], this.spnMaxValue[1], this.cmbVCrossType[1], this.spnVAxisCrosses[1],
this.cmbUnits[1] , this.cmbVMajorType[1], this.cmbVMinorType[1], this.cmbVLabelPos[1], // 3 tab
this.cmbHorTitle[0], this.cmbHorGrid[0],
this.cmbHCrossType[0] , this.spnHAxisCrosses[0], this.cmbAxisPos[0], this.cmbHMajorType[0], this.cmbHMinorType[0], this.spnMarksInterval[0],
this.chVertHide[1], this.cmbMinType[1] , this.spnMinValue[1], this.cmbMaxType[1], this.spnMaxValue[1], this.cmbVCrossType[1], this.spnVAxisCrosses[1],
this.chVReverse[1], this.cmbUnits[1] , this.cmbVMajorType[1], this.cmbVMinorType[1], this.cmbVLabelPos[1], // 3 tab
this.chHorHide[0], this.cmbHorTitle[0], this.cmbHorGrid[0],
this.cmbHCrossType[0] , this.spnHAxisCrosses[0], this.cmbAxisPos[0], this.chHReverse[0], this.cmbHMajorType[0], this.cmbHMinorType[0], this.spnMarksInterval[0],
this.cmbHLabelPos[0] , this.spnLabelDist[0], this.cmbLabelInterval[0], this.spnLabelInterval[0], // 4 tab
this.cmbHorTitle[1], this.cmbHorGrid[1],
this.cmbHCrossType[1] , this.spnHAxisCrosses[1], this.cmbAxisPos[1], this.cmbHMajorType[1], this.cmbHMinorType[1], this.spnMarksInterval[1],
this.chHorHide[1], this.cmbHorTitle[1], this.cmbHorGrid[1],
this.cmbHCrossType[1] , this.spnHAxisCrosses[1], this.cmbAxisPos[1], this.chHReverse[1], this.cmbHMajorType[1], this.cmbHMinorType[1], this.spnMarksInterval[1],
this.cmbHLabelPos[1] , this.spnLabelDist[1], this.cmbLabelInterval[1], this.spnLabelInterval[1], // 5 tab
this.inputAltTitle, this.textareaAltDescription // 7 tab
this.cmbEmptyCells, this.chShowEmpty, // 6 tab
this.chShowAxis, this.chReverse, this.cmbSparkMinType, this.spnSparkMinValue, this.cmbSparkMaxType, this.spnSparkMaxValue, // 7 tab
this.radioTwoCell, this.radioOneCell, this.radioAbsolute, // 8 tab
this.inputAltTitle, this.textareaAltDescription // 9 tab
];
},
@ -1052,6 +1055,15 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
me.onHCategoryClick(index-4);
me.cmbHCrossType[index-4].focus();
break;
case 6:
me.cmbEmptyCells.focus();
break;
case 7:
me.chShowAxis.focus();
break;
case 8:
me.radioTwoCell.focus();
break;
case 9:
me.inputAltTitle.focus();
break;

View file

@ -165,7 +165,7 @@ define([
},
getFocusedComponents: function() {
return [this.txtSourceRange, this.txtDestRange];
return [this.txtSourceRange, this.radioNew, this.radioExist, this.txtDestRange];
},
getDefaultFocusableComponent: function () {

View file

@ -265,9 +265,9 @@ define([ 'text!spreadsheeteditor/main/app/template/DataValidationDialog.templ
getFocusedComponents: function() {
return [
this.cmbAllow, this.cmbData, this.inputRangeSource, this.inputRangeMin, this.inputRangeMax, // 0 tab
this.inputInputTitle, this.textareaInput, // 1 tab
this.cmbStyle, this.inputErrorTitle, this.textareaError // 2 tab
this.cmbAllow, this.cmbData, this.chIgnore, this.chShowDropDown, this.inputRangeSource, this.inputRangeMin, this.inputRangeMax, this.chApply, // 0 tab
this.chShowInput, this.inputInputTitle, this.textareaInput, // 1 tab
this.chShowError, this.cmbStyle, this.inputErrorTitle, this.textareaError // 2 tab
];
},
@ -281,10 +281,16 @@ define([ 'text!spreadsheeteditor/main/app/template/DataValidationDialog.templ
me.cmbAllow.focus();
break;
case 1:
me.inputInputTitle.focus();
if (!me.inputInputTitle.isDisabled())
me.inputInputTitle.focus();
else
me.chShowInput.focus();
break;
case 2:
me.cmbStyle.focus();
if (!me.cmbStyle.isDisabled())
me.cmbStyle.focus();
else
me.chShowError.focus();
break;
}
}, 10);

View file

@ -212,6 +212,29 @@ define([ 'text!spreadsheeteditor/main/app/template/FieldSettingsDialog.templa
this.afterRender();
},
getFocusedComponents: function() {
return [
this.inputCustomName, this.radioTabular, this.radioOutline, this.chCompact, this.chRepeat, this.chBlank, this.chSubtotals, this.radioTop, this.radioBottom, this.chEmpty, // 0 tab
this.chSum, this.chCount, this.chAve, this.chMax, this.chMin, this.chProduct, this.chNum, this.chDev, this.chDevp, this.chVar, this.chVarp // 1 tab
];
},
onCategoryClick: function(btn, index) {
Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index);
var me = this;
setTimeout(function(){
switch (index) {
case 0:
me.inputCustomName.focus();
break;
case 1:
me.chSum.focus();
break;
}
}, 10);
},
afterRender: function() {
this._setDefaults(this.props);
if (this.storageName) {

View file

@ -807,6 +807,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
});
this.chIconShow.on('change', function(field, newValue, oldValue, eOpts){
});
Common.UI.FocusManager.add(this, this.chIconShow);
this.btnReverse = new Common.UI.Button({
el: $('#format-rules-edit-btn-icon-reverse')
@ -916,6 +917,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
this.chFill.on('change', function(field, newValue, oldValue, eOpts){
me.btnNegFill.setDisabled(field.getValue()=='checked');
});
Common.UI.FocusManager.add(this, this.chFill);
// Border
this.cmbBorder = new Common.UI.ComboBox({
@ -966,6 +968,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
this.chBorder.on('change', function(field, newValue, oldValue, eOpts){
me.btnNegBorder.setDisabled(field.getValue()=='checked');
});
Common.UI.FocusManager.add(this, this.chBorder);
// Axis
this.cmbBarDirection = new Common.UI.ComboBox({
@ -993,6 +996,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
el: $('#format-rules-edit-chk-show-bar'),
labelText: this.textShowBar
});
Common.UI.FocusManager.add(this, this.chShowBar);
this.cmbAxisPos = new Common.UI.ComboBox({
el : $('#format-rules-edit-combo-axis-pos'),

View file

@ -186,7 +186,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
this.btnUp = new Common.UI.Button({
parentEl: $('#format-manager-btn-up'),
cls: 'btn-toolbar',
cls: 'btn-toolbar bg-white',
iconCls: 'caret-up',
hint: this.textUp
});
@ -194,7 +194,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
this.btnDown = new Common.UI.Button({
parentEl: $('#format-manager-btn-down'),
cls: 'btn-toolbar',
cls: 'btn-toolbar bg-white',
iconCls: 'caret-down',
hint: this.textDown
});
@ -213,7 +213,13 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
_setDefaults: function (props) {
Common.UI.FocusManager.add(this, this.cmbScope);
Common.UI.FocusManager.add(this, {cmp: this.rulesList, selector: '.listview'});
Common.UI.FocusManager.add(this, this.rulesList);
Common.UI.FocusManager.add(this, this.btnNew);
Common.UI.FocusManager.add(this, this.btnEdit);
Common.UI.FocusManager.add(this, this.btnUp);
Common.UI.FocusManager.add(this, this.btnDown);
Common.UI.FocusManager.add(this, this.btnDelete);
this.rulesList.on('item:add', _.bind(this.addControls, this));
this.rulesList.on('item:change', _.bind(this.addControls, this));

View file

@ -291,7 +291,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbFormat, this.spnDecimal, this.cmbSymbols, this.cmbNegative, this.cmbType, this.inputCustomFormat, {cmp: this.codesList, selector: '.listview'}];
return [this.cmbFormat, this.spnDecimal, this.chSeparator, this.cmbSymbols, this.cmbNegative, this.cmbType, this.inputCustomFormat, this.codesList, this.chLinked];
},
getDefaultFocusableComponent: function () {

View file

@ -125,7 +125,7 @@ define([
},
getFocusedComponents: function() {
return [this.inputSearch, this.cmbFuncGroup, {cmp: this.cmbListFunctions, selector: '.listview'}];
return [this.inputSearch, this.cmbFuncGroup, this.cmbListFunctions];
},
getDefaultFocusableComponent: function () {

View file

@ -255,7 +255,7 @@ define([
},
getFocusedComponents: function() {
return [this.inputUrl, {cmp: this.internalList, selector: '.treeview'}, this.inputRange, this.inputDisplay, this.inputTip];
return [this.inputUrl, this.internalList, this.inputRange, this.inputDisplay, this.inputTip];
},
setSettings: function(settings) {

View file

@ -148,7 +148,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
getFocusedComponents: function() {
return [
this.spnAngle, // 0 tab
this.spnAngle, this.chFlipHor, this.chFlipVert, // 0 tab
this.radioTwoCell, this.radioOneCell, this.radioAbsolute, // 1 tab
this.inputAltTitle, this.textareaAltDescription // 2 tab
];
},
@ -162,6 +163,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp
case 0:
me.spnAngle.focus();
break;
case 1:
me.radioTwoCell.focus();
break;
case 2:
me.inputAltTitle.focus();
break;

View file

@ -172,7 +172,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
},
getFocusedComponents: function() {
return [ this.cmbFilter, {cmp: this.rangeList, selector: '.listview'} ];
return [ this.cmbFilter, this.rangeList, this.btnNewRange, this.btnEditRange, this.btnDeleteRange ];
},
getDefaultFocusableComponent: function () {
@ -321,6 +321,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
}
}).on('close', function() {
me.show();
setTimeout(function(){ me.getDefaultFocusableComponent().focus(); }, 100);
});
me.hide();

View file

@ -407,8 +407,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
return [
this.cmbTextAlignment, this.numIndentsLeft, this.numIndentsRight, this.cmbSpecial, this.numSpecialBy,
this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, // 0 tab
this.numSpacing, // 1 tab
this.numDefaultTab, this.numTab, this.cmbAlign, {cmp: this.tabList, selector: '.listview'} // 2 tab
this.chStrike, this.chSubscript, this.chDoubleStrike, this.chSmallCaps, this.chSuperscript, this.chAllCaps, this.numSpacing, // 1 tab
this.numDefaultTab, this.numTab, this.cmbAlign, this.tabList, this.btnAddTab, this.btnRemoveTab, this.btnRemoveAll // 2 tab
];
},
@ -422,7 +422,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
me.cmbTextAlignment.focus();
break;
case 1:
me.numSpacing.focus();
me.chStrike.focus();
break;
case 2:
me.numDefaultTab.focus();

View file

@ -216,7 +216,7 @@ define([
},
getFocusedComponents: function() {
return [this.inputStart, this.inputEnd, this.inputBy, {cmp: this.listDate, selector: '.listview'}, this.spnDays];
return [this.chStart, this.inputStart, this.chEnd, this.inputEnd, this.inputBy, this.listDate, this.spnDays];
},
getDefaultFocusableComponent: function () {

View file

@ -183,7 +183,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PivotSettingsAdvanced.temp
getFocusedComponents: function() {
return [
this.inputName, this.numWrap, // 0 tab
this.inputName, this.chRows, this.chCols, this.radioDown, this.radioOver, this.numWrap, this.chHeaders, // 0 tab
this.txtDataRange, // 1 tab
this.inputAltTitle, this.textareaAltDescription // 2 tab
];

View file

@ -279,8 +279,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
},
getFocusedComponents: function() {
return [this.cmbRange, this.cmbSheet, this.cmbPaperSize, this.cmbPaperOrientation, this.cmbLayout, this.txtRangeTop, this.txtRangeLeft,
this.spnMarginTop, this.spnMarginBottom, this.spnMarginLeft, this.spnMarginRight];
return [this.cmbRange, this.chIgnorePrintArea, this.cmbSheet, this.cmbPaperSize, this.cmbPaperOrientation, this.cmbLayout, this.txtRangeTop, this.txtRangeLeft,
this.spnMarginTop, this.spnMarginBottom, this.spnMarginLeft, this.spnMarginRight, this.chPrintGrid, this.chPrintRows];
},
getDefaultFocusableComponent: function () {

View file

@ -101,6 +101,7 @@ define([
store: new Common.UI.DataViewStore(),
simpleAddMode: true,
scrollAlwaysVisible: true,
tabindex: 1,
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
itemTemplate: _.template([
'<div>',
@ -249,6 +250,14 @@ define([
}
},
getFocusedComponents: function() {
return [this.chHeaders, this.columnsList];
},
getDefaultFocusableComponent: function () {
return this.columnsList;
},
afterRender: function() {
this._setDefaults(this.props);
},
@ -258,10 +267,6 @@ define([
this.chHeaders.setValue(!!props.asc_getHasHeaders(), true);
this.updateColumnsList();
}
var me = this;
_.delay(function () {
me.columnsList.focus();
}, 100, this);
},
getSettings: function () {

View file

@ -168,7 +168,7 @@ define([
},
getFocusedComponents: function() {
return [this.cmbScaleWidth, this.cmbScaleHeight, this.spnScale];
return [this.radioFitTo, this.cmbScaleWidth, this.cmbScaleHeight, this.radioScaleTo, this.spnScale];
},
getDefaultFocusableComponent: function () {

View file

@ -576,10 +576,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
getFocusedComponents: function() {
return [
this.spnWidth, this.spnHeight, // 0 tab
this.spnAngle, // 1 tab
this.spnAngle, this.chFlipHor, this.chFlipVert, // 1 tab
this.cmbCapType, this.cmbJoinType, // 2 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 3 tab
this.chAutofit, this.chOverflow, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 3 tab
this.spnColumns, this.spnSpacing, // 4 tab
this.radioTwoCell, this.radioOneCell, this.radioAbsolute, // 5 tab
this.inputAltTitle, this.textareaAltDescription // 6 tab
];
},
@ -605,6 +606,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
case 4:
me.spnColumns.focus();
break;
case 5:
me.radioTwoCell.focus();
break;
case 6:
me.inputAltTitle.focus();
break;

View file

@ -386,8 +386,10 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.inputHeader, this.numWidth, this.numHeight, this.numCols, this.numColHeight, // 0 tab
this.inputHeader, this.chHeader, this.numWidth, this.numHeight, this.numCols, this.numColHeight, // 0 tab
this.radioAsc, this.radioDesc, this.chHideNoData, this.chIndNoData, this.chShowNoData, // 1 tab
this.inputName, // 2 tab
this.radioTwoCell, this.radioOneCell, this.radioAbsolute, // 3 tab
this.inputAltTitle, this.textareaAltDescription // 4 tab
];
},
@ -401,9 +403,15 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
case 0:
me.inputHeader.focus();
break;
case 1:
me.chHideNoData.focus();
break;
case 2:
me.inputName.focus();
break;
case 3:
me.radioTwoCell.focus();
break;
case 4:
me.inputAltTitle.focus();
break;

View file

@ -130,6 +130,14 @@ define([
this.afterRender();
},
getFocusedComponents: function() {
return [this.chHeaders, this.radioTop, this.radioLeft];
},
getDefaultFocusableComponent: function () {
return this.radioTop;
},
afterRender: function() {
this._setDefaults(this.props);
},

View file

@ -351,6 +351,16 @@ define([
this.afterRender();
},
getFocusedComponents: function() {
return [this.radioAll, this.radioFormulas, this.radioValues, this.radioFormats, this.radioComments, this.radioColWidth,
this.radioWBorders, this.radioFFormat, this.radioFWidth, this.radioFNFormat, this.radioVNFormat, this.radioVFormat,
this.radioNone, this.radioAdd, this.radioMult, this.radioSub, this.radioDiv, this.chBlanks, this.chTranspose];
},
getDefaultFocusableComponent: function () {
return this.radioAll;
},
afterRender: function() {
this._setDefaults(this.props);
},

View file

@ -123,7 +123,8 @@ define([
'<div class="lock-user"><%=lockuser%></div>',
'<% } %>',
'</div>'
].join(''))
].join('')),
tabindex: 1
});
this.viewList.on('item:select', _.bind(this.onSelectItem, this))
.on('item:keydown', _.bind(this.onKeyDown, this))
@ -158,6 +159,14 @@ define([
this.afterRender();
},
getFocusedComponents: function() {
return [ this.viewList, this.btnNew, this.btnRename, this.btnDuplicate, this.btnDelete ];
},
getDefaultFocusableComponent: function () {
return this.viewList;
},
afterRender: function() {
this._setDefaults();
},
@ -286,7 +295,9 @@ define([
rec.get('view').asc_setName(value);
}
}
})).show();
})).on('close', function() {
me.getDefaultFocusableComponent().focus();
}).show();
}
},