diff --git a/inc/myco.js b/inc/myco.js index cc0a5e5..d4f84f3 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -307,6 +307,7 @@ on_categories_go_back_group_btn_click=function(e) { } on_categories_group_add_btn_click=function(e) { + e.preventDefault(); name=$('#add_category input')[0].value; if (jQuery.type(name)!='string' || name=='') { @@ -322,6 +323,7 @@ on_categories_group_add_btn_click=function(e) { group.addCategory(new Category(name)); $('#add_category input')[0].value=''; refresh_group_categories(group); + $('#add_category input').focus(); } } @@ -1077,6 +1079,7 @@ $( document ).ready( function() { $('#nav-search-form input').bind('input',on_nav_search_form_input); $('#view-group-categories span.input-group-addon').bind('click',on_categories_group_add_btn_click); + $('#view-group-categories form').bind('submit',on_categories_group_add_btn_click); $("#view-group-categories button.go-back-group").bind('click',on_categories_go_back_group_btn_click); view_home(); diff --git a/index.html b/index.html index 2ceabbb..14196b5 100644 --- a/index.html +++ b/index.html @@ -339,10 +339,12 @@ span.cat-color {