diff --git a/client/css/framemo.css b/client/css/framemo.css index ef06f48..b33975a 100644 --- a/client/css/framemo.css +++ b/client/css/framemo.css @@ -13,6 +13,7 @@ h1 { h1 a.banner { font-size: 48px; font-weight: bold; + font-family: "DejaVu Sans", Verdana, Geneva, sans-serif !important; } .content h1, .content h2, .content h3 { font-family: 'Rock Salt', "Arial Rounded MT Bold", arial, serif !important; diff --git a/client/script.js b/client/script.js index 4e04ecb..f4af603 100644 --- a/client/script.js +++ b/client/script.js @@ -966,3 +966,150 @@ $(function() { }); }) }); + +/** Doubleclick on mobile + Layout Framemo with tabs **/ +$(document).ready(function(){ + + if(window.location.href != window.location.protocol+'//'+window.location.host+'/') { // Not on homepage + + /** Double click on mobile interface **/ + + var clickTimer = null; + var clickTarget = null; + var editTarget = null; + + function doubletapCards( selector ) { + + $(selector+' .stickertarget').addClass('doubletap'); // Escape multi bound + + $(selector+' .doubletap').on('click', function() { + + clickTarget = selector.replace('#',''); + + if (clickTimer == null) { + + clickTimer = setTimeout(function () { + clickTimer = null; + }, 1000) + + } else { + //console.log('doubleclick : '+clickTimer+':'+editTarget); + clearTimeout(clickTimer); + clickTimer = null; + + if(editTarget == clickTarget && clickTarget !== undefined && clickTarget !== null) { + $('#'+clickTarget.replace('content:','')+' .doubletap').trigger('dblclick'); + } + + } + + editTarget = clickTarget; + + }); + } + + function doubletapTitle( selector ) { + + $(selector).addClass('doubletap'); // Escape multi bound + + $(selector+'.doubletap').on('click', function() { + + clickTarget = selector.replace('#',''); + + if (clickTimer == null) { + + clickTimer = setTimeout(function () { + clickTimer = null; + }, 1000) + + } else { + //console.log('doubleclick : '+clickTimer+':'+editTarget); + clearTimeout(clickTimer); + clickTimer = null; + + if(editTarget == clickTarget && clickTarget !== undefined && clickTarget !== null) { + $('#'+clickTarget+'.doubletap').trigger('dblclick'); + } + + } + + editTarget = clickTarget; + + }); + } + + setInterval(function() { // Add periodically the doubletap event on new cards + + $('.stickertarget:not(.doubletap)').each(function(){ + doubletapCards('#'+$(this).attr('id').replace('content:','')); + }); + $('#board-table .col h2:not(.doubletap)').each(function(){ + doubletapTitle('#'+$(this).attr('id')); + }); + + }, 500); + + /** Layout Framemo - Tabs **/ + + $('.board-outline') + .before( + '
' + ) + .wrap( + '