X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fclavette_www.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Fporte_plume%2Fjavascript%2Fjquery.previsu_spip.js;h=5e57baa729dc13368b99e70cfada16af1751958b;hp=e8ef8c17dd3c7393bfcde874e014c35b10633f30;hb=cc641eb476987612f6d6df1a5417c1c5582a8ab8;hpb=7d84a490677fb716a1fd4df260f8eab35f6a8506 diff --git a/www/plugins-dist/porte_plume/javascript/jquery.previsu_spip.js b/www/plugins-dist/porte_plume/javascript/jquery.previsu_spip.js index e8ef8c1..5e57baa 100644 --- a/www/plugins-dist/porte_plume/javascript/jquery.previsu_spip.js +++ b/www/plugins-dist/porte_plume/javascript/jquery.previsu_spip.js @@ -32,15 +32,14 @@ mark = $(this).parent().parent(); objet = mark.parents('.formulaire_spip')[0].className.match(/formulaire_editer_(\w+)/); champ = mark.parents('li')[0].className.match(/editer_(\w+)/); + dir = mark.find('textarea').attr('dir'); $(mark).find('.markItUpPreview').height( $(mark).find('.markItUpHeader').height() + $(mark).find('.markItUpEditor').height() + $(mark).find('.markItUpFooter').height() ); - $(mark).find('.markItUpHeader').hide(); - $(mark).find('.markItUpEditor').hide(); - $(mark).find('.markItUpFooter').hide(); + $(mark).find('.markItUpHeader,.markItUpEditor,.markItUpFooter').hide(); $(this).addClass('on').next().removeClass('on'); $(mark).find('.markItUpPreview').show() .addClass('ajaxLoad') @@ -50,7 +49,9 @@ (objet ? objet[1] : '')) ) .removeClass('ajaxLoad'); - + if(dir) + $(mark).find('.markItUpPreview').attr('dir',dir); + //ouvre un nouvel onglet lorsqu'on clique sur un lien dans la prévisualisation $(".markItUpPreview a").attr("target","blank"); @@ -59,15 +60,12 @@ $('.previsuEditer').click(function(){ mark = $(this).parent().parent(); $(mark).find('.markItUpPreview').hide(); - $(mark).find('.markItUpHeader').show(); - $(mark).find('.markItUpEditor').show(); - $(mark).find('.markItUpFooter').show(); + $(mark).find('.markItUpHeader,.markItUpEditor,.markItUpFooter').show(); $(this).addClass('on').prev().removeClass('on'); return false; }); } - function renderPreview(val, champ, objet) { var phtml; if (options.previewParserPath !== '') {