Set focus in text field when user add an idea

This commit is contained in:
Manuel Cillero 2017-09-08 21:21:03 +02:00
parent 9b5e9d7df0
commit a35dce838b
2 changed files with 3 additions and 1 deletions

View file

@ -170,6 +170,8 @@ function stormidea_form(&$node) {
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'title') : -16,
);
drupal_add_js('$jq(function(){$("#edit-title-1").focus();});', 'inline', 'footer');
return $form;
}

View file

@ -537,7 +537,7 @@ function zuitedesk_pager($tags = array(), $limit = 10, $element = 0, $parameters
if (empty($_REQUEST['go'])) {
$parameters['go'] = 'backlog';
} else {
drupal_add_js('$jq(\'html\').delay(500).animate({scrollTop:$("#views-exposed-form-storm-projects-kanban-page-2").offset().top-60},1600);', 'inline', 'footer');
drupal_add_js('$jq(function(){$(\'html,body\').animate({scrollTop:$("#views-exposed-form-storm-projects-kanban-page-2").offset().top-60},1600);});', 'inline', 'footer');
}
}
}