diff --git a/common/static/js/capa/design-protein-2d.js b/common/static/js/capa/design-protein-2d.js index c0db798e2c..18945a401a 100644 --- a/common/static/js/capa/design-protein-2d.js +++ b/common/static/js/capa/design-protein-2d.js @@ -7,39 +7,15 @@ if (typeof(protex) !== "undefined" && protex) { protex.onInjectionDone("protex"); } - /*if (typeof(protex) !== "undefined") { - //initializeProtex(); - }*/ + if (typeof(protex) !== "undefined") { + initializeProtex(); + } else { setTimeout(function() { waitForProtex(); }, timeout); } } - //NOTE: - // Protex uses three global functions: - // protexSetTargetShape (exported from GWT) - // exported protexCheckAnswer (exported from GWT) - // It calls protexIsReady with a deferred command when it has finished - // initialization and has drawn itself - - protexIsReady = function() { - //Load target shape - var target_shape = $('#target_shape').val(); - protexSetTargetShape(target_shape); - - //Get answer from protex and store it into the hidden input field - //when Check button is clicked - var problem = $('#protex_container').parents('.problem'); - var check_button = problem.find('input.check'); - var input_field = problem.find('input[type=hidden]'); - check_button.on('click', function() { - var protex_answer = protexCheckAnswer(); - var value = {protex_answer: protex_answer}; - input_field.val(JSON.stringify(value)); - }); - }; - - /*function initializeProtex() { + function initializeProtex() { //Check to see if the two exported GWT functions protexSetTargetShape // and protexCheckAnswer have been appended to global scope -- this //happens at the end of onModuleLoad() in GWT @@ -69,5 +45,5 @@ else { setTimeout(function() {initializeProtex(); }, timeout); } - }*/ + } }).call(this); diff --git a/common/static/js/capa/protex/00950A947CFA1ACD8CC83306B9515908.cache.html b/common/static/js/capa/protex/00950A947CFA1ACD8CC83306B9515908.cache.html new file mode 100644 index 0000000000..c236939b62 --- /dev/null +++ b/common/static/js/capa/protex/00950A947CFA1ACD8CC83306B9515908.cache.html @@ -0,0 +1,750 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/protex/0096DE2845FBF7D7D836936320AD0AC4.cache.html b/common/static/js/capa/protex/0096DE2845FBF7D7D836936320AD0AC4.cache.html new file mode 100644 index 0000000000..4bf742011f --- /dev/null +++ b/common/static/js/capa/protex/0096DE2845FBF7D7D836936320AD0AC4.cache.html @@ -0,0 +1,746 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/protex/356E8E1EA8930F0EA56B8973ACF7A92B.cache.html b/common/static/js/capa/protex/356E8E1EA8930F0EA56B8973ACF7A92B.cache.html new file mode 100644 index 0000000000..5b7a580be5 --- /dev/null +++ b/common/static/js/capa/protex/356E8E1EA8930F0EA56B8973ACF7A92B.cache.html @@ -0,0 +1,735 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/protex/39CC89519B0E1FCB47B935AC9FE13D7B.cache.html b/common/static/js/capa/protex/39CC89519B0E1FCB47B935AC9FE13D7B.cache.html deleted file mode 100644 index e5db692aac..0000000000 --- a/common/static/js/capa/protex/39CC89519B0E1FCB47B935AC9FE13D7B.cache.html +++ /dev/null @@ -1,743 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/protex/5CE0BC9042E03326D1C86C810404FE4A.cache.html b/common/static/js/capa/protex/5CE0BC9042E03326D1C86C810404FE4A.cache.html new file mode 100644 index 0000000000..b5b610878c --- /dev/null +++ b/common/static/js/capa/protex/5CE0BC9042E03326D1C86C810404FE4A.cache.html @@ -0,0 +1,742 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/protex/6E05B1CD5BFCAF7D53C7C64D84318178.cache.html b/common/static/js/capa/protex/6E05B1CD5BFCAF7D53C7C64D84318178.cache.html deleted file mode 100644 index ce6b444862..0000000000 --- a/common/static/js/capa/protex/6E05B1CD5BFCAF7D53C7C64D84318178.cache.html +++ /dev/null @@ -1,750 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/protex/89DCE0145624582CBBEEA35B857D07CD.cache.html b/common/static/js/capa/protex/89DCE0145624582CBBEEA35B857D07CD.cache.html new file mode 100644 index 0000000000..501abe3613 --- /dev/null +++ b/common/static/js/capa/protex/89DCE0145624582CBBEEA35B857D07CD.cache.html @@ -0,0 +1,759 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/protex/8D83FC6A58D4713A62FE989ECFDECF12.cache.html b/common/static/js/capa/protex/8D83FC6A58D4713A62FE989ECFDECF12.cache.html new file mode 100644 index 0000000000..010508a13d --- /dev/null +++ b/common/static/js/capa/protex/8D83FC6A58D4713A62FE989ECFDECF12.cache.html @@ -0,0 +1,742 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/protex/C824A958AB642DC2213DFFDAC640BEAA.cache.html b/common/static/js/capa/protex/C824A958AB642DC2213DFFDAC640BEAA.cache.html deleted file mode 100644 index f84a8b9822..0000000000 --- a/common/static/js/capa/protex/C824A958AB642DC2213DFFDAC640BEAA.cache.html +++ /dev/null @@ -1,760 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/protex/D9267DE8FB02F8B995B4A58C66C76E29.cache.html b/common/static/js/capa/protex/D9267DE8FB02F8B995B4A58C66C76E29.cache.html deleted file mode 100644 index b6fc4f6a08..0000000000 --- a/common/static/js/capa/protex/D9267DE8FB02F8B995B4A58C66C76E29.cache.html +++ /dev/null @@ -1,758 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/protex/F275492F7098103BCB05F4F86ABF6218.cache.html b/common/static/js/capa/protex/F275492F7098103BCB05F4F86ABF6218.cache.html deleted file mode 100644 index 311c82b3a0..0000000000 --- a/common/static/js/capa/protex/F275492F7098103BCB05F4F86ABF6218.cache.html +++ /dev/null @@ -1,750 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/protex/F3301B0E65F38C7FCF2EF3764B3BB0B6.cache.html b/common/static/js/capa/protex/F3301B0E65F38C7FCF2EF3764B3BB0B6.cache.html deleted file mode 100644 index f39f0d68d2..0000000000 --- a/common/static/js/capa/protex/F3301B0E65F38C7FCF2EF3764B3BB0B6.cache.html +++ /dev/null @@ -1,754 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/protex/protex.nocache.js b/common/static/js/capa/protex/protex.nocache.js index 77f770bf9c..034032fe6b 100644 --- a/common/static/js/capa/protex/protex.nocache.js +++ b/common/static/js/capa/protex/protex.nocache.js @@ -1,4 +1,4 @@ -function protex(){var P='',xb='" for "gwt:onLoadErrorFn"',vb='" for "gwt:onPropertyErrorFn"',ib='"><\/script>',Z='#',Xb='.cache.html',_='/',lb='//',Qb='39CC89519B0E1FCB47B935AC9FE13D7B',Rb='6E05B1CD5BFCAF7D53C7C64D84318178',Wb=':',pb='::',dc='