Commit 3139f143 authored by Sven Franck's avatar Sven Franck

fixed display of jqplot when required as a module

parent 4819318d
......@@ -50,7 +50,10 @@
, queries: '../js/libs/jio/complex_queries'
, md5: '../js/libs/jio/md5'
, jio: '../js/libs/jio/jio'
// additional modules to be lazyloaded
// = these modules need to be excluded from main in build.js!
, gmaps: '../js/plugins/jquery-ui-map/jquery.ui.map.module'
, plot: '../js/plugins/jqplot/jqplot.module'
},
//Configure CommonJS packages. See http://requirejs.org/docs/api.html#packages
......@@ -75,6 +78,8 @@
, 'jio': { deps: ['md5'] }
, 'localstorage': { deps: ['jio'] }
, 'queries': { deps: ['jio'] }
, 'plot': { deps: ['jquery']}
, 'maps': { deps: ['jquery', 'jqm']}
},
//As of RequireJS 2.0.2, the dir above will be deleted before the
......@@ -347,11 +352,15 @@
modules: [
{
name: "main"
, excludeShallow: ["gmaps"]
, excludeShallow: ["gmaps, plot"]
},
{
name: "gmaps"
, exclude: ["jquery", "jqm"]
},
{
name: "plot"
, exclude: ["jquery"]
}
// // //Just specifying a module name means that module will be converted into
// // //a built file that contains all of its dependencies. If that module or any
......
This diff is collapsed.
......@@ -62,11 +62,11 @@ define(
'jio'
],
function(require, $, mobile, Controller, RenderJs){
RenderJs.bindReady(function () {
// RenderJs.bindReady(function () {
//
// });
});
$(document).on('pagebeforeshow', function(){
// $(document).on('pagebeforeshow', function(){
// var modules = $(this).jqmData("modules") || '';
// if(modules){
// require(modules.split(/\s*,\s*/), function(){
......@@ -76,7 +76,7 @@ define(
// console.log("got it");
// });
// }
});
// });
Controller.start();
}
......
......@@ -2,25 +2,20 @@
// will not trace HTML files = gadgets for dependencies
// so requiring dependencies from inside a gadget will exclude them from
// optimization and bundling
define([
'../js/plugins/jqplot/jquery.jqplot.min'
, '../js/plugins/jqplot/plugins/jqplot.barRenderer.min'
, '../js/plugins/jqplot/plugins/jqplot.logAxisRenderer.min'
, '../js/plugins/jqplot/plugins/jqplot.enhancedLegendRenderer.min'
, '../js/plugins/jqplot/plugins/jqplot.categoryAxisRenderer.min'
, '../js/plugins/jqplot/plugins/jqplot.canvasAxisTickRenderer.min'
, '../js/plugins/jqplot/plugins/jqplot.canvasTextRenderer.min'
, '../js/plugins/jqplot/plugins/jqplot.pointLabels.min'
], function (
plot
, BarRenderer
, LogAxisRenderer
, EnhancedLegendRenderer
, CategoryAxisRenderer
, CanvasAxisTickRenderer
, CanvasTextRenderer
, PointLabels
){
return $.jqplot;
}
define(['../js/plugins/jqplot/jquery.jqplot'],
function () {
require([
'../js/plugins/jqplot/plugins/jqplot.barRenderer'
, '../js/plugins/jqplot/plugins/jqplot.logAxisRenderer'
, '../js/plugins/jqplot/plugins/jqplot.categoryAxisRenderer'
, '../js/plugins/jqplot/plugins/jqplot.canvasAxisTickRenderer'
, '../js/plugins/jqplot/plugins/jqplot.canvasTextRenderer'
, '../js/plugins/jqplot/plugins/jqplot.pointLabels'
, '../js/plugins/jqplot/plugins/jqplot.enhancedLegendRenderer'
],
function (){
return $.jqplot;
}
);
}
);
\ No newline at end of file
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