jaroslav@1189: /* jaroslav@1189: * HTML via Java(tm) Language Bindings jaroslav@1189: * Copyright (C) 2013 Jaroslav Tulach jaroslav@1189: * jaroslav@1189: * This program is free software: you can redistribute it and/or modify jaroslav@1189: * it under the terms of the GNU General Public License as published by jaroslav@1189: * the Free Software Foundation, version 2 of the License. jaroslav@1189: * jaroslav@1189: * This program is distributed in the hope that it will be useful, jaroslav@1189: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1189: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1189: * GNU General Public License for more details. apidesign.org jaroslav@1189: * designates this particular file as subject to the jaroslav@1189: * "Classpath" exception as provided by apidesign.org jaroslav@1189: * in the License file that accompanied this code. jaroslav@1189: * jaroslav@1189: * You should have received a copy of the GNU General Public License jaroslav@1189: * along with this program. Look for COPYING file in the top folder. jaroslav@1189: * If not, see http://wiki.apidesign.org/wiki/GPLwithClassPathException jaroslav@1189: */ jaroslav@1189: // Knockout JavaScript library v2.2.1 jaroslav@1189: // (c) Steven Sanderson - http://knockoutjs.com/ jaroslav@1189: // License: MIT (http://www.opensource.org/licenses/mit-license.php) jaroslav@1189: jaroslav@1189: (function(){ jaroslav@1189: var DEBUG=true; jaroslav@1189: (function(window,document,navigator,jQuery,undefined){ jaroslav@1189: !function(factory) { jaroslav@1189: // Support three module loading scenarios jaroslav@1189: if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') { jaroslav@1189: // [1] CommonJS/Node.js jaroslav@1189: var target = module['exports'] || exports; // module.exports is for Node.js jaroslav@1189: factory(target); jaroslav@1189: } else if (typeof define === 'function' && define['amd']) { jaroslav@1189: // [2] AMD anonymous module jaroslav@1189: define(['exports'], factory); jaroslav@1189: } else { jaroslav@1189: // [3] No module loader (plain "); jaroslav@1189: }; jaroslav@1189: jaroslav@1189: if (jQueryTmplVersion > 0) { jaroslav@1189: jQuery['tmpl']['tag']['ko_code'] = { jaroslav@1189: open: "__.push($1 || '');" jaroslav@1189: }; jaroslav@1189: jQuery['tmpl']['tag']['ko_with'] = { jaroslav@1189: open: "with($1) {", jaroslav@1189: close: "} " jaroslav@1189: }; jaroslav@1189: } jaroslav@1189: }; jaroslav@1189: jaroslav@1189: ko.jqueryTmplTemplateEngine.prototype = new ko.templateEngine(); jaroslav@1189: jaroslav@1189: // Use this one by default *only if jquery.tmpl is referenced* jaroslav@1189: var jqueryTmplTemplateEngineInstance = new ko.jqueryTmplTemplateEngine(); jaroslav@1189: if (jqueryTmplTemplateEngineInstance.jQueryTmplVersion > 0) jaroslav@1189: ko.setTemplateEngine(jqueryTmplTemplateEngineInstance); jaroslav@1189: jaroslav@1189: ko.exportSymbol('jqueryTmplTemplateEngine', ko.jqueryTmplTemplateEngine); jaroslav@1189: })(); jaroslav@1189: }); jaroslav@1189: })(window,document,navigator,window["jQuery"]); jaroslav@1189: })();