mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-22 19:27:40 +00:00
The big purge of the old widget mechanism
Getting rid of the old widget mechanism files finally gives us a payoff for all the refactoring. Still a bit of tidying up to do, and we need to re-introduce the animation mechanisms.
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/error.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
The error widget displays an error message.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var ErrorWidget = function(renderer,errorMessage) {
|
||||
// Save state
|
||||
this.renderer = renderer;
|
||||
this.errorMessage = errorMessage;
|
||||
// Generate child nodes
|
||||
this.generate();
|
||||
};
|
||||
|
||||
ErrorWidget.prototype.generate = function() {
|
||||
// Set the element details
|
||||
this.tag = "span";
|
||||
this.attributes = {
|
||||
"class": "tw-error-widget"
|
||||
};
|
||||
this.children = this.renderer.renderTree.createRenderers(this.renderer,[{
|
||||
type: "text",
|
||||
text: this.errorMessage
|
||||
}]);
|
||||
};
|
||||
|
||||
exports.error = ErrorWidget;
|
||||
|
||||
})();
|
Reference in New Issue
Block a user