bootstrap-wysihtml5-rails 0.3.1 → 0.3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module BootstrapWysihtml5Rails
2
2
  module Rails
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.1.1"
4
4
  end
5
5
  end
@@ -1,114 +1,107 @@
1
1
  !function($, wysi) {
2
2
  "use strict";
3
3
 
4
- var templates = {
5
- "font-styles": "<li class='dropdown'>" +
6
- "<a class='btn dropdown-toggle' data-toggle='dropdown' href='#'>" +
7
- "<i class='icon-font'></i>&nbsp;<span class='current-font'>Normal text</span>&nbsp;<b class='caret'></b>" +
8
- "</a>" +
9
- "<ul class='dropdown-menu'>" +
10
- "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='div'>Normal text</a></li>" +
11
- "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h1'>Heading 1</a></li>" +
12
- "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h2'>Heading 2</a></li>" +
13
- "</ul>" +
14
- "</li>",
15
- "emphasis": "<li>" +
16
- "<div class='btn-group'>" +
17
- "<a class='btn' data-wysihtml5-command='bold' title='CTRL+B'>Bold</a>" +
18
- "<a class='btn' data-wysihtml5-command='italic' title='CTRL+I'>Italic</a>" +
19
- "<a class='btn' data-wysihtml5-command='underline' title='CTRL+U'>Underline</a>" +
20
- "</div>" +
21
- "</li>",
22
- "lists": "<li>" +
23
- "<div class='btn-group'>" +
24
- "<a class='btn' data-wysihtml5-command='insertUnorderedList' title='Unordered List'><i class='icon-list'></i></a>" +
25
- "<a class='btn' data-wysihtml5-command='insertOrderedList' title='Ordered List'><i class='icon-th-list'></i></a>" +
26
- "<a class='btn' data-wysihtml5-command='Outdent' title='Outdent'><i class='icon-indent-right'></i></a>" +
27
- "<a class='btn' data-wysihtml5-command='Indent' title='Indent'><i class='icon-indent-left'></i></a>" +
28
- "</div>" +
29
- "</li>",
30
- "link": "<li>" +
31
- "<div class='bootstrap-wysihtml5-insert-link-modal modal hide fade'>" +
32
- "<div class='modal-header'>" +
33
- "<a class='close' data-dismiss='modal'>&times;</a>" +
34
- "<h3>Insert Link</h3>" +
35
- "</div>" +
36
- "<div class='modal-body'>" +
37
- "<input value='http://' class='bootstrap-wysihtml5-insert-link-url input-xlarge'>" +
38
- "</div>" +
39
- "<div class='modal-footer'>" +
40
- "<a href='#' class='btn' data-dismiss='modal'>Cancel</a>" +
41
- "<a href='#' class='btn btn-primary' data-dismiss='modal'>Insert link</a>" +
42
- "</div>" +
43
- "</div>" +
44
- "<a class='btn' data-wysihtml5-command='createLink' title='Link'><i class='icon-share'></i></a>" +
45
- "</li>",
46
- "image": "<li>" +
47
- "<div class='bootstrap-wysihtml5-insert-image-modal modal hide fade'>" +
48
- "<div class='modal-header'>" +
49
- "<a class='close' data-dismiss='modal'>&times;</a>" +
50
- "<h3>Insert Image</h3>" +
51
- "</div>" +
52
- "<div class='modal-body'>" +
53
- "<input value='http://' class='bootstrap-wysihtml5-insert-image-url input-xlarge'>" +
54
- "</div>" +
55
- "<div class='modal-footer'>" +
56
- "<a href='#' class='btn' data-dismiss='modal'>Cancel</a>" +
57
- "<a href='#' class='btn btn-primary' data-dismiss='modal'>Insert image</a>" +
58
- "</div>" +
59
- "</div>" +
60
- "<a class='btn' data-wysihtml5-command='insertImage' title='Insert image'><i class='icon-picture'></i></a>" +
61
- "</li>",
62
-
63
- "html":
64
- "<li>" +
65
- "<div class='btn-group'>" +
66
- "<a class='btn' data-wysihtml5-action='change_view' title='Edit HTML'><i class='icon-pencil'></i></a>" +
67
- "</div>" +
68
- "</li>"
4
+ var templates = function(key, locale) {
5
+
6
+ var tpl = {
7
+ "font-styles":
8
+ "<li class='dropdown'>" +
9
+ "<a class='btn dropdown-toggle' data-toggle='dropdown' href='#'>" +
10
+ "<i class='icon-font'></i>&nbsp;<span class='current-font'>" + locale.font_styles.normal + "</span>&nbsp;<b class='caret'></b>" +
11
+ "</a>" +
12
+ "<ul class='dropdown-menu'>" +
13
+ "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='div'>" + locale.font_styles.normal + "</a></li>" +
14
+ "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h1'>" + locale.font_styles.h1 + "</a></li>" +
15
+ "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h2'>" + locale.font_styles.h2 + "</a></li>" +
16
+ "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h3'>" + locale.font_styles.h3 + "</a></li>" +
17
+ "</ul>" +
18
+ "</li>",
19
+
20
+ "emphasis":
21
+ "<li>" +
22
+ "<div class='btn-group'>" +
23
+ "<a class='btn' data-wysihtml5-command='bold' title='CTRL+B'>" + locale.emphasis.bold + "</a>" +
24
+ "<a class='btn' data-wysihtml5-command='italic' title='CTRL+I'>" + locale.emphasis.italic + "</a>" +
25
+ "<a class='btn' data-wysihtml5-command='underline' title='CTRL+U'>" + locale.emphasis.underline + "</a>" +
26
+ "</div>" +
27
+ "</li>",
28
+
29
+ "lists":
30
+ "<li>" +
31
+ "<div class='btn-group'>" +
32
+ "<a class='btn' data-wysihtml5-command='insertUnorderedList' title='" + locale.lists.unordered + "'><i class='icon-list'></i></a>" +
33
+ "<a class='btn' data-wysihtml5-command='insertOrderedList' title='" + locale.lists.ordered + "'><i class='icon-th-list'></i></a>" +
34
+ "<a class='btn' data-wysihtml5-command='Outdent' title='" + locale.lists.outdent + "'><i class='icon-indent-right'></i></a>" +
35
+ "<a class='btn' data-wysihtml5-command='Indent' title='" + locale.lists.indent + "'><i class='icon-indent-left'></i></a>" +
36
+ "</div>" +
37
+ "</li>",
38
+
39
+ "link":
40
+ "<li>" +
41
+ "<div class='bootstrap-wysihtml5-insert-link-modal modal hide fade'>" +
42
+ "<div class='modal-header'>" +
43
+ "<a class='close' data-dismiss='modal'>&times;</a>" +
44
+ "<h3>" + locale.link.insert + "</h3>" +
45
+ "</div>" +
46
+ "<div class='modal-body'>" +
47
+ "<input value='http://' class='bootstrap-wysihtml5-insert-link-url input-xlarge'>" +
48
+ "</div>" +
49
+ "<div class='modal-footer'>" +
50
+ "<a href='#' class='btn' data-dismiss='modal'>" + locale.link.cancel + "</a>" +
51
+ "<a href='#' class='btn btn-primary' data-dismiss='modal'>" + locale.link.insert + "</a>" +
52
+ "</div>" +
53
+ "</div>" +
54
+ "<a class='btn' data-wysihtml5-command='createLink' title='" + locale.link.insert + "'><i class='icon-share'></i></a>" +
55
+ "</li>",
56
+
57
+ "image":
58
+ "<li>" +
59
+ "<div class='bootstrap-wysihtml5-insert-image-modal modal hide fade'>" +
60
+ "<div class='modal-header'>" +
61
+ "<a class='close' data-dismiss='modal'>&times;</a>" +
62
+ "<h3>" + locale.image.insert + "</h3>" +
63
+ "</div>" +
64
+ "<div class='modal-body'>" +
65
+ "<input value='http://' class='bootstrap-wysihtml5-insert-image-url input-xlarge'>" +
66
+ "</div>" +
67
+ "<div class='modal-footer'>" +
68
+ "<a href='#' class='btn' data-dismiss='modal'>" + locale.image.cancel + "</a>" +
69
+ "<a href='#' class='btn btn-primary' data-dismiss='modal'>" + locale.image.insert + "</a>" +
70
+ "</div>" +
71
+ "</div>" +
72
+ "<a class='btn' data-wysihtml5-command='insertImage' title='" + locale.image.insert + "'><i class='icon-picture'></i></a>" +
73
+ "</li>",
74
+
75
+ "html":
76
+ "<li>" +
77
+ "<div class='btn-group'>" +
78
+ "<a class='btn' data-wysihtml5-action='change_view' title='" + locale.html.edit + "'><i class='icon-pencil'></i></a>" +
79
+ "</div>" +
80
+ "</li>",
81
+
82
+ "color":
83
+ "<li class='dropdown'>" +
84
+ "<a class='btn dropdown-toggle' data-toggle='dropdown' href='#'>" +
85
+ "<span class='current-color'>" + locale.colours.black + "</span>&nbsp;<b class='caret'></b>" +
86
+ "</a>" +
87
+ "<ul class='dropdown-menu'>" +
88
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='black'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='black'>" + locale.colours.black + "</a></li>" +
89
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='silver'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='silver'>" + locale.colours.silver + "</a></li>" +
90
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='gray'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='gray'>" + locale.colours.gray + "</a></li>" +
91
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='maroon'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='maroon'>" + locale.colours.maroon + "</a></li>" +
92
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='red'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='red'>" + locale.colours.red + "</a></li>" +
93
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='purple'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='purple'>" + locale.colours.purple + "</a></li>" +
94
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='green'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='green'>" + locale.colours.green + "</a></li>" +
95
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='olive'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='olive'>" + locale.colours.olive + "</a></li>" +
96
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='navy'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='navy'>" + locale.colours.navy + "</a></li>" +
97
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='blue'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='blue'>" + locale.colours.blue + "</a></li>" +
98
+ "<li><div class='wysihtml5-colors' data-wysihtml5-command-value='orange'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='orange'>" + locale.colours.orange + "</a></li>" +
99
+ "</ul>" +
100
+ "</li>"
101
+ };
102
+ return tpl[key];
69
103
  };
70
104
 
71
- var defaultOptions = {
72
- "font-styles": true,
73
- "emphasis": true,
74
- "lists": true,
75
- "html": false,
76
- "link": true,
77
- "image": true,
78
- events: {},
79
- parserRules: {
80
- tags: {
81
- "b": {},
82
- "i": {},
83
- "br": {},
84
- "ol": {},
85
- "ul": {},
86
- "li": {},
87
- "h1": {},
88
- "h2": {},
89
- "blockquote": {},
90
- "u": 1,
91
- "img": {
92
- "check_attributes": {
93
- "width": "numbers",
94
- "alt": "alt",
95
- "src": "url",
96
- "height": "numbers"
97
- }
98
- },
99
- "a": {
100
- set_attributes: {
101
- target: "_blank",
102
- rel: "nofollow"
103
- },
104
- check_attributes: {
105
- href: "url" // important to avoid XSS
106
- }
107
- }
108
- }
109
- },
110
- stylesheets: []
111
- };
112
105
 
113
106
  var Wysihtml5 = function(el, options) {
114
107
  this.el = el;
@@ -119,9 +112,9 @@
119
112
 
120
113
  $('iframe.wysihtml5-sandbox').each(function(i, el){
121
114
  $(el.contentWindow).off('focus.wysihtml5').on({
122
- 'focus.wysihtml5' : function(){
123
- $('li.dropdown').removeClass('open');
124
- }
115
+ 'focus.wysihtml5' : function(){
116
+ $('li.dropdown').removeClass('open');
117
+ }
125
118
  });
126
119
  });
127
120
  };
@@ -131,17 +124,16 @@
131
124
  constructor: Wysihtml5,
132
125
 
133
126
  createEditor: function(options) {
134
- options = $.extend(defaultOptions, options || {});
135
- options.toolbar = this.toolbar[0];
127
+ options = options || {};
128
+ options.toolbar = this.toolbar[0];
136
129
 
137
- var editor = new wysi.Editor(this.el[0], options);
130
+ var editor = new wysi.Editor(this.el[0], options);
138
131
 
139
132
  if(options && options.events) {
140
133
  for(var eventName in options.events) {
141
134
  editor.on(eventName, options.events[eventName]);
142
135
  }
143
136
  }
144
-
145
137
  return editor;
146
138
  },
147
139
 
@@ -151,7 +143,7 @@
151
143
  'class' : "wysihtml5-toolbar",
152
144
  'style': "display:none"
153
145
  });
154
-
146
+ var culture = options.locale || defaultOptions.locale || "en";
155
147
  for(var key in defaultOptions) {
156
148
  var value = false;
157
149
 
@@ -164,7 +156,7 @@
164
156
  }
165
157
 
166
158
  if(value === true) {
167
- toolbar.append(templates[key]);
159
+ toolbar.append(templates(key, locale[culture]));
168
160
 
169
161
  if(key === "html") {
170
162
  this.initHtml(toolbar);
@@ -182,15 +174,22 @@
182
174
 
183
175
  if(options.toolbar) {
184
176
  for(key in options.toolbar) {
185
- toolbar.append(options.toolbar[key]);
177
+ toolbar.append(options.toolbar[key]);
186
178
  }
187
179
  }
188
180
 
189
181
  toolbar.find("a[data-wysihtml5-command='formatBlock']").click(function(e) {
190
- var el = $(e.srcElement);
182
+ var target = e.target || e.srcElement;
183
+ var el = $(target);
191
184
  self.toolbar.find('.current-font').text(el.html());
192
185
  });
193
186
 
187
+ toolbar.find("a[data-wysihtml5-command='foreColor']").click(function(e) {
188
+ var target = e.target || e.srcElement;
189
+ var el = $(target);
190
+ self.toolbar.find('.current-color').text(el.html());
191
+ });
192
+
194
193
  this.el.before(toolbar);
195
194
 
196
195
  return toolbar;
@@ -234,11 +233,18 @@
234
233
  });
235
234
 
236
235
  toolbar.find('a[data-wysihtml5-command=insertImage]').click(function() {
237
- insertImageModal.modal('show');
238
- insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
239
- e.stopPropagation();
240
- });
241
- return false;
236
+ var activeButton = $(this).hasClass("wysihtml5-command-active");
237
+
238
+ if (!activeButton) {
239
+ insertImageModal.modal('show');
240
+ insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
241
+ e.stopPropagation();
242
+ });
243
+ return false;
244
+ }
245
+ else {
246
+ return true;
247
+ }
242
248
  });
243
249
  },
244
250
 
@@ -278,24 +284,175 @@
278
284
  });
279
285
 
280
286
  toolbar.find('a[data-wysihtml5-command=createLink]').click(function() {
281
- insertLinkModal.modal('show');
282
- insertLinkModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
283
- e.stopPropagation();
284
- });
285
- return false;
287
+ var activeButton = $(this).hasClass("wysihtml5-command-active");
288
+
289
+ if (!activeButton) {
290
+ insertLinkModal.append('body').modal('show');
291
+ insertLinkModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
292
+ e.stopPropagation();
293
+ });
294
+ return false;
295
+ }
296
+ else {
297
+ return true;
298
+ }
286
299
  });
300
+ }
301
+ };
287
302
 
288
-
303
+ // these define our public api
304
+ var methods = {
305
+ resetDefaults: function() {
306
+ $.fn.wysihtml5.defaultOptions = $.extend(true, {}, $.fn.wysihtml5.defaultOptionsCache);
307
+ },
308
+ bypassDefaults: function(options) {
309
+ return this.each(function () {
310
+ var $this = $(this);
311
+ $this.data('wysihtml5', new Wysihtml5($this, options));
312
+ });
313
+ },
314
+ shallowExtend: function (options) {
315
+ var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {});
316
+ var that = this;
317
+ methods.bypassDefaults.apply(that, [settings]);
318
+ },
319
+ deepExtend: function(options) {
320
+ var settings = $.extend(true, {}, $.fn.wysihtml5.defaultOptions, options || {});
321
+ var that = this;
322
+ methods.bypassDefaults.apply(that, [settings]);
323
+ },
324
+ init: function(options) {
325
+ var that = this;
326
+ methods.shallowExtend.apply(that, [options]);
289
327
  }
290
328
  };
291
329
 
292
- $.fn.wysihtml5 = function (options) {
293
- return this.each(function () {
294
- var $this = $(this);
295
- $this.data('wysihtml5', new Wysihtml5($this, options));
296
- });
330
+ $.fn.wysihtml5 = function ( method ) {
331
+ if ( methods[method] ) {
332
+ return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
333
+ } else if ( typeof method === 'object' || ! method ) {
334
+ return methods.init.apply( this, arguments );
335
+ } else {
336
+ $.error( 'Method ' + method + ' does not exist on jQuery.wysihtml5' );
337
+ }
297
338
  };
298
339
 
299
340
  $.fn.wysihtml5.Constructor = Wysihtml5;
300
341
 
342
+ var defaultOptions = $.fn.wysihtml5.defaultOptions = {
343
+ "font-styles": true,
344
+ "color": false,
345
+ "emphasis": true,
346
+ "lists": true,
347
+ "html": false,
348
+ "link": true,
349
+ "image": true,
350
+ events: {},
351
+ parserRules: {
352
+ classes: {
353
+ // (path_to_project/lib/css/wysiwyg-color.css)
354
+ "wysiwyg-color-silver" : 1,
355
+ "wysiwyg-color-gray" : 1,
356
+ "wysiwyg-color-white" : 1,
357
+ "wysiwyg-color-maroon" : 1,
358
+ "wysiwyg-color-red" : 1,
359
+ "wysiwyg-color-purple" : 1,
360
+ "wysiwyg-color-fuchsia" : 1,
361
+ "wysiwyg-color-green" : 1,
362
+ "wysiwyg-color-lime" : 1,
363
+ "wysiwyg-color-olive" : 1,
364
+ "wysiwyg-color-yellow" : 1,
365
+ "wysiwyg-color-navy" : 1,
366
+ "wysiwyg-color-blue" : 1,
367
+ "wysiwyg-color-teal" : 1,
368
+ "wysiwyg-color-aqua" : 1,
369
+ "wysiwyg-color-orange" : 1,
370
+ },
371
+ tags: {
372
+ "b": {},
373
+ "i": {},
374
+ "br": {},
375
+ "ol": {},
376
+ "ul": {},
377
+ "li": {},
378
+ "h1": {},
379
+ "h2": {},
380
+ "h3": {},
381
+ "blockquote": {},
382
+ "u": 1,
383
+ "img": {
384
+ "check_attributes": {
385
+ "width": "numbers",
386
+ "alt": "alt",
387
+ "src": "url",
388
+ "height": "numbers"
389
+ }
390
+ },
391
+ "a": {
392
+ set_attributes: {
393
+ target: "_blank",
394
+ rel: "nofollow"
395
+ },
396
+ check_attributes: {
397
+ href: "url" // important to avoid XSS
398
+ }
399
+ },
400
+ "span": 1,
401
+ "div": 1
402
+ }
403
+ },
404
+ stylesheets: ["./lib/css/wysiwyg-color.css"], // (path_to_project/lib/css/wysiwyg-color.css)
405
+ locale: "en"
406
+ };
407
+
408
+ if (typeof $.fn.wysihtml5.defaultOptionsCache === 'undefined') {
409
+ $.fn.wysihtml5.defaultOptionsCache = $.extend(true, {}, $.fn.wysihtml5.defaultOptions);
410
+ }
411
+
412
+ var locale = $.fn.wysihtml5.locale = {
413
+ en: {
414
+ font_styles: {
415
+ normal: "Normal text",
416
+ h1: "Heading 1",
417
+ h2: "Heading 2",
418
+ h3: "Heading 3"
419
+ },
420
+ emphasis: {
421
+ bold: "Bold",
422
+ italic: "Italic",
423
+ underline: "Underline"
424
+ },
425
+ lists: {
426
+ unordered: "Unordered list",
427
+ ordered: "Ordered list",
428
+ outdent: "Outdent",
429
+ indent: "Indent"
430
+ },
431
+ link: {
432
+ insert: "Insert link",
433
+ cancel: "Cancel"
434
+ },
435
+ image: {
436
+ insert: "Insert image",
437
+ cancel: "Cancel"
438
+ },
439
+ html: {
440
+ edit: "Edit HTML"
441
+ },
442
+ colours: {
443
+ black: "Black",
444
+ silver: "Silver",
445
+ gray: "Grey",
446
+ maroon: "Maroon",
447
+ red: "Red",
448
+ purple: "Purple",
449
+ green: "Green",
450
+ olive: "Olive",
451
+ navy: "Navy",
452
+ blue: "Blue",
453
+ orange: "Orange"
454
+ }
455
+ }
456
+ };
457
+
301
458
  }(window.jQuery, window.wysihtml5);
@@ -35,10 +35,68 @@ ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
35
35
  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
36
36
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
37
37
  background-color: #E6E6E6;
38
- background-color: #D9D9D9 9;
38
+ background-color: #D9D9D9;
39
39
  outline: 0;
40
40
  }
41
41
 
42
42
  ul.wysihtml5-commands-disabled .dropdown-menu {
43
43
  display: none !important;
44
44
  }
45
+
46
+ ul.wysihtml5-toolbar div.wysihtml5-colors {
47
+ display:block;
48
+ width: 50px;
49
+ height: 20px;
50
+ margin-top: 2px;
51
+ margin-left: 5px;
52
+ position: absolute;
53
+ pointer-events: none;
54
+ }
55
+
56
+ ul.wysihtml5-toolbar a.wysihtml5-colors-title {
57
+ padding-left: 70px;
58
+ }
59
+
60
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
61
+ background: black !important;
62
+ }
63
+
64
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
65
+ background: silver !important;
66
+ }
67
+
68
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
69
+ background: gray !important;
70
+ }
71
+
72
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
73
+ background: maroon !important;
74
+ }
75
+
76
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
77
+ background: red !important;
78
+ }
79
+
80
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
81
+ background: purple !important;
82
+ }
83
+
84
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
85
+ background: green !important;
86
+ }
87
+
88
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
89
+ background: olive !important;
90
+ }
91
+
92
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
93
+ background: navy !important;
94
+ }
95
+
96
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
97
+ background: blue !important;
98
+ }
99
+
100
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
101
+ background: orange !important;
102
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-wysihtml5-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.1.1
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-08-22 00:00:00.000000000 Z
12
+ date: 2012-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  segments:
96
96
  - 0
97
- hash: 1706980044175295282
97
+ hash: 1958460717683798076
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: 1706980044175295282
106
+ hash: 1958460717683798076
107
107
  requirements: []
108
108
  rubyforge_project:
109
109
  rubygems_version: 1.8.24