Bug 12343: Multiple Clicks on View More buttons adding extra tab in the bread crum bar

status 12343: resolved fixed
reviewed-by: brian
This commit is contained in:
Pranav Saxena 2012-04-04 03:40:18 +05:30 committed by Brian Federle
parent b5d0d41f83
commit b91f8e1b02
1 changed files with 21 additions and 3 deletions

View File

@ -23,10 +23,27 @@
var $label = $('<span>').addClass('view-all-label').html(args.label ? args.label : 'View all');
var $browser = args.$browser;
var action = args.action;
// Launch a list view
$viewAll.click(function() {
//var $multiple-click=$viewAll.data('multiple-click',false);
$viewAll.click(function() {
if ($viewAll.data('multiple-click')) return false;
//@pranav-handling the multiple clicks by using a flag variable
$viewAll.data('multiple-click', true);
$browser.cloudBrowser('addPanel', {
title: args.title,
maximizeIfSelected: true,
complete: function($newPanel) {
$viewAll.data('multiple-click', false);
action({ $panel: $newPanel });
}
});
});
/* $viewAll.click(function() {
$browser.cloudBrowser('addPanel', {
// $('.button view-all').data('multiple_click',true),
title: args.title,
maximizeIfSelected: true,
complete: function($newPanel) {
@ -34,7 +51,8 @@
}
});
});
*/
$viewAll.append($label);
return $viewAll;