refinerycms-wymeditor 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +8 -0
  4. data/app/assets/javascripts/refinery/boot_wym.js.erb +19 -41
  5. data/app/assets/javascripts/refinery/wymeditor.js +9 -7
  6. data/app/assets/javascripts/wymeditor/GPL-license.txt +278 -0
  7. data/app/assets/javascripts/wymeditor/MIT-license.txt +20 -0
  8. data/app/assets/javascripts/wymeditor/README.txt +35 -0
  9. data/app/assets/javascripts/wymeditor/browsers/mozilla.js.erb +10 -11
  10. data/app/assets/javascripts/wymeditor/browsers/webkit.js.erb +17 -18
  11. data/app/assets/javascripts/wymeditor/classes.js.erb +3 -5
  12. data/app/assets/javascripts/wymeditor/functions.js.erb +8 -4
  13. data/app/assets/javascripts/wymeditor/init_interface.js +45 -0
  14. data/app/assets/javascripts/wymeditor/lang/de.js +13 -1
  15. data/app/assets/javascripts/wymeditor/lang/fr.js +1 -0
  16. data/app/assets/javascripts/wymeditor/lang/nl.js +55 -45
  17. data/app/assets/javascripts/wymeditor/lang/pl.js +12 -1
  18. data/app/assets/javascripts/wymeditor/lang/ru.js +1 -0
  19. data/app/assets/javascripts/wymeditor/lang/{zh_cn.js → zh-CN.js} +1 -1
  20. data/app/assets/javascripts/wymeditor/lang/zh-TW.js +47 -0
  21. data/app/assets/javascripts/wymeditor/prototypes.js.erb +6 -9
  22. data/app/assets/javascripts/wymeditor/setup.js.erb +36 -36
  23. data/app/assets/javascripts/wymeditor/skins/refinery/skin.js +1 -4
  24. data/app/assets/javascripts/wymeditor/validators.js.erb +3 -2
  25. data/app/assets/stylesheets/wymeditor/skins/refinery/skin.css.scss +9 -9
  26. data/app/assets/stylesheets/wymeditor/skins/refinery/wymiframe.css.scss +29 -29
  27. data/app/decorators/controllers/refinery/fast_controller_decorator.rb +5 -0
  28. data/app/decorators/models/refinery/page/friendly_id_options_decorator.rb +8 -0
  29. data/app/views/refinery/admin/dialogs/show.html.erb +19 -0
  30. data/app/views/refinery/wymiframe.html.erb +1 -1
  31. data/config/routes.rb +3 -0
  32. data/lib/generators/refinery/wymeditor/templates/config/initializers/refinery/wymeditor.rb.erb +5 -0
  33. data/lib/generators/refinery/wymeditor/wymeditor_generator.rb +10 -0
  34. data/lib/refinery/wymeditor/engine.rb +17 -12
  35. data/lib/refinerycms-wymeditor.rb +2 -0
  36. data/readme.md +44 -32
  37. data/refinerycms-wymeditor.gemspec +3 -1
  38. data/spec/controllers/refinery/fast_controller_spec.rb +12 -0
  39. data/spec/spec_helper.rb +30 -0
  40. metadata +49 -13
  41. data/.gitignore +0 -88
@@ -45,7 +45,7 @@ WYMeditor.editor.prototype.init = function() {
45
45
  for (var prop in WymClass) { this[prop] = WymClass[prop]; }
46
46
 
47
47
  //load wymbox
48
- this._box = $(this._element).hide().after(this._options.boxHtml).next().addClass('wym_box_' + this._index);
48
+ this._box = $(this._element).hide().after(this._options.boxHtml).next().addClass('visual_editor_box_' + this._index);
49
49
 
50
50
  //store the instance index in wymbox and element replaced by editor instance
51
51
  //but keep it compatible with jQuery < 1.2.3, see #122
@@ -630,7 +630,7 @@ WYMeditor.editor.prototype.dialog = function( dialogType ) {
630
630
  var wym = this;
631
631
 
632
632
  wym.update();
633
- var path = this._wym._options.dialogPath + dialogType + '?wymeditor=true&' + window.location.href.match(/switch_locale=[a-z]{2}/);
633
+ var path = this._wym._options.dialogPath + dialogType + '?wymeditor=true&' + window.location.href.match(/switch_locale=[a-z]{2}(?:-[A-Z]{2})?/);
634
634
 
635
635
  wym._current_unique_stamp = wym.uniqueStamp();
636
636
  // change undo or redo on cancel to true to have this happen when a user closes (cancels) a dialogue
@@ -691,7 +691,7 @@ WYMeditor.editor.prototype.dialog = function( dialogType ) {
691
691
  end = selection.focusOffset;
692
692
  }
693
693
 
694
- // for https://github.com/resolve/refinerycms/issues/581
694
+ // for https://github.com/refinery/refinerycms/issues/581
695
695
  if (typeof (start_node.insertData) === 'undefined') {
696
696
  var j = start_node.childNodes.length - 1,
697
697
  tmp_start_node = start_node;
@@ -780,7 +780,7 @@ WYMeditor.editor.prototype.dialog = function( dialogType ) {
780
780
  ajax_loaded_callback();
781
781
  break;
782
782
  default:
783
- $("<img id='dialog_loading' src='/assets/refinery/dialogLoadingAnimation.gif' width='208' height='13' />").appendTo(dialog_container);
783
+ $("<img id='dialog_loading' src='<%= asset_path 'refinery/dialogLoadingAnimation.gif' %>' width='208' height='13' />").appendTo(dialog_container);
784
784
  dialog_container.dialog($.extend(wym._options.dialogFeatures, {
785
785
  title: dialog_title
786
786
  })).load(path, ajax_loaded_callback);
@@ -796,9 +796,6 @@ WYMeditor.editor.prototype.dialog_ajax_callback = function(selected) {
796
796
  // now fix the height;
797
797
  $("#" + wym._options.dialogId + ".editor_dialog").css('height', 'auto');
798
798
 
799
- // add corners to the buttons.
800
- $('#' + wym._options.dialogId + " .button").corner('6px');
801
-
802
799
  // look for iframes
803
800
  (iframes = $("#" + this._options.dialogId).find('iframe')).load(function() {
804
801
  WYMeditor.INIT_DIALOG(wym, _selected, true);
@@ -995,7 +992,7 @@ WYMeditor.editor.prototype.computeBasePath = function() {
995
992
  };
996
993
 
997
994
  WYMeditor.editor.prototype.computeWymPath = function() {
998
- return $('script[src*=jquery.refinery.wymeditor]').attr('src');
995
+ return $('script[src*=refinery\/wymeditor]').attr('src');
999
996
  };
1000
997
 
1001
998
  WYMeditor.editor.prototype.computeJqueryPath = function() {
@@ -1089,7 +1086,7 @@ WYMeditor.editor.prototype.loadSkin = function() {
1089
1086
  }
1090
1087
  }
1091
1088
 
1092
- //put the classname (ex. wym_skin_default) on wym_box
1089
+ //put the classname (ex. wym_skin_default) on visual_editor_box
1093
1090
  $(this._box).addClass( "wym_skin_" + this._options.skin );
1094
1091
 
1095
1092
  //does the user want to use some JS to initialize the skin (default: yes)?
@@ -99,10 +99,10 @@ $.extend(WYMeditor, {
99
99
  BASE_PATH : "{Wym_Base_Path}",
100
100
  CSS_PATH : "{Wym_Css_Path}",
101
101
  WYM_PATH : "{Wym_Wym_Path}",
102
- SKINS_DEFAULT_PATH : "/assets/wymeditor/skins/",
102
+ SKINS_DEFAULT_PATH : "<%= Rails.application.config.assets.prefix + '/wymeditor/skins/wymeditor_icon.png' %>",
103
103
  SKINS_DEFAULT_CSS : "skin.css",
104
104
  SKINS_DEFAULT_JS : "skin.js",
105
- LANG_DEFAULT_PATH : "lang/",
105
+ LANG_DEFAULT_PATH : "<%= Rails.application.config.assets.prefix + '/wymeditor/lang/en.js' %>",
106
106
  IFRAME_BASE_PATH : "{Wym_Iframe_Base_Path}",
107
107
  IFRAME_DEFAULT : "iframe/default/",
108
108
  JQUERY_PATH : "{Wym_Jquery_Path}",
@@ -125,8 +125,8 @@ $.extend(WYMeditor, {
125
125
  HTML : "{Wym_Html}",
126
126
  IFRAME : "{Wym_Iframe}",
127
127
  STATUS : "{Wym_Status}",
128
- DIALOG_TITLE : "{Wym_Dialog_Title}",
129
- DIALOG_BODY : "{Wym_Dialog_Body}",
128
+ DIALOG_TITLE : "{Visual_Editor_Dialog_Title}",
129
+ DIALOG_BODY : "{Visual_Editor_Dialog_Body}",
130
130
  STRING : "string",
131
131
  BODY : "body",
132
132
  DIV : "div",
@@ -154,7 +154,7 @@ $.extend(WYMeditor, {
154
154
  TITLE : "title",
155
155
  TARGET : "target",
156
156
  ALT : "alt",
157
- REL : 'rel',
157
+ REL : 'data-rel',
158
158
  DIALOG_LINK : "Link",
159
159
  DIALOG_IMAGE : "Image",
160
160
  DIALOG_TABLE : "Table",
@@ -186,8 +186,8 @@ $.extend(WYMeditor, {
186
186
  "li", "tbody", "td", "tfoot", "th", "thead", "tr", "meter",
187
187
  "section", "article", "aside", "details", "header", "footer",
188
188
  "nav", "dialog", "figure", "figcaption", "address", "hgroup",
189
- "mark", "time", "canvas", "audio", "video", "source", "output",
190
- "progress", "ruby", "rt", "rp", "summary", "command"<%= ", #{Refinery::Wymeditor.whitelist_tags.keys.map{|k| %Q{"#{k}"}}.join(', ')}" if Refinery::Wymeditor.whitelist_tags.any? %>),
189
+ "mark", "time", "canvas", "audio", "video", "output",
190
+ "progress", "ruby", "rt", "rp", "summary", "command"),
191
191
 
192
192
  KEY : {
193
193
  BACKSPACE: 8,
@@ -323,11 +323,11 @@ $.fn.wymeditor = function(options) {
323
323
  initSkin: true,
324
324
  loadSkin: true,
325
325
 
326
- lang: "en",
326
+ lang: refinery.current_admin_locale,
327
327
 
328
328
  direction: "ltr",
329
329
 
330
- boxHtml: "<div class='wym_box'>"
330
+ boxHtml: "<div class='visual_editor_box'>"
331
331
  + "<div class='wym_area_top'>" + WYMeditor.TOOLS + "</div>"
332
332
  + "<div class='wym_area_left'></div>"
333
333
  + "<div class='wym_area_right'>" + WYMeditor.CONTAINERS + WYMeditor.CLASSES + "</div>"
@@ -424,7 +424,7 @@ $.fn.wymeditor = function(options) {
424
424
  + "<textarea class='wym_html_val'></textarea>"
425
425
  +"</div>",
426
426
 
427
- boxSelector: ".wym_box",
427
+ boxSelector: ".visual_editor_box",
428
428
  toolsSelector: ".wym_tools",
429
429
  toolsListSelector: " ul",
430
430
  containersSelector:".wym_containers",
@@ -440,13 +440,13 @@ $.fn.wymeditor = function(options) {
440
440
  classHiddenSelector: ".wym_classes_hidden",
441
441
  htmlValSelector: ".wym_html_val",
442
442
 
443
- hrefSelector: ".wym_href",
444
- srcSelector: ".wym_src",
445
- titleSelector: ".wym_title",
446
- targetSelector: ".wym_target",
447
- altSelector: ".wym_alt",
443
+ hrefSelector: ".visual_editor_href",
444
+ srcSelector: ".visual_editor_src",
445
+ titleSelector: ".visual_editor_title",
446
+ targetSelector: ".visual_editor_target",
447
+ altSelector: ".visual_editor_alt",
448
448
  textSelector: ".wym_text",
449
- sizeSelector: ".wym_size",
449
+ sizeSelector: ".visual_editor_size",
450
450
 
451
451
  rowsSelector: ".wym_rows",
452
452
  colsSelector: ".wym_cols",
@@ -457,12 +457,12 @@ $.fn.wymeditor = function(options) {
457
457
  cancelSelector: ".wym_cancel",
458
458
  previewSelector: "",
459
459
 
460
- dialogTypeSelector: ".wym_dialog_type",
461
- dialogLinkSelector: ".wym_dialog_link",
462
- dialogImageSelector: ".wym_dialog_image",
463
- dialogTableSelector: ".wym_dialog_table",
464
- dialogPasteSelector: ".wym_dialog_paste",
465
- dialogPreviewSelector: ".wym_dialog_preview",
460
+ dialogTypeSelector: ".visual_editor_dialog_type",
461
+ dialogLinkSelector: ".visual_editor_dialog_link",
462
+ dialogImageSelector: ".visual_editor_dialog_image",
463
+ dialogTableSelector: ".visual_editor_dialog_table",
464
+ dialogPasteSelector: ".visual_editor_dialog_paste",
465
+ dialogPreviewSelector: ".visual_editor_dialog_preview",
466
466
 
467
467
  updateSelector: ".wymupdate",
468
468
  updateEvent: "click",
@@ -486,20 +486,20 @@ $.fn.wymeditor = function(options) {
486
486
  + WYMeditor.DIALOG_BODY
487
487
  + "</html>",
488
488
 
489
- dialogLinkHtml: "<div class='wym_dialog wym_dialog_link'>"
489
+ dialogLinkHtml: "<div class='visual_editor_dialog visual_editor_dialog_link'>"
490
490
  + "<form>"
491
491
  + "<fieldset>"
492
- + "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
492
+ + "<input type='hidden' id='visual_editor_dialog_type' class='visual_editor_dialog_type' value='"
493
493
  + WYMeditor.DIALOG_LINK
494
494
  + "' />"
495
495
  + "<legend>{Link}</legend>"
496
496
  + "<div class='row'>"
497
497
  + "<label>{URL}</label>"
498
- + "<input type='text' class='wym_href' value='' size='40' />"
498
+ + "<input type='text' class='visual_editor_href' value='' size='40' />"
499
499
  + "</div>"
500
500
  + "<div class='row'>"
501
501
  + "<label>{Title}</label>"
502
- + "<input type='text' class='wym_title' value='' size='40' />"
502
+ + "<input type='text' class='visual_editor_title' value='' size='40' />"
503
503
  + "</div>"
504
504
  + "<div class='row row-indent'>"
505
505
  + "<input class='wym_submit button' type='button'"
@@ -511,24 +511,24 @@ $.fn.wymeditor = function(options) {
511
511
  + "</form>"
512
512
  + "</div>",
513
513
 
514
- dialogImageHtml: "<div class='wym_dialog wym_dialog_image'>"
514
+ dialogImageHtml: "<div class='visual_editor_dialog visual_editor_dialog_image'>"
515
515
  + "<form>"
516
516
  + "<fieldset>"
517
- + "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
517
+ + "<input type='hidden' id='visual_editor_dialog_type' class='visual_editor_dialog_type' value='"
518
518
  + WYMeditor.DIALOG_IMAGE
519
519
  + "' />"
520
520
  + "<legend>{Image}</legend>"
521
521
  + "<div class='row'>"
522
522
  + "<label>{URL}</label>"
523
- + "<input type='text' class='wym_src' value='' size='40' />"
523
+ + "<input type='text' class='visual_editor_src' value='' size='40' />"
524
524
  + "</div>"
525
525
  + "<div class='row'>"
526
526
  + "<label>{Alternative_Text}</label>"
527
- + "<input type='text' class='wym_alt' value='' size='40' />"
527
+ + "<input type='text' class='visual_editor_alt' value='' size='40' />"
528
528
  + "</div>"
529
529
  + "<div class='row'>"
530
530
  + "<label>{Title}</label>"
531
- + "<input type='text' class='wym_title' value='' size='40' />"
531
+ + "<input type='text' class='visual_editor_title' value='' size='40' />"
532
532
  + "</div>"
533
533
  + "<div class='row row-indent'>"
534
534
  + "<input class='wym_submit button' type='button'"
@@ -540,9 +540,9 @@ $.fn.wymeditor = function(options) {
540
540
  + "</form>"
541
541
  + "</div>",
542
542
 
543
- dialogTableHtml: "<div class='wym_dialog wym_dialog_table'>"
543
+ dialogTableHtml: "<div class='visual_editor_dialog visual_editor_dialog_table'>"
544
544
  + "<form>"
545
- + "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
545
+ + "<input type='hidden' id='visual_editor_dialog_type' class='visual_editor_dialog_type' value='"
546
546
  + WYMeditor.DIALOG_TABLE
547
547
  + "' />"
548
548
  + "<div class='row'>"
@@ -570,9 +570,9 @@ $.fn.wymeditor = function(options) {
570
570
  + "</form>"
571
571
  + "</div>",
572
572
 
573
- dialogPasteHtml: "<div class='wym_dialog wym_dialog_paste'>"
573
+ dialogPasteHtml: "<div class='visual_editor_dialog visual_editor_dialog_paste'>"
574
574
  + "<form>"
575
- + "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
575
+ + "<input type='hidden' id='visual_editor_dialog_type' class='visual_editor_dialog_type' value='"
576
576
  + WYMeditor.DIALOG_PASTE
577
577
  + "' />"
578
578
  + "<fieldset>"
@@ -590,7 +590,7 @@ $.fn.wymeditor = function(options) {
590
590
  + "</form>"
591
591
  + "</div>",
592
592
 
593
- dialogPreviewHtml: "<div class='wym_dialog wym_dialog_preview'></div>",
593
+ dialogPreviewHtml: "<div class='visual_editor_dialog visual_editor_dialog_preview'></div>",
594
594
 
595
595
  dialogStyles: [],
596
596
 
@@ -25,7 +25,7 @@ WYMeditor.SKINS['refinery'] = {
25
25
  },function(){
26
26
  $(this).removeClass('hover');
27
27
  });
28
-
28
+
29
29
  // show or hide CSS class options on hover
30
30
  $(wym._box).find('.wym_tools_class')
31
31
  .hover($.proxy(function(){
@@ -38,9 +38,6 @@ WYMeditor.SKINS['refinery'] = {
38
38
  $(wym._box).css('width', $(wym._element).width() - 2)
39
39
  .find('.wym_iframe iframe').css('width', $(wym._box).width() - 2);
40
40
 
41
- $('.button').corner('6px');
42
- $(".wym_area_top li>a").corner("2px");
43
-
44
41
  $(".wym_skin_refinery").animate({
45
42
  opacity: 1
46
43
  }, 800);
@@ -338,8 +338,9 @@ WYMeditor.XhtmlValidator = {
338
338
  "readonly":/^(readonly)$/,
339
339
  "size":/^(\d)+$/,
340
340
  "3":"src",
341
- "type":/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text|tel|search|url|email|datetime|date|month|week|time|datetime-local|number|range|color|placeholder)$/,
342
- "4":"value"
341
+ "type":/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text|tel|search|url|email|datetime|date|month|week|time|datetime-local|number|range|color)$/,
342
+ "4":"value",
343
+ "5":"placeholder"
343
344
  },
344
345
  "inside":"form"
345
346
  },
@@ -41,7 +41,7 @@
41
41
  padding: 5px 5px 0px 5px
42
42
  }
43
43
 
44
- /*auto-clear the wym_box*/
44
+ /*auto-clear the visual_editor_box*/
45
45
  .wym_skin_refinery:after {
46
46
  content: ".";
47
47
  display: block;
@@ -394,38 +394,38 @@ background-image: image_url('wymeditor/skins/refinery/style.png');
394
394
  }
395
395
 
396
396
  /*DIALOGS*/
397
- .wym_dialog div.row {
397
+ .visual_editor_dialog div.row {
398
398
  margin-bottom: 5px;
399
399
  }
400
- .wym_dialog div.row input {
400
+ .visual_editor_dialog div.row input {
401
401
  margin-right: 5px;
402
402
  }
403
- .wym_dialog div.row label {
403
+ .visual_editor_dialog div.row label {
404
404
  float: left;
405
405
  width: 150px;
406
406
  display: block;
407
407
  text-align: right;
408
408
  margin-right: 10px;
409
409
  }
410
- .wym_dialog div.row-indent {
410
+ .visual_editor_dialog div.row-indent {
411
411
  padding-left: 160px;
412
412
  }
413
413
  /*autoclearing*/
414
- .wym_dialog div.row:after {
414
+ .visual_editor_dialog div.row:after {
415
415
  content: ".";
416
416
  display: block;
417
417
  height: 0;
418
418
  clear: both;
419
419
  visibility: hidden;
420
420
  }
421
- .wym_dialog div.row {
421
+ .visual_editor_dialog div.row {
422
422
  display: inline-block;
423
423
  }
424
424
  /* Hides from IE-mac \*/
425
- * html .wym_dialog div.row {
425
+ * html .visual_editor_dialog div.row {
426
426
  height: 1%;
427
427
  }
428
- .wym_dialog div.row {
428
+ .visual_editor_dialog div.row {
429
429
  display: block;
430
430
  }
431
431
  /* End hide from IE-mac */
@@ -74,34 +74,34 @@
74
74
  td { height: 1.6em; }
75
75
 
76
76
  /* labels */
77
- p { background-image: asset_url('wymeditor/skins/refinery/html5/p.png', image); }
78
- h1 { background-image: asset_url('wymeditor/skins/refinery/html5/h1.png', image); }
79
- h2 { background-image: asset_url('wymeditor/skins/refinery/html5/h2.png', image); }
80
- h3 { background-image: asset_url('wymeditor/skins/refinery/html5/h3.png', image); }
81
- h4 { background-image: asset_url('wymeditor/skins/refinery/html5/h4.png', image); }
82
- h5 { background-image: asset_url('wymeditor/skins/refinery/html5/h5.png', image); }
83
- h6 { background-image: asset_url('wymeditor/skins/refinery/html5/h6.png', image); }
84
- blockquote { background-image: asset_url('wymeditor/skins/refinery/html5/blockquote.png', image); }
85
- pre { background-image: asset_url('wymeditor/skins/refinery/html5/pre.png', image); }
86
- meter { background-image: asset_url('wymeditor/skins/refinery/html5/meter.png', image); }
87
- nav { background-image: asset_url('wymeditor/skins/refinery/html5/nav.png', image); }
88
- ruby { background-image: asset_url('wymeditor/skins/refinery/html5/ruby.png', image); }
89
- rt { background-image: asset_url('wymeditor/skins/refinery/html5/rt.png', image); }
90
- rp { background-image: asset_url('wymeditor/skins/refinery/html5/rp.png', image); }
91
- article { background-image: asset_url('wymeditor/skins/refinery/html5/article.png', image); }
92
- aside { background-image: asset_url('wymeditor/skins/refinery/html5/aside.png', image); }
93
- command { background-image: asset_url('wymeditor/skins/refinery/html5/command.png', image); }
94
- details { background-image: asset_url('wymeditor/skins/refinery/html5/details.png', image); }
95
- summary { background-image: asset_url('wymeditor/skins/refinery/html5/summary.png', image); }
96
- figure { background-image: asset_url('wymeditor/skins/refinery/html5/figure.png', image); }
97
- figcaption { background-image: asset_url('wymeditor/skins/refinery/html5/figcaption.png', image); }
98
- footer { background-image: asset_url('wymeditor/skins/refinery/html5/footer.png', image); }
99
- header { background-image: asset_url('wymeditor/skins/refinery/html5/header.png', image); }
100
- hgroup { background-image: asset_url('wymeditor/skins/refinery/html5/hgroup.png', image); }
101
- mark { background-image: asset_url('wymeditor/skins/refinery/html5/mark.png', image); }
102
- progress { background-image: asset_url('wymeditor/skins/refinery/html5/progress.png', image); }
103
- section { background-image: asset_url('wymeditor/skins/refinery/html5/section.png', image); }
104
- time { background-image: asset_url('wymeditor/skins/refinery/html5/time.png', image); }
77
+ p { background-image: asset-url('wymeditor/skins/refinery/html5/p.png'); }
78
+ h1 { background-image: asset-url('wymeditor/skins/refinery/html5/h1.png'); }
79
+ h2 { background-image: asset-url('wymeditor/skins/refinery/html5/h2.png'); }
80
+ h3 { background-image: asset-url('wymeditor/skins/refinery/html5/h3.png'); }
81
+ h4 { background-image: asset-url('wymeditor/skins/refinery/html5/h4.png'); }
82
+ h5 { background-image: asset-url('wymeditor/skins/refinery/html5/h5.png'); }
83
+ h6 { background-image: asset-url('wymeditor/skins/refinery/html5/h6.png'); }
84
+ blockquote { background-image: asset-url('wymeditor/skins/refinery/html5/blockquote.png'); }
85
+ pre { background-image: asset-url('wymeditor/skins/refinery/html5/pre.png'); }
86
+ meter { background-image: asset-url('wymeditor/skins/refinery/html5/meter.png'); }
87
+ nav { background-image: asset-url('wymeditor/skins/refinery/html5/nav.png'); }
88
+ ruby { background-image: asset-url('wymeditor/skins/refinery/html5/ruby.png'); }
89
+ rt { background-image: asset-url('wymeditor/skins/refinery/html5/rt.png'); }
90
+ rp { background-image: asset-url('wymeditor/skins/refinery/html5/rp.png'); }
91
+ article { background-image: asset-url('wymeditor/skins/refinery/html5/article.png'); }
92
+ aside { background-image: asset-url('wymeditor/skins/refinery/html5/aside.png'); }
93
+ command { background-image: asset-url('wymeditor/skins/refinery/html5/command.png'); }
94
+ details { background-image: asset-url('wymeditor/skins/refinery/html5/details.png'); }
95
+ summary { background-image: asset-url('wymeditor/skins/refinery/html5/summary.png'); }
96
+ figure { background-image: asset-url('wymeditor/skins/refinery/html5/figure.png'); }
97
+ figcaption { background-image: asset-url('wymeditor/skins/refinery/html5/figcaption.png'); }
98
+ footer { background-image: asset-url('wymeditor/skins/refinery/html5/footer.png'); }
99
+ header { background-image: asset-url('wymeditor/skins/refinery/html5/header.png'); }
100
+ hgroup { background-image: asset-url('wymeditor/skins/refinery/html5/hgroup.png'); }
101
+ mark { background-image: asset-url('wymeditor/skins/refinery/html5/mark.png'); }
102
+ progress { background-image: asset-url('wymeditor/skins/refinery/html5/progress.png'); }
103
+ section { background-image: asset-url('wymeditor/skins/refinery/html5/section.png'); }
104
+ time { background-image: asset-url('wymeditor/skins/refinery/html5/time.png'); }
105
105
 
106
106
  /* specific HTML elements */
107
107
  caption { text-align: left; }
@@ -132,7 +132,7 @@
132
132
  img.selected_by_wym {
133
133
  border: 1px dashed #22a7f2;
134
134
  }
135
-
135
+
136
136
  article,
137
137
  aside,
138
138
  command,
@@ -0,0 +1,5 @@
1
+ Refinery::FastController.class_eval do
2
+ def wymiframe
3
+ render :template => "/refinery/wymiframe", :layout => false
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ Refinery::Page::FriendlyIdOptions.class_eval do
2
+ class << self
3
+ def reserved_words_with_wymiframe
4
+ reserved_words_without_wymiframe.push('wymiframe')
5
+ end
6
+ alias_method_chain :reserved_words, :wymiframe
7
+ end
8
+ end
@@ -0,0 +1,19 @@
1
+ <form id='visual_editor_dialog_form' class='visual_editor_dialog visual_editor_dialog_<%= @dialog_type %>'>
2
+ <input type='hidden' id='visual_editor_dialog_type' class='visual_editor_dialog_type' value='<%= @dialog_type %>' />
3
+ <iframe src='<%= @iframe_src %>' id='dialog_frame' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>
4
+ <div class='wym_hideables'>
5
+ <% if @dialog_type == "image" %>
6
+ <input type='hidden' id='visual_editor_src' class='visual_editor_src' value='' />
7
+ <input type='hidden' id='visual_editor_alt' class='visual_editor_alt' value='' />
8
+ <input type='hidden' id='visual_editor_title' class='visual_editor_title' value='' />
9
+ <input type='hidden' id='visual_editor_size' class='visual_editor_size' value='' />
10
+ <% elsif @dialog_type == "link" %>
11
+ <input type='hidden' id='visual_editor_href' class='visual_editor_href' value='' />
12
+ <input type='hidden' id='visual_editor_title' class='visual_editor_title' value='' />
13
+ <input type='hidden' id='visual_editor_target' class='visual_editor_target' value='' />
14
+ <% end %>
15
+
16
+ <input id='visual_editor_dialog_submit' class='wym_submit submit_dialog button' type='button' value='<%= t('.save') %>' />
17
+ <a id='visual_editor_dialog_cancel' href='' class='wym_cancel close_dialog button'><%= t('.cancel') %></a>
18
+ </div>
19
+ </form>