mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-10 21:01:41 +00:00
update
This commit is contained in:
4
node_modules/mustache/wrappers/dojo/mustache.js.post
generated
vendored
Normal file
4
node_modules/mustache/wrappers/dojo/mustache.js.post
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
dojox.mustache = dojo.hitch(Mustache, "render");
|
||||
|
||||
})();
|
9
node_modules/mustache/wrappers/dojo/mustache.js.pre
generated
vendored
Normal file
9
node_modules/mustache/wrappers/dojo/mustache.js.pre
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
Shameless port of a shameless port
|
||||
@defunkt => @janl => @aq => @voodootikigod
|
||||
|
||||
See http://github.com/defunkt/mustache for more info.
|
||||
*/
|
||||
|
||||
dojo.provide("dojox.mustache._base");
|
||||
(function(){
|
13
node_modules/mustache/wrappers/jquery/mustache.js.post
generated
vendored
Normal file
13
node_modules/mustache/wrappers/jquery/mustache.js.post
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
$.mustache = function (template, view, partials) {
|
||||
return Mustache.render(template, view, partials);
|
||||
};
|
||||
|
||||
$.fn.mustache = function (view, partials) {
|
||||
return $(this).map(function (i, elm) {
|
||||
var template = $.trim($(elm).html());
|
||||
var output = $.mustache(template, view, partials);
|
||||
return $(output).get();
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
9
node_modules/mustache/wrappers/jquery/mustache.js.pre
generated
vendored
Normal file
9
node_modules/mustache/wrappers/jquery/mustache.js.pre
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
Shameless port of a shameless port
|
||||
@defunkt => @janl => @aq
|
||||
|
||||
See http://github.com/defunkt/mustache for more info.
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
5
node_modules/mustache/wrappers/mootools/mustache.js.post
generated
vendored
Normal file
5
node_modules/mustache/wrappers/mootools/mustache.js.post
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
Object.implement('mustache', function(view, partials){
|
||||
return Mustache.render(view, this, partials);
|
||||
});
|
||||
})();
|
2
node_modules/mustache/wrappers/mootools/mustache.js.pre
generated
vendored
Normal file
2
node_modules/mustache/wrappers/mootools/mustache.js.pre
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
(function(){
|
||||
|
9
node_modules/mustache/wrappers/qooxdoo/mustache.js.post
generated
vendored
Normal file
9
node_modules/mustache/wrappers/qooxdoo/mustache.js.post
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Above is the original mustache code.
|
||||
*/
|
||||
|
||||
// EXPOSE qooxdoo variant
|
||||
qx.bom.Template.version = this.Mustache.version;
|
||||
qx.bom.Template.render = this.Mustache.render;
|
||||
|
||||
}).call({});
|
172
node_modules/mustache/wrappers/qooxdoo/mustache.js.pre
generated
vendored
Normal file
172
node_modules/mustache/wrappers/qooxdoo/mustache.js.pre
generated
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
/* ************************************************************************
|
||||
|
||||
qooxdoo - the new era of web development
|
||||
|
||||
http://qooxdoo.org
|
||||
|
||||
Copyright:
|
||||
2004-2012 1&1 Internet AG, Germany, http://www.1und1.de
|
||||
|
||||
License:
|
||||
LGPL: http://www.gnu.org/licenses/lgpl.html
|
||||
EPL: http://www.eclipse.org/org/documents/epl-v10.php
|
||||
See the LICENSE file in the project's top-level directory for details.
|
||||
|
||||
Authors:
|
||||
* Martin Wittemann (martinwittemann)
|
||||
|
||||
======================================================================
|
||||
|
||||
This class contains code based on the following work:
|
||||
|
||||
* Mustache.js version 0.8.0
|
||||
|
||||
Code:
|
||||
https://github.com/janl/mustache.js
|
||||
|
||||
Copyright:
|
||||
(c) 2009 Chris Wanstrath (Ruby)
|
||||
(c) 2010 Jan Lehnardt (JavaScript)
|
||||
|
||||
License:
|
||||
MIT: http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2009 Chris Wanstrath (Ruby)
|
||||
Copyright (c) 2010 Jan Lehnardt (JavaScript)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
************************************************************************ */
|
||||
|
||||
/**
|
||||
* The is a template class which can be used for HTML templating. In fact,
|
||||
* this is a wrapper for mustache.js which is a "framework-agnostic way to
|
||||
* render logic-free views".
|
||||
*
|
||||
* Here is a basic example how to use it:
|
||||
* Template:
|
||||
* <pre class="javascript">
|
||||
* var template = "Hi, my name is {{name}}!";
|
||||
* var view = {name: "qooxdoo"};
|
||||
* qx.bom.Template.render(template, view);
|
||||
* // return "Hi, my name is qooxdoo!"
|
||||
* </pre>
|
||||
*
|
||||
* For further details, please visit the mustache.js documentation here:
|
||||
* https://github.com/janl/mustache.js/blob/master/README.md
|
||||
*
|
||||
* @ignore(module)
|
||||
*/
|
||||
qx.Bootstrap.define("qx.bom.Template", {
|
||||
statics : {
|
||||
/** Contains the mustache.js version. */
|
||||
version: null,
|
||||
|
||||
/**
|
||||
* Original and only template method of mustache.js. For further
|
||||
* documentation, please visit https://github.com/janl/mustache.js
|
||||
*
|
||||
* @signature function(template, view, partials)
|
||||
* @param template {String} The String containing the template.
|
||||
* @param view {Object} The object holding the data to render.
|
||||
* @param partials {Object} Object holding parts of a template.
|
||||
* @return {String} The parsed template.
|
||||
*/
|
||||
render: null,
|
||||
|
||||
/**
|
||||
* Combines {@link #render} and {@link #get}. Input is equal to {@link #render}
|
||||
* and output is equal to {@link #get}. The advantage over {@link #get}
|
||||
* is that you don't need a HTML template but can use a template
|
||||
* string and still get a DOM element. Keep in mind that templates
|
||||
* can only have one root element.
|
||||
*
|
||||
* @param template {String} The String containing the template.
|
||||
* @param view {Object} The object holding the data to render.
|
||||
* @param partials {Object} Object holding parts of a template.
|
||||
* @return {Element} A DOM element holding the parsed template data.
|
||||
*/
|
||||
renderToNode : function(template, view, partials) {
|
||||
var renderedTmpl = this.render(template, view, partials);
|
||||
return this._createNodeFromTemplate(renderedTmpl);
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper method which provides you with a direct access to templates
|
||||
* stored as HTML in the DOM. The DOM node with the given ID will be used
|
||||
* as a template, parsed and a new DOM node will be returned containing the
|
||||
* parsed data. Keep in mind to have only one root DOM element in the the
|
||||
* template.
|
||||
* Additionally, you should not put the template into a regular, hidden
|
||||
* DOM element because the template may not be valid HTML due to the containing
|
||||
* mustache tags. We suggest to put it into a script tag with the type
|
||||
* <code>text/template</code>.
|
||||
*
|
||||
* @param id {String} The id of the HTML template in the DOM.
|
||||
* @param view {Object} The object holding the data to render.
|
||||
* @param partials {Object} Object holding parts of a template.
|
||||
* @return {Element} A DOM element holding the parsed template data.
|
||||
*/
|
||||
get : function(id, view, partials) {
|
||||
// get the content stored in the DOM
|
||||
var template = document.getElementById(id);
|
||||
return this.renderToNode(template.innerHTML, view, partials);
|
||||
},
|
||||
|
||||
/**
|
||||
* Accepts a parsed template and returns a (potentially nested) node.
|
||||
*
|
||||
* @param template {String} The String containing the template.
|
||||
* @return {Element} A DOM element holding the parsed template data.
|
||||
*/
|
||||
_createNodeFromTemplate : function(template) {
|
||||
// template is text only (no html elems) so use text node
|
||||
if (template.search(/<|>/) === -1) {
|
||||
return document.createTextNode(template);
|
||||
}
|
||||
|
||||
// template has html elems so convert string into DOM nodes
|
||||
var helper = qx.dom.Element.create("div");
|
||||
helper.innerHTML = template;
|
||||
|
||||
return helper.children[0];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
(function() {
|
||||
// prevent using CommonJS exports object,
|
||||
// by shadowing global exports object
|
||||
var exports;
|
||||
|
||||
// prevent using AMD compatible loader,
|
||||
// by shadowing global define function
|
||||
var define;
|
||||
|
||||
/**
|
||||
* Below is the original mustache.js code. Snapshot date is mentioned in
|
||||
* the head of this file.
|
||||
* @ignore(exports)
|
||||
* @ignore(define.*)
|
||||
* @ignore(module.*)
|
||||
* @lint ignoreNoLoopBlock()
|
||||
*/
|
4
node_modules/mustache/wrappers/yui3/mustache.js.post
generated
vendored
Normal file
4
node_modules/mustache/wrappers/yui3/mustache.js.post
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
Y.mustache = Mustache.render;
|
||||
|
||||
}, "0");
|
1
node_modules/mustache/wrappers/yui3/mustache.js.pre
generated
vendored
Normal file
1
node_modules/mustache/wrappers/yui3/mustache.js.pre
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
YUI.add("mustache", function(Y) {
|
Reference in New Issue
Block a user