http://trac.tiddlywiki.org/changeset/9947
JeremyRuston
2009-06-26 09:51:15 +0000 (Fri, 26 Jun 2009)
81
[fileplugin] Pulled extraneous init() method, and adjusted documentation to
match
---------------
U Trunk/core/jquery/plugins/doc/twFile.html
U Trunk/core/jquery/plugins/jQuery.twFile.js
---------------
Modified: Trunk/core/jquery/plugins/doc/twFile.html
===================================================================
--- Trunk/core/jquery/plugins/doc/twFile.html 2009-06-26 09:46:47 UTC (rev
9946)
+++ Trunk/core/jquery/plugins/doc/twFile.html 2009-06-26 09:51:15 UTC (rev
9947)
@@ -41,13 +41,6 @@
<p><code>$.twFile.copy(dest, source)</code>: duplicate
existing file</p>
<p><strong>N.B.:</strong> This is not supported on all
browsers.</p>
</li>
- <li>
- <p><code>$.twFile.init()</code>: force internal
initialization</p>
- <p>
- This would typically be used inside a
- <code>$(document).ready</code> handler.
- </p>
- </li>
</ul>
<p>
<strong>N.B.:</strong> All file paths must be absolute (e.g.
@@ -58,6 +51,15 @@
<h2>Limitations</h2>
<ul>
<li>
+ plugin not available until after all document.onready
handlers have completed
+ <p>
+ Because the TiddlySaver applet cannot be
synchronously injected
+ into the document, it is done during
document.onready processing.
+ This means that the plugin is not guaranteed to
work properly
+ until after all document.onready handlers have
completed.
+ </p>
+ </li>
+ <li>
currently unreliable UTF-8 support on Internet Explorer
<p>
The plugin is designed to work with UTF-8
encoded text files.
Modified: Trunk/core/jquery/plugins/jQuery.twFile.js
===================================================================
--- Trunk/core/jquery/plugins/jQuery.twFile.js 2009-06-26 09:46:47 UTC (rev
9946)
+++ Trunk/core/jquery/plugins/jQuery.twFile.js 2009-06-26 09:51:15 UTC (rev
9947)
@@ -20,18 +20,6 @@
currentDriver: null,
driverList: ["activeX", "mozilla", "tiddlySaver",
"javaLiveConnect"],
- getDriver: function() {
- if(this.currentDriver === null) {
- for(var t=0; t<this.driverList.length; t++) {
- if(this.currentDriver === null &&
drivers[this.driverList[t]].isAvailable &&
drivers[this.driverList[t]].isAvailable())
- this.currentDriver =
drivers[this.driverList[t]];
- }
- }
- return this.currentDriver;
- },
- init: function() {
- this.getDriver();
- },
load: function(filePath) {
return this.getDriver().loadFile(filePath);
},
@@ -43,6 +31,15 @@
return this.currentDriver.copyFile(dest,source);
else
return false;
+ },
+ getDriver: function() {
+ if(this.currentDriver === null) {
+ for(var t=0; t<this.driverList.length; t++) {
+ if(this.currentDriver === null &&
drivers[this.driverList[t]].isAvailable &&
drivers[this.driverList[t]].isAvailable())
+ this.currentDriver =
drivers[this.driverList[t]];
+ }
+ }
+ return this.currentDriver;
}
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---