From 5c3b18393fba869ee348004b885d6f5e548d6726 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Thu, 27 Apr 2017 16:53:08 +0200 Subject: [PATCH] Legacy smiley/emoji support has been added --- CHANGELOG.rst | 5 + PluginGemfile | 1 + .../settings/redmine_tweaks/_general.html.erb | 8 +- assets/images/smileys/check.png | Bin 0 -> 248 bytes .../images/smileys/exclamation-red-frame.png | Bin 0 -> 874 bytes assets/images/smileys/failure-frame.png | Bin 0 -> 759 bytes assets/images/smileys/question-frame.png | Bin 0 -> 925 bytes assets/images/smileys/rose.png | Bin 0 -> 1000 bytes assets/images/smileys/smiley-angel.png | Bin 0 -> 1783 bytes assets/images/smileys/smiley-annoyed.png | Bin 0 -> 862 bytes assets/images/smileys/smiley-confuse.png | Bin 0 -> 790 bytes assets/images/smileys/smiley-cool.png | Bin 0 -> 869 bytes assets/images/smileys/smiley-cry.png | Bin 0 -> 820 bytes assets/images/smileys/smiley-eek.png | Bin 0 -> 856 bytes assets/images/smileys/smiley-evil.png | Bin 0 -> 863 bytes assets/images/smileys/smiley-grin.png | Bin 0 -> 830 bytes assets/images/smileys/smiley-kiss.png | Bin 0 -> 890 bytes assets/images/smileys/smiley-laughing2.png | Bin 0 -> 911 bytes assets/images/smileys/smiley-neutral.png | Bin 0 -> 806 bytes assets/images/smileys/smiley-razz.png | Bin 0 -> 832 bytes assets/images/smileys/smiley-red.png | Bin 0 -> 808 bytes assets/images/smileys/smiley-sad.png | Bin 0 -> 795 bytes assets/images/smileys/smiley-wink.png | Bin 0 -> 840 bytes assets/images/smileys/smiley.png | Bin 0 -> 850 bytes assets/images/smileys/smiley2.png | Bin 0 -> 899 bytes assets/images/smileys/success-frame.png | Bin 0 -> 933 bytes assets/stylesheets/tweaks.css | 105 +++++++++++++++++- config/locales/de.yml | 4 +- config/locales/en.yml | 4 +- config/locales/ja.yml | 4 +- docs/conf.py | 4 +- docs/index.rst | 4 + docs/manual.rst | 5 +- init.rb | 3 +- lib/redmine_tweaks.rb | 11 ++ lib/redmine_tweaks/formatter.rb | 64 +++++++++++ .../patches/formatter_markdown_patch.rb | 27 +++++ .../patches/formatter_textile_patch.rb | 23 ++++ 38 files changed, 263 insertions(+), 9 deletions(-) create mode 100644 assets/images/smileys/check.png create mode 100644 assets/images/smileys/exclamation-red-frame.png create mode 100644 assets/images/smileys/failure-frame.png create mode 100644 assets/images/smileys/question-frame.png create mode 100644 assets/images/smileys/rose.png create mode 100644 assets/images/smileys/smiley-angel.png create mode 100644 assets/images/smileys/smiley-annoyed.png create mode 100644 assets/images/smileys/smiley-confuse.png create mode 100644 assets/images/smileys/smiley-cool.png create mode 100644 assets/images/smileys/smiley-cry.png create mode 100644 assets/images/smileys/smiley-eek.png create mode 100644 assets/images/smileys/smiley-evil.png create mode 100644 assets/images/smileys/smiley-grin.png create mode 100644 assets/images/smileys/smiley-kiss.png create mode 100644 assets/images/smileys/smiley-laughing2.png create mode 100644 assets/images/smileys/smiley-neutral.png create mode 100644 assets/images/smileys/smiley-razz.png create mode 100644 assets/images/smileys/smiley-red.png create mode 100644 assets/images/smileys/smiley-sad.png create mode 100644 assets/images/smileys/smiley-wink.png create mode 100644 assets/images/smileys/smiley.png create mode 100644 assets/images/smileys/smiley2.png create mode 100644 assets/images/smileys/success-frame.png create mode 100644 lib/redmine_tweaks/formatter.rb create mode 100644 lib/redmine_tweaks/patches/formatter_markdown_patch.rb create mode 100644 lib/redmine_tweaks/patches/formatter_textile_patch.rb diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a802cf3c..938e96c0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Changelog ========= +1.0.2 ++++++ + +- Smiley/Emoji legacy support + 1.0.1 +++++ diff --git a/PluginGemfile b/PluginGemfile index eb106217..40ea59e4 100644 --- a/PluginGemfile +++ b/PluginGemfile @@ -1,4 +1,5 @@ gem 'deface' +gem 'gemoji', '~> 3.0.0' group :test do gem 'brakeman' diff --git a/app/views/settings/redmine_tweaks/_general.html.erb b/app/views/settings/redmine_tweaks/_general.html.erb index 0d1ebe09..5eceb8d7 100644 --- a/app/views/settings/redmine_tweaks/_general.html.erb +++ b/app/views/settings/redmine_tweaks/_general.html.erb @@ -35,5 +35,11 @@

<%= content_tag(:label, l(:label_add_go_to_top)) %> <%= check_box_tag 'settings[add_go_to_top]', 1, @settings[:add_go_to_top] %> - <%= t(:label_add_go_to_top_info) %> + <%= t(:add_go_to_top_info) %> +

+ +

+ <%= content_tag(:label, l(:label_legacy_smiley_support)) %> + <%= check_box_tag 'settings[legacy_smiley_support]', 1, @settings[:legacy_smiley_support] %> + <%= t(:legacy_smiley_support_info_html) %>

diff --git a/assets/images/smileys/check.png b/assets/images/smileys/check.png new file mode 100644 index 0000000000000000000000000000000000000000..a2ed1a378190408415170b5f4cd27f16e180c355 GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!cYsfb>wg9Y!yZG!7EPxqhCyq+ zyp}pe?G0+VmR)@WAFE7 z?+r>`>$UXUl(pBEo@CCL3^bOpB*-tA!Qt7BG$1G1)5S4FB7EwJi$V?xA}tSl7hAY% ziM;>6M50$yJnc{TZ`}{8H|#&Nu}W;)q-}>T?pm_WbnW)JDgB%6*Scy%%l!NxabdA& vTJnmWyaL@**sOAYEi||g6fPN{Uth-XYc6w$h2o(GpfwDhu6{1-oD!M2wH(!ym@R#zteY*ju`qCgj;BI2;bn z%H&f$Jw1aSkLQLG2w0L&p5WWVhgcaOhZGJ&G#V|P=g*xar9vnaVsea75bSn4OX=wC z?HzQx-4~<7!_dEZ0~=+v)zrXhHbcy0u;%k2>7T`Z&tQun2nq#R<{;Wapz1U*YuW?g8fN=%==>uFe^HJc`|-sAl_1N~KcB zkfI3npjarV_qDrr0W*HoT)pCCE(b74QWkO`0HwMbd09p_oyPk5x>|-_uZNbV@poLg zwKbH;SC(^Nu8u~8SXGFhUMij-*E;SNkqO-wMC z`lEb{M85bYC&!;T?%c!omR5WunF0|Kjg2b!JV#h*JA|g&ck%rB)U#+b;$yB*ei-p! za864+ZP(3P4(w?{OweOC{uLpe9!h5yYA;R07*qoM6N<$g3WrN A0RR91 literal 0 HcmV?d00001 diff --git a/assets/images/smileys/failure-frame.png b/assets/images/smileys/failure-frame.png new file mode 100644 index 0000000000000000000000000000000000000000..57e00041adba68da737d498c76b45f07d358b4c4 GIT binary patch literal 759 zcmVXhJnf= z=%0!&;%@ja2lmjIPa-~)(3{YMQxSR+ETIC^_7*}zkRhQFz68GX5*wPJ2}?4BVYv|n zhHf-pw&``dw{t$tG-L;U_kMqVzw@2*o%4x~jt&$Q6hKiFh7&+D^4p4G7;6ONayh6c zHk`D0b8>QWB9qA+FPf%#Jhs_v=;`V49!=Ny^Vfk!;+8-l;QzU>fSr+%Gmowq9){oV zpYVFUeKZw>&w^6WXyBTfntJ&?6hvZl3~g;~NTpJz#C&=%7)05_Avjzv^!E1k)AAD9 z+uQr&@wmDCdd7UGX{IqaXtKq+x=w*DH83DK%#FpOCTo>!Hmf8OaU`Dm;BmVld_H;N zwb@xDlSv64v)RYTq1Dw%?(Xg`SgX=a3SB=ymToi_i{VRE74B?qVsCE`m!_wYPN%U+ zbFNaTp#kL;6)>r4`}_M`1)5o~X7OGiQod?2xvqR5d$ z=CX#hGKE~ukP&1ktn}6viiyCzQCL_Ai^U>Q!YOdsbX{_#hP2WF=SP1Si3IGlSv^00 zO023XZf$I!n0V)i$6P=;biiQR=fI-&l>1kTspKzH}uM|8PC;cz%mT3Xsdt?Zeb3q9QluOM{)-kGg@JMaeO z^-bvPbU&uDzNcPT7Dw;l0-1|KZ(dwnAIkR>TU%?#bX{Me23w+Ok{xh)uXB~GR%g7?j~uI+Ny2R zMrvq-rnbJo`ob6Sg@SDr?N2c(s2_r;`1lbK_16y(6!AwWNb}K3TKo`1@r9MdiqWD? z6Jt%#*rcXOlTGv5O}(>1sCI~2%N?Jxk)=!xSFA5)lYxz-#oTt^-@PQ>2{V?`Px?LFQ~W z8w+J)dwcsqyWM{1(w!)Lk#guN>QGy2LUnaDawR?96X(U-I1cZ#t>8FLB9RFu!ppL3 zYG`QKv~Al~$Hm)GXy=%LYyme<&z*HUJ+9o%AQ%yF`EC@Kk8W{zypPnk1IY0UgnU=Ok?x%IE>{H1OiETJX0{6jrb6dv2Jf&3*)NkQ-mP^Rz3y8)h@jVhlW1WPqU6mLO7xCcvG*p}hVy2+jX0tgkE>BOzL?B5rQeqCV z$!U-dpb~KHghh$w>b-Gr8ojcXW_Yqy$Y5M1kmfiZi|Z++$pSrkIk>;6+jI8YpE}T0 z{Yz&Fl41*}nLwI(j|2i=d`qobq*FbK{0sKy-ERFvpoj6m_vU z27|$Fvo)_ddGf;U*4FjbS*3`fp*O)>x2``L9sTSPMe%t)pJxS=V*)JcEY0%?20;+2 zsQawcG&Qr^nWCJatOtw5Vv_zdgkOZ@Zvh4Xrbm;z$GN_}00000NkvXXu0mjf_aLjw literal 0 HcmV?d00001 diff --git a/assets/images/smileys/rose.png b/assets/images/smileys/rose.png new file mode 100644 index 0000000000000000000000000000000000000000..66ea939be2f980a15e7d289181015395297c4f85 GIT binary patch literal 1000 zcmV>P)Gh_5wtDA=5sTdoxO994^jvwJ59s~|Bv_F^Z(uR z!3F+r>IM$|XJ#J(Pj&-4mzh7`1#lPe;CO{Y#Y4?59%f6>X(4xKRr|& zfSDa>+u*6GigzfRg#knk2v>{80t}G?5zLJn74OJw7DOa=F|Qw>fSaZH`8u_*04}bm z9+XNUn45zHuE%&(7BPSG=hdrELvZZ$MuYIM{v(bttcL>wSsK60_ACkS&n zsFoIx=K)a!a$Ts_RxDLl7=OZj%W3j1l%C?tiJ3;c0lO#2JK&A8l(fJ1M1yQJlQ z0D_2g`90y=$F=L<+T2uckB|Nlo_y0!tmSbPXTXdpMwEHr{vCJaa+?k#smEa0wrmA3 z?6sK30!|$DhfGvH{o{o%0^2RAY%W_TRqWEOsyoi$^^U5?6>ubC-cEqJFTWX=hQ^@+ zFU3{5-Lev|F|#h0if!+_<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h6aP@P*11zXmyC?c3V z*$mlcAN1CEIcyN z%b|^%+h-Z~fzuw(?+jk<-8dP zrPgS5uSwKZQvLK0_XpSf%N;hYg28vMtcNf-a`z2K`vmO8ZI)rhwtd-~yQPD;Tg{RS zMQS&Ge625UZLzU=TGH0Nd5^~RbgHYCl@x3|)t*^4IVYcQyW!>1xRzsBhRm*O@s*Uw zyfZ!aXhc}sw#J*cw5aiNXXqQ(gRABqkA5@Q-ni%L#fzOih0$yH^_Cfvm;IP+O=Mhe zE5Dz!KB8s$n?#Fz4@Z~7#f6lL*2devO&{zYa67bQ|DW#O^$l|-56*9(c$%_Sq(PTD Q&A+0Mpm1@yaQTM+0MY2fxBvhE literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-annoyed.png b/assets/images/smileys/smiley-annoyed.png new file mode 100644 index 0000000000000000000000000000000000000000..46e4c0c37bc6cf0a4e0715ab120e1f365a4372df GIT binary patch literal 862 zcmV-k1EKthP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipr8 z3Lr2-lTm&E00Q1gL_t(I%YBl;YZP}FhM$?8naz$nyD>Yvt0X0@F(IuU=e8ckNSY|RLlK5IQ`9xU7d4D0RbW( zT`(=XTC`@qEe89wq2tYaW$1m^hh)D00$YTihAw_}^;EIy9_{V$?6+mY&T9tCXLzyk zknN3M$yq6dp+Q@BhMn%-=7&kb{nN8QDm_VmoNS8$3pZrOqGZ``tj zQ?zN+S7@!TV&@C4Rhpbj66OJPrC2D8OjV@4i(ATa`Su#O9^6Di4+(aW(BsyFn_RxV zhFi)a?Oh5ZQx&CH=mW+q)3hb(Au0f%R;wY=G15CgqGM{c8UUgKBUfZpx0)ZA=& z=vfexN2@OhRThlFcg{G7o&zyK&(hp%dEG8c0EX|g+}`rm-AeWJN9Ts!i_;U-|7h^O zCO@8_>N-d&yx875+}`rmGZ~fvj36KoVe$7zjdGG$Gv_Z%y4P;ZL&iGEf)tVnQ9jR` z2ZxVW8hHYFx1@cAcHe#o ze>R#2EZ%=cbISt}K?5>C32@y!#p~yp{dANow#l%j;fT-)6nl?%Sbg}MCx=};-~j0M o0XmQaY{2CIB|r%HKqMmk2f)BnjF_#MIRF3v07*qoM6N<$f|^T@82|tP literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-confuse.png b/assets/images/smileys/smiley-confuse.png new file mode 100644 index 0000000000000000000000000000000000000000..9f3205e33c642ab937bba75bd65ab288792a4bc6 GIT binary patch literal 790 zcmV+x1L^#UP)J@Ge~cqaY@CgMR3lAr=o5D{xAtyTn~ppdq^ zUANmlXCBsg@+Dv9&CK`BzBlvM^>r3-xd26xR&%>C31EuQN9Z7w33ny&W8 zp^>{uEjFg3NfG)2Yy)lqud2m@YVuytJWO?+Zq7!4+JjaRcfAgcjx-Y-oK9+iPW|M| zJ7ngbppbb1QLjqNKF2xFJm#}b7HBjusfGu}G=GPlUt2XjMB&9o_83;3_DTpFTL)NpwS$G%1r+xTnP(pJStqYx7?>|_ zm)7)Xtn*@Tw;l=xvHUhGn-=N{>nD?5N(mpjNDS3y!75vr{Me9m?Pzilu6zj%%o!Qfww3;Y&f0HHQq UA_pa)(EtDd07*qoM6N<$f|IXpH~;_u literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-cool.png b/assets/images/smileys/smiley-cool.png new file mode 100644 index 0000000000000000000000000000000000000000..92aa42a073b1f77c6675ed47e2d00c656f03e89f GIT binary patch literal 869 zcmV-r1DgDaP)x zB|wP0Qh6Cl<0CN<116}6J2jCg36aDY_qxH2@jtlHg$e4Kh_V2KM8ZQ6BPzyP6eA)O zg_O>;w9^^Sy|L=bn|wJp=YHqA=bm$}hv1mf$6%2noWlWnt8| zVVEXB7FFkMP}rYUPtF^X7Hiv8b1E!(s#QTQk*wUdX{MKB`qEIx&f1H4;tdeu#h{`< zz2$J<^0!=QRl`vY7J29f9Y-~P(YUwj6_wBS2Ht7 zM4~N#;DpCbX=J}~8;L~$D-Ts6c!HW7h(z`8?^&&eqAvfjni#{^_&7w-fpaHzhr0LhLJtWfP98t02jK-!1yeVcY!vkoUWT^I(9j`VkR78`8Cr`G3t)H6)i{np7r!gE~NUTF} z(FIOCo&JJsp7xUeFT@hqf}5W+9^+D0>TtH++Cuo`nzK%My?XSi`)rktarGz-!Mjk7(%a|Vjh`Eh4C=^LT vx+uW%qzXYLIPw3*dYL8Y?5i<>UjhsOYJfeKIr?Ad00000NkvXXu0mjf5$22y literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-cry.png b/assets/images/smileys/smiley-cry.png new file mode 100644 index 0000000000000000000000000000000000000000..d5b81da06b472a347107953f106ed1ec6d329172 GIT binary patch literal 820 zcmV-41Izr0P)f0Utj4fuLXIf zF@PwghA(SC0-Cr$!b%bsE{zg5CjJRl{0WwZ_zOs2BMVI+d<2S00!V2U0SzCarS1FZ z>+2iu4AvMIPI7WHcg{I;=gy4h`wZam0For4;`L$-z&IgJ2onl~3}Mc7vA`G%#{np! z?F9qL{)_}ArzCB#Kh*IgCe^nqURjk~yXZKjgF!tzJ5oMb-z457Azc&I3=*ynRqJ|C{)r^q~~c;Q5&_~w~yGE ze~awKJFrSgL_X(vzRr1^&vn9}TE&>$)HR^ghqX*<1v{&YP$LSos0vs=MC5ax=j)uu z`CKQCKu+V~*1l#|IE2;|fTrD`Zc1R*DVSkWEF#uihgg*I%mL?de*SQmH+q&E#AUx< zVP=j>wz0l;ESfSnd<)F9z-$Zat6#5jLoGCyAqQ23>qG^%jj)e7QdzeU8Ck?={0&t= zn-x9@sL{I^efC^5)zkJ8=7)y})Hy;|Gbq@)?vzd2?=8D9x2I7b3S2!7a$-5Uxr-D^ zdKtmy2@nq+;&Yv7qGcgdyvP}>%3zvwM%PDanGpC3vdD{d;&DFLi3&<3%%!(7kGlIh zBf4HirC3F3D~o?e{ALt>T30+W(p&qdTqg{49SeoM(^R-YYYZeDt&lHc_`wjo60gEb zaN#;OzU=HGY&ggr<kiX<-KTE`_k}0vNxogRTM8TMGtuQ)KCz~ zWG_6nP)eH@itTNmt1> zq4s5J+Vmk}u|B{e6+I~^c=D!r7Qwr{=pW!+5b4d62cd#eMWx`oqS!~0HnrNCCTXl~ zb~kIX+3`19TIj`rj~_GNV`qM|BP>1ue7-FR0#s4NSpeq=2MA4sO~L|U+;uU*7%ayD zIQCy!Ym>bmh>nTO%!H8Y zt^g|a$67=>J&B0F23E7Ynx1}!RLa`nGud~7=vZ5~&}uyYk*^PTu1qY~kzAtvP^n&s zzrfFG3x3xkNcm%kisaeRWLXEW#<>|?dw5Yr>43Li@BAx9O)$q z6JCI2!J=Py^v$c;=0-y~lpKia@qHbLxAR*P33QYOHMDMGK3iIQKRNrgUdJfC8?TFe zkLZa3=lapz-HbbJoh^e0j|{}4@t7J227GqacFKjK_3hJiVR^KFGe}SgGX6g( i4>rN%PmKrs6JP*s^K8PjMh8Ry0000p{a literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-evil.png b/assets/images/smileys/smiley-evil.png new file mode 100644 index 0000000000000000000000000000000000000000..0da78cd0644126ce532f60fb8dde75db5009b607 GIT binary patch literal 863 zcmV-l1EBngP)Wxr%ws<1SpxYyIu2iIaIf*X z6g~9=E_X44&mJNf`+(u6x2>7?9OrZ9F`x4+fm{xq?#eCYX6ieZ(n-`D>cjcTa~OX4 z0?GKSHS?b1e9k=PbDre^EovlDl+DE?mNJ=TM*{)WZ>U%)6M=OBYvyy4`XZIMWX`h$ zbRBNHX$U4oByw!#Q5!CJh-9-vlI+m+Jnc_W94MA-V4mG!Sa~Y~DP2_!!7#++??0%i zF6YXCBI+~K8EI?C<+8YSS=w> zj-^s5h(ZC?m8D2$k{ah(0#sISWOQQRj$MsP+s+0I1f%eG-9`P@J*xs=Mh7td;0SiN z_~>%Qh>V8goM#EBD*997@nKK7cb&g_qi1iM2hqW^c>P>Oj_MUf5l)vAZF>T6ItqwR z&Lk#@Z?~i063{egRASHI>+t$~UTUswYVd4psRZoOvKRbY=5;bp#n;eSV(3kHgminz zBI^~fQ`khl9o&q%y7jnN>8sejCD7z8^Onnw5{Hmo%o@Mu;@YQRXl{CH_I+d?J$;`M z8IQBKrX@g+3uOe4#|fpq7Tb6Fuv-?fk-p+0PFl-hW@rj;UwuU|kpZP*o{(7);Cq%3 p_}>=s|H1vt5>$R_Ebv!=0RXUxWh9@XODX^W002ovPDHLkV1lx@kpln# literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-grin.png b/assets/images/smileys/smiley-grin.png new file mode 100644 index 0000000000000000000000000000000000000000..545a4c530e9e94fc41a96a80685305e4bc1cba68 GIT binary patch literal 830 zcmV-E1Ht@>P)y&NOPfaL*?=+C&s7Ln|Pk1*d{H3J$B$_rNMe+fSty$7+DwP{~9We5P&tc}@Gk zwe((5T>dhnIW~7)M{R=_yTK)_OnuODEmtqYQpF|W^DjTqaR%Lks>B@~p~qO=)FzlM zA`1I(-}t@GZ<`WRQz%kiuz0I1gWRT8hvr2_vF$>qFZWO7-E|=>>T=u^P@j!fu>9iiu zuEqn4!B}&X6YJAY5Lul>Hk&;GmS=UwV|=F5c0e_MdM)-IPk`!3CZt4&_wfdYL=xv6_Q-hIuXKkyuy~R=OunXm; za)X?cm1Hy~EzK`Sx5K*&fjEXIRuEW={kcaYCkKz!6LYfxzScgMBfXkY!(u8T=7o0M~YI?B4=n?*IS*07*qo IM6N<$g2oPk`~Uy| literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-kiss.png b/assets/images/smileys/smiley-kiss.png new file mode 100644 index 0000000000000000000000000000000000000000..3870237f11386b467a65d792a89871de8ea6900a GIT binary patch literal 890 zcmV-=1BLvFP)^O=uC;2s56CIU!)UENsJ@+V@B0zJIvrdLrw<-i;@zreR#8}bfln`=AkhRS)DvFcgDmGR({;=hR%&lb^;RR)mjvIf zf+f>bM=3~h3KuS4g0629L7a4nqih+C@@Dh3XAV4^uh#`L3>cKg4vCe=>(Xxm>XR`mNDeSopG>taNUryZYNfDf^${3~=QThK6=vsz0}D^vH?B z*>pCeM4}OHnU=dztr_q0AF7qo&!yEmCTBllb*1*F7lMib(gc-c=ovqN(UUoxR%Gm^ z9!XHmlVn(bUBbfrSL7QSeAhZb`%6G=LeCE<1R4JyeiKt?K_}S$#%}=z0P|OCmUpZg QqW}N^07*qoM6N<$f|*N@CIA2c literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-laughing2.png b/assets/images/smileys/smiley-laughing2.png new file mode 100644 index 0000000000000000000000000000000000000000..27a94b51ae2071be892aec29d170158522a2582e GIT binary patch literal 911 zcmV;A191F_P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipr7 z6C(zvMxZqS00R$6L_t(I%YD(`Yg=^~$MN?`&PkKg{AzQOSX)hq#+4c~+mubgi(d3< zRbjItPShJ^y%7I{fw;fGyA5x22!h~+Lb{t=M68gOu0^}8t}*GlE*m{f*DN_FIXfrG z*NYKF27ch-bM?G<;F0cL1xW%~21!D7xtIqQfER!u&;%+#zTc-H1nq7Ygn;Kh6v+IW zv=Cg9wb|+6)Z1~{pHN+%fZVrR-LA1WYgT`rdwj6I30wrqgQWqG?n}PQ;a5J&s__|( zJ|F;`8(gj)qlNU_4;dwvxRb%OlfYIIdogc~4|=M)e1^%0`Lp)fECE6)hS7 z>pogEKp>>Dy}CkWqlD@YYM#jCOs~g0fXi`M2u@^TqPdS28RGPXb|huMmSyqr(ph2KR0crP zHqGv^>QOT9|Aa4`q*|?#N~QkOnN*5S;|@2ze+%0*yS7aeK(;I@t%t|6W3gbUUtc5n z>Ky%kpJX!mRNpN8z*sCu>)~Ct}*4`Oi@%&TusJ4$Vhxj%pUi+drb;TPAxV#!FW lsDQ%%M*tRJ0=5u>zX2H!cbG!AM9lyI002ovPDHLkV1gsRpjiL_ literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-neutral.png b/assets/images/smileys/smiley-neutral.png new file mode 100644 index 0000000000000000000000000000000000000000..6c0b16e86990c9599c97c504cdbabdcfb1a5c679 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ia8n3Q#$P>TS_n^^vG?xW#uhC08mK^*41jFg*peri#Y9lXx_FA0B53 z%uET(eIDm|&f|Qp<6ZFrZ7!!%W#uAR#T2c^Vll9C4y>3JmizqhJm+yf*NG*T%kVpx zr7((kYb3DwVZ7`X>mjm9F_8a);yB9_&*8R&PIN#&^s-@CjQ-r6#35MK0<&zg9PG>r z|6iVXoX>TlgHj2}{P9U&t(yh5wh!@jJ&iyh0N=Ln;sYsMD?rzEI2|@xo9mD-oS0lE z3KR;MPOK*H+~~g^7#X5%D;`J=H%^x%)HXLGmr5Zp$U7+kR*@!SNUUyVxK4~<7?|1J z&MfWi9Unn?G%(GR~x!M4XbRZlKV!WxPv9~MM8LAI8sBVv2 zDHTiB?{vmoTU<~7*gsfKWD$S2fy8!(KPV;&I0*FwP4m*Y?dZMPf?KK+SLhZWaq?yb zKNt4#`Qr{2j|w0uvV6Da1!RJUpc0(;|KU%Jwh4njHD2Ja00RKS%5UaW{(27p0000< KMNUMnLSTYpErD17 literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley-red.png b/assets/images/smileys/smiley-red.png new file mode 100644 index 0000000000000000000000000000000000000000..7ac0cac2347036ff4675b190261ca4aa4681dacf GIT binary patch literal 808 zcmV+@1K0eCP){=s<^-0v%ci zDB)2=#3rRgT@u1d5*I8@bZ2z$7FPTP7p{rFz$hll!i9@Us2F^KPzv%&fdck1?X=VR zymzp;^J`9S?)}a=b9=ul{h9|P2~brx>avVU08@m1LNg&pND*E;4i<%gY1;rrTzMcs zvda^p;+$%X#hUu=g;igVE^B_(spM_DurpTNdO2=omRE>3OW3H3>IM-<@;-05`7o-7 zM-4bsp)a6Pge>6E^l(6nJ_?wbc-#4x`F5c6q;4WttI(;XxxnyrRQITcpLKr?q<)X2=uV*kr&x3c5|76r zD(4WTV>fcnhwqukeAc-`w8{v`IZL(o3h+{)_I3i#uG4H4nZzcVG*JGO>NdP*7VJ|C zN_UH^a}BB%a@PK7O>E}f7xDBukUcu226_ly5PDl-)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;~{5jTzh(DjrU)D{iJ4I0g6pt*oRU64FlUT!c{4l%tZv7k8af1GhUM)3^3$4KIeuTpTOm>9Yh6iH< zL4UASsrS^ojFMp;8KNJ%NP68zeRrR51v=_sdL%5>I zXs25mh*Quj*k9bm$Jg6f$`(OVP=laYGvIN02ns>Q{|D~|`WVpoSK|i%1Q-DF%XhwQ S0_Mm70000i7 literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley.png b/assets/images/smileys/smiley.png new file mode 100644 index 0000000000000000000000000000000000000000..ce8da0228ee6e120165edfd5c9b306f7bd968768 GIT binary patch literal 850 zcmV-Y1FigtP) z+W=XdxWhncN2i9I{gT$)bgZf;B&iX_?JbfVYtObb8_mYrP}iT-`&r`k5fX<X)u2KvcBVJ z3loz~~?K%`w2q0lD8$)QILSi^h!2W!|eHcP@u+f4IJ!>0h7}4^emf!i|an9p>o+p}U zS@3(9Eiv+_1un43Yk1Tk+CyZMe4zV7^5Y;*Jde*7d7=V(&@IET8U5VV#3oqY2D2Tq z9PGe~JH=NiPCU-%d7^@B7RkL|JI%#D7Fb@{#D|3x0)YSx*1r+SQ>S%Zhb%d$3YTIp zvt#l+A&|*nI5C&Jc)s;apra*<@#%F`_B_YwhV~%fW+KVn&$}t z!@!8XlAh7ZLnW0}$FW-m=N#~$_SdK zqPXiM&b36)rg#yiph_!|F)e(Z+Q7TFtC-o&AVu6QLgr9_*I7tV2r~YE_=;r-246KU c@K=BV0FKXVnOyZ{FaQ7m07*qoM6N<$f=7gx+W-In literal 0 HcmV?d00001 diff --git a/assets/images/smileys/smiley2.png b/assets/images/smileys/smiley2.png new file mode 100644 index 0000000000000000000000000000000000000000..9af305817db0601eb17ba45fa35074dd9770ebe4 GIT binary patch literal 899 zcmV-}1AP36P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipr7 z6CNJk!f@RH00RR_L_t(I%YBl+ZyR+ShMzm%*^Yb8#rP5v;VNp>LP!&S#HFbk1{f+N zh7MjTRSFYQC!`E8X5t@U>6WRggpd#eQq#d5s1&tH6`Mi`DUO{qq(JNh5***1n~>g|3J& zXE+yLJ~e#RG^`;_PiBdO!&6~*E9Y)}``Po>@-*-}Ckjelfk3KKdp zprt|6L1GXebnsfW_+aJM-?2KnCPL-(w4f`66Nb#$qh&jj&FTA3A5)#b%|^9?s4g4T z3f1}B>_2@>CY#gk(Xt(e%qfKfphpoi$^6J*#_H9ZwMEvJ7RcHeoc=8MzvJ|0$=Vs# zmKJE%7Rgw>dNMyU7)8tg=t@!UEshz|*~ZDIn7pyf^}A)nZzJ9|;1@+m95a-nd;%yWO;eNL2vHsYrBVqA4v?c=Bsic{DghwMLxLlcrl~1K0l)|Xnh6PW zqLgN(G-T-mZjJ+JNZ?_m;O6+J$P!p74N;0jI+P%w37`i7oxpWN2}2s|J4h5FVT?pE z63MZLF%pF|8aqfB61Z*{1atrl-=}%_*ZzgRwAfGTJN&TP!nSP;Y&Q z#g{nj?t8v}+`#B|xwF2~eE*%v*X^l`BRr^Xa^~unyf%LMKfo_552$}#=F-Fv=qc7$ z*4o`JcK{667KOVANk>*t+w}5b+z?u>yPi(cbT34ne}=bL<9{; z0C~W1Ec)I%%Uc(RxRgm!)W8zxdI8TKZL#=WgW6t~7O)F+PXId517rY`|Cazh-~xe& Z@DF%~cr?~o>G%Ku002ovPDHLkV1gaPlr8`O literal 0 HcmV?d00001 diff --git a/assets/images/smileys/success-frame.png b/assets/images/smileys/success-frame.png new file mode 100644 index 0000000000000000000000000000000000000000..7fe467b751046418f22aea200e095c9f25a5228c GIT binary patch literal 933 zcmV;W16urvP)Mb9 z(q@oQv;uKKCkDeRvOppbgJh0bJ}jBZ5)-3K=7*8Z4`xf2`AIa(o^zh(ocBHN%eAz$fa5suJgGUKKB%rD)*jL2b$Rs|tSS-8S+S=NSi;K&X$)vU*iXyyTudBPe`he-%q3jtJTV`Qq$br?6BMI9ml+#m=Ih@=kdtRGeB?9Bf5SGL^!~$WSPRSS-*@+VMds3v+XG=(zbcB60-xV=fdHZn7~gGtkR& z46eiz?PIR7C6EhE%n;&0 zrLF=#->jQynZZ9!=e6F3{05lf1&}g0>~MdoiER&SfK6*+N#;tumKhbg^WqAg-JJs53TjrW(Qf<#C(AqGbYAJBmbgKMHW&_vlN|Z; z#JbGP%-rnkY`fLEb?4Ee-!@iN?JD_SqhVs=@0qTypKnb~J-I{0HKHiWYnonW1_Gfc z3@lQ50X@ZELQP|&|Be6Yqf{e7y7J8G>gpm3iU<*lZv+?s3J;!e|I%#300000NkvXX Hu0mjfdm6m_ literal 0 HcmV?d00001 diff --git a/assets/stylesheets/tweaks.css b/assets/stylesheets/tweaks.css index be1c9422..0b5bb781 100644 --- a/assets/stylesheets/tweaks.css +++ b/assets/stylesheets/tweaks.css @@ -18,7 +18,7 @@ } .month-calendar { - display:inline-block; + display: inline-block; } .login-tweaks { @@ -27,3 +27,106 @@ max-width: 490px; font-size: 95%; } + +/* Legacy smilie classes */ + +span.tweaks.smiley { + background-repeat: no-repeat; + display: inline-block; + width: 16px; + height: 16px; +} + +span.tweaks.smiley-smiley { + background-image: url(../images/smileys/smiley.png); +} + +span.tweaks.smiley-smiley2 { + background-image: url(../images/smileys/smiley2.png); +} + +span.tweaks.smiley-laughing { + background-image: url(../images/smileys/smiley-grin.png); +} + +span.tweaks.smiley-laughing2 { + background-image: url(../images/smileys/smiley-laughing2.png); +} + +span.tweaks.smiley-crying { + background-image: url(../images/smileys/smiley-cry.png); +} + +span.tweaks.smiley-sad { + background-image: url(../images/smileys/smiley-sad.png); +} + +span.tweaks.smiley-wink { + background-image: url(../images/smileys/smiley-wink.png); +} + +span.tweaks.smiley-cheeky { + background-image: url(../images/smileys/smiley-razz.png); +} + +span.tweaks.smiley-shock { + background-image: url(../images/smileys/smiley-eek.png); +} + +span.tweaks.smiley-annoyed { + background-image: url(../images/smileys/smiley-annoyed.png); +} + +span.tweaks.smiley-confuse { + background-image: url(../images/smileys/smiley-confuse.png); +} + +span.tweaks.smiley-straight { + background-image: url(../images/smileys/smiley-neutral.png); +} + +span.tweaks.smiley-embarrassed { + background-image: url(../images/smileys/smiley-red.png); +} + +span.tweaks.smiley-kiss { + background-image: url(../images/smileys/smiley-kiss.png); +} + +span.tweaks.smiley-angel { + background-image: url(../images/smileys/smiley-angel.png); +} + +span.tweaks.smiley-evil { + background-image: url(../images/smileys/smiley-evil.png); +} + +span.tweaks.smiley-rock { + background-image: url(../images/smileys/smiley-cool.png); +} + +span.tweaks.smiley-rose { + background-image: url(../images/smileys/rose.png); + width: 24px; + height: 24px; +} + +span.tweaks.smiley-check { + background-image: url(../images/smileys/check.png); +} + +span.tweaks.smiley-exclamation { + background-image: url(../images/smileys/exclamation-red-frame.png); +} + +span.tweaks.smiley-question { + background-image: url(../images/smileys/question-frame.png); +} + +span.tweaks.smiley-success { + background-image: url(../images/smileys/success-frame.png); +} + +span.tweaks.smiley-failure { + background-image: url(../images/smileys/failure-frame.png); +} diff --git a/config/locales/de.yml b/config/locales/de.yml index a8faab2f..ffa0c7a5 100755 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -29,7 +29,7 @@ de: global_wiki_header_info: 'Hier kann ein projektübergreifender Wiki Header hinterlegt werden. Wird über "Wiki Extensions" ein projektspezifischer Header angelegt, wird dieser immer vorzugsweise vor dem projektübergreifenden Header verwendet.' global_wiki_sidebar_info: 'Hier kann für die Wiki Sidebar ein projektübergreifender Text hinterlegt werden. Diese Sidebar wird nur auf den Wiki Seiten angezeigt und kann z.B. für Makros wie "Zuletzt geänderte Seiten" verwendet werden. Wird eine projektspezifische Sidebar angelegt (über eine Wiki Seite), dann wird diese anstelle der projektübergreifenden Sidebar angezeigt.' label_account_login: "Text für Anmeldeseite" - label_add_go_to_top_info: 'Bei langen Seiten ist es hilfreich, wenn ein Link zur Verfügung steht, mit dem man zum Seitenanfang springen kann.' + add_go_to_top_info: 'Bei langen Seiten ist es hilfreich, wenn ein Link zur Verfügung steht, mit dem man zum Seitenanfang springen kann.' label_add_go_to_top: '"Nach oben" Link hinzufügen' label_content_plural: Inhalte label_custom_help_url: "URL zur Hilfeseite" @@ -95,3 +95,5 @@ de: wiki_pdf_header_info: Dieser Textblock wir auf der ersten Seite vor dem eigentlichen Inhalt der Wiki Seite in der PDF Ansicht angezeigt. Die Makros sind hier nur eingeschränkt einsetzbar. wiki_pdf_remove_attachments_info: Wenn aktiv, werden die an der Wiki Seite angehängten Dateien nicht in der PDF Ansicht angezeigt. wiki_pdf_remove_title_info: Wenn aktiv, wird der Wiki Titel nicht in der PDF Ansicht angezeigt. + label_legacy_smiley_support: Smiley/Emoji Support + legacy_smiley_support_info_html: 'Smileys und Emoji Symbole konvertieren. Diese Option sollte nur aktiviert werden, wenn der Code für Smileys oder Emoji manuell eingetragen wird (z.B. :kiss:). Wenn Unicode-Emoji eingesetzt werden sollte diese Option deaktiviert bleiben. Siehe http://caniemoji.com/ für Emoji-Browser Support. Im Emoji cheat sheet können die zur Verfügung stehenden Emoji-Codes eingesetzt werden. Der Anwendungsserver muss neu gestartet werden, damit diese Einstellung aktiv wird.' diff --git a/config/locales/en.yml b/config/locales/en.yml index fb77fc00..fcbfff6f 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -29,7 +29,7 @@ en: global_wiki_header_info: 'Enter a project wide wiki header here. In case a project specific wiki header is used by "Wiki Extensions", this will be preferably displayed instead.' global_wiki_sidebar_info: 'Enter a project wide available text message for your wiki sidebar, here. This sidebar text will be displayed at the wiki pages only. Use this space for Macros like "Last changed pages" for example. In case a project specific sidebar is used (wiki page), this will be preferably displayed in the sidebar instead.' label_account_login: "Text for login page" - label_add_go_to_top_info: 'If you have a lot of long pages, it is helpful to add a jump to top link.' + add_go_to_top_info: 'If you have a lot of long pages, it is helpful to add a jump to top link.' label_add_go_to_top: 'Add "Go to top" link' label_content_plural: Contents label_custom_help_url: "Custom Help URL" @@ -95,3 +95,5 @@ en: wiki_pdf_header_info: This text block will be displayed on the first page before the regular Wiki content in the PDF view. Macro use is very restricted, here. wiki_pdf_remove_attachments_info: When active the attached Wiki files will not be displayed in PDF view. wiki_pdf_remove_title_info: When active the Wiki title info will not be displayed in PDF view. + label_legacy_smiley_support: Legacy smiley/emoji support + legacy_smiley_support_info_html: 'Convert Smileys and Emoji symbols. Activate this option only if Smileys or Emoji are manually typed in by the use of code (e.g. :kiss:). If you use Unicode-Emoji this option should be deactivated. For more info on Emoji-Browser support read http://caniemoji.com/. Have a look at Emoji cheat sheet for available Emoji-Codes you can use. Restart the application server, in order to activate the settings.' diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 1f262167..b6835cc1 100755 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -29,7 +29,7 @@ ja: global_wiki_header_info: 'プロジェクトのWikiヘッダーをここで入力する。「Wiki Extensions」等のプロジェクト特有のWikiヘッダーが使用されている場合、こちらの文章が優先的に表示されます。' global_wiki_sidebar_info: 'プロジェクト全体のWikiサイドバーで使用される文章を入力する。このサイドバー文章は、Wikiページのみに表示されます。例えば、「直近変更されたページ」等のマクロで使う事をお勧めします。もしプロジェクト特有のサイドバーが使用されている場合でも、こちらの文章がサイドバーで優先的に表示されます。' label_account_login: "ログイン画面の文章" - label_add_go_to_top_info: '長いページが多い場合、「トップへ」のリンクは役立ちます。' + add_go_to_top_info: '長いページが多い場合、「トップへ」のリンクは役立ちます。' label_add_go_to_top: '「トップへ」リンクを追加する' label_content_plural: Contents label_custom_help_url: "カスタムヘルプURL" @@ -95,3 +95,5 @@ ja: wiki_pdf_header_info: This text block will be displayed on the first page before the regular Wiki content in the PDF view. Macro use is very restricted, here. wiki_pdf_remove_attachments_info: When active the attached Wiki files will not be displayed in PDF view. wiki_pdf_remove_title_info: When active the Wiki title info will not be displayed in PDF view. + label_legacy_smiley_support: Legacy smiley/emoji support + legacy_smiley_support_info_html: 'Convert Smileys and Emoji symbols. Activate this option only if Smileys or Emoji are manually typed in by the use of code (e.g. :kiss:). If you use Unicode-Emoji this option should be deactivated. For more info on Emoji-Browser support read http://caniemoji.com/. Have a look at Emoji cheat sheet for available Emoji-Codes you can use. Restart the application server, in order to activate the settings.' diff --git a/docs/conf.py b/docs/conf.py index a3b89b93..b1ec50e0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,9 +28,9 @@ copyright = u'2013-2017, AlphaNodes GmbH' author = u'Alexander Meindl' # The short X.Y version. -version = u'1.0.0' +version = u'1.0.2' # The full version, including alpha/beta/rc tags. -release = u'1.0.0' +release = u'1.0.2' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/docs/index.rst b/docs/index.rst index 304152f7..949cdd09 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -49,6 +49,9 @@ Install ``redmine_tweaks`` plugin for `Redmine`_. $ cd $REDMINE_ROOT $ git clone git://github.com/alphanodes/redmine_tweaks.git plugins/redmine_tweaks $ bundle install --without development test + $ + $ # if you want to use smiley/emoji legacy support, run: + $ bundle exec gemoji extract public/images/emoji Restart your application server (apache with passenger, nginx with passenger, unicorn, puma, etc.) and ``redmine_tweaks`` is ready to use. @@ -69,6 +72,7 @@ Features * customize top menu items * disable (hide) modules for projects * open external urls in new window +* smiley/emoji legacy support * anonymize referrer for external urls * Hide role in project memberbox * Configurable issue rules diff --git a/docs/manual.rst b/docs/manual.rst index 3d8e38c2..4b903f4a 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -17,8 +17,11 @@ And the following options can be edited by users with administratios righst in t * Add "Go to top" link. If you have a lot of long pages, it is enabling users to easily return to the top of a page. * Change the option for ``External urls`` into default behaviour, open in new window or open with NoReferrer. +* Activate the ``Smileys and Emoji symbols support`` if you want to use the manual smiley code (e.g. ``:kiss:``). This option is deactivated in the standard setting. If you already use a plugin that supports Smileys and Emojis this option should stay deactivated. For more info on Emoji-Browser support read http://caniemoji.com/. Have a look at Emoji cheat sheet for available Emoji-Codes. -.. note:: Please restart the application server, if you make changes to the external urls settings. +.. note:: Please restart the application server, if you make changes to the external urls settings as well as if you activate the Smileys and Emoji symbol support. + +.. note:: You can use the following manual smiley codes: :), =), :D, =D, :'(, :(, ;), :P, :O, :/, :S, :|, :X, :*, O:), >:), B), (!), (?), (v), (x), (/) and @}->- Overview page section --------------------- diff --git a/init.rb b/init.rb index 9647a85b..3b3e9f3e 100644 --- a/init.rb +++ b/init.rb @@ -8,7 +8,7 @@ Redmine::Plugin.register :redmine_tweaks do name 'Tweaks' author 'AlphaNodes GmbH' description 'Wiki and content extensions' - version '1.0.1' + version '1.0.2' author_url 'https://alphanodes.com/' url 'https://github.com/alphanodes/redmine_tweaks' @@ -29,6 +29,7 @@ Redmine::Plugin.register :redmine_tweaks do issue_auto_assign_role: '', issue_auto_assign_status: '', issue_auto_assign: 0, + legacy_smiley_support: 0, new_ticket_message: 'Don\'t forget to define acceptance criteria!', overview_bottom: '', overview_right: '', diff --git a/lib/redmine_tweaks.rb b/lib/redmine_tweaks.rb index d13d54a5..fd189645 100644 --- a/lib/redmine_tweaks.rb +++ b/lib/redmine_tweaks.rb @@ -11,6 +11,17 @@ if ActiveRecord::Base.connection.table_exists?(:settings) require_dependency 'redmine_tweaks/patches/wiki_controller_patch' require_dependency 'redmine_tweaks/patches/wiki_pdf_helper_patch' + Rails.configuration.assets.paths << Emoji.images_path + # Send Emoji Patches to all wiki formatters available to be able to switch formatter without app restart + Redmine::WikiFormatting.format_names.each do |format| + case format + when 'markdown' + require_dependency 'redmine_tweaks/patches/formatter_markdown_patch' + when 'textile' + require_dependency 'redmine_tweaks/patches/formatter_textile_patch' + end + end + # Global helpers for Tweaks require_dependency 'redmine_tweaks/helpers' diff --git a/lib/redmine_tweaks/formatter.rb b/lib/redmine_tweaks/formatter.rb new file mode 100644 index 00000000..2eaa5319 --- /dev/null +++ b/lib/redmine_tweaks/formatter.rb @@ -0,0 +1,64 @@ +# Redmine Tweaks plugin for Redmine +# Copyright (C) 2013-2017 AlphaNodes GmbH + +module RedmineTweaks + module Formatter + SMILEYS = { + 'smiley' => ':-?\)', # :) + 'smiley2' => '=-?\)', # =) + 'laughing' => ':-?D', # :D + 'laughing2' => '[=]-?D', # =D + 'crying' => '[=:][\'*]\(', # :'( + 'sad' => '[=:]-?\(', # :( + 'wink' => ';-?[)D]', # ;) + 'cheeky' => '[=:]-?[Ppb]', # :P + 'shock' => '[=:]-?[Oo0]', # :O + 'annoyed' => '[=:]-?[\\/]', # :/ + 'confuse' => '[=:]-?S', # :S + 'straight' => '[=:]-?[\|\]]', # :| + 'embarrassed' => '[=:]-?[Xx]', # :X + 'kiss' => '[=:]-?\*', # :* + 'angel' => '[Oo][=:]-?\)', # O:) + 'evil' => '>[=:;]-?[)(]', # >:) + 'rock' => 'B-?\)', # B) + 'rose' => '@[)\}][-\\/\',;()>\}]*', # @}->- + 'exclamation' => '[\[(]![\])]', # (!) + 'question' => '[\[(]\?[\])]', # (?) + 'check' => '[\[(]\\/[\])]', # (/) + 'success' => '[\[(]v[\])]', # (v) + 'failure' => '[\[(]x[\])]' # (x) + }.freeze + + def inline_smileys(text) + SMILEYS.each do |name, regexp| + text.gsub!(%r{(\s|^)(!)?(#{regexp})(?=\W|$)}m) do |match| + leading, esc, smiley = $1, $2, $3 + if esc.nil? + leading + "" + else + leading + smiley + end + end + end + end + + def inline_emojify(text) + text.gsub!(/:([\w+-]+):/) do |match| + emoji = Emoji.find_by_alias($1) + if emoji.present? + %() + else + match + end + end + text + end + + def inline_emojify_image_path(image_filename) + path = Setting.protocol + '://' + Setting.host_name + # TODO: use relative path, if not for mailer + # path = '/' + Rails.public_path.relative_path_from Rails.root.join('public') + "#{path}/images/emoji/" + image_filename + end + end +end diff --git a/lib/redmine_tweaks/patches/formatter_markdown_patch.rb b/lib/redmine_tweaks/patches/formatter_markdown_patch.rb new file mode 100644 index 00000000..e828a644 --- /dev/null +++ b/lib/redmine_tweaks/patches/formatter_markdown_patch.rb @@ -0,0 +1,27 @@ +# Redmine Tweaks plugin for Redmine +# Copyright (C) 2013-2017 AlphaNodes GmbH + +module RedmineTweaks + module Patches + module FormatterMarkdownPatch + def self.included(base) + base.class_eval do + base.send(:include, RedmineTweaks::Formatter) + + # Add a postprocess hook to redcarpet's html formatter + def postprocess(text) + if RedmineTweaks.settings[:legacy_smiley_support].to_i == 1 + inline_emojify(text) + else + text + end + end + end + end + end + end +end + +unless Redmine::WikiFormatting::Markdown::HTML.included_modules.include? RedmineTweaks::Patches::FormatterMarkdownPatch + Redmine::WikiFormatting::Markdown::HTML.send(:include, RedmineTweaks::Patches::FormatterMarkdownPatch) +end diff --git a/lib/redmine_tweaks/patches/formatter_textile_patch.rb b/lib/redmine_tweaks/patches/formatter_textile_patch.rb new file mode 100644 index 00000000..8aa510a3 --- /dev/null +++ b/lib/redmine_tweaks/patches/formatter_textile_patch.rb @@ -0,0 +1,23 @@ +# Redmine Tweaks plugin for Redmine +# Copyright (C) 2013-2017 AlphaNodes GmbH + +module RedmineTweaks + module Patches + module FormatterTextilePatch + def self.included(base) + base.class_eval do + base.send(:include, RedmineTweaks::Formatter) + # Add :inline_emojify to list of textile functions + if Setting.plugin_redmine_tweaks[:legacy_smiley_support].to_i == 1 + Redmine::WikiFormatting::Textile::Formatter::RULES << :inline_emojify + Redmine::WikiFormatting::Textile::Formatter::RULES << :inline_smileys + end + end + end + end + end +end + +unless Redmine::WikiFormatting::Textile::Formatter.included_modules.include? RedmineTweaks::Patches::FormatterTextilePatch + Redmine::WikiFormatting::Textile::Formatter.send(:include, RedmineTweaks::Patches::FormatterTextilePatch) +end