From a788593687a1f16b400ebbecac3552451c3b07f1 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 22 Mar 2013 21:12:39 +0000 Subject: [PATCH] Further refactorings of boot.js --- core/boot.js | 74 +++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/core/boot.js b/core/boot.js index 8a8d5874f..70a91c6e6 100644 --- a/core/boot.js +++ b/core/boot.js @@ -254,6 +254,14 @@ $tw.utils.checkVersions = function(required,actual) { (diff[0] === 0 && diff[1] === 0 && diff[2] > 0); }; +/* +Register file type information +*/ +$tw.utils.registerFileType = function(type,encoding,extension) { + $tw.config.fileExtensionInfo[extension] = {type: type}; + $tw.config.contentTypeInfo[type] = {encoding: encoding, extension: extension}; +} + /* Creates a PasswordPrompt object */ @@ -308,12 +316,11 @@ $tw.utils.PasswordPrompt.prototype.createPrompt = function(options) { form.addEventListener("submit",function(event) { // Collect the form data var data = {},t; - for(t=0; t