Peter will hate this but I extended Etherpad to support 64 colors and removed the requirements for a background image on the colorpicker dialogue

This commit is contained in:
John McLear 2011-08-16 21:29:51 +01:00
parent 5da30a40bf
commit 5d30c8b4a5
4 changed files with 17 additions and 9 deletions

View File

@ -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,

View File

@ -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;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -143,8 +143,10 @@ We removed this feature cause its not worth the space it needs in the editbar
<a onclick="closeColorPicker()">Cancel</a>
</span>
</div>
<!--
<div id="mycolorpickersave">Save</div>
<div id="mycolorpickercancel">Cancel</div>
-->
<div id="myswatchbox"><div id="myswatch"><!-- --></div></div>
<div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled" /></div>