Sha256: a53092703689d6e0484feff1b06e95019ac6a28f079de33aa02949d4705e95ed

Contents?: true

Size: 1.51 KB

Versions: 12

Compression:

Stored size: 1.51 KB

Contents

this.visual_editor_init_interface_hook = (function(_this) {
  return function() {
    return $("textarea.wymeditor, textarea.visual_editor").each(function() {
      var instance, next, prev, textarea;
      textarea = $(this);
      if ((instance = WYMeditor.INSTANCES[$((textarea.next(".visual_editor_box").find("iframe").attr("id") || "").split("_")).last().get(0)]) != null) {
        if (((next = textarea.parent().next()) != null) && next.length > 0) {
          next.find("input, textarea").keydown($.proxy(function(e) {
            var shiftHeld;
            shiftHeld = e.shiftKey;
            if (shiftHeld && e.keyCode === $.ui.keyCode.TAB) {
              this._iframe.contentWindow.focus();
              return e.preventDefault();
            }
          }, instance)).keyup(function(e) {
            var shiftHeld;
            return shiftHeld = false;
          });
        }
        if (((prev = textarea.parent().prev()) != null) && prev.length > 0) {
          return prev.find("input, textarea").keydown($.proxy(function(e) {
            if (e.keyCode === $.ui.keyCode.TAB) {
              this._iframe.contentWindow.focus();
              return e.preventDefault();
            }
          }, instance));
        }
      }
    });
  };
})(this);

this.visual_editor_update = (function(_this) {
  return function() {
    $.each(WYMeditor.INSTANCES, function(index, wym) {
      wym.update();
    });
  }
})(this);

this.visual_editor_init = (function(_this) {
  return function() {
    return WYMeditor.init();
  };
})(this);

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
refinerycms-wymeditor-3.0.0 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-2.2.0 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-2.1.0 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-2.0.0 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.1.0 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.7 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.6 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.5 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.4 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.3 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.2 app/assets/javascripts/wymeditor/init_interface.js
refinerycms-wymeditor-1.0.1 app/assets/javascripts/wymeditor/init_interface.js