mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-16 23:04:50 +00:00
Make test cases editable
This commit is contained in:
parent
b47c75785a
commit
4a0ffcfb97
@ -27,6 +27,7 @@ TestCaseWidget.prototype = new Widget();
|
|||||||
Render this widget into the DOM
|
Render this widget into the DOM
|
||||||
*/
|
*/
|
||||||
TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
||||||
|
var self = this;
|
||||||
this.parentDomNode = parent;
|
this.parentDomNode = parent;
|
||||||
this.computeAttributes();
|
this.computeAttributes();
|
||||||
this.execute();
|
this.execute();
|
||||||
@ -48,7 +49,14 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
// Create a wiki
|
// Create a wiki
|
||||||
this.testcaseWiki = new $tw.Wiki();
|
this.testcaseWiki = new $tw.Wiki();
|
||||||
// Always load the core plugin
|
// Always load the core plugin
|
||||||
this.testcaseWiki.addTiddler(this.wiki.getTiddler("$:/core"));
|
var loadTiddler = function(title) {
|
||||||
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
|
if(tiddler) {
|
||||||
|
self.testcaseWiki.addTiddler(tiddler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loadTiddler("$:/core");
|
||||||
|
loadTiddler("$:/plugins/tiddlywiki/codemirror");
|
||||||
// Load tiddlers from child data widgets
|
// Load tiddlers from child data widgets
|
||||||
var tiddlers = [];
|
var tiddlers = [];
|
||||||
this.findChildrenDataWidgets(this.contentRoot.children,"data",function(widget) {
|
this.findChildrenDataWidgets(this.contentRoot.children,"data",function(widget) {
|
||||||
|
@ -16,4 +16,4 @@ title: $:/core/ui/testcases/DefaultTemplate/Source
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</$list>
|
</$list>
|
||||||
<pre><$view tiddler=<<currentTab>>/></pre>
|
<$edit class="tc-edit-texteditor" tiddler=<<currentTab>>/>
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
"plugins": [
|
"plugins": [
|
||||||
"tiddlywiki/geospatial",
|
"tiddlywiki/geospatial",
|
||||||
"tiddlywiki/jszip",
|
"tiddlywiki/jszip",
|
||||||
"tiddlywiki/xlsx-utils"
|
"tiddlywiki/xlsx-utils",
|
||||||
|
"tiddlywiki/codemirror"
|
||||||
],
|
],
|
||||||
"themes": [
|
"themes": [
|
||||||
"tiddlywiki/vanilla",
|
"tiddlywiki/vanilla",
|
||||||
|
Loading…
Reference in New Issue
Block a user