From ed8f28689ec85a02ee1507ae259e1fbd5517f701 Mon Sep 17 00:00:00 2001 From: Greg Burri <greg.burri@gmail.com> Date: Sun, 4 May 2008 20:42:11 +0000 Subject: [PATCH] MOD affichage des smiles dans une fenetre --- css/1/euphorik.css | 2 +- css/1/pageMinichat.css | 27 ++++++++++++------- doc/TODO.txt | 18 ++++++------- doc/graphiques/bouton_smiles.xcf | Bin 0 -> 1033 bytes img/css1/bouton_smiles.png | Bin 0 -> 237 bytes img/smileys/bn.gif | Bin 0 -> 1446 bytes img/smileys/hum.gif | Bin 123 -> 124 bytes img/smileys/redface.gif | Bin 0 -> 95 bytes js/euphorik.js | 10 +++---- js/pageMinichat.js | 43 +++++++++++++++++++++++++------ 10 files changed, 65 insertions(+), 35 deletions(-) create mode 100644 doc/graphiques/bouton_smiles.xcf create mode 100644 img/css1/bouton_smiles.png create mode 100644 img/smileys/bn.gif create mode 100644 img/smileys/redface.gif diff --git a/css/1/euphorik.css b/css/1/euphorik.css index 67848f0..2630f1f 100755 --- a/css/1/euphorik.css +++ b/css/1/euphorik.css @@ -91,7 +91,7 @@ div#info { z-index: 20; } -div#info .fermer { +div#info div.fermer { float:right; cursor: pointer; height:16px; diff --git a/css/1/pageMinichat.css b/css/1/pageMinichat.css index 67a915d..208584b 100755 --- a/css/1/pageMinichat.css +++ b/css/1/pageMinichat.css @@ -4,17 +4,19 @@ vertical-align: bottom; } -#page.minichat #smiles { - border-width: 1px 0px 1px 0px; +#smiles { + border-width: 1px 1px 1px 1px; border-color: #253f18; border-style: solid; margin-bottom: 10px; padding: 1px; - height: 100%; + width: 100px; background-color: #0c2003; + position: absolute; + display: none } - -#page.minichat #smiles img { +#smiles img { + margin: 1px; cursor: pointer; opacity: 0.5; } @@ -28,23 +30,28 @@ margin-bottom: 15px; padding-left: 10px; } - #page.minichat form .pseudo { margin-right: 5px; } - #page.minichat form .message { margin-right: 5px; } - #page.minichat form .return { - height: 15px; + height: 16px; width: 32px; background-image: url(../../img/css1/return.png); background-repeat: no-repeat; background-position: 5px 2px; vertical-align: top; } +#page.minichat form .smiles { + height: 16px; + width: 16px; + background-image: url(../../img/css1/bouton_smiles.png); + background-repeat: no-repeat; + background-position: 2px 2px; + vertical-align: top; +} /* voir pour l'astuce css "float left" des conversations : http://www.quirksmode.org/css/clearing.html */ #page.minichat #conversations { @@ -172,7 +179,7 @@ float: right; padding-right: 5px; padding-left: 5px; - background-color: #c90000; + background-color: #7d1b1b; cursor: pointer; } diff --git a/doc/TODO.txt b/doc/TODO.txt index 96977c3..27e80f9 100755 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -8,15 +8,6 @@ * Mettre un icone (genre sablier ou truc qui tourne à la apple) lorsque le chat se charge (également lors d'un changement de page par exemple) * Modifier la syntaxe des smiles actuels (pour pas qu'ils entre en conflit avec totoz) * Ajouter dans la FAQ et/ou dans la page d'enregistrement les conditions d'utilisation, genre "chacun est responsable de ses dires" https://linuxfr.org/bouchot/ -* Ajouter de nouveaux smiles et changer la syntax pour eviter le conflit avec totoz : - * "slurp" : http://forum-images.hardware.fr/images/perso/huit.gif - * "agreed" : http://forum-images.hardware.fr/icones/smilies/jap.gif - * "dodo" (tete avec un bonnet de nuit et des ZZZZ) - * "hum?" : http://forum-images.hardware.fr/icones/smilies/heink.gif - * "pas reveillé" avec une tasse de café et des cernes : http://forum-images.hardware.fr/images/perso/elmoricq.gif - * "interrogation" genre http://forum-images.hardware.fr/icones/confused.gif - * http://forum-images.hardware.fr/images/perso/dao.gif ou http://forum-images.hardware.fr/icones/redface.gif - * http://forum-images.hardware.fr/icones/ohwell.gif * Avoir un thème de discussion affiché en haut des messages genre appellé "troll de la semaine : linux sera-t-il desktop ready en 2008?" * Un statut "EK" avec plein de privilège à la con. (avoir une petite étoile à coté de son nick ou le nick d'une certaine couleur) * Une page pour voir les trolls de la semaine et pouvoir en ajouter et modifier les siens (page "admin") @@ -145,6 +136,15 @@ * pseudo(login) * Créer un favicon (joli) [ok] Créer une page 'about' +[ok] Ajouter de nouveaux smiles et changer la syntax pour eviter le conflit avec totoz : + * "slurp" : http://forum-images.hardware.fr/images/perso/huit.gif + * "agreed" : http://forum-images.hardware.fr/icones/smilies/jap.gif + * "dodo" (tete avec un bonnet de nuit et des ZZZZ) + * "hum?" : http://forum-images.hardware.fr/icones/smilies/heink.gif + * "pas reveillé" avec une tasse de café et des cernes : http://forum-images.hardware.fr/images/perso/elmoricq.gif + * "interrogation" genre http://forum-images.hardware.fr/icones/confused.gif + * http://forum-images.hardware.fr/images/perso/dao.gif ou http://forum-images.hardware.fr/icones/redface.gif + * http://forum-images.hardware.fr/icones/ohwell.gif === Bugs === 1 : Critique diff --git a/doc/graphiques/bouton_smiles.xcf b/doc/graphiques/bouton_smiles.xcf new file mode 100644 index 0000000000000000000000000000000000000000..21ac57a33d4070485f5f26166e178da739715610 GIT binary patch literal 1033 zcmc&yOHRWu5OqHN(2w}D_6oI&paK#HC<}zd?+R(^q!w*bC8^p-9DxOw$%ead2v+O} zZ&DkzqAU^9KKps*jrBTiASYA4@O<vev0#XX0`XnIFtF?c_5KTE1jGSg0~O#%anc<^ ze~-N#;9AFvCKC~+I5R5lUB<#q#gNZsI^tK?w+~d=DW!7a2EqwqIiwuaM!l1y*;sHH zrXo&+m&zzix{Zz>c+ohDd8gc*I2gFRchW0k136WtE?Ng0T6LZOPN;Q}OkGcg0Y5*} z7dATCrliU_vrwim?~MexUPQj1i1gbaQrXYcGPB-F^H5>DGG<-q6L$SpG~LFXnDZMq z6EO))S`bx$9;yK9ij#Uvact!+q@id6nzvSXdxdX<(_K1hAi78YF)Uq#m677wEwtv- zdd_^NbBkHI%__OcjQoS;Iel4P%?(xqjNAfD)NSZmf2uZ_RlrGMvRd)Uiep-;I8~6f uup{)Zp=mbzuJ;(k(JUNN>A!}q9~~B~H!_0IHZgSTeVNiZo2)ZWeZBy{#-1wx literal 0 HcmV?d00001 diff --git a/img/css1/bouton_smiles.png b/img/css1/bouton_smiles.png new file mode 100644 index 0000000000000000000000000000000000000000..40a681d73e44503f209e61615fb81fe9f697e6c8 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>VN3FMcVVby zkY<oh5|^q0if|TqL>4nJa0`PlBg3pY5<o%r5>H=O_8Y7$!dB|9e?<KQ3Q3l@MwB?` z=jNv7l`uFLr6!i7rYMwWmSiZnd-?{1H}Z)C6?u5NIEF}EPEK)P{eSUCj|2}JTigHW z?Rl<&Pv5@f4L{uBEx0R5EyXp!QN%3doxSj;yp-UJxd}-MLK_ka`NM)czww+r=xlI+ Zv39GXuh7&LQb02qJYD@<);T3K0RYHiM412p literal 0 HcmV?d00001 diff --git a/img/smileys/bn.gif b/img/smileys/bn.gif new file mode 100644 index 0000000000000000000000000000000000000000..dba4463b206af9dccf0eaa57d8c67d4d94870fae GIT binary patch literal 1446 zcmZ?wbhEHb6l4%$I3mXI<{Z<L{S0r;FulLV_VE_yvx5w8PBXr{!t(hp@B8a)UmgfO zKg#g_8tbzI3{6dqD^K3z;NZBvj)8-P<@IUC|Ns9pFfc$!AOkB<{Lk&@8WQa67~pE8 zXTZz|RHXQmg)@agj6nya0ptt@*183%eHXqvCeQM^@YqgZRo9#E`##;;<@dh6FNFKW z0*U@9{Q?;#mcBwlOEQ#X7@9m6D0Vtc@;sWrq%m1K=JfRziP>uJJ(Ul6sYwX`aGyWF zT9vJ`skx}cggdgOsm_G8tGUOd*{`WhS%|S;Sa8~O!LB)h#<6pj$}ciDiH+4#1UZS7 z3)M-rlsd`(UVb3NN$K}YW&)j5&{R+dbWw9li3w|GQ>#f+Rem?nMSa48Q>O`b&IY<@ z_7eGp2p2&DiH(5+2$_I^#QES$t&-)`7a~kx_sXHVR|e?bl+1Y<tJdYb-nYT>?3Z76 zFaPx|eE<JIf&mLy131ia8VB}1NR}N48CV4tu=Xte8mUpW3~1aN^~FeG#12%%3d9Vo zLJz+CK1!MQLZo)0W?zcr;cRJ$)4(>dGjIcyu>zHGJ^0f5C}Up6PhTWcI2rhXlFT6K z1*x_7E#^M4tOZMR8i72<#lQ>I%?p%%WYRm$a$?e{T@V#$QKf?H^#YyqC4Xx#i)`G! zZ~b<EmqVv~?R1rcpkaolv4zq&h9|oZopJvsUcM^CR^41(94IEl9a$wPFW6e&!P@LM zp}k{Dq3}c##_FlF=a}@*?prurTS##AYWWq$u^W*SA0lA+6%@Men@<g1weC≦Zy( zMZ^$4C^<yV1FFfH-M0*)h7;;RUSPfgg}l;&uf0#w=RVa8%6Yv>&C9mf_x>x6`U3yn zX>QH#e?;vY6FI=yF#t6!g&_y%e9`)n+<y6`@At@c?__uNkl|B3Ak+FRTQ9lSE$>&1 z9`mIaAxd-nbR$=WCe==`zs3LEbLpB)hq)IlzV}``7W+|svd5Krle$JFtZ~;&wJ5-q v^Zh4H3KWy~nBguzbvnPuyan^;&zbJIbh)or#`HDI66B-hA&GL3l}OeA3tjJt literal 0 HcmV?d00001 diff --git a/img/smileys/hum.gif b/img/smileys/hum.gif index c7e8bebb6187d5fe44928475388f128ed56e245c..db24401b988b99675ea42267a2ac19003a8e33b7 100644 GIT binary patch delta 103 zcmb=fiFEgLv#?C$XAomp$jkr)Teoig|DT~&T3YcZ3nK#qGlLFD6eQ2U<QpT9ykdG^ z!h~bK;gWHk+MgTapHH2Aqa}r7OYRA#LpJ+$dauu)^St3u_QjT_iIFnw4L5nT85pbq DT1z9{ delta 102 zcmb=aj&%2Qv#?C$XAomp$N&QW{{zu~AVcvd3nK#qGlLFD6eQ2U<TFPhdBya;1rv_> zhD*kEYJYBwe?E2gjg}OSEx9L{4%+P3>AgOG&hv&t*%w<HCq~M!O@ABAz+epkVlpJy diff --git a/img/smileys/redface.gif b/img/smileys/redface.gif new file mode 100644 index 0000000000000000000000000000000000000000..6e08e7bfe3d9e103365ebc06a641fd4489efa5b4 GIT binary patch literal 95 zcmZ?wbhEHb<Y(Y#Sjfl#1pgTr7#Tq<#h)xdiitr7BnpyeU^1A(JM;J?#)nA?QI)Uu rGO)%r&KI_w^ljnn)M;-|PFvG;X^Bem_sr_o9)U}xBwgDB85pbq`VAZy literal 0 HcmV?d00001 diff --git a/js/euphorik.js b/js/euphorik.js index 3b17bf5..e8311da 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -40,7 +40,8 @@ var conf = { "kirby" : [/\[-kirby\]/g], "slurp" : [/\[-slurp\]/g], "agreed" : [/\[-agreed\]/g], - "dodo" : [/\[-dodo\]/g] + "dodo" : [/\[-dodo\]/g], + "bn" : [/\[-bn\]/g] } } @@ -799,12 +800,7 @@ jQuery(document).ready( initialiserListeStyles(client) // TODO : pourquoi jQuery(document).unload ne fonctionne pas ? - jQuery(window).unload( - function() - { - client.flush(false) - } - ) + jQuery(window).unload(function(){client.flush(false)}) jQuery("#menu .minichat").click(function(){ pages.afficherPage("minichat") }) jQuery("#menu .profile").click(function(){ pages.afficherPage("profile") }) diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 8d914b4..9a88dce 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -14,14 +14,13 @@ function PageMinichat(client, formateur, util) PageMinichat.prototype.contenu = function() { -// <input class="captcha" name="captcha" type="text" size="12"></input>\ return '\ -<div id="smiles"></div>\ <form method="post" action="">\ <p>\ <input class="captcha" name="captcha" type="text" size="8" maxlength="8"></input>\ <input class="pseudo" name="pseudo" type="text" size="12" maxlength="50" value="<nick>"></input>\ <input class="message" name="message" type="text" size="80" maxlength="500" value=""></input>\ + <button class="smiles"></button>\ <button class="return"></button>\ </p>\ </form>\ @@ -41,8 +40,10 @@ PageMinichat.prototype.charger = function() this.util.setCaretToEnd(jQuery("form input.message")[0]) + // <smiles> + jQuery("body").append("<div id=\"smiles\"></div>") // affichage des smiles - jQuery("#smiles").html(this.formateur.getSmilesHTML()).children().each( + jQuery("#smiles").append(this.formateur.getSmilesHTML()).children().each( function(i) { var opacityBase = jQuery(this).css("opacity") @@ -72,12 +73,28 @@ PageMinichat.prototype.charger = function() ) } ) + jQuery("form button.smiles").hover( + function(e) + { + var offset = jQuery(e.target).offset() + jQuery("#smiles").css("top", offset.top).css("left", offset.left).show() + }, + function(e){} + ) + jQuery("#smiles").hover( + function(){}, + function(e) + { + jQuery("#smiles").hide() + } + ) + // </smiles> - /// événements - jQuery("form button.return").click( + // événements + var nouveauMessage = function() - { - // captcha anti bot + { + // captcha anti bot if (jQuery("form input.captcha").val() != "") return thisPage.envoyerMessage( @@ -87,9 +104,19 @@ PageMinichat.prototype.charger = function() jQuery("form input.message")[0].focus() } + + jQuery("form input.message").keypress( + function(e) + { + if (e.which == 13) // return + nouveauMessage() + } ) + + jQuery("form button.return").click(nouveauMessage) + // interdiction de submiter le formulaire - jQuery("form").submit(function(){return false}) + jQuery("form").submit(function(){ return false}) jQuery("input.pseudo").click( function() -- 2.49.0