Permalink
Browse files

Removed versioned files

  • Loading branch information...
1 parent 2ece1a0 commit 90fb276189e5c7353be68977de1c8bb1a7aa7a79 @markdalgleish committed Aug 15, 2011
Showing with 0 additions and 55 deletions.
  1. +0 −47 tmpload-v1.0.js
  2. +0 −8 tmpload-v1.0.min.js
View
@@ -1,47 +0,0 @@
-/*
-tmpload jQuery Plugin v1.0
-Copyright 2011, Mark Dalgleish
-
-This content is released under the MIT License
-github.com/markdalgleish/tmpload/blob/master/MIT-LICENSE.txt
-*/
-(function($, undefined) {
- //Template cache
- var templates = {};
-
- $.tmpload = function(obj, url) {
- if (url === undefined) {
- //Declaring template(s)
- if (typeof obj === "object") {
- if (obj.length) {
- //Array of declaration objects
- for (var i = 0; i < obj.length; i++) {
- templates[obj[i].name] = obj[i].url;
- }
- } else {
- //A single declaration object
- templates[obj.name] = obj.url;
- }
- }
- //Loading the template
- else if (typeof obj === "string") {
- if (typeof templates[obj] === "string") {
- //The template hasn't been loaded yet
- return templates[obj] = $.Deferred(function(dfd) {
- $.get(templates[obj]).success(function(d) {
- dfd.resolve($.template(obj, d));
- }).error(function(d) {
- dfd.reject(d);
- });
- }).promise();
- } else {
- //The template has already been cached
- return templates[obj];
- }
- }
- //Declaring a single template
- } else {
- templates[obj] = url;
- }
- };
-})(jQuery);
View
@@ -1,8 +0,0 @@
-/*
-tmpload jQuery Plugin v1.0
-Copyright 2011, Mark Dalgleish
-
-This content is released under the MIT License
-github.com/markdalgleish/tmpload/blob/master/MIT-LICENSE.txt
-*/
-(function(d,f){var b={};d.tmpload=function(a,e){if(e===f)if(typeof a==="object")if(a.length)for(var c=0;c<a.length;c++)b[a[c].name]=a[c].url;else b[a.name]=a.url;else{if(typeof a==="string")return typeof b[a]==="string"?d.Deferred(function(c){d.get(b[a]).success(function(g){b[a]=d.template(g);c.resolve(b[a])}).error(function(a){c.reject(a)})}).promise():b[a]}else b[a]=e}})(jQuery);

0 comments on commit 90fb276

Please sign in to comment.