wcolorpicker-rails 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Wcolorpicker
2
2
  module Rails
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -8,7 +8,7 @@
8
8
  * @license This wChar jQuery plug-in is dual licensed under the MIT and GPL licenses.
9
9
  * @link http://www.websanova.com
10
10
  * @github http://github.com/websanova/wColorPicker
11
- * @version Version 1.3.1
11
+ * @version Version 1.3.2
12
12
  *
13
13
  ******************************************/
14
14
  (function($)
@@ -131,7 +131,7 @@
131
131
  //setup custom area
132
132
  var custom =
133
133
  $('<div class="_wColorPicker_custom"></div>')
134
- .append(this.appendColors($('<div class="_wColorPicker_noColor">'), ['transparent'], 1))
134
+ .append(this.appendColors($('<div class="_wColorPicker_noColor">'), [''], 1))
135
135
  .append(this.customTarget)
136
136
  .append(this.customInput)
137
137
  //clear floats
@@ -360,7 +360,11 @@
360
360
 
361
361
  toHex: function(color)
362
362
  {
363
- if(color.substring(0,3) == 'rgb')
363
+ if(color.substring(0,4) === 'rgba')
364
+ {
365
+ hex = 'transparent';
366
+ }
367
+ else if(color.substring(0,3) === 'rgb')
364
368
  {
365
369
  var rgb = color.substring(4, color.length - 1).replace(/\s/g, '').split(',');
366
370
 
@@ -374,9 +378,9 @@
374
378
  }
375
379
  else
376
380
  {
377
- hex = color;//color.substring(0, 1) == '#' ? color.substring(1, color.length) : color;
381
+ hex = color;
378
382
  }
379
-
383
+
380
384
  return hex;
381
385
  },
382
386
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wcolorpicker-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-24 00:00:00.000000000 Z
12
+ date: 2013-01-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This gem Provides the Websanova Color Picker assets for your Rails application
15
15
  .