Removed: KnockoutJS 'hasFocus:' because HTML5 has autofocus=""

Knoin.js now searches for [autofocus] and handles it
This commit is contained in:
djmaze 2020-08-22 01:03:03 +02:00
parent 226f77e392
commit 996723a486
18 changed files with 60 additions and 113 deletions

View file

@ -11,9 +11,9 @@
<div class="input-append">
<input type="text" class="input-block-level inputLogin checkAutocomplete"
name="RainLoopAdminLogin" id="RainLoopAdminLogin"
style="padding-right: 35px;"
autofocus=""
autocomplete="username" autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_LOGIN"
data-bind="textInput: login, hasFocus: loginFocus, disable: submitRequest" />
data-bind="textInput: login, disable: submitRequest" />
<span class="add-on">
<i class="icon-user"></i>
</span>
@ -23,7 +23,6 @@
<div class="input-append">
<input type="password" class="input-block-level inputPassword checkAutocomplete"
placeholder="Password" name="RainLoopAdminPassword" id="RainLoopAdminPassword"
style="padding-right: 35px;"
autocomplete="current-password" autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD"
data-bind="textInput: password, disable: submitRequest" />
<span class="add-on" tabindex="-1" data-tooltip-join="left" data-bind="command: submitCommand, tooltip: 'LOGIN/BUTTON_LOGIN'">
@ -44,4 +43,5 @@
</center>
</div>
<div class="loginAfter"></div>
<div>
<div>

View file

@ -13,8 +13,8 @@
&nbsp;
<span style="color: #aaa">(<span data-i18n="POPUPS_DOMAIN/NAME_HELPER"></span>)</span>
<br />
<input type="text" class="span4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="textInput: name, hasfocus: name.focused" />
<input type="text" class="span4" autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="textInput: name" />
<div data-bind="visible: '' !== savingError()">
<span class="error-desc" data-bind="text: savingError"></span>
</div>
@ -268,4 +268,4 @@
</a>
</div>
</div>
</div>
</div>

View file

@ -10,12 +10,12 @@
<br />
</div>
<div class="modal-footer">
<button class="btn buttonYes" data-bind="click: yesClick, hasFocus: yesFocus">
<button class="btn buttonYes" data-bind="click: yesClick">
<i class="icon-ok"></i>
&nbsp;&nbsp;
<span data-bind="text: yesButton"></span>
</button>
<button class="btn buttonNo" data-bind="click: noClick, hasFocus: noFocus">
<button class="btn buttonNo" data-bind="click: noClick">
<i class=" icon-remove"></i>
&nbsp;&nbsp;
<span data-bind="text: noButton"></span>

View file

@ -11,7 +11,7 @@
</div>
<div class="modal-footer">
<button class="btn" data-bind="command: cancelCommand, hasFocus: closeFocused">
<button class="btn" autofocus="" data-bind="command: cancelCommand">
<i class="icon-remove"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="POPUPS_WELCOME_PAGE/BUTTON_CLOSE"></span>
@ -19,4 +19,4 @@
</div>
</div>
</div>
</div>

View file

@ -32,9 +32,10 @@
data-bind="css: {'error': emailError, 'animated': emailErrorAnimation}">
<div class="input-append">
<input type="email" class="i18n input-block-level inputEmail checkAutocomplete"
name="RainLoopEmail" id="RainLoopEmail" style="padding-right: 35px;" autocomplete="email"
autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="textInput: email, hasFocus: emailFocus, disable: submitRequest"
name="RainLoopEmail" id="RainLoopEmail"
autofocus=""
autocomplete="email" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="textInput: email, disable: submitRequest"
data-i18n="[placeholder]LOGIN/LABEL_EMAIL" />
<span class="add-on">
<i class="icon-mail"></i>
@ -44,9 +45,9 @@
<div class="controls" data-bind="css: {'error': passwordError, 'animated': passwordErrorAnimation}">
<div class="input-append">
<input type="password" class="i18n input-block-level inputPassword checkAutocomplete"
name="RainLoopPassword" id="RainLoopPassword" style="padding-right: 35px;"
name="RainLoopPassword" id="RainLoopPassword"
autocomplete="current-password" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="textInput: password, hasFocus: passwordFocus, disable: submitRequest"
data-bind="textInput: password, disable: submitRequest"
data-i18n="[placeholder]LOGIN/LABEL_PASSWORD" />
<span class="add-on" tabindex="-1" data-tooltip-join="left"
data-bind="command: submitCommand, tooltip: 'LOGIN/BUTTON_SIGN_IN'">
@ -62,7 +63,7 @@
<div class="input-append">
<input type="text" class="i18n input-block-level inputAdditionalCode" autocomplete="off"
autocorrect="off" autocapitalize="off" spellcheck="false" style="padding-right: 35px;"
data-bind="textInput: additionalCode, hasFocus: additionalCode.focused, disable: submitRequest"
data-bind="textInput: additionalCode, disable: submitRequest"
data-i18n="[placeholder]LOGIN/LABEL_VERIFICATION_CODE" />
<span class="add-on">
<i class="icon-key"></i>

View file

@ -11,7 +11,7 @@
<div class="alert" data-bind="visible: key.error() && key.errorMessage(), text: key.errorMessage"></div>
<div class="form-horizontal">
<div class="control-group" data-bind="css: {'error': key.error}">
<textarea class="inputKey input-xxlarge" rows="14" autocomplete="off" data-bind="value: key, hasfocus: key.focus"></textarea>
<textarea class="inputKey input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: key"></textarea>
</div>
</div>
</div>

View file

@ -18,7 +18,7 @@
<div class="control-group" data-bind="visible: !owner(), css: {'error': email.hasError}">
<label class="i18n control-label" data-i18n="POPUPS_IDENTITY/LABEL_EMAIL"></label>
<div class="controls">
<input type="email" class="inputEmail input-xlarge"
<input type="email" class="inputEmail input-xlarge" autofocus=""
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="value: email, onEnter: addOrEditIdentityCommand, hasfocus: email.focused" />
</div>
@ -34,7 +34,7 @@
<div class="controls">
<input type="text" class="inputName input-xlarge"
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="value: name, onEnter: addOrEditIdentityCommand, hasfocus: name.focused" />
data-bind="value: name, onEnter: addOrEditIdentityCommand" />
</div>
</div>
<div class="control-group" data-bind="visible: showReplyTo, css: {'error': replyTo.hasError}">