mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 23:36:01 +01:00
Issue ID field does not get focus when adding a related issue (#37473).
Patch by Mizuki ISHIKAWA. git-svn-id: https://svn.redmine.org/redmine/trunk@21867 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -336,7 +336,7 @@ module ApplicationHelper
|
|||||||
|
|
||||||
def toggle_link(name, id, options={})
|
def toggle_link(name, id, options={})
|
||||||
onclick = +"$('##{id}').toggle(); "
|
onclick = +"$('##{id}').toggle(); "
|
||||||
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
|
onclick << (options[:focus] ? "$('##{options[:focus]}:visible').focus(); " : "this.blur(); ")
|
||||||
onclick << "$(window).scrollTop($('##{options[:focus]}').position().top); " if options[:scroll]
|
onclick << "$(window).scrollTop($('##{options[:focus]}').position().top); " if options[:scroll]
|
||||||
onclick << "return false;"
|
onclick << "return false;"
|
||||||
link_to(name, "#", :onclick => onclick)
|
link_to(name, "#", :onclick => onclick)
|
||||||
|
|||||||
@@ -958,7 +958,7 @@ function addFormObserversForDoubleSubmit() {
|
|||||||
|
|
||||||
function defaultFocus(){
|
function defaultFocus(){
|
||||||
if (($('#content :focus').length == 0) && (window.location.hash == '')) {
|
if (($('#content :focus').length == 0) && (window.location.hash == '')) {
|
||||||
$('#content input[type=text], #content textarea').first().focus();
|
$('#content input[type=text]:visible, #content textarea:visible').first().focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user