fix focus on modal

This commit is contained in:
Ezequiel Bergamaschi 2014-02-11 00:43:20 -03:00
parent c78b8db81c
commit 6299f43067

View File

@ -170,8 +170,8 @@ jQuery.fn.dialogForm = function (options) {
}); });
// Open the modal dialog ... // Open the modal dialog ...
this.on('shown', function() { this.on('shown.bs.modal', function() {
$('#' + containerId + ' input:first').focus(); $(this).find('input:first').focus();
}); });
this.modal(); this.modal();
@ -466,10 +466,9 @@ $(function () {
var dataTable = $('#mindmapListTable').dataTable(); var dataTable = $('#mindmapListTable').dataTable();
//remove the selected tag... //remove the selected tag...
$("#foldersContainer li.active").remove(); $("#foldersContainer li.active").remove();
//find the second li... (all) $("#foldersContainer li:first").addClass("active");
$("#foldersContainer li:nth-child(2)").addClass("active");
$('#foldersContainer .active i').addClass('icon-white'); $('#foldersContainer .active i').addClass('icon-white');
$("#foldersContainer li:nth-child(2)").animate({left: '+=8px'}, 'fast'); $("#foldersContainer li:first").animate({left: '+=8px'}, 'fast');
dataTable.fnReloadAjax("c/restful/maps/?q=all", callbackOnTableInit, true); dataTable.fnReloadAjax("c/restful/maps/?q=all", callbackOnTableInit, true);
} }
}) })