@@ -29,6 +29,31 @@ hashCode = function (s) {
2929
3030ISATabViewer . rendering = {
3131
32+ process_study_details : function ( study_index ) {
33+ var study = ISATabViewer . investigation . STUDY [ study_index ] ;
34+ var study_details = [ ] ; //{"designs": [], "measurements": [], "technologies": []};
35+
36+ var record = { "name" : "Designs" , "values" : study [ "STUDY DESIGN DESCRIPTORS" ] [ "Study Design Type" ] } ;
37+ study_details . push ( record ) ;
38+
39+ record = { "name" : "Measurements" , "values" : study [ "STUDY ASSAYS" ] [ "Study Assay Measurement Type" ] } ;
40+ study_details . push ( record ) ;
41+
42+ record = { "name" : "Technologies" , "values" : study [ "STUDY ASSAYS" ] [ "Study Assay Technology Type" ] } ;
43+ study_details . push ( record ) ;
44+
45+ return study_details ;
46+ } ,
47+
48+ render_study_details : function ( ) {
49+ var source = $ ( "#study-details-template" ) . html ( ) ;
50+ var template = Handlebars . compile ( source ) ;
51+ var html = template ( { "study_details" : ISATabViewer . rendering . study_details } ) ;
52+
53+ console . log ( "html---->" , html ) ;
54+
55+ $ ( "#study-details" ) . html ( html ) ;
56+ } ,
3257
3358 render_sample_statistics : function ( ) {
3459 var source = $ ( "#sample-distribution-template" ) . html ( ) ;
@@ -67,9 +92,13 @@ ISATabViewer.rendering = {
6792 for ( var study_index in ISATabViewer . investigation . STUDY ) {
6893
6994 var study_information = ISATabViewer . investigation . STUDY [ study_index ] ;
95+
7096 var study_file = ISATabViewer . rendering . replace_str ( "\"" , "" , study_information . STUDY [ "Study File Name" ] [ 0 ] ) ;
7197 var base_directory = file_name . substr ( 0 , file_name . lastIndexOf ( "/" ) + 1 ) ;
7298
99+ ISATabViewer . rendering . study_details = ISATabViewer . rendering . process_study_details ( study_index ) ;
100+ ISATabViewer . rendering . render_study_details ( ) ;
101+
73102 var assays = ISATabViewer . rendering . generate_records ( study_information , "STUDY ASSAYS" ) ;
74103
75104 $ . ajax ( {
@@ -85,6 +114,7 @@ ISATabViewer.rendering = {
85114
86115 ISATabViewer . rendering . render_sample_statistics ( ) ;
87116 }
117+
88118 }
89119 } ) ;
90120
@@ -178,6 +208,7 @@ ISATabViewer.rendering = {
178208 }
179209 }
180210 }
211+
181212 return { current_study : current_study , current_section : current_section , parts : parts } ;
182213 } ,
183214
@@ -294,7 +325,7 @@ ISATabViewer.rendering = {
294325
295326 render_assay : function ( study_id , file_name ) {
296327
297- $ ( "#isa-breadcrumb-items" ) . html ( '<li onclick="Transition.functions.hideContent();" class="active"><i class="fa fa-chevron-left"></i> Back to Studies </li><li onclick="ISATabViewer.rendering.render_study(\'' + study_id + '\')" class="active"><span class="fa fa-align-justify"></span> Study Details </li><li><span class="fa fa-table"></span> ' + file_name + '</li>' ) ;
328+ $ ( "#isa-breadcrumb-items" ) . html ( '<li onclick="Transition.functions.hideContent();" class="active"><i class="fa fa-chevron-left"></i> Back to Datasets </li><li onclick="ISATabViewer.rendering.render_study(\'' + study_id + '\')" class="active"><span class="fa fa-align-justify"></span> Dataset Details </li><li><span class="fa fa-table"></span> ' + file_name + '</li>' ) ;
298329
299330 var spreadsheet = ISATabViewer . spreadsheets . files [ file_name ] ;
300331
0 commit comments