mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-08-30 22:58:56 +00:00
@@ -37,7 +37,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
|
||||
var domNode = this.document.createElement("div");
|
||||
// Assign classes
|
||||
var classes = (this["class"] || "").split(" ");
|
||||
classes.push("tw-keyboard");
|
||||
classes.push("tc-keyboard");
|
||||
domNode.className = classes.join(" ");
|
||||
// Add a keyboard event handler
|
||||
domNode.addEventListener("keydown",function (event) {
|
||||
|
||||
@@ -129,15 +129,15 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
|
||||
$tw.utils.addClass(event.target,"tc-tiddlylink-dragging");
|
||||
// Create the drag image elements
|
||||
this.dragImage = this.document.createElement("div");
|
||||
this.dragImage.className = "tw-tiddler-dragger";
|
||||
this.dragImage.className = "tc-tiddler-dragger";
|
||||
var inner = this.document.createElement("div");
|
||||
inner.className = "tw-tiddler-dragger-inner";
|
||||
inner.className = "tc-tiddler-dragger-inner";
|
||||
inner.appendChild(this.document.createTextNode(this.to));
|
||||
this.dragImage.appendChild(inner);
|
||||
this.document.body.appendChild(this.dragImage);
|
||||
// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html
|
||||
var cover = this.document.createElement("div");
|
||||
cover.className = "tw-tiddler-dragger-cover";
|
||||
cover.className = "tc-tiddler-dragger-cover";
|
||||
cover.style.left = (inner.offsetLeft - 16) + "px";
|
||||
cover.style.top = (inner.offsetTop - 16) + "px";
|
||||
cover.style.width = (inner.offsetWidth + 32) + "px";
|
||||
|
||||
@@ -101,7 +101,7 @@ RadioWidget.prototype.execute = function() {
|
||||
if(this.radioClass !== "") {
|
||||
this.radioClass += " ";
|
||||
}
|
||||
this.radioClass += "tw-radio";
|
||||
this.radioClass += "tc-radio";
|
||||
// Make the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.execute();
|
||||
var domNode = this.document.createElement(this.parseTreeNode.isBlock ? "div" : "span");
|
||||
var classes = this["class"].split(" ") || [];
|
||||
classes.push("tw-reveal");
|
||||
classes.push("tc-reveal");
|
||||
domNode.className = classes.join(" ");
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
|
||||
@@ -41,9 +41,9 @@ TiddlerWidget.prototype.execute = function() {
|
||||
this.tiddlerTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
// Set context variables
|
||||
this.setVariable("currentTiddler",this.tiddlerTitle);
|
||||
this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tw-tiddler-exists" : "tw-tiddler-missing");
|
||||
this.setVariable("shadowTiddlerClass",this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tw-tiddler-shadow" : "");
|
||||
this.setVariable("systemTiddlerClass",this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tw-tiddler-system" : "");
|
||||
this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tc-tiddler-exists" : "tc-tiddler-missing");
|
||||
this.setVariable("shadowTiddlerClass",this.wiki.isShadowTiddler(this.tiddlerTitle) ? "tc-tiddler-shadow" : "");
|
||||
this.setVariable("systemTiddlerClass",this.wiki.isSystemTiddler(this.tiddlerTitle) ? "tc-tiddler-system" : "");
|
||||
this.setVariable("tiddlerTagClasses",this.getTagClasses())
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
|
||||
Reference in New Issue
Block a user