Commit 00caccd1 authored by rlanvin's avatar rlanvin

Fix non_amd.html

- converse-muc.js was overriding the global "converse" variable
  with undefind (the factory function didn't return anything)
- locales was not defined in utils.js in non AMD (not passed in
  the factory function)
parent a687e87e
......@@ -47,7 +47,8 @@
<script type="text/javascript" src="builds/locales.js"></script>
<script type="text/javascript" src="builds/templates.js"></script>
<script type="text/javascript" src="src/utils.js"></script>
<script type="text/javascript" src="converse.js"></script>
<script type="text/javascript" src="src/converse-core.js"></script>
<script type="text/javascript" src="src/converse-muc.js"></script>
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-custom">
<section class="intro">
......
......@@ -19,7 +19,7 @@
// In this case, the dependencies need to be available already as
// global variables, and should be loaded separately via *script* tags.
// See the file **non_amd.html** for an example of this usecase.
root.converse = factory(converse, utils);
factory(converse, utils);
}
}(this, function (converse_api, utils) {
// Strophe methods for building stanzas
......
/*global jQuery, templates, escape, Jed, _ */
/*global jQuery, templates, escape, Jed, _, locales */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(["jquery", "underscore", "converse-templates", "locales"], factory);
} else {
root.utils = factory(jQuery, _, templates);
root.utils = factory(jQuery, _, templates, locales);
}
}(this, function ($, _, templates, locales) {
"use strict";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment