fix rows unclickeables when searching maps that are not in the first page

This commit is contained in:
Ezequiel Bergamaschi 2015-01-31 16:55:16 -03:00
parent 9f79d8f40a
commit 6950f7f715

View File

@ -253,26 +253,30 @@ function updateStarred(spanElem) {
}
function callbackOnTableInit() {
var clickAction = function() {
$("#mindmapListTable tbody tr").unbind('click').click(
function (event) {
var target = $(event.target);
if (!target.is('.closeTag')) {
if (!target.parent().is('.closeTag')) {
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("c/maps/"));
window.open(baseUrl + 'c/maps/' + $(this).find('.mindmapName').attr('value') + '/edit', '_self');
}
}
});
};
// Register starred events ...
$('#mindmapListTable .starredOff, #mindmapListTable .starredOn').click(function (event) {
updateStarred(this);
event.stopPropagation();
});
$("#mindmapListTable tbody tr").click(
function(event) {
var target = $(event.target);
if (!target.is('.closeTag')){
if (!target.parent().is('.closeTag')) {
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("c/maps/"));
window.open(baseUrl + 'c/maps/' + $(this).find('.mindmapName').attr('value') + '/edit' , '_self');
}
}
});
clickAction();
$('input:checkbox').click(function(event) {
event.stopPropagation();
});
updateStatusToolbar();
$("#mindmapListTable").on("draw", clickAction);
}
// Register time update functions ....