From 9dbe91190738dae5fc9a2dcc93964841c2b4f8e3 Mon Sep 17 00:00:00 2001 From: jmclaus Date: Wed, 13 Feb 2013 09:45:44 +0100 Subject: [PATCH 1/2] Back to last version of Protex --- common/static/js/capa/design-protein-2d.js | 35 +- ...0950A947CFA1ACD8CC83306B9515908.cache.html | 750 ----------------- ...096DE2845FBF7D7D836936320AD0AC4.cache.html | 746 ----------------- ...56E8E1EA8930F0EA56B8973ACF7A92B.cache.html | 735 ----------------- ...9CC89519B0E1FCB47B935AC9FE13D7B.cache.html | 743 +++++++++++++++++ ...CE0BC9042E03326D1C86C810404FE4A.cache.html | 742 ----------------- ...E05B1CD5BFCAF7D53C7C64D84318178.cache.html | 750 +++++++++++++++++ ...9DCE0145624582CBBEEA35B857D07CD.cache.html | 759 ----------------- ...D83FC6A58D4713A62FE989ECFDECF12.cache.html | 742 ----------------- ...824A958AB642DC2213DFFDAC640BEAA.cache.html | 760 ++++++++++++++++++ ...9267DE8FB02F8B995B4A58C66C76E29.cache.html | 758 +++++++++++++++++ ...275492F7098103BCB05F4F86ABF6218.cache.html | 750 +++++++++++++++++ ...3301B0E65F38C7FCF2EF3764B3BB0B6.cache.html | 754 +++++++++++++++++ .../static/js/capa/protex/protex.nocache.js | 4 +- 14 files changed, 4547 insertions(+), 4481 deletions(-) delete mode 100644 common/static/js/capa/protex/00950A947CFA1ACD8CC83306B9515908.cache.html delete mode 100644 common/static/js/capa/protex/0096DE2845FBF7D7D836936320AD0AC4.cache.html delete mode 100644 common/static/js/capa/protex/356E8E1EA8930F0EA56B8973ACF7A92B.cache.html create mode 100644 common/static/js/capa/protex/39CC89519B0E1FCB47B935AC9FE13D7B.cache.html delete mode 100644 common/static/js/capa/protex/5CE0BC9042E03326D1C86C810404FE4A.cache.html create mode 100644 common/static/js/capa/protex/6E05B1CD5BFCAF7D53C7C64D84318178.cache.html delete mode 100644 common/static/js/capa/protex/89DCE0145624582CBBEEA35B857D07CD.cache.html delete mode 100644 common/static/js/capa/protex/8D83FC6A58D4713A62FE989ECFDECF12.cache.html create mode 100644 common/static/js/capa/protex/C824A958AB642DC2213DFFDAC640BEAA.cache.html create mode 100644 common/static/js/capa/protex/D9267DE8FB02F8B995B4A58C66C76E29.cache.html create mode 100644 common/static/js/capa/protex/F275492F7098103BCB05F4F86ABF6218.cache.html create mode 100644 common/static/js/capa/protex/F3301B0E65F38C7FCF2EF3764B3BB0B6.cache.html diff --git a/common/static/js/capa/design-protein-2d.js b/common/static/js/capa/design-protein-2d.js index 18945a401a..fb97b93956 100644 --- a/common/static/js/capa/design-protein-2d.js +++ b/common/static/js/capa/design-protein-2d.js @@ -7,15 +7,40 @@ if (typeof(protex) !== "undefined" && protex) { protex.onInjectionDone("protex"); } - if (typeof(protex) !== "undefined") { - initializeProtex(); - } + /*if (typeof(protex) !== "undefined") { + //initializeProtex(); + }*/ else { setTimeout(function() { waitForProtex(); }, timeout); } } - function initializeProtex() { + //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)); + console.log(JSON.stringify(value)); + }); + }; + + /*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 @@ -45,5 +70,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 deleted file mode 100644 index c236939b62..0000000000 --- a/common/static/js/capa/protex/00950A947CFA1ACD8CC83306B9515908.cache.html +++ /dev/null @@ -1,750 +0,0 @@ - - - - \ 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 deleted file mode 100644 index 4bf742011f..0000000000 --- a/common/static/js/capa/protex/0096DE2845FBF7D7D836936320AD0AC4.cache.html +++ /dev/null @@ -1,746 +0,0 @@ - - - - \ 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 deleted file mode 100644 index 5b7a580be5..0000000000 --- a/common/static/js/capa/protex/356E8E1EA8930F0EA56B8973ACF7A92B.cache.html +++ /dev/null @@ -1,735 +0,0 @@ - - - - \ 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 new file mode 100644 index 0000000000..e5db692aac --- /dev/null +++ b/common/static/js/capa/protex/39CC89519B0E1FCB47B935AC9FE13D7B.cache.html @@ -0,0 +1,743 @@ + + + + \ 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 deleted file mode 100644 index b5b610878c..0000000000 --- a/common/static/js/capa/protex/5CE0BC9042E03326D1C86C810404FE4A.cache.html +++ /dev/null @@ -1,742 +0,0 @@ - - - - \ 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 new file mode 100644 index 0000000000..ce6b444862 --- /dev/null +++ b/common/static/js/capa/protex/6E05B1CD5BFCAF7D53C7C64D84318178.cache.html @@ -0,0 +1,750 @@ + + + + \ 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 deleted file mode 100644 index 501abe3613..0000000000 --- a/common/static/js/capa/protex/89DCE0145624582CBBEEA35B857D07CD.cache.html +++ /dev/null @@ -1,759 +0,0 @@ - - - - \ 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 deleted file mode 100644 index 010508a13d..0000000000 --- a/common/static/js/capa/protex/8D83FC6A58D4713A62FE989ECFDECF12.cache.html +++ /dev/null @@ -1,742 +0,0 @@ - - - - \ 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 new file mode 100644 index 0000000000..f84a8b9822 --- /dev/null +++ b/common/static/js/capa/protex/C824A958AB642DC2213DFFDAC640BEAA.cache.html @@ -0,0 +1,760 @@ + + + + \ 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 new file mode 100644 index 0000000000..b6fc4f6a08 --- /dev/null +++ b/common/static/js/capa/protex/D9267DE8FB02F8B995B4A58C66C76E29.cache.html @@ -0,0 +1,758 @@ + + + + \ 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 new file mode 100644 index 0000000000..311c82b3a0 --- /dev/null +++ b/common/static/js/capa/protex/F275492F7098103BCB05F4F86ABF6218.cache.html @@ -0,0 +1,750 @@ + + + + \ 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 new file mode 100644 index 0000000000..f39f0d68d2 --- /dev/null +++ b/common/static/js/capa/protex/F3301B0E65F38C7FCF2EF3764B3BB0B6.cache.html @@ -0,0 +1,754 @@ + + + + \ 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 034032fe6b..77f770bf9c 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='00950A947CFA1ACD8CC83306B9515908',Rb='0096DE2845FBF7D7D836936320AD0AC4',Sb='356E8E1EA8930F0EA56B8973ACF7A92B',Tb='5CE0BC9042E03326D1C86C810404FE4A',Ub='89DCE0145624582CBBEEA35B857D07CD',Vb='8D83FC6A58D4713A62FE989ECFDECF12',Wb=':',pb='::',dc='