Changeset 8242
- Timestamp:
- 16/04/12 16:41:25 (9 years ago)
- Location:
- mauRepo/MolesManager/trunk/src/MolesManager/static
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/MolesManager/static/js/cedaObservation.js
r8233 r8242 34 34 idDict[coObs.identifier[loopVal].authority.title] = coObs.identifier[loopVal].code; 35 35 } 36 //if (!('doi' in idDict)){37 // idDict['doi'] = 'test/doi.string.123456'38 //}39 36 return idDict 40 37 } … … 72 69 73 70 function docLinkObj(moles2url){ 74 var docLinkString = '<p>For further details see the following links: </p><ol><li>' 75 docLinkString += '<a href="' + moles2url + '"> CEDA MOLES2 Metadata Catalogue Entry</a>' + '</li></ol>' 71 var docLinkString = '<p>For further details see the following links: </p><ol><li>' ; 72 docLinkString += '<a href="' + moles2url + '"> CEDA MOLES2 Metadata Catalogue Entry</a>' + '</li></ol>'; 76 73 return docLinkString 77 74 } 75 76 function downloadLink(result){ 77 var dltext = '<p><b>' + result.source[0].name + ':</b> '; 78 dltext += '<a href="'+ result.source[0].linkage + '">' + result.source[0].function.value + '</a>'; 79 dltext += '</p>'; 80 console.log(dltext) 81 return dltext 82 } 83 84 function timeLead0(timeElement){ 85 if (timeElement.length == 1){ 86 console.log(timeElement) 87 timeElement = '0' + timeElement; 88 } 89 return timeElement; 90 91 } 92 93 function resultTime(timeDetails){ 94 timeArray = {}; 95 console.log(timeDetails); 96 if (timeDetails.hasOwnProperty('begin')){ 97 timeArray['startYear'] = timeDetails.begin.position.date8601.year; 98 timeArray['startMonth'] = timeLead0(timeDetails.begin.position.date8601.month); 99 timeArray['startDay'] = timeLead0(timeDetails.begin.position.date8601.day); 100 //timeArray['startHour'] = timeLead0(timeDetails.begin.position.date8601.hour); 101 //timeArray['startMinute'] = timeLead0(timeDetails.begin.position.date8601.minute); 102 //timeArray['startSecond'] = timeLead0(timeDetails.begin.position.date8601.second); 103 timeArray['startDate'] = timeArray['startYear'] + '-' + timeArray['startMonth'] + '-' + timeArray['startDay'] //+ 104 //timeArray['startHour'] + ':' + timeArray['startMinute'] + ':' + timeArray['startSecond'] 105 } 106 if (timeDetails.hasOwnProperty('end')){ 107 timeArray['endYear'] = timeDetails.end.position.date8601.year; 108 timeArray['endMonth'] = timeLead0(timeDetails.end.position.date8601.month); 109 timeArray['endDay'] = timeLead0(timeDetails.end.position.date8601.day); 110 //timeArray['endHour'] = timeLead0(timeDetails.end.position.date8601.hour); 111 //timeArray['endMinute'] = timeLead0(timeDetails.end.position.date8601.minute); 112 //timeArray['endSecond'] = timeLead0(timeDetails.end.position.date8601.second); 113 timeArray['endDate'] = timeArray['endYear'] + '-' + timeArray['endMonth'] + '-' + timeArray['endDay']// + 114 // timeArray['endHour'] + ':' + timeArray['endMinute'] + ':' + timeArray['endSecond'] 115 116 } 117 timeArray['timeString'] = '<p>Data Start Date: <b>'+ timeArray['startDate'] + '</b></p><p>Data End Date: <b>' + timeArray['endDate'] 118 //timeArray['timeString'] = '<p>Test time string</p>' 119 return timeArray 120 } 121 78 122 function citeNameArrange(nameIn){ 79 123 // function to strip off additional info from the name and then to prepare the name if individual for citation, e.g. … … 224 268 225 269 require(['dojo/ready', 'dojo/parser', 'dijit/registry', 'dojo/_base/json', 'dojo/store/Memory', 226 'dijit/Tree', 'dijit/form/Button', 'dojo/html'], function(ready, parser, registry, Tree){ 270 'dijit/Tree', 'dijit/form/Button', 271 'dijit/TitlePane','dojo/html'], function(ready, parser, registry, Tree){ 227 272 ready(function () 228 273 { … … 261 306 title_id.startup(); 262 307 263 var citation_id = new dijit.form.Textarea( 264 { 265 value: "" 266 }, "citation_id"); 267 citation_id.startup(); 268 308 //var citation_id = new dijit.titlePane( 309 //{ 310 // value: "" 311 //}, "citation_id"); 312 //citation_id.startup(); 313 314 315 269 316 var keywords_id = new dijit.form.TextBox( 270 317 { … … 286 333 287 334 var rps = getRelatedParties(coObs); 335 dojo.attr("title_id", 'value', ids['ceda_title']); 288 336 var pubDetails = publicationDetails(coObs); 289 337 var pubDetails_id = new dojo.html.set(dojo.byId("pubDetails_id"),pubDetails['pubString']); 338 339 var citation_id = new dijit.TitlePane( 340 { 341 title: "Citation", content: createCitation(coObs,ids,rps[0],pubDetails) 342 },"citation_id"); 343 citation_id.startup(); 344 345 if (ids.hasOwnProperty("moles2url")){ 346 var pastCitation_id = new dijit.TitlePane( 347 { 348 title: "Previous Identifiers Used:", content: ids['moles2url'], open: 0 349 },"pastCitation_id"); 350 citation_id.startup(); 351 } 352 353 var dataLink_id = new dojo.html.set(dojo.byId("datalink_id"),downloadLink(coObs.result)); 354 290 355 var access_id = new dojo.html.set(dojo.byId("access_id"),accessLink(coObs.permission)); 291 356 var help_id = new dojo.html.set(dojo.byId("help_id"),rps[1]); 292 357 var docLink_id = new dojo.html.set(dojo.byId("docLink_id"),docLinkObj(ids['moles2url'])); 293 var citation_id = new dojo.html.set(dojo.byId("citation_id"),createCitation(coObs,ids,rps[0],pubDetails)); 294 console.log(rps[1]); 295 296 297 dojo.attr("title_id", 'value', ids['ceda_title']); 298 // dojo.attr("citation_id", 'value', createCitation(coObs,ids,rps[0],pubDetails)); 358 359 //dojo.attr("citation_id", 'content', createCitation(coObs,ids,rps[0],pubDetails)); 299 360 dojo.attr("records_dataLineage", 'value', coObs.dataLineage); 300 361 dojo.attr("description_id", 'value', coObs.description); … … 303 364 dojo.attr("help_id",'value',''); 304 365 drawMap(coObs.geographicExtent,'map'); 366 var resultTime_id = new dojo.html.set(dojo.byId("resultTime_id"),resultTime(coObs.phenomenonTime)['timeString']); 305 367 306 368 } -
mauRepo/MolesManager/trunk/src/MolesManager/static/templates/cedaObservation.html
r8233 r8242 19 19 <div class="grid_8 alpha cedaObs" id="upper_middle_top"> 20 20 <div id='pubDetails_id'></div> 21 <label for="title"> Title</label><div id="title_id" class = "coObs_cite"></div> <br />21 <label for="title"><b>Title</b></label><div id="title_id" class = "coObs_cite"></div> <br /> 22 22 <div id="citation_id"></div> 23 <label for="keywords">Keywords</label><div id="keywords_id"></div><br /> 23 <div id="pastCitation_id"></div> 24 <label for="keywords"><b>Keywords</b></label><div id="keywords_id"></div><br /> 24 25 </div> <!-- End of div upper_middle_top --> 25 26 … … 39 40 </div> 40 41 <div data-dojo-type="dijit.layout.ContentPane" title="Download & Services" selected="true"> 41 < p>Links to download and data services </p>42 <div id="datalink_id"><p>Links to download and data services </p></div> 42 43 </div> 43 44 <div data-dojo-type="dijit.layout.ContentPane" title="Apply for Access"> … … 67 68 68 69 <label for="resolution">Resolution</label><div id="resolution_id"></div> <br /> 70 <div id="resultTime_id"></div> 69 71 </div> <!-- End of div upper_right --> 70 72 </div> <!-- End of div upper_section -->
Note: See TracChangeset
for help on using the changeset viewer.