Commit e3b4d78d by David Ormsbee

IE7 compatibility: no trailing commas in arrays, including the third party…

IE7 compatibility: no trailing commas in arrays, including the third party json2.js lib because IE<8 has no JSON object.
parent 7596deb4
...@@ -1953,7 +1953,7 @@ cktsim = (function() { ...@@ -1953,7 +1953,7 @@ cktsim = (function() {
var module = { var module = {
'Circuit': Circuit, 'Circuit': Circuit,
'parse_number': parse_number, 'parse_number': parse_number,
'parse_source': parse_source, 'parse_source': parse_source
} }
return module; return module;
}()); }());
...@@ -2068,7 +2068,7 @@ schematic = (function() { ...@@ -2068,7 +2068,7 @@ schematic = (function() {
'n': [NFet, 'NFet'], 'n': [NFet, 'NFet'],
'p': [PFet, 'PFet'], 'p': [PFet, 'PFet'],
's': [Probe, 'Voltage Probe'], 's': [Probe, 'Voltage Probe'],
'a': [Ammeter, 'Current Probe'], 'a': [Ammeter, 'Current Probe']
}; };
// global clipboard // global clipboard
...@@ -5502,7 +5502,7 @@ schematic = (function() { ...@@ -5502,7 +5502,7 @@ schematic = (function() {
'magenta' : 'rgb(255,64,255)', 'magenta' : 'rgb(255,64,255)',
'yellow': 'rgb(255,255,64)', 'yellow': 'rgb(255,255,64)',
'black': 'rgb(0,0,0)', 'black': 'rgb(0,0,0)',
'x-axis': undefined, 'x-axis': undefined
}; };
function Probe(x,y,rotation,color,offset) { function Probe(x,y,rotation,color,offset) {
...@@ -6100,7 +6100,7 @@ schematic = (function() { ...@@ -6100,7 +6100,7 @@ schematic = (function() {
'Amplitude', 'Amplitude',
'Frequency (Hz)', 'Frequency (Hz)',
'Delay until sin starts (secs)', 'Delay until sin starts (secs)',
'Phase offset (degrees)'], 'Phase offset (degrees)']
} }
// build property editor div // build property editor div
...@@ -6300,7 +6300,7 @@ schematic = (function() { ...@@ -6300,7 +6300,7 @@ schematic = (function() {
var module = { var module = {
'Schematic': Schematic, 'Schematic': Schematic,
'component_slider': component_slider, 'component_slider': component_slider
} }
return module; return module;
}()); }());
...@@ -404,6 +404,7 @@ courseware_only_js += [ ...@@ -404,6 +404,7 @@ courseware_only_js += [
] ]
main_vendor_js = [ main_vendor_js = [
'js/vendor/json2.js',
'js/vendor/jquery.min.js', 'js/vendor/jquery.min.js',
'js/vendor/jquery-ui.min.js', 'js/vendor/jquery-ui.min.js',
'js/vendor/jquery.cookie.js', 'js/vendor/jquery.cookie.js',
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
CSRFProtection: function(xhr) { CSRFProtection: function(xhr) {
var token = $.cookie('csrftoken'); var token = $.cookie('csrftoken');
if (token) xhr.setRequestHeader('X-CSRFToken', token); if (token) xhr.setRequestHeader('X-CSRFToken', token);
}, }
} }
$.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { form_ext.CSRFProtection(xhr); }}); $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { form_ext.CSRFProtection(xhr); }});
$(document).delegate('form', 'submit', function(e) { $(document).delegate('form', 'submit', function(e) {
......
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