From 2fafbc03a2e41952e07c3f1b7f39d4eaeeb95e8b Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sat, 31 Jan 2015 16:55:16 -0300 Subject: [PATCH] fix rows unclickeables when searching maps that are not in the first page --- wise-webapp/src/main/webapp/js/mindmapList.js | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/wise-webapp/src/main/webapp/js/mindmapList.js b/wise-webapp/src/main/webapp/js/mindmapList.js index 0dbe9196..4e67b34f 100644 --- a/wise-webapp/src/main/webapp/js/mindmapList.js +++ b/wise-webapp/src/main/webapp/js/mindmapList.js @@ -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 ....