kopia lustrzana https://github.com/miklobit/TiddlyWiki5
More tw5dropbox updates
rodzic
63e486298c
commit
d416781110
|
@ -12,9 +12,13 @@ Startup the Dropbox main app
|
||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var titleLoadedWikis = "$:/plugins/dropbox/LoadedWikis";
|
||||||
|
|
||||||
exports.startup = function() {
|
exports.startup = function() {
|
||||||
|
$tw.wiki.addTiddler({title: titleLoadedWikis, text: "no"},true);
|
||||||
// Load tiddlers
|
// Load tiddlers
|
||||||
$tw.plugins.dropbox.loadWikiFiles("/",function() {
|
$tw.plugins.dropbox.loadWikiFiles("/",function() {
|
||||||
|
$tw.wiki.addTiddler({title: titleLoadedWikis, text: "yes"},true);
|
||||||
console.log("Loaded all wikis",$tw.wiki.tiddlers);
|
console.log("Loaded all wikis",$tw.wiki.tiddlers);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,15 @@ title: TiddlyWiki5 in the Sky with Dropbox
|
||||||
|
|
||||||
Welcome to TiddlyWiki5 in the Sky with Dropbox.
|
Welcome to TiddlyWiki5 in the Sky with Dropbox.
|
||||||
|
|
||||||
|
<<reveal state:[[$:/plugins/dropbox/LoadedWikis]] type:nomatch text:yes><
|
||||||
|
Loading your wikis from Dropbox
|
||||||
|
>>
|
||||||
|
|
||||||
|
<<reveal state:[[$:/plugins/dropbox/LoadedWikis]] type:match text:yes><
|
||||||
! Your ~TiddlyWikis
|
! Your ~TiddlyWikis
|
||||||
|
|
||||||
((( [tag[wiki]] ))(WikiTemplate))
|
<<transclude filter:[tag[wiki]] templateTitle:WikiTemplate emptyMessage:"You haven't created any wikis yet">>
|
||||||
|
>>
|
||||||
|
|
||||||
! Create new ~TiddlyWiki
|
! Create new ~TiddlyWiki
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
title: WikiTemplate
|
title: WikiTemplate
|
||||||
|
|
||||||
<div class="alert">
|
<div class="alert"><<view title>> - <<link throughField:urlView><View>> <<link throughField:urlEdit><Edit>>
|
||||||
<div>
|
|
||||||
<<view title>>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<<view url link>>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -86,7 +86,8 @@ $tw.plugins.dropbox.loadWikiFiles = function(path,callback) {
|
||||||
for(var s=0; s<stats.length; s++) {
|
for(var s=0; s<stats.length; s++) {
|
||||||
var stat = stats[s];
|
var stat = stats[s];
|
||||||
if(!stat.isFile && stat.isFolder) {
|
if(!stat.isFile && stat.isFolder) {
|
||||||
$tw.wiki.addTiddler({title: stat.name, text: "wiki", tags: ["wiki"], url: $tw.plugins.dropbox.userInfo.publicAppUrl + stat.path + "/index.html"});
|
var url = $tw.plugins.dropbox.userInfo.publicAppUrl + stat.path + "/index.html";
|
||||||
|
$tw.wiki.addTiddler({title: stat.name, text: "wiki", tags: ["wiki"], urlView: url, urlEdit: url + "?edit=true"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
|
|
Ładowanie…
Reference in New Issue