Commit 15249b03 by David Ormsbee

Merge pull request #1296 from MITx/hotfix/alex/gst

Hotfix/alex/gst
parents fd20496a 176be159
...@@ -24,11 +24,10 @@ class GraphicalSliderToolModule(XModule): ...@@ -24,11 +24,10 @@ class GraphicalSliderToolModule(XModule):
''' '''
js = { js = {
'coffee': [resource_string(__name__, 'js/src/javascript_loader.coffee')],
'js': [ 'js': [
# 3rd party libraries used by graphic slider tool. # 3rd party libraries used by graphic slider tool.
# TODO - where to store them - outside xmodule? # TODO - where to store them - outside xmodule?
resource_string(__name__, 'js/src/graphical_slider_tool/jstat-1.0.0.min.js'),
resource_string(__name__, 'js/src/graphical_slider_tool/gst_main.js'), resource_string(__name__, 'js/src/graphical_slider_tool/gst_main.js'),
resource_string(__name__, 'js/src/graphical_slider_tool/state.js'), resource_string(__name__, 'js/src/graphical_slider_tool/state.js'),
resource_string(__name__, 'js/src/graphical_slider_tool/logme.js'), resource_string(__name__, 'js/src/graphical_slider_tool/logme.js'),
...@@ -38,8 +37,8 @@ class GraphicalSliderToolModule(XModule): ...@@ -38,8 +37,8 @@ class GraphicalSliderToolModule(XModule):
resource_string(__name__, 'js/src/graphical_slider_tool/graph.js'), resource_string(__name__, 'js/src/graphical_slider_tool/graph.js'),
resource_string(__name__, 'js/src/graphical_slider_tool/el_output.js'), resource_string(__name__, 'js/src/graphical_slider_tool/el_output.js'),
resource_string(__name__, 'js/src/graphical_slider_tool/g_label_el_output.js'), resource_string(__name__, 'js/src/graphical_slider_tool/g_label_el_output.js'),
resource_string(__name__, 'js/src/graphical_slider_tool/gst.js') resource_string(__name__, 'js/src/graphical_slider_tool/gst.js')
] ]
} }
js_module_name = "GraphicalSliderTool" js_module_name = "GraphicalSliderTool"
......
...@@ -401,7 +401,7 @@ define('Graph', ['logme'], function (logme) { ...@@ -401,7 +401,7 @@ define('Graph', ['logme'], function (logme) {
return false; return false;
} }
} else { } else {
logme('MESSAGE: "xticks" were not specified. Using defaults.'); // logme('MESSAGE: "xticks" were not specified. Using defaults.');
return false; return false;
} }
...@@ -416,7 +416,7 @@ define('Graph', ['logme'], function (logme) { ...@@ -416,7 +416,7 @@ define('Graph', ['logme'], function (logme) {
return false; return false;
} }
} else { } else {
logme('MESSAGE: "yticks" were not specified. Using defaults.'); // logme('MESSAGE: "yticks" were not specified. Using defaults.');
return false; return false;
} }
......
...@@ -14,7 +14,9 @@ window.GraphicalSliderTool = function (el) { ...@@ -14,7 +14,9 @@ window.GraphicalSliderTool = function (el) {
// with a unique DOM ID), we will iterate over all children, and for // with a unique DOM ID), we will iterate over all children, and for
// each match, we will call GstMain module. // each match, we will call GstMain module.
$(el).children('.graphical_slider_tool').each(function (index, value) { $(el).children('.graphical_slider_tool').each(function (index, value) {
GstMain($(value).attr('id')); JavascriptLoader.executeModuleScripts($(value), function(){
GstMain($(value).attr('id'));
});
}); });
}); });
}; };
...@@ -19,7 +19,7 @@ define( ...@@ -19,7 +19,7 @@ define(
if ($('#' + gstId).attr('data-processed') !== 'processed') { if ($('#' + gstId).attr('data-processed') !== 'processed') {
$('#' + gstId).attr('data-processed', 'processed'); $('#' + gstId).attr('data-processed', 'processed');
} else { } else {
logme('MESSAGE: Already processed GST with ID ' + gstId + '. Skipping.'); // logme('MESSAGE: Already processed GST with ID ' + gstId + '. Skipping.');
return; return;
} }
......
...@@ -20,9 +20,9 @@ define('Sliders', ['logme'], function (logme) { ...@@ -20,9 +20,9 @@ define('Sliders', ['logme'], function (logme) {
} else if (sliderDiv.length > 1) { } else if (sliderDiv.length > 1) {
logme('ERROR: Found more than one slider for the parameter "' + paramName + '".'); logme('ERROR: Found more than one slider for the parameter "' + paramName + '".');
logme('sliderDiv.length = ', sliderDiv.length); logme('sliderDiv.length = ', sliderDiv.length);
} else { } // else {
logme('MESSAGE: Did not find a slider for the parameter "' + paramName + '".'); // logme('MESSAGE: Did not find a slider for the parameter "' + paramName + '".');
} // }
} }
function createSlider(sliderDiv, paramName) { function createSlider(sliderDiv, paramName) {
......
...@@ -24,7 +24,7 @@ define('State', ['logme'], function (logme) { ...@@ -24,7 +24,7 @@ define('State', ['logme'], function (logme) {
dynamicElByElId = {}; dynamicElByElId = {};
stateInst += 1; stateInst += 1;
logme('MESSAGE: Creating state instance # ' + stateInst + '.'); // logme('MESSAGE: Creating state instance # ' + stateInst + '.');
// Initially, there are no parameters to track. So, we will instantiate // Initially, there are no parameters to track. So, we will instantiate
// an empty object. // an empty object.
......
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