Difference between revisions of "Team:Greece/Description scripts"

Line 1: Line 1:
 
function importScientific(){
 
function importScientific(){
  
/* Sub section 1 */
+
/* Sub section 1 and General (titles and src) */
 
   $.ajax({
 
   $.ajax({
 
     "url": 'https://static.igem.org/mediawiki/2017/0/0c/Greekom_subsection1.txt',
 
     "url": 'https://static.igem.org/mediawiki/2017/0/0c/Greekom_subsection1.txt',
Line 16: Line 16:
  
 
/* Header */
 
/* Header */
 +
    $('#header').html('Project Description');
 
     $('#sub_header_1').html('Bio-logical Information Processing');
 
     $('#sub_header_1').html('Bio-logical Information Processing');
 +
    $('#sub_header_3').html('Applications of biological computers');
 +
    $('#sub_header_4').html('pANDORRA: a biological computer to treat cancer');
 +
    $('#sub_header_5').html('Why colorectal cancer?');
 +
    $('#sub_header_6').html('Transference to cancer cells');
  
/* Section */
+
/* Images */
 +
$('#image_1').attr({'src' : 'https://static.igem.org/mediawiki/2017/3/36/Greekom_image1.png'});
 +
$('#image_2').attr({'src' : 'https://static.igem.org/mediawiki/2017/b/b1/Greekom_image2_glance.png'});
 +
$('#image_3').attr({'src' : ''});
 +
 
 +
/* Section 1 */
 
     $('#sub_section_1').html(data);
 
     $('#sub_section_1').html(data);
 
$('#image_1').attr({'src': 'https://static.igem.org/mediawiki/2017/3/36/Greekom_image1.png'});
 
  
 
     console.log('This is from console alone' + data);
 
     console.log('This is from console alone' + data);
Line 39: Line 47:
 
/* Section */
 
/* Section */
 
     $('#sub_section_2').html(data);
 
     $('#sub_section_2').html(data);
 +
 +
}).fail(function(jqxhr, textStatus, errorThrown) {
 +
    //Write code to be executed when the request FAILS.
 +
});
 +
 +
/* Sub section 3 */
 +
  $.ajax({
 +
    "url": 'https://static.igem.org/mediawiki/2017/3/34/Greekom_subsection3_glance.txt',
 +
    "type": "GET",
 +
    "dataType": "text",
 +
    "timeout": 10000,
 +
    "data": {}
 +
}).done(function(data, textStatus, jqxhr) {
 +
 +
/* Section */
 +
    $('#sub_section_3').html(data);
 +
 +
}).fail(function(jqxhr, textStatus, errorThrown) {
 +
    //Write code to be executed when the request FAILS.
 +
});
 +
 +
/* Sub section 4 */
 +
  $.ajax({
 +
    "url": 'https://static.igem.org/mediawiki/2017/2/21/Greekom_subsection4_glance.txt',
 +
    "type": "GET",
 +
    "dataType": "text",
 +
    "timeout": 10000,
 +
    "data": {}
 +
}).done(function(data, textStatus, jqxhr) {
 +
 +
/* Section */
 +
    $('#sub_section_4').html(data);
 +
 +
}).fail(function(jqxhr, textStatus, errorThrown) {
 +
    //Write code to be executed when the request FAILS.
 +
});
 +
 +
/* Sub section 5 */
 +
  $.ajax({
 +
    "url": 'https://static.igem.org/mediawiki/2017/0/06/Greekom_subsection5_glance.txt',
 +
    "type": "GET",
 +
    "dataType": "text",
 +
    "timeout": 10000,
 +
    "data": {}
 +
}).done(function(data, textStatus, jqxhr) {
 +
 +
/* Section */
 +
    $('#sub_section_5').html(data);
 +
 +
}).fail(function(jqxhr, textStatus, errorThrown) {
 +
    //Write code to be executed when the request FAILS.
 +
});
 +
 +
/* Sub section 6 */
 +
  $.ajax({
 +
    "url": 'https://static.igem.org/mediawiki/2017/c/ca/Greekom_subsection6_glance.txt',
 +
    "type": "GET",
 +
    "dataType": "text",
 +
    "timeout": 10000,
 +
    "data": {}
 +
}).done(function(data, textStatus, jqxhr) {
 +
 +
/* Section */
 +
    $('#sub_section_6').html(data);
 +
 +
}).fail(function(jqxhr, textStatus, errorThrown) {
 +
    //Write code to be executed when the request FAILS.
 +
});
 +
 +
/* Sub section 7 */
 +
  $.ajax({
 +
    "url": 'https://static.igem.org/mediawiki/2017/0/07/Greekom_subsection7_glance.txt',
 +
    "type": "GET",
 +
    "dataType": "text",
 +
    "timeout": 10000,
 +
    "data": {}
 +
}).done(function(data, textStatus, jqxhr) {
 +
 +
/* Section */
 +
    $('#sub_section_7').html(data);
  
 
}).fail(function(jqxhr, textStatus, errorThrown) {
 
}).fail(function(jqxhr, textStatus, errorThrown) {

Revision as of 21:40, 23 October 2017

function importScientific(){

/* Sub section 1 and General (titles and src) */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/0/0c/Greekom_subsection1.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* General - Execute once */

   $('#label').html('At a glance');
   $('#mode').val('simple');
   $('#label').css('right', '199px');

/* Header */

   $('#header').html('Project Description');
   $('#sub_header_1').html('Bio-logical Information Processing');
   $('#sub_header_3').html('Applications of biological computers');
   $('#sub_header_4').html('pANDORRA: a biological computer to treat cancer');
   $('#sub_header_5').html('Why colorectal cancer?');
   $('#sub_header_6').html('Transference to cancer cells');

/* Images */ $('#image_1').attr({'src' : 'https://static.igem.org/mediawiki/2017/3/36/Greekom_image1.png'}); $('#image_2').attr({'src' : 'https://static.igem.org/mediawiki/2017/b/b1/Greekom_image2_glance.png'}); $('#image_3').attr({'src' : });

/* Section 1 */

   $('#sub_section_1').html(data);
   console.log('This is from console alone' + data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

/* Sub section 2 */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/d/d0/Greekom_subsection2.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* Section */

   $('#sub_section_2').html(data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

/* Sub section 3 */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/3/34/Greekom_subsection3_glance.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* Section */

   $('#sub_section_3').html(data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

/* Sub section 4 */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/2/21/Greekom_subsection4_glance.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* Section */

   $('#sub_section_4').html(data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

/* Sub section 5 */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/0/06/Greekom_subsection5_glance.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* Section */

   $('#sub_section_5').html(data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

/* Sub section 6 */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/c/ca/Greekom_subsection6_glance.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* Section */

   $('#sub_section_6').html(data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

/* Sub section 7 */

  $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/0/07/Greekom_subsection7_glance.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

/* Section */

   $('#sub_section_7').html(data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

$('#Description').removeClass('grayscale');

}

function importGeneral(){

 $.ajax({
   "url": 'https://static.igem.org/mediawiki/2017/2/24/GreeKom_front.txt', //'https://static.igem.org/mediawiki/2017/2/23/Front.txt',
   "type": "GET",
   "dataType": "text",
   "timeout": 10000,
   "data": {}

}).done(function(data, textStatus, jqxhr) {

   $('#description_content').html(data);
   $('#mode').val('scientific');
   $('#label').html('In depth');
   $('#label').css('right', '210px');
   console.log('This is from console alone' + data);

}).fail(function(jqxhr, textStatus, errorThrown) {

   //Write code to be executed when the request FAILS.

});

$('#Description').addClass('grayscale');

}