1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-19 08:29:50 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
jeremy@jermolene.com
2d9d2fbc2c Initial commit 2023-02-27 13:41:23 +00:00
7 changed files with 7 additions and 81 deletions

View File

@@ -1,54 +0,0 @@
/*\
title: $:/core/modules/debug-view.js
type: application/javascript
module-type: global
debug-view module supports the optional external debug window
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var dm = $tw.utils.domMaker;
/*
Instantiate the debug view
*/
function DebugView(options) {
if($tw.browser) {
this.outputFilters = dm("div",{
text: "Yes"
})
this.container = dm("div",{
"class": "tc-debug-view",
children: [
dm("div",{
children: [
dm("h1",{
text: "TiddlyWiki Debug View"
}),
dm("h2",{
text: "Filter Execution"
}),
this.outputFilters
]
})
]
});
document.body.appendChild(this.container);
}
}
/*
Show a generic network error alert
*/
DebugView.prototype.displayError = function(msg,err) {
};
exports.DebugView = DebugView;
})();

View File

@@ -330,14 +330,6 @@ exports.compileFilter = function(filterString) {
}
})());
});
// If we're debugging then wrap each operation function with debug code
if(true) {
$tw.utils.each(operationFunctions,function(operationFunction,index) {
operationFunctions[index] = function(results,source,widget) {
return operationFunction(results,source,widget);
};
});
}
// Return a function that applies the operations to a source iterator of tiddler titles
var fnMeasured = $tw.perf.measure("filter: " + filterString,function filterFunction(source,widget) {
if(!source) {

View File

@@ -32,18 +32,18 @@ FieldIndexer.prototype.setMaxIndexedValueLength = function(length) {
FieldIndexer.prototype.addIndexMethods = function() {
var self = this;
// get all tiddlers, including those overwrite shadow tiddlers
this.wiki.each.byField = function(name,value) {
var lookup = self.lookup(name,value);
var titles = self.wiki.allTitles(),
lookup = self.lookup(name,value);
return lookup && lookup.filter(function(title) {
return self.wiki.tiddlerExists(title)
return titles.indexOf(title) !== -1;
});
};
// get shadow tiddlers, including shadow tiddlers that is overwritten
this.wiki.eachShadow.byField = function(name,value) {
var lookup = self.lookup(name,value);
var titles = self.wiki.allShadowTitles(),
lookup = self.lookup(name,value);
return lookup && lookup.filter(function(title) {
return self.wiki.isShadowTiddler(title)
return titles.indexOf(title) !== -1;
});
};
this.wiki.eachTiddlerPlusShadows.byField = function(name,value) {

View File

@@ -23,8 +23,6 @@ var PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = "$:/config/Performance/Instrument
var widget = require("$:/core/modules/widgets/widget.js");
exports.startup = function() {
// Debug view
$tw.debugView = new $tw.DebugView();
// Minimal browser detection
if($tw.browser) {
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));

View File

@@ -259,7 +259,7 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
}
};
// Let the browser handle it if we're in a textarea or input box
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable && !event.twEditor) {
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable) {
var self = this,
items = event.clipboardData.items;
// Enumerate the clipboard items

View File

@@ -1,13 +1,11 @@
title: $:/language/Docs/Fields/
_canonical_uri: Pełny adres URL do zewnętrznego obrazu
author: Imię autora wtyczki
bag: Nazwa worka, z ktorego pochodzi tiddler
caption: Tekst wyświetlany na zakładce lub przycisku
code-body: Ustawienie wartości na ''tak'' spowoduje wyświetlanie tiddlera jako kod
color: Wartość koloru CSS powiążanego z tym tiddlerem
component: Nazwa komponentu odpowiedzialnego za [[alert|AlertMechanism]]
core-version: Wersja TiddlyWiki która jest wspierana przez wtyczkę
current-tiddler: Używane by zapamiętać ostatniego tiddlera w [[liście historii|HistoryMechanism]]
created: Data kiedy utworzono tiddlera
creator: Imię twórcy tiddlera
@@ -24,9 +22,7 @@ list-before: Jeżeli ustawione, nazwa tiddlera przed którym ten tiddler będzie
list-after: Jeżeli ustawione, nazwa tiddlera po którym ten tiddler będzie dodany w sortowanej liście nazw tiddlerów; lub na końcu listy jeżeli pole jest obecne ale puste
modified: Czas i data ostatniej modyfikacji
modifier: Tytuł tiddlera powiązanego z osobą, która ostatnio modyfikowała tego tiddlera
module-type: Rodzaj modułu używany przez wtyczki napisane w javascripcie
name: Czytelna nazwa powiązana z tiddlerem wtyczki
parent-plugin: Określa nadrzędną wtyczkę
plugin-priority: Numeryczna wartość określająca tiddlera wtyczki
plugin-type: Typ tiddlera wtyczki
revision: Numer rewizji tiddlera przechowywany na serwerze

View File

@@ -220,15 +220,9 @@ function CodeMirrorEngine(options) {
}
});
this.cm.on("paste",function(cm,event) {
event["twEditor"] = true;
self.widget.handlePasteEvent.call(self.widget,event);
});
} else {
this.cm.on("paste",function(cm,event){
event["twEditor"] = true;
});
}
;
}
/*