Team:NTU Taiwan/javascript/index.js

From 2013.igem.org

(Difference between revisions)
 
Line 11: Line 11:
     });
     });
};
};
 +
var calendar_create = function(target){
var calendar_create = function(target){
     $(target).dp_calendar({
     $(target).dp_calendar({
-
         date_selected: Date.now(),
+
         date_selected: new Date(2013, 7, 09, 12, 0),
         show_datepicker: false,
         show_datepicker: false,
         order_by: 3,
         order_by: 3,
Line 224: Line 225:
     });
     });
};
};
-
 
var windowResize = function(){
var windowResize = function(){

Latest revision as of 03:06, 28 September 2013

var changeContent = function(html, loadcall, callback){

   $(".content").hide("slide", { direction: "left", easing: "easeOutExpo"}, 300).queue(function(){
       $(this).html(html);
       if(loadcall) {
           loadcall();
       }
       $(this).show("slide", { direction: "right", easing: "easeInOutQuart"}, 500).dequeue();
       if(callback) {
           callback();
       }
   });

};

var calendar_create = function(target){

   $(target).dp_calendar({
       date_selected: new Date(2013, 7, 09, 12, 0),
       show_datepicker: false,
       order_by: 3,
       format_ampm: true,
       events_array: [{
               startDate: new Date(2013, 1, 16, 12, 0),
               title: "Weekly Meeting",
               priority: 3
           },{
               startDate: new Date(2013, 1, 16, 14, 30),
               title: "Report Review by 李易遠",
               description: "李易遠:review0217 - Synthetic Biological Technology",
               priority: 1
           },{
               startDate: new Date(2013, 1, 16, 14, 30),
               title: "Report Review by 張宏宇",
               description: "張宏宇:review0217 - Synthetic biology new engineering rules for an emerging discipline",
               priority: 1
           },{
               startDate: new Date(2013, 1, 16, 14, 30),
               title: "Report Review by 呂宗諭",
               description: "呂宗諭:review0217 - DNA assembly",
               priority: 1
           },{
               startDate: new Date(2013, 1, 16, 14, 30),
               title: "介紹2012 iGEM各隊伍主題",
               description: "介紹2012 iGEM各隊伍主題",
               priority: 1
           },{
               startDate: new Date(2013, 1, 16, 14, 30),
               title: "討論題目",
               description: "1.  題名:染料、水果熟成控制、糞便尿液唾液、營養熱量測量、水族箱、養殖漁業、免疫檢測、沙漠化、珊瑚、芳香劑、避孕
2.查詢相關資料", priority: 1 },{ startDate: new Date(2013, 1, 23, 12, 0), title: "Weekly Meeting", priority: 3 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "報告醫學院的三個題目 by 李易遠", description: "1. 偵測土味
2. HIV 的receptor給細菌,利用細菌抓HIV病毒。類似抗體的技巧
3. 水耕植物:用細菌偵測鈉、鉀、磷的變換", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "Project資料與提案 - 水果 by 吳泰億 ", description: "1. 乙烯、乙炔在催熟中扮演的角色
2. 面臨問題 - 過量有害
3. 可嘗試方向 - 水果成熟度的分級、利用乙烯、偵測乙烯的儀器", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "Project資料與提案 - 水果 by Po-Hsien ", description: "1. 水果非破壞性檢測技術", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "Project資料與提案 - 養殖漁業 by 吳泰億 ", description: "A. 面臨的問題 寒冬、硝化細菌
B. 改善設施、飼料配方、抗寒基因的研究
C. 可嘗試方向 魚類的生態球", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "Project資料與提案 - 養殖漁業 by 王德緯 ", description: "A. Uncoupling protein 讓proton 通過 不會產生ATP但產生熱
B. 用合成生物學的方法好處:不需要燃油、電力
C. 評估需要消耗提供多少熱量、養分來餵我們的biological device", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "Project資料與提案 - 養殖漁業 by 呂宗諭 ", description: "A. 寒冷造成傷害的原因:太冷產生結晶、細胞膜會被破壞、免疫能力下降
B. AFP, AFGP、基改魚類、飼料", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "Project資料與提案 - 芳香劑 by 呂宗諭 ", description: "偵測臭味的receptor、濕度溫度、代謝臭味的分子、直接放出芳香物", priority: 1 },{ startDate: new Date(2013, 1, 23, 14, 0), title: "隊名 NTU BEST", description: "NTU BEST :Biochemistry Engineering Synbio Team", priority: 2 },{ startDate: new Date(2013, 2, 9, 12, 0), title: "Weekly Meeting", priority: 3 },{ startDate: new Date(2013, 2, 9, 14, 0), title: "主題評估 - 合成胞器", description: "需要克服:創新不足、困難度高", priority: 1 },{ startDate: new Date(2013, 2, 9, 14, 0), title: "主題評估 - 發熱菌株(採用)", description: "i.先前研究
ii.產熱效率:不足的話目標改為提升效率", priority: 2 },{ startDate: new Date(2013, 2, 9, 14, 0), title: "主題評估 - 高分子", description: "i. 很多人做過
ii. 需要議題", priority: 1 },{ startDate: new Date(2013, 2, 9, 14, 0), title: "主題評估 - 合成生物學玩具", description: "杜鵑花節做出prototype", priority: 1 },{ startDate: new Date(2013, 2, 16), endDate: new Date(2013, 2, 17), title: "台大杜鵑花節 - 合成生物學玩具", description: "WEBSITE COMMING SOON<img src=images/NTU_ALALEA_FESTIVAL.jpg>", priority: 3, frecuency: 1 },{ startDate: new Date(2013, 2, 23, 12, 0), title: "Weekly Meeting", priority: 3 },{ startDate: new Date(2013, 2, 23, 14, 0), title: "WET LAB老師接洽,實驗方法&應用層面", description: "a: 呂宗諭:漁科所
b: 張宏宇:梁國淦-發酵槽、熱卡計之儀器組裝與採買
c: 李易遠:陳彥榮-隊務", priority: 1 },{ startDate: new Date(2013, 2, 23, 14, 0), title: "DRY LAB模擬", description: "a: 模擬 UCP/ATP synthase 比例,找出產熱最大值
b: 模擬實際寒流來襲時,魚塭中的菌需發熱功率多少才能維持溫暖", priority: 1 },{ startDate: new Date(2013, 2, 30, 12, 0), title: "Weekly Meeting", priority: 3 },{ startDate: new Date(2013, 2, 30, 14, 0), title: "報進度 - 呂宗諭", description: " 1:UCP1人體活化路徑
2:突變株: G176, G76, G269L
3:Gene ontology
4:找Mutation protocol、HR protocol
5:溫度promoter: 增加敏感度", priority: 1 },{ startDate: new Date(2013, 2, 30, 14, 0), title: "報進度 - 張宏宇", description: " 1: 結合發酵槽與卡計", priority: 1 },{ startDate: new Date(2013, 2, 30, 14, 0), title: "報進度 - 王德緯", description: " 1: UCP 分解
2: Transcription factor", priority: 1 },{ startDate: new Date(2013, 3, 6, 14, 0), title: "確認目標", description: " 1: 低溫下加熱儀器的成本
2: 大尺寸加熱難度", priority: 1 },{ startDate: new Date(2013, 3, 6, 14, 0), title: "研究2008年成果", description: "Experiment 2008是用Homologous 還是 plasmid?", priority: 1 },{ startDate: new Date(2013, 3, 11), title: "與麗冠教授討論實驗細節", description: "1. UV突變方法
2. 低溫培養箱使用
3. 酵母菌HR方法
4. 大腸桿菌的優勢
5. 回收死菌的系統", priority: 1 },{ startDate: new Date(2013, 3, 20, 14, 0), title: "UT-Tokyo discussion next week", description: "題目報告", priority: 1 },{ startDate: new Date(2013, 4, 4, 14, 0), title: "Conference with UT-Tokyo", description: "Conference with UT-Tokyo by Skype
link: http://goo.gl/X6u5Z ", priority: 1 },{ startDate: new Date(2013, 5, 12), endDate: new Date(2013, 5, 0), title: "討論", description: "Normal Meeting", priority: 1, frecuency: 2 },{ startDate: new Date(2013, 5, 1), endDate: new Date(2013, 5, 30), title: "NTU 期末考", description: "期末考試ING", priority: 3, frecuency: 1 },{ startDate: new Date(2013, 6, 5, 10, 30), title: "配培養液、培養基、菌體活化、繼代", description: "討論人力分配及生長曲線測定", priority: 1 },{ startDate: new Date(2013, 6, 8, 10, 30), title: "Conference", description: "Conference with Purdue iGEM team", priority: 1 },{ startDate: new Date(2013, 6, 10, 10, 30), title: "Conference", description: "Conference with Berkeley iGEM", priority: 1 },{ startDate: new Date(2013, 6, 14, 10, 30), title: "Conference", description: "conference with UT-Tokyo iGEM", priority: 1 },{ startDate: new Date(2013, 7, 5), endDate: new Date(2013, 7, 9), frecuency: 1, title: "Conference with Asia Teams", description: "conference in Chao-Tung University", priority: 1 } ] });

};

var windowResize = function(){

   $("iframe").css("width", "75%").css("height", $("iframe").width()*6/8);
   if($(".rainbow-text").length !== 0){
       $("#particleSystem").css("top", $(".rainbow-text").offset().top+50 + "px");
   }

};


var spinner = new Spinner({

   lines: 11,
   length: 34,
   width: 15,
   radius: 45,
   corners: 1.0,
   rotate: 50,
   trail: 86,
   speed: 1.5,
   direction: 1,
   shadow: "on",
   className: "container"

}).spin();

if($("#preloader").length > 0){

   $("#preloader").append(spinner.el);

}

$(document).ready(function(){

   $(window).on("resize", windowResize);
   $("#navbar .dropdown>a").hover(function(){
       $(this).parent().addClass("open");
   });


   var myRouter = Backbone.Router.extend({
       initialize: function(){
           this.database = {};
           var data = $("script[type='text/template']");
           for(var i=0; i<data.length; i++){
               this.database[$(data[i]).attr("id")] = $(data[i]).html();
           }
       },
       routes:{
           "*action": "mainContent"
       },
       mainContent: function(p1){
           if(!p1) {
               p1 = "";
           }
           $("#navbar a").parent().removeClass("active");
           if($("#navbar a[href='#" + p1 + "']").closest("li").parents("li").length !== 0){
               $("#navbar a[href='#" + p1 + "']").parents("li").addClass("active");
           }
           else{
               $("#navbar a[href='#" + p1 + "']").parent().addClass("active");
           }
           if(!p1) {
               p1 = "index";
           }
           if($("#" + p1).length === 0) {
               p1 = "undefined";
           }
           changeContent(this.database[p1], function(){
               $("[lightbox-id]").children().each(function(){
                   var src = $(this).children("img").attr("src");
                   var group = $(this).parent().attr("lightbox-id");
                   $(this).wrapInner("<a href="+src+" data-lightbox="+group+"></a>");
               });
$(".tilt-gallery li").addClass("photo-item").wrapInner("
");
               $("img").error(function(){
                   if($(this).attr("alt-src")){
                       $(this).attr("src", $(this).attr("alt-src"));
                   }
               });
               calendar_create($("#calendar_content"));
               $(".index-item a, .photo-item a").click(function(){
                   $("body").animate({
                       scrollTop: $("#" + $(this).attr("scroll-to")).offset().top
                   }, 1000, "easeInOutBack");
               });
           }, function(){
               $(window).resize();
               
               $(".content section h1.header").fitText(1, {minFontSize: "20px", maxFontSize: "90px"});
               $(".teamMember .img-gallery li").click(function(){
                   $(this).addClass("active");
                   $(this).siblings().removeClass("active");
               }).click(function(){
                   var html = $("#" + $(this).children().attr("toggle")).html();
                   var color = $("#" + $(this).children().attr("toggle")).attr("color");
                   if(color){
                       var ori_color = $("#teamContainer").attr("cur-color");
                       $("#teamContainer").removeClass(ori_color).addClass(color).attr("cur-color", color);
                   }
                   
                   $("#teamContainer>div").hide("slide", {direction: "left", easing: "easeOutExpo"}, 500).queue(function(){
                       $(this).html(html).show("slide", {direction: "right", easing: "easeInOutCubic"}, 300).dequeue();
                   });
               });
               $("[data-toggle='tooltip']").tooltip({
                   placement: "auto",
                   container: "body"
               });


           });
       }
   });
   new myRouter();
   Backbone.history.start();

});