From tchemit@users.labs.libre-entreprise.org Mon May 19 09:08:26 2008 From: tchemit@users.labs.libre-entreprise.org To: nuiton-rss-commits@list.nuiton.org Subject: [Lutinweb-commits] r57 - trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude Date: Mon, 19 May 2008 09:08:26 +0200 Message-ID: <20080519070826.7867E461AF8@labs.libre-entreprise.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3423690999432544675==" --===============3423690999432544675== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: tchemit Date: 2008-05-19 07:08:25 +0000 (Mon, 19 May 2008) New Revision: 57 Modified: trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude/fck_= rssinclude.html trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude/fck_= rssinclude.js Log: ajout dans la list des feeds de la configuration enregistr?\195?\169e (nbItem= et feedRepr) suppression style en dur sur les div (todo voir comment ajouter css a l'?\195= ?\169diteur) Modified: trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclu= de/fck_rssinclude.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude/fck= _rssinclude.html 2008-05-18 21:52:11 UTC (rev 56) +++ trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude/fck= _rssinclude.html 2008-05-19 07:08:25 UTC (rev 57) @@ -46,21 +46,29 @@
- Edit - Add + Edit + Add Modified: trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclu= de/fck_rssinclude.js =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude/fck= _rssinclude.js 2008-05-18 21:52:11 UTC (rev 56) +++ trunk/lutinrss/src/main/resources/fckeditor/editor/plugins/rssinclude/fck= _rssinclude.js 2008-05-19 07:08:25 UTC (rev 57) @@ -48,12 +48,12 @@ xhr.onreadystatechange =3D function() { if(xhr.readyState =3D=3D 4 && xhr.status =3D=3D 200) /* 200 : co= de HTTP pour OK */ { - var content =3D ''+=20 xhr.responseText + ''; document.getElementById("divFeedName").innerHTML =3D content; if (oRss) { // on selectionne l'ancienne valeur - GetE('txtFeedName').value =3D GetAttribute( oRss, 'feedN= ame', '' ); + GetE('txtFeedName').value =3D GetAttribute( oRss, 'feedn= ame', '' ); } } } @@ -70,9 +70,9 @@ // la generation des attribute dans updateRss les transformes en minuscu= le... // cela ne fonctionne pas bien sous ie //TODO utiliser des attributs tout en minuscule pour eviter ce probleme - GetE('txtFeedName').value =3D GetAttribute( oRss, 'feedName', '' ); - GetE('txtNbItem').value =3D GetAttribute( oRss, 'nbItem', '' ); - GetE('txtFeedRepr').value =3D GetAttribute( oRss, 'feedRepr', '' ); + GetE('txtFeedName').value =3D GetAttribute( oRss, 'feedname', '' ); + GetE('txtNbItem').value =3D GetAttribute( oRss, 'nbitem', '' ); + GetE('txtFeedRepr').value =3D GetAttribute( oRss, 'feedrepr', '' ); =20 updatePreview(); } @@ -112,14 +112,13 @@ e.contentEditable =3D false; =20 =20 SetAttribute( e, 'class', 'rssinclude'); + SetAttribute( e, 'contentEditable', 'false'); SetAttribute( e, 'name', 'rssinclude'); - SetAttribute( e, 'feedName', GetE('txtFeedName').value ); - SetAttribute( e, 'nbItem', GetE('txtNbItem').value ); - SetAttribute( e, 'feedRepr', GetE('txtFeedRepr').value ); + SetAttribute( e, 'feedname', GetE('txtFeedName').value ); + SetAttribute( e, 'nbitem', GetE('txtNbItem').value ); + SetAttribute( e, 'feedrepr', GetE('txtFeedRepr').value ); //SetAttribute( e, 'forceReload', 'true' ); e.innerHTML =3D 'RSS ' + GetE('txtFeedName').value + ' (items:'+GetE('tx= tNbItem').value+')'; - //TODO Il faudrait utiliser une class css, afin de ne pas poluer le cont= enu final - e.style.backgroundColor =3D '#ffff00' ; } =20 // L'element servant a la preview @@ -127,8 +126,9 @@ =20 /** * Mise a jour du flux dans la preview + * @param combo la combo utilisee (undefined si uniquement un input) */ -function updatePreview(){ +function updatePreview(combo){ =20 if ( !ePreview ) { ePreview =3D GetE('rssincludePreview'); @@ -141,6 +141,13 @@ if ( GetE('txtFeedName').value.length =3D=3D 0 ) { ePreview.innerHTML =3D 'Invalid RSS'; } else { + if (!!combo) { + // mise =C3=A0 jour des champs =C3=A0 partir de l'option selecti= onne + var index =3D combo.options.selectedIndex; + var option =3D combo.options[index]; + GetE('txtNbItem').value =3D GetAttribute( option, 'nbitem', '' ) + GetE('txtFeedRepr').value =3D GetAttribute( option, 'feedrepr',= '' ) + } updateRss(ePreview); rssincludeUpdateDiv(ePreview, true); } --===============3423690999432544675==--