1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-10 02:38:06 +00:00

Change more "tw-*" classes to "tc-*"

Part of #764
This commit is contained in:
Jermolene
2014-08-28 18:21:08 +01:00
parent 4a1c530da7
commit 787481a804
27 changed files with 64 additions and 64 deletions

View File

@@ -19,7 +19,7 @@ var CsvParser = function(type,text,options) {
"type": "element", "tag": "table", "children": [{
"type": "element", "tag": "tbody", "children": []
}], "attributes": {
"class": {"type": "string", "value": "tw-csv-table"}
"class": {"type": "string", "value": "tc-csv-table"}
}
}]
}];

View File

@@ -45,7 +45,7 @@ exports.init = function(parser) {
};
exports.parse = function() {
var classes = ["tw-quote"];
var classes = ["tc-quote"];
// Get all the details of the match
var reEndString = "^" + this.match[1] + "(?!<)";
// Move past the <s

View File

@@ -42,7 +42,7 @@ exports.parse = function() {
type: "element",
tag: "span",
attributes: {
"class": {type: "string", value: "tw-inline-style"}
"class": {type: "string", value: "tc-inline-style"}
},
children: tree
};

View File

@@ -160,11 +160,11 @@ SaverHandler.prototype.isDirty = function() {
};
/*
Update the document body with the class "tw-dirty" if the wiki has unsaved/unsynced changes
Update the document body with the class "tc-dirty" if the wiki has unsaved/unsynced changes
*/
SaverHandler.prototype.updateDirtyStatus = function() {
if($tw.browser) {
$tw.utils.toggleClass(document.body,"tw-dirty",this.isDirty());
$tw.utils.toggleClass(document.body,"tc-dirty",this.isDirty());
}
};

View File

@@ -53,7 +53,7 @@ exports.startup = function() {
$tw.perf.report("mainRender",function() {
$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});
$tw.pageContainer = document.createElement("div");
$tw.utils.addClass($tw.pageContainer,"tw-page-container-wrapper");
$tw.utils.addClass($tw.pageContainer,"tc-page-container-wrapper");
document.body.insertBefore($tw.pageContainer,document.body.firstChild);
$tw.pageWidgetNode.render($tw.pageContainer,null);
})();

View File

@@ -109,11 +109,11 @@ Syncer.prototype.isDirty = function() {
};
/*
Update the document body with the class "tw-dirty" if the wiki has unsaved/unsynced changes
Update the document body with the class "tc-dirty" if the wiki has unsaved/unsynced changes
*/
Syncer.prototype.updateDirtyStatus = function() {
if($tw.browser) {
$tw.utils.toggleClass(document.body,"tw-dirty",this.isDirty());
$tw.utils.toggleClass(document.body,"tc-dirty",this.isDirty());
}
};

View File

@@ -35,7 +35,7 @@ Notifier.prototype.display = function(title,options) {
return;
}
// Add classes
$tw.utils.addClass(notification,"tw-notification");
$tw.utils.addClass(notification,"tc-notification");
// Render the body of the notification
var widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});
widgetNode.render(notification,null);

View File

@@ -26,15 +26,15 @@ Popup.prototype.show = function(options) {
this.title = options.title;
this.wiki = options.wiki;
this.anchorDomNode = options.domNode;
$tw.utils.addClass(this.anchorDomNode,"tw-popup");
$tw.utils.addClass(this.anchorDomNode,"tc-popup");
this.rootElement.addEventListener("click",this,false);
};
Popup.prototype.handleEvent = function(event) {
// Dismiss the popup if we get a click on an element that doesn't have .tw-popup class
// Dismiss the popup if we get a click on an element that doesn't have .tc-popup class
if(event.type === "click") {
var node = event.target;
while(node && !$tw.utils.hasClass(node,"tw-popup")) {
while(node && !$tw.utils.hasClass(node,"tc-popup")) {
node = node.parentNode;
}
if(!node) {
@@ -45,7 +45,7 @@ Popup.prototype.handleEvent = function(event) {
Popup.prototype.cancel = function() {
if(this.anchorDomNode) {
$tw.utils.removeClass(this.anchorDomNode,"tw-popup");
$tw.utils.removeClass(this.anchorDomNode,"tc-popup");
this.anchorDomNode = null;
}
this.rootElement.removeEventListener("click",this,false);

View File

@@ -35,7 +35,7 @@ DropZoneWidget.prototype.render = function(parent,nextSibling) {
this.execute();
// Create element
var domNode = this.document.createElement("div");
domNode.className = "tw-dropzone";
domNode.className = "tc-dropzone";
// Add event handlers
$tw.utils.addEventListeners(domNode,[
{name: "dragenter", handlerObject: this, handlerMethod: "handleDragEnterEvent"},
@@ -57,7 +57,7 @@ DropZoneWidget.prototype.handleDragEnterEvent = function(event) {
this.dragEnterCount = (this.dragEnterCount || 0) + 1;
// If we're entering for the first time we need to apply highlighting
if(this.dragEnterCount === 1) {
$tw.utils.addClass(this.domNodes[0],"tw-dragover");
$tw.utils.addClass(this.domNodes[0],"tc-dragover");
}
// Tell the browser that we're ready to handle the drop
event.preventDefault();
@@ -80,7 +80,7 @@ DropZoneWidget.prototype.handleDragLeaveEvent = function(event) {
this.dragEnterCount = (this.dragEnterCount || 0) - 1;
// Remove highlighting if we're leaving externally
if(this.dragEnterCount <= 0) {
$tw.utils.removeClass(this.domNodes[0],"tw-dragover");
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
}
};
@@ -94,7 +94,7 @@ DropZoneWidget.prototype.handleDropEvent = function(event) {
// Reset the enter count
this.dragEnterCount = 0;
// Remove highlighting
$tw.utils.removeClass(this.domNodes[0],"tw-dragover");
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
// Import any files in the drop
var numFiles = this.wiki.readFiles(dataTransfer.files,function(tiddlerFieldsArray) {
self.dispatchEvent({type: "tw-import-tiddlers", param: JSON.stringify(tiddlerFieldsArray)});

View File

@@ -38,7 +38,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
this.renderChildren(domNode,null);
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
this.positionPopup(domNode);
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
$tw.utils.addClass(domNode,"tc-popup"); // Make sure that clicks don't dismiss popups within the revealed content
}
if(!this.isOpen) {
domNode.setAttribute("hidden","true")
@@ -187,7 +187,7 @@ RevealWidget.prototype.updateState = function() {
// Animate our DOM node
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
this.positionPopup(domNode);
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
$tw.utils.addClass(domNode,"tc-popup"); // Make sure that clicks don't dismiss popups within the revealed content
}
if(this.isOpen) {