Browse Source

Visual Editor fix (part two).

develop
Ben Kurtovic 9 years ago
parent
commit
86f2ffd67d
1 changed files with 21 additions and 13 deletions
  1. +21
    -13
      src/tfd.js

+ 21
- 13
src/tfd.js View File

@@ -217,23 +217,31 @@ TFD.prototype._build_loading_node = function(node, text) {

TFD.prototype._build_hook = function(verb, callback) {
var self = this;
return $("<span/>", {style: "margin-left: 1em;"})
.append($("<span/>", {addClass: "mw-editsection-bracket", text: "["}))
.append($("<a/>", {
href: "#",
text: verb,
title: "tfdclerk: " + verb + " discussion",
click: function() {
callback.call(self);
return false;
}
}))
.append($("<span/>", {addClass: "mw-editsection-bracket", text: "]"}));
return $("<a/>", {
href: "#",
text: verb,
title: "tfdclerk: " + verb + " discussion",
click: function() {
callback.call(self);
return false;
}
});
};

TFD.prototype._build_hook_divider = function() {
return $("<span/>", {
addClass: "mw-editsection-divider",
style: "display: inline;",
text: "["
});
};

TFD.prototype.add_hooks = function() {
$("<span/>", {addClass: "tfdclerk-hooks"})
$("<span/>", {addClass: "tfdclerk-hooks", style: "margin-left: 1em;"})
.append($("<span/>", {addClass: "mw-editsection-bracket", text: "["}))
.append(this._build_hook("close", this.close))
.append(this._build_hook_divider())
.append(this._build_hook("relist", this.relist))
.append($("<span/>", {addClass: "mw-editsection-bracket", text: "]"}))
.appendTo(this.head.find(".mw-editsection"));
};

Loading…
Cancel
Save