From 5d30c8b4a5790fe0d4547e175232e174ee864cdc Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 16 Aug 2011 21:29:51 +0100 Subject: [PATCH] Peter will hate this but I extended Etherpad to support 64 colors and removed the requirements for a background image on the colorpicker dialogue --- node/handler/PadMessageHandler.js | 2 +- static/css/pad.css | 22 ++++++++++++++-------- static/img/colorpicker.gif | Bin 1992 -> 0 bytes static/pad.html | 2 ++ 4 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 static/img/colorpicker.gif diff --git a/node/handler/PadMessageHandler.js b/node/handler/PadMessageHandler.js index 2d0cf001..6623d162 100644 --- a/node/handler/PadMessageHandler.js +++ b/node/handler/PadMessageHandler.js @@ -746,7 +746,7 @@ function handleClientReady(client, message) "rev": pad.getHeadRevisionNumber(), "globalPadId": message.padId }, - "colorPalette": ["#ffc7c7", "#fff1c7", "#e3ffc7", "#c7ffd5", "#c7ffff", "#c7d5ff", "#e3c7ff", "#ffc7f1", "#ff8f8f", "#ffe38f", "#c7ff8f", "#8fffab", "#8fffff", "#8fabff", "#c78fff", "#ff8fe3", "#d97979", "#d9c179", "#a9d979", "#79d991", "#79d9d9", "#7991d9", "#a979d9", "#d979c1", "#d9a9a9", "#d9cda9", "#c1d9a9", "#a9d9b5", "#a9d9d9", "#a9b5d9", "#c1a9d9", "#d9a9cd"], + "colorPalette": ["#ffc7c7", "#fff1c7", "#e3ffc7", "#c7ffd5", "#c7ffff", "#c7d5ff", "#e3c7ff", "#ffc7f1", "#ff8f8f", "#ffe38f", "#c7ff8f", "#8fffab", "#8fffff", "#8fabff", "#c78fff", "#ff8fe3", "#d97979", "#d9c179", "#a9d979", "#79d991", "#79d9d9", "#7991d9", "#a979d9", "#d979c1", "#d9a9a9", "#d9cda9", "#c1d9a9", "#a9d9b5", "#a9d9d9", "#a9b5d9", "#c1a9d9", "#d9a9cd", "#4c9c82", "#12d1ad", "#2d8e80", "#7485c3", "#a091c7", "#3185ab", "#6818b4", "#e6e76d", "#a42c64", "#f386e5", "#4ecc0c", "#c0c236", "#693224", "#b5de6a", "#9b88fd", "#358f9b", "#496d2f", "#e267fe", "#d23056", "#1a1a64", "#5aa335", "#d722bb", "#86dc6c", "#b5a714", "#955b6a", "#9f2985", "#4b81c8", "#3d6a5b", "#434e16", "#d16084", "#af6a0e", "#8c8bd8"], "clientIp": "127.0.0.1", "userIsGuest": true, "userColor": authorColorId, diff --git a/static/css/pad.css b/static/css/pad.css index 8b0db73c..16ce1839 100644 --- a/static/css/pad.css +++ b/static/css/pad.css @@ -348,11 +348,16 @@ a#hidetopmsg { position: absolute; right: 5px; bottom: 5px; } #myswatch { width: 100%; height: 100%; background: transparent;/*...initially*/ } #mycolorpicker { - background: url(../img/colorpicker.gif) no-repeat left top; - width: 232px; height: 140px; + /*background: url(../img/colorpicker.gif) no-repeat left top;*/ + width: 232px; height: 230px; position: absolute; left: -240px; top: 0px; z-index: 101; display: none;/*...initially*/ + border-style: solid; + border-radius: 5px; + border-color: #000; + background: #fff; + border-width:1px; } #mycolorpicker ul li @@ -362,12 +367,12 @@ a#hidetopmsg { position: absolute; right: 5px; bottom: 5px; } #mycolorpicker .picked { border: 1px solid #000 !important; } #mycolorpicker .picked .pickerswatch { border: 1px solid #fff; } -#mycolorpickersave { position: absolute; left: 14px; top: 102px; - width: 47px; height: 0; padding-top: 20px; overflow: hidden; - cursor: pointer; } -#mycolorpickercancel { position: absolute; left: 87px; top: 102px; - width: 44px; height: 0; padding-top: 20px; overflow: hidden; - cursor: pointer; } +#mycolorpickersave { position: absolute; left: 10px; top: 192px; + width: 60px; padding: 4px; overflow: hidden; color: #000; + cursor: pointer; color:#000; font-size:13px; border-radius:5px; border-style:solid; border-color:#000; border-width:1px;text-align:center;background-color:#86DC6C;} +#mycolorpickercancel { position: absolute; left: 87px; top: 192px; + width: 60px; padding: 4px; overflow: hidden; color: #000; + cursor: pointer; color:#000; font-size:13px; border-radius:5px; border-style:solid; border-color:#000; border-width:1px;text-align:center;background-color:#FF8F8F;} #myusernameform { margin-left: 35px; } #myusernameedit { font-size: 1.3em; color: #fff; padding: 3px; height: 18px; margin: 0; border: 0; @@ -1095,3 +1100,4 @@ width:27px !important; cursor: hand; cursor: pointer; } + diff --git a/static/img/colorpicker.gif b/static/img/colorpicker.gif deleted file mode 100644 index 4f74446586bab9cd55c8af2b7ef3a14c3f22d7b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1992 zcmci9`#;kQ1Hkd`zFT1?qmifNOdOXDjhrX!IfWGFUXqqGQ|W}1Lr*T}V4GYHrU~0P zWNw==a_4cWZSKRFTZO1mIW8ra2-Td|`6r&wKk)wHgw9s+WPwX#>U3x=H`}`me$tRwzjs8j*h2K zp9+OSkx10l)z#bEE0IVB1_q>3>Bz{)*x1vl*^I=wY4wJ>sePDqn&}f%V zSvz|Zxx8|IMWvvs`f*KdU427iQ*%qTx3l%BOSDs`|JT{o-P7CGFCm^j74Kwyd0=e( z+4C0zmoHimyG^{7&CX3+_8G=qdb70r{zHwA8_sOy)8>}U$0Pak*KhJppZxb<9BVit zZ-|19U*9lE9Ic{9(Ec1&+@1Ceb9K5eliibnKGU;nR9D)6LEobSmK$C+kY?&Hxuq4s z9ishkXXz~~g69$WV?4af2st-g@_}~jCxV;t7_Tqiz5rfh^sI8M^y-YwDCWiEiyE|} zE-u)~`Ww;=x5_Q-%O?4i*WwOL(EdQJSO+QFWT zpX@UP;TC~e%;RZ;g50tffBtehfs2j#G&9QGEOwuX{2@eG?XQ|)`V#kH>i0WuZU}z; z{N~k@@1d%sXscfadmh|zub!@-m~SsUvu7IHy1Mi{?V2>>H~i;!ub$#hVo3O%^%-f2 z!sEDaQJ)R1I}H!VJ#pCCS~HjKsh-{ok$+>2#DT94lBomQDP#+{S(IzS0ZnMY{eVVC zU3VC%{LlM`r^Ertfq{y}ahr6->=XkqQ>&&3}+?!ly z17%BBhCQo84Jn4}j|cr#5H-*L>rqrS5`=^?wSEwkXJ&x?mLAPznLJ8yC;h-Xj z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