FSN#38071 hamburgers voor inline acties toegevoegd (in touch modus)
svn path=/Website/trunk/; revision=31113
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
var insideFrame = $(this).offset();
|
||||
var outsideFrame = $(window.frameElement).offset();
|
||||
var scrollTop = $(window.parent).scrollTop();
|
||||
var offset = insideFrame?insideFrame.top:0 + outsideFrame?outsideFrame.top:0;
|
||||
var offset = insideFrame.top + outsideFrame.top;
|
||||
// if browser is IE then correct the top positioning
|
||||
var IEcorr = (/*@cc_on!@*/false)?-4:0;
|
||||
if ((scrollTop > offset) && (scrollTop < offset + $(this).height())) {
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
// 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 touch = null;
|
||||
var currentRowKey = null;
|
||||
|
||||
function delayed(delay, fn)
|
||||
{
|
||||
if (window.timerID)
|
||||
@@ -151,7 +155,15 @@ function initActions(tableID, isTouch)
|
||||
.on('mouseout', 'tr', hideActions);
|
||||
$("#allactions_" + tableID +".allactions")
|
||||
.on('mouseover', function (evt) { evt.stopPropagation() } )
|
||||
.on('mouseout', function (evt) { evt.stopPropagation() } )
|
||||
.on('mouseout', function (evt) { evt.stopPropagation() } );
|
||||
touch = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#" + tableID)
|
||||
.on('click', ".hamburger", showHamburgerActions)
|
||||
.on('click', '.hamburger', FcltMgr.stopPropagation );
|
||||
touch = true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -187,20 +199,34 @@ function defaultAction(event)
|
||||
|
||||
function hideActions(event)
|
||||
{
|
||||
if (window.activerow != this) // voorkom hide als je muis boven de buttons beweegt
|
||||
if ((!touch && window.activerow != this) || (touch && showingInlineDetails)) // voorkom hide als je muis boven de buttons beweegt
|
||||
{
|
||||
$currentActionsDiv().hide();
|
||||
if (touch) showingInlineDetails = false;
|
||||
}
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
function showHamburgerActions(event)
|
||||
{
|
||||
var thisTR = $(this).closest('tr')[0];
|
||||
showActions.apply(thisTR, [event]);
|
||||
}
|
||||
|
||||
window.activerow = null;
|
||||
function showActions(event) // event op de mouseover van resultsettable
|
||||
{
|
||||
var key = this.getAttribute("ROWKEY");
|
||||
if (!key)
|
||||
if (!key || (touch && currentRowKey == key && showingInlineDetails))
|
||||
{
|
||||
hideActions(event)
|
||||
return;
|
||||
}
|
||||
else if (touch)
|
||||
{
|
||||
currentRowKey = key;
|
||||
showingInlineDetails = true;
|
||||
}
|
||||
var mustHide = ( window.activerow != this );
|
||||
window.activerow = this;
|
||||
var $actiondiv = $currentActionsDiv();
|
||||
|
||||
@@ -16,6 +16,7 @@ FCLTHeader.Requires({ plugins: ["jQuery"],
|
||||
js: ["resultset_table_v2.js", "sorttable.js", "floatThead.js"]
|
||||
});
|
||||
var APIname = getQParam("API","");
|
||||
var touch = getQParam("touch","") == 1;
|
||||
var book_id = null;
|
||||
if (APIname == "REPORT")
|
||||
{
|
||||
@@ -217,8 +218,12 @@ ResultsetTable.prototype.addAction = __rsAddAction;
|
||||
|
||||
function __rsAddAction(params)
|
||||
{
|
||||
if (device.test(device.isTouch) && !params.isDefault)
|
||||
/*
|
||||
if (device.test(device.isTouch) && !params.isDefault) {
|
||||
params.single = false; // touch heeft geen mouseover. Dan alleen de default onclick
|
||||
}
|
||||
Nu ook actions bij PDA (hamburger)
|
||||
*/
|
||||
|
||||
this.actions.push(params);
|
||||
};
|
||||
@@ -1033,6 +1038,10 @@ function __rsMakeTableHeader(oRs, oRsFlexData, anyMultiActions)
|
||||
{
|
||||
html += "<th class='sorttable_nosort'><input type=checkbox class='master' onclick='checkAll(\"" + ID + "\", this)'></th>";
|
||||
}
|
||||
if (device.test(device.isTouch))
|
||||
{
|
||||
html += "<th class='sorttable_nosort'></th>";
|
||||
}
|
||||
if (inlineDetails)
|
||||
{
|
||||
html += "<th>"+L("lcl_inlinecolumnheader")+"</th>";
|
||||
@@ -1048,6 +1057,7 @@ function __rsMakeTableHeader(oRs, oRsFlexData, anyMultiActions)
|
||||
if ((!isPrinting && (columns[i].purpose & VIEW_ONLY)) ||
|
||||
((isPrinting || showProperties || isExcel) && (columns[i].purpose & PRINTING_ONLY)))
|
||||
{
|
||||
// __DoLog(columns[i]);
|
||||
if ((isPrinting || showProperties || isExcel || !columns[i].combine) && !(isExcel && columns[i].hidden))
|
||||
{
|
||||
html += "<th";
|
||||
@@ -1190,6 +1200,12 @@ function __rsMakeTableRow(oRs, oRsFlexData, cnt, anyMultiActions, noFlexResult)
|
||||
var isChecked = this.rowChecked && this.rowChecked(oRs, this.processParams);
|
||||
appender += "<td><input type=checkbox class='multiselect'" + (isChecked?' checked=1':'') + "></td>";
|
||||
}
|
||||
|
||||
if (device.test(device.isTouch))
|
||||
{
|
||||
appender += "<td><div class=\"hamburger\"><img src=\"../pictures/hamburger.png\"></img></div></td>";
|
||||
}
|
||||
|
||||
if (!isPrinting && !isExcel && inlineDetails)
|
||||
{
|
||||
var ttl = null;
|
||||
|
||||
Reference in New Issue
Block a user