From 892a1b369e29fd3b829efbd8700af3fcd5b3b0f4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 26 May 2004 07:21:00 +0000 Subject: [PATCH] Added tigra color-picker Ver. 1.1 --- phpgwapi/js/picker/img/logo.gif | Bin 0 -> 660 bytes phpgwapi/js/picker/img/pixel.gif | Bin 0 -> 67 bytes phpgwapi/js/picker/img/sel.gif | Bin 0 -> 109 bytes phpgwapi/js/picker/img/tcolorp.gif | Bin 0 -> 10067 bytes phpgwapi/js/picker/index.html | 199 +++++++++++++++++++++++++++++ phpgwapi/js/picker/picker.html | 40 ++++++ phpgwapi/js/picker/picker.js | 137 ++++++++++++++++++++ 7 files changed, 376 insertions(+) create mode 100644 phpgwapi/js/picker/img/logo.gif create mode 100644 phpgwapi/js/picker/img/pixel.gif create mode 100644 phpgwapi/js/picker/img/sel.gif create mode 100644 phpgwapi/js/picker/img/tcolorp.gif create mode 100644 phpgwapi/js/picker/index.html create mode 100644 phpgwapi/js/picker/picker.html create mode 100644 phpgwapi/js/picker/picker.js diff --git a/phpgwapi/js/picker/img/logo.gif b/phpgwapi/js/picker/img/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..6b5397dd3184a4c4da9381063e5ef322fd0a8d2b GIT binary patch literal 660 zcmV;F0&D$8Nk%w1VX^=o0FeLy|NsBY%*IsLlMc^0!8j+%m;7N>1B?!Sq zpafVc$wL5(s0g}<@3aOsY=?&pa6R#E6I@5&JWFe%>W$uI0R~4WLFRxLqX*Xma5sVF zIAKT<8DU64IPlj{iD;t8x9C;3G&w5qhZz>3ur`SS^%48H2wSUJbv3K9_t=HRRAzB` z(JKaln=5H>v}oF?IHqh^87=&%j5=wCn&2wjcy+|!)K+|(9Fa<~+YRH+yda$rsb>m+ zeE@gQyu519%GiZT=-gotn9tHRKOx|~aLAxuHh!l9>a%eXV?lNQ6%}?$QtOG9MNhye z?3jVt$$rVoEb+!M*SeOy0IoFl$IzOE1N#)p7_(X?i^x=R;7MrRpDj9LvZT2M)Bs{s zI&ON3QO+%sajasUNfh5yo~YPm8+%b|R;=Cr61gW7}$Dy>L>Z{&WRn3778ue^b zwV9-!@5PNQZ3p(g!vlIhFF=mlB9QC70A}DD1l_)fT3(I zGFyT_Wg`8Tt*|niZF@H@JM0}RlFb%>lw2D&WRH+fD~M#&Xy@3UZSTG=M-v%tG`}oF zuHkGTuaynfevt2wYS|70KadENBK2#(vGy##crVbd`N{QdSCF1Dx@F`XP@2it)qJ^R zH=YqKewZczmuz#XON+u0n@#=42nNl7#SFt7<7PY Nfa*bPrVvI3YXHjL5YGSr literal 0 HcmV?d00001 diff --git a/phpgwapi/js/picker/img/sel.gif b/phpgwapi/js/picker/img/sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..542801d1938927a6e98bb356517595ad5114192b GIT binary patch literal 109 zcmZ?wbhEHb_>+Z^fq{)d2P6to%fM`u zvFgf}2@{>XyVJsQ7tV7zVB4eGa3wryDr-ab>}B1T`vkpsvi@zFD^t+?aEXU2d(cD% G25SHT1}8}X literal 0 HcmV?d00001 diff --git a/phpgwapi/js/picker/img/tcolorp.gif b/phpgwapi/js/picker/img/tcolorp.gif new file mode 100644 index 0000000000000000000000000000000000000000..8df0d17e402cfe3f3bb9f354f6a876c150a66937 GIT binary patch literal 10067 zcmWldWmMCTJ(=#WlHkrpNj0wRvlr2}aY zX#oLIv4j8b|K^_i?s@Z^bI-XZW*4+|+%JQOKtBK!RW<+m@gpF=xAN)Glm0h5+wT__ z7U#D=sTR^dp9w%uR%J81bhu1Lv?YuR zH}IxGRtDUasV!$ka|lvT@JboOQYxKE+T~2YYA!jbj5^FH%=BkZJCLCtjv3Ej_nq*G z(1nFl?CO?2Lai=a`&!Dld3m{EFm6-~R|*$Z$Q}f`mzk3bO6BFsE6x?WNGh+WthxdL zvtQCfN!-=oIxEFpSK(0#=7yGOJhQl9YGGk%X8Rx1mbENjzfscZQD;>Sw-DZE19gs%Wa8g zQap00yb$|d1ar+a;R;N~{tqw8j7QgoCn?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0D}9iLHB>Bl&Ne{Pie(LFw_uU#Vc@$ I3IJ#R50!?VHUIzs literal 0 HcmV?d00001 diff --git a/phpgwapi/js/picker/index.html b/phpgwapi/js/picker/index.html new file mode 100644 index 0000000000..e594c1abd0 --- /dev/null +++ b/phpgwapi/js/picker/index.html @@ -0,0 +1,199 @@ + + + JavaScript Color Picker - Demo + + + + + + + + + + + + + + + + + + + + +
Tigra Color PickerSoftcomplex logo
+ + | About Us  + | Services  + | Download  + | Order  + | Support  + | + +
+ + + +
+ + + + + + + + + + +
Tigra Color Picker - Demo #1 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Notes
+ On the right hand side there is a form with Tigra Color Picker attached to the fields. Note, that you can have multiple pickers on the same page independently. +
Advantages
+

Easy color input - With Tigra Color Picker color input is simple and intuitive. Visitors can select any color from three available palettes with few clicks. +

Cost Saving Component - Don't waste your time coding color convertors and validators all over again for each new project. Get the colors on server side ready for further processing. +

Professional Look - Simple great looking improvement to the user interface of your web application.

+
Links
+ + + +
Getting Started
+

The script is really easy to setup. To see an example just open this document with plain text editor and find comments. Didn't it help? Ask for help in Product Forum. +

Vote for the script
+ If you like the script, please vote for it. We do appreciate this much. +
+ + ScriptSearch.com : +   +
+ +
+ + HotScripts.com : +   +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
Try out the script with this demo form
Select color from Web safe palette: + + + + Click Here to Pick up the color +
Select color from Windows system palette: + + Click Here to Pick up the color +
Select color from grayscale palette: + + Click Here to Pick up the color +
Picker reads initial value from the input: + + Click Here to Pick up the color +
 
+
+ +
+
+ + + + + + + + +
Copyright ©2003 SoftComplex Inc. All rights reserved. + | company info + | privacy policy + | contact us + | +
+ + + + diff --git a/phpgwapi/js/picker/picker.html b/phpgwapi/js/picker/picker.html new file mode 100644 index 0000000000..962dda8ce7 --- /dev/null +++ b/phpgwapi/js/picker/picker.html @@ -0,0 +1,40 @@ + + + + + Tigra Color Picker + + + + + + + + +
+ +
+ +
+ + diff --git a/phpgwapi/js/picker/picker.js b/phpgwapi/js/picker/picker.js new file mode 100644 index 0000000000..2428a727d7 --- /dev/null +++ b/phpgwapi/js/picker/picker.js @@ -0,0 +1,137 @@ +// Title: Tigra Color Picker +// URL: http://www.softcomplex.com/products/tigra_color_picker/ +// Version: 1.1 +// Date: 06/26/2003 (mm/dd/yyyy) +// Note: Permission given to use this script in ANY kind of applications if +// header lines are left unchanged. +// Note: Script consists of two files: picker.js and picker.html + +var TCP = new TColorPicker(); + +function TCPopup(field, palette) { + this.field = field; + this.initPalette = !palette || palette > 2 ? 0 : palette; + var w = 194, h = 206, + move = screen ? + ',left=' + ((screen.width - w) >> 1) + ',top=' + ((screen.height - h) >> 1) : '', + o_colWindow = window.open('picker.html', null, "help=no,status=no,scrollbars=no,resizable=no" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true); + o_colWindow.opener = window; + o_colWindow.focus(); +} + +function TCBuildCell (R, G, B, w, h) { + return '
'; +} + +function TCSelect(c) { + this.field.value = '#' + c.toUpperCase(); + this.win.close(); +} + +function TCPaint(c, b_noPref) { + c = (b_noPref ? '' : '#') + c.toUpperCase(); + if (this.o_samp) + this.o_samp.innerHTML = '' + c +' ' + c + '' + if(this.doc.layers) + this.sample.bgColor = c; + else { + if (this.sample.backgroundColor != null) this.sample.backgroundColor = c; + else if (this.sample.background != null) this.sample.background = c; + } +} + +function TCGenerateSafe() { + var s = ''; + for (j = 0; j < 12; j ++) { + s += ""; + for (k = 0; k < 3; k ++) + for (i = 0; i <= 5; i ++) + s += this.bldCell(k * 51 + (j % 2) * 51 * 3, Math.floor(j / 2) * 51, i * 51, 8, 10); + s += ""; + } + return s; +} + +function TCGenerateWind() { + var s = ''; + for (j = 0; j < 12; j ++) { + s += ""; + for (k = 0; k < 3; k ++) + for (i = 0; i <= 5; i++) + s += this.bldCell(i * 51, k * 51 + (j % 2) * 51 * 3, Math.floor(j / 2) * 51, 8, 10); + s += ""; + } + return s +} + +function TCGenerateGray() { + var s = ''; + for (j = 0; j <= 15; j ++) { + s += ""; + for (k = 0; k <= 15; k ++) { + g = Math.floor((k + j * 16) % 256); + s += this.bldCell(g, g, g, 9, 7); + } + s += ''; + } + return s +} + +function TCDec2Hex(v) { + v = v.toString(16); + for(; v.length < 6; v = '0' + v); + return v; +} + +function TCChgMode(v) { + for (var k in this.divs) this.hide(k); + this.show(v); +} + +function TColorPicker(field) { + this.build0 = TCGenerateSafe; + this.build1 = TCGenerateWind; + this.build2 = TCGenerateGray; + this.show = document.layers ? + function (div) { this.divs[div].visibility = 'show' } : + function (div) { this.divs[div].visibility = 'visible' }; + this.hide = document.layers ? + function (div) { this.divs[div].visibility = 'hide' } : + function (div) { this.divs[div].visibility = 'hidden' }; + // event handlers + this.C = TCChgMode; + this.S = TCSelect; + this.P = TCPaint; + this.popup = TCPopup; + this.draw = TCDraw; + this.dec2hex = TCDec2Hex; + this.bldCell = TCBuildCell; + this.divs = []; +} + +function TCDraw(o_win, o_doc) { + this.win = o_win; + this.doc = o_doc; + var + s_tag_openT = o_doc.layers ? + 'layer visibility=hidden top=54 left=5 width=182' : + 'div style=visibility:hidden;position:absolute;left:6px;top:54px;width:182px;height:0', + s_tag_openS = o_doc.layers ? 'layer top=32 left=6' : 'div', + s_tag_close = o_doc.layers ? 'layer' : 'div' + + this.doc.write('<' + s_tag_openS + ' id=sam name=sam>
sample sample
'); + this.sample = o_doc.layers ? o_doc.layers['sam'] : + o_doc.getElementById ? o_doc.getElementById('sam').style : o_doc.all['sam'].style + + for (var k = 0; k < 3; k ++) { + this.doc.write('<' + s_tag_openT + ' id="p' + k + '" name="p' + k + '">' + this['build' + k]() + '
'); + this.divs[k] = o_doc.layers + ? o_doc.layers['p' + k] : o_doc.all + ? o_doc.all['p' + k].style : o_doc.getElementById('p' + k).style + } + if (!o_doc.layers && o_doc.body.innerHTML) + this.o_samp = o_doc.all + ? o_doc.all.samp : o_doc.getElementById('samp'); + this.C(this.initPalette); + if (this.field.value) this.P(this.field.value, true) +}