From 6803551efad3896dd79d4728ab1e8688f4af7662 Mon Sep 17 00:00:00 2001 From: jdeveloper Date: Tue, 19 Nov 2013 11:10:34 +0100 Subject: [PATCH] Added color picker plugin --- client/assets/css/custom.css | 1 + client/assets/img/color_picker.png | Bin 0 -> 892 bytes client/assets/plugins/bold.html | 41 +++++++++++++ client/assets/plugins/font_color.html | 85 ++++++++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 client/assets/css/custom.css create mode 100644 client/assets/img/color_picker.png create mode 100644 client/assets/plugins/bold.html create mode 100644 client/assets/plugins/font_color.html diff --git a/client/assets/css/custom.css b/client/assets/css/custom.css new file mode 100644 index 0000000..fa09e0a --- /dev/null +++ b/client/assets/css/custom.css @@ -0,0 +1 @@ +#kiwi .controlbox .input_tools .active { margin:0 1em; display:inline; background-color: #DEDEDE} \ No newline at end of file diff --git a/client/assets/img/color_picker.png b/client/assets/img/color_picker.png new file mode 100644 index 0000000000000000000000000000000000000000..809fb00e5aa1f28726db3e2a5adf8f536bfbcbf1 GIT binary patch literal 892 zcmV-?1B3jDP)n`HO=N{yXhvI{h!_0ot^nS)JXfldwbvK_6nsG2Z&Wi&v@PQ zheULFT39nvnw}fe2u3u2dsOe=oVI#j9M1QC>zmd3XI9C7d+1ER`oBP|zA^0tJC|RwkIug^e1fA zX~N2H7aFgMFJ&|`u{>vFkyaX=K50U-_$2WeLXrR?y%y9osP$m;9(wLDa(L0IUjO100%{ufD~Y>02&pjbm4v#?whc82VKwMSB#SqZE`$mB-jcCHlU+0 z5!eC}fZ@6i#^osNm{8QAUxQqp!Je3uR3kxXnuJ~O)qerH3OWj$UL38Ff>!fEx(x_D ze9vUyrvmBUlf}BOj>p;pw*yU}8i3vdQv(|vr;&lW3vL^{HjGO;yJh@AvLL%V=8X-d zj-N^keq9GM0OdgtfE|S-5NpMdyD8XjL8D3d)Ci3ms|*JAHOZR#{F@d3_1R~2nP^IO zx1jHVVL;UcM?t(JNH>#EYr=^m)YgmC{@kfR@+(bUGOoFIyidRT#pP%sAgjUt2GomC z-GbUC?3chRN8#8QO)J9o??pQO=z9z5hjj@+!++`xv!lb9;ml&Wvph&Nw86?bNyh%=cqNQD8i+$LPB!e5mg zGpxOzX7}R-bs>C2a6nYto*kyOG|b@Xj8Ib}DhS31*TztPJc)IANu4e{-2WFIIaS?u SuzCdm0000 + (function () { + var network = kiwi.components.Network(); + var control = kiwi.components.ControlInput(); + var $area = $("#kiwi .controlbox textarea"); + + var $icon = $('B'); + var bold = false; + + $.fn.toggleClick=function(){ + console.log('toggle click'); + var functions=arguments, iteration=0 + return this.click(function(){ + functions[iteration].apply(this,arguments) + iteration= (iteration+1) %functions.length + }) + } + + $icon.toggleClick(function(){ + console.log('bold'); + $area.css('font-weight', 'bold'); + $icon.parent().addClass('active'); + bold = true; + },function(){ + console.log('unbold'); + $area.css('font-weight', ''); + $icon.parent().removeClass('active'); + bold = false; + }); + + $area.keydown(function(e){ + var code = e.keyCode || e.which; + + if(code == 13 && bold){ + $area.val('\x02'+$area.val()); + } + }); + + control.addPluginIcon($icon); + })(); + \ No newline at end of file diff --git a/client/assets/plugins/font_color.html b/client/assets/plugins/font_color.html new file mode 100644 index 0000000..3aae5c2 --- /dev/null +++ b/client/assets/plugins/font_color.html @@ -0,0 +1,85 @@ + + +
+ +
    +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • +
  •  
  • + +
+
+ + \ No newline at end of file -- 2.25.1