fixed 3rd hamburger inline details setting

svn path=/Website/trunk/; revision=31488
This commit is contained in:
2016-11-16 09:27:38 +00:00
parent beaab9090f
commit d6b3e7c945
3 changed files with 9 additions and 44 deletions

View File

@@ -15,7 +15,6 @@
// maar <form> mag niet binnen een ander <form> voorkomen en moet eigenlijk wel binnen body staan
// Formulier als tekststring samenstellen en m.b.v. $(document).ready(function(){}) binnen de body zetten
var timerID=null;
var showingInlineDetails = false;
var useHamb = null;
var currentRowKey = null;
window.activerow = null;
@@ -183,40 +182,21 @@ function initActions(tableID, hambType)
{
$("#" + tableID)
.on('mouseenter', '.hamburger', showHamburgerActions)
.on('mouseleave', 'tr', hamburgerMouseOut)
.on('mouseenter', 'tr', hamburgerMouseOut);
.on('mouseenter', 'tr', hideActions);
$("div")
.on('mouseleave', '.allactions', hamburgerMouseOut);
// $(document).add(parent.document).add(parent.parent.document).mouseleave(hamburgerMouseOut);
// $(document).add(parent.document).add(parent.parent.document).mouseenter(hamburgerMouseOut);
.on('mouseleave', '.allactions', hideActions)
}
}
});
}
function hamburgerMouseOut(event)
{
var node = $(this).prop('nodeName');
var key = this.getAttribute("ROWKEY");
if (showingInlineDetails && (node == "DIV" || (node == "TR" && currentRowKey != key)))
{
showingInlineDetails = false;
$currentActionsDiv().hide();
}
if (node != "DIV" && node != "TR")
{
alert(node);
}
event.stopPropagation();
}
function defaultHamburgerAction(event)
{
var thisTR = $(this).closest('tr')[0];
if (!$('li.byHamburger').hasClass('hidden'))
$('li.byHamburger').toggleClass('hidden');
else if (showingInlineDetails)
else if ($currentActionsDiv().css('display') != "none")
hideActions.apply(thisTR, [event]);
else if (!!$(event.currentTarget).attr("ROWKEY"))
defaultAction.apply(thisTR, [event]);
@@ -254,23 +234,11 @@ function defaultAction(event)
function hideActions(event)
{
if ((useHamb == 0 && window.activerow != this) || (useHamb != 0 && showingInlineDetails)) // voorkom hide als je muis boven de buttons beweegt
{
if ((useHamb == 0 && window.activerow != this) || (useHamb != 0 && $currentActionsDiv().css('display') != "none")) // voorkom hide als je muis boven de buttons beweegt
$currentActionsDiv().hide();
if (useHamb != 0) showingInlineDetails = false;
}
event.stopPropagation();
}
function inlineHambOff()
{
if (showingInlineDetails)
{
$currentActionsDiv().hide();
if (useHamb != 0) showingInlineDetails = false;
}
}
function hambSetCursor(event)
{
window.activerow = this;
@@ -287,7 +255,7 @@ function hambSetCursor(event)
function showHamburgerActions(event)
{
if (!showingInlineDetails)
if ($currentActionsDiv().css('display') == "none" || useHamb == 1)
{
var thisTR = $(this).closest('tr')[0];
showActions.apply(thisTR, [event]);
@@ -297,16 +265,13 @@ function showHamburgerActions(event)
function showActions(event) // event op de mouseover van resultsettable
{
var key = this.getAttribute("ROWKEY");
if (!key || (useHamb != 0 && currentRowKey == key && showingInlineDetails))
if (!key || (useHamb != 0 && currentRowKey == key && $currentActionsDiv().css('display') != "none"))
{
hideActions(event)
return;
}
else if (useHamb != 0)
{
currentRowKey = key;
showingInlineDetails = true;
}
if (!$('li.byHamburger').hasClass('hidden'))
$('li.byHamburger').toggleClass('hidden');
var mustHide = ( window.activerow != this );