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( + '
' + ) + .css('margin','auto'); + + $('.names').css({'margin':'auto','width':'auto'}).addClass('pull-right'); + + $('#scrumblr') + .append($('.names, .stickers, .buttons')) + .after( + '
'+ + '
'+ + '
' + ); + + $('#export-import').append($('.export, .import')); + $('#revisions').append($('.revisions')); + $('#about').append($('#tuto-faq, #le-logiciel, #jardin')); + + // Style + $('#create-card').addClass('vert fa-3x').css('opacity','1'); + $('#smallify').removeClass('fa-expand').addClass('fa-search-minus').on('click',function(){ + if (currentTheme == "bigcards") { + $(this).removeClass('fa-search-plus').addClass('fa-search-minus'); + } else { + $(this).removeClass('fa-search-minus').addClass('fa-search-plus'); + } + }) + + $('#full-page').on('click', function(){ + if ($('.container.ombre').length) { + $(this).children('i').removeClass('fa-expand').addClass('fa-compress'); + $('.container.ombre').removeClass('container').addClass('container-fluid'); + } else { + $(this).children('i').removeClass('fa-compress').addClass('fa-expand'); + $('.container-fluid.ombre').removeClass('container-fluid').addClass('container'); + } + }) + + $('main hr').hide(); + + /** Mode iframe **/ + if(top.location!=self.document.location) { + + $('#full-page').hide().trigger('click'); + $('main hr, header').hide(); + + } + + } + +});