forked from Wavyzz/dolibarr
Works on jQuery fileupload upgrade (Todo: css problem)
This commit is contained in:
46
htdocs/includes/jquery/plugins/template/runtime.js
vendored
Normal file
46
htdocs/includes/jquery/plugins/template/runtime.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* JavaScript Templates Runtime 2.1.0
|
||||
* https://github.com/blueimp/JavaScript-Templates
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
/*jslint sloppy: true */
|
||||
/*global define */
|
||||
|
||||
(function ($) {
|
||||
var tmpl = function (id, data) {
|
||||
var f = tmpl.cache[id];
|
||||
return data ? f(data, tmpl) : function (data) {
|
||||
return f(data, tmpl);
|
||||
};
|
||||
};
|
||||
tmpl.cache = {};
|
||||
tmpl.encReg = /[<>&"'\x00]/g;
|
||||
tmpl.encMap = {
|
||||
"<" : "<",
|
||||
">" : ">",
|
||||
"&" : "&",
|
||||
"\"" : """,
|
||||
"'" : "'"
|
||||
};
|
||||
tmpl.encode = function (s) {
|
||||
return String(s || "").replace(
|
||||
tmpl.encReg,
|
||||
function (c) {
|
||||
return tmpl.encMap[c] || "";
|
||||
}
|
||||
);
|
||||
};
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(function () {
|
||||
return tmpl;
|
||||
});
|
||||
} else {
|
||||
$.tmpl = tmpl;
|
||||
}
|
||||
}(this));
|
||||
Reference in New Issue
Block a user