Commit 03331eca authored by Iker Hurtado's avatar Iker Hurtado
Browse files

Implement the 'New quantities issue' (105)

parent e8062482
Pipeline #24324 passed with stages
in 6 seconds
......@@ -759,7 +759,8 @@
title = getSubscriptedFormula(data.formula_reduced);
if (html !== undefined && html ===false) title = data.formula_reduced;
if (data.space_group !== null) title += ' - space group '+data.space_group;
if (data.space_group_number !== null)
title += ' - space group '+data.space_group_number;
//return '<span style="font-size: 0.9em">'+title+' </span>';
return title;
}
......@@ -2480,6 +2481,14 @@
<b><span info-sys-data="structure-type">Structure type</span></b>:
<span class="structure-type-value" ></span>
</div>
<div class="structure-prototype-field" style="display: none">
<b><span info-sys-data="structure-prototype">Structure prototype</span></b>:
<span class="structure-prototype-value" ></span>
</div>
<div class="strukturbericht-field" style="display: none">
<b><span info-sys-data="strukturbericht">Strukturbericht designation</span></b>:
<span class="strukturbericht-value" ></span>
</div>
</div>
</div>
......@@ -2615,6 +2624,10 @@
this.spaceGroupValue = this.element.querySelector('.space-group-value');
this.structTypeField= this.element.querySelector('.structure-type-field');
this.structTypeValue= this.element.querySelector('.structure-type-value');
this.structPrototypeField= this.element.querySelector('.structure-prototype-field');
this.structPrototypeValue= this.element.querySelector('.structure-prototype-value');
this.strukturberichtField= this.element.querySelector('.strukturbericht-field');
this.strukturberichtValue= this.element.querySelector('.strukturbericht-value');
//this.band_gap = this.element.getElementsByClassName('e-struct-field')[0];
......@@ -2714,14 +2727,21 @@
let isBulk = (data.system_type === 'bulk');
this.systemType.textContent= data.system_type;
this.structTypeField.style.display = (isBulk ? 'block' : 'none');
this.structTypeField.style.display =
(isBulk && data.structure_type !== null ? 'block' : 'none');
this.structPrototypeField.style.display =
(isBulk && data.structure_prototype !== null ? 'block' : 'none');
this.strukturberichtField.style.display =
(isBulk && data.strukturbericht_designation !== null ? 'block' : 'none');
this.spaceGroupField.style.display = (isBulk ? 'block' : 'none');
if (isBulk){
this.structTypeValue.textContent= data.structure_type;
this.spaceGroupValue.textContent = data.space_group;
//InfoSys.setTooltip(this.spaceGroupValue, 'space-group.value:'+data.space_group);
InfoSys.addElementToInfoSystem(this.spaceGroupValue, 'space-group.value:'+data.space_group);
this.structPrototypeValue.textContent= data.structure_prototype;
this.strukturberichtValue.textContent= data.strukturbericht_designation;
this.spaceGroupValue.textContent = data.space_group_number;
InfoSys.addElementToInfoSystem(this.spaceGroupValue,
'space-group.value:'+data.space_group_number);
}
//if (this.cellViewer === null) this.cellViewer = new CellViewer(this.vizBox);
......@@ -4162,6 +4182,14 @@
<b><span info-sys-data="structure-type">Structure type</span></b>:
<span class="structure-type-value" ></span>
</div>
<div class="structure-prototype-field" style="display: none">
<b><span info-sys-data="structure-prototype">Structure prototype</span></b>:
<span class="structure-prototype-value" ></span>
</div>
<div class="strukturbericht-field" style="display: none">
<b><span info-sys-data="strukturbericht">Strukturbericht designation</span></b>:
<span class="strukturbericht-value" ></span>
</div>
</div>
<div class="footer-flex" style="display: none">
......@@ -4235,6 +4263,10 @@
this.systemTypeField= fields[0];
this.structTypeField= this.element.querySelector('.structure-type-field');
this.structTypeValue= this.element.querySelector('.structure-type-value');
this.structPrototypeField= this.element.querySelector('.structure-prototype-field');
this.structPrototypeValue= this.element.querySelector('.structure-prototype-value');
this.strukturberichtField= this.element.querySelector('.strukturbericht-field');
this.strukturberichtValue= this.element.querySelector('.strukturbericht-value');
this.lowerBox = this.element.querySelector('.footer-flex');
this.latticeValue= this.element.querySelector('.lattice-value');
......@@ -4272,13 +4304,21 @@
this.isBulk = (data.system_type === 'bulk');
this.systemTypeField.textContent= data.system_type;
this.structTypeField.style.display = (this.isBulk ? 'block' : 'none');
this.structTypeField.style.display =
(this.isBulk && data.structure_type !== null ? 'block' : 'none');
this.structPrototypeField.style.display =
(this.isBulk && data.structure_prototype !== null ? 'block' : 'none');
this.strukturberichtField.style.display =
(this.isBulk && data.strukturbericht_designation !== null ? 'block' : 'none');
this.lowerBox.style.display = (this.isBulk ? 'flex' : 'none');
if (this.isBulk){
this.structTypeValue.textContent= data.structure_type;
this.spaceGroupValue.textContent = data.space_group;
this.structPrototypeValue.textContent= data.structure_prototype;
this.strukturberichtValue.textContent= data.strukturbericht_designation;
this.spaceGroupValue.textContent = data.space_group_number
+' ('+data.space_group_international_short_symbol+')';
this.pointGroupValue.textContent = data.point_group;
this.latticeValue.textContent = data.crystal_system;
......@@ -4312,9 +4352,12 @@
this.wyckoffValue.innerHTML = '<table>' + wyckoffHTML+'</table>';
}
InfoSys.addElementToInfoSystem(this.spaceGroupValue, 'space-group.value:'+data.space_group);
InfoSys.addElementToInfoSystem(this.latticeValue, 'crystal-system.value:'+data.crystal_system);
InfoSys.addElementToInfoSystem(this.pointGroupValue, 'point-group.value:'+data.point_group);
InfoSys.addElementToInfoSystem(this.spaceGroupValue,
'space-group.value:'+data.space_group_number);
InfoSys.addElementToInfoSystem(this.latticeValue,
'crystal-system.value:'+data.crystal_system);
InfoSys.addElementToInfoSystem(this.pointGroupValue,
'point-group.value:'+data.point_group);
//InfoSys.addElementToInfoSystem(this.wyckoffValue, 'wyckoff-position-population.value:'+);
}
......@@ -6405,9 +6448,9 @@
let repositoryLinkHtml = '';
if (calc.calculation_pid !== null && calc.calculation_pid !== undefined)
repositoryLinkHtml =
'<a href="'+REPOSITORY_LINK+calc.calculation_pid+'" target="blank"> '+
'<a href="'+REPOSITORY_LINK+calc.calculation_pid+'" target="blank"> '
+'<img src="img/download.svg" height="20px" /> </a>';
//***** InfoSys.setTooltip(this.spaceGroup, 'space-group.value:'+data.space_group);
return `
<tr data-calc-id="${calc.id/*leafId*/}" data-calc-props="${calcProps}" class="data-row">
<td>${calc.id/*leafId*/}</td>
......@@ -8277,7 +8320,8 @@
<!--<span info-sys-data="system-type">-->${mat.system_type} <!--</span>-->
</td>
<td style="text-align:center" >
${mat.space_group === null ? '' : mat.space_group } </td>
${mat.space_group_number === null ? '' : mat.space_group_number}
</td>
<td> ${mat.structure_type === null ? '' : mat.structure_type } </td>
<td style="text-align:center" > ${mat.nr_of_calculations} </td>
</tr>`;
......
......@@ -348,7 +348,8 @@ function getMaterialTitle(data, html){
title = getSubscriptedFormula(data.formula_reduced);
if (html !== undefined && html ===false) title = data.formula_reduced;
if (data.space_group !== null) title += ' - space group '+data.space_group;
if (data.space_group_number !== null)
title += ' - space group '+data.space_group_number;
//return '<span style="font-size: 0.9em">'+title+' </span>';
return title;
}
......
......@@ -433,9 +433,9 @@ class MethodologyDetails extends DetailsViewBase {
let repositoryLinkHtml = '';
if (calc.calculation_pid !== null && calc.calculation_pid !== undefined)
repositoryLinkHtml =
'<a href="'+REPOSITORY_LINK+calc.calculation_pid+'" target="blank"> '+
'<a href="'+REPOSITORY_LINK+calc.calculation_pid+'" target="blank"> '
+'<img src="img/download.svg" height="20px" /> </a>';
//***** InfoSys.setTooltip(this.spaceGroup, 'space-group.value:'+data.space_group);
return `
<tr data-calc-id="${calc.id/*leafId*/}" data-calc-props="${calcProps}" class="data-row">
<td>${calc.id/*leafId*/}</td>
......
......@@ -49,6 +49,14 @@ class Overview {
<b><span info-sys-data="structure-type">Structure type</span></b>:
<span class="structure-type-value" ></span>
</div>
<div class="structure-prototype-field" style="display: none">
<b><span info-sys-data="structure-prototype">Structure prototype</span></b>:
<span class="structure-prototype-value" ></span>
</div>
<div class="strukturbericht-field" style="display: none">
<b><span info-sys-data="strukturbericht">Strukturbericht designation</span></b>:
<span class="strukturbericht-value" ></span>
</div>
</div>
</div>
......@@ -184,6 +192,10 @@ class Overview {
this.spaceGroupValue = this.element.querySelector('.space-group-value');
this.structTypeField= this.element.querySelector('.structure-type-field');
this.structTypeValue= this.element.querySelector('.structure-type-value');
this.structPrototypeField= this.element.querySelector('.structure-prototype-field');
this.structPrototypeValue= this.element.querySelector('.structure-prototype-value');
this.strukturberichtField= this.element.querySelector('.strukturbericht-field');
this.strukturberichtValue= this.element.querySelector('.strukturbericht-value');
//this.band_gap = this.element.getElementsByClassName('e-struct-field')[0];
......@@ -283,14 +295,21 @@ class Overview {
let isBulk = (data.system_type === 'bulk');
this.systemType.textContent= data.system_type;
this.structTypeField.style.display = (isBulk ? 'block' : 'none');
this.structTypeField.style.display =
(isBulk && data.structure_type !== null ? 'block' : 'none');
this.structPrototypeField.style.display =
(isBulk && data.structure_prototype !== null ? 'block' : 'none');
this.strukturberichtField.style.display =
(isBulk && data.strukturbericht_designation !== null ? 'block' : 'none');
this.spaceGroupField.style.display = (isBulk ? 'block' : 'none');
if (isBulk){
this.structTypeValue.textContent= data.structure_type;
this.spaceGroupValue.textContent = data.space_group;
//InfoSys.setTooltip(this.spaceGroupValue, 'space-group.value:'+data.space_group);
InfoSys.addElementToInfoSystem(this.spaceGroupValue, 'space-group.value:'+data.space_group);
this.structPrototypeValue.textContent= data.structure_prototype;
this.strukturberichtValue.textContent= data.strukturbericht_designation;
this.spaceGroupValue.textContent = data.space_group_number;
InfoSys.addElementToInfoSystem(this.spaceGroupValue,
'space-group.value:'+data.space_group_number);
}
//if (this.cellViewer === null) this.cellViewer = new CellViewer(this.vizBox);
......
......@@ -38,6 +38,14 @@ class StructureDetails extends DetailsViewBase {
<b><span info-sys-data="structure-type">Structure type</span></b>:
<span class="structure-type-value" ></span>
</div>
<div class="structure-prototype-field" style="display: none">
<b><span info-sys-data="structure-prototype">Structure prototype</span></b>:
<span class="structure-prototype-value" ></span>
</div>
<div class="strukturbericht-field" style="display: none">
<b><span info-sys-data="strukturbericht">Strukturbericht designation</span></b>:
<span class="strukturbericht-value" ></span>
</div>
</div>
<div class="footer-flex" style="display: none">
......@@ -111,6 +119,10 @@ class StructureDetails extends DetailsViewBase {
this.systemTypeField= fields[0];
this.structTypeField= this.element.querySelector('.structure-type-field');
this.structTypeValue= this.element.querySelector('.structure-type-value');
this.structPrototypeField= this.element.querySelector('.structure-prototype-field');
this.structPrototypeValue= this.element.querySelector('.structure-prototype-value');
this.strukturberichtField= this.element.querySelector('.strukturbericht-field');
this.strukturberichtValue= this.element.querySelector('.strukturbericht-value');
this.lowerBox = this.element.querySelector('.footer-flex');
this.latticeValue= this.element.querySelector('.lattice-value');
......@@ -148,13 +160,21 @@ class StructureDetails extends DetailsViewBase {
this.isBulk = (data.system_type === 'bulk');
this.systemTypeField.textContent= data.system_type;
this.structTypeField.style.display = (this.isBulk ? 'block' : 'none');
this.structTypeField.style.display =
(this.isBulk && data.structure_type !== null ? 'block' : 'none');
this.structPrototypeField.style.display =
(this.isBulk && data.structure_prototype !== null ? 'block' : 'none');
this.strukturberichtField.style.display =
(this.isBulk && data.strukturbericht_designation !== null ? 'block' : 'none');
this.lowerBox.style.display = (this.isBulk ? 'flex' : 'none');
if (this.isBulk){
this.structTypeValue.textContent= data.structure_type;
this.spaceGroupValue.textContent = data.space_group;
this.structPrototypeValue.textContent= data.structure_prototype;
this.strukturberichtValue.textContent= data.strukturbericht_designation;
this.spaceGroupValue.textContent = data.space_group_number
+' ('+data.space_group_international_short_symbol+')';
this.pointGroupValue.textContent = data.point_group;
this.latticeValue.textContent = data.crystal_system;
......@@ -188,9 +208,12 @@ class StructureDetails extends DetailsViewBase {
this.wyckoffValue.innerHTML = '<table>' + wyckoffHTML+'</table>';
}
InfoSys.addElementToInfoSystem(this.spaceGroupValue, 'space-group.value:'+data.space_group);
InfoSys.addElementToInfoSystem(this.latticeValue, 'crystal-system.value:'+data.crystal_system);
InfoSys.addElementToInfoSystem(this.pointGroupValue, 'point-group.value:'+data.point_group);
InfoSys.addElementToInfoSystem(this.spaceGroupValue,
'space-group.value:'+data.space_group_number);
InfoSys.addElementToInfoSystem(this.latticeValue,
'crystal-system.value:'+data.crystal_system);
InfoSys.addElementToInfoSystem(this.pointGroupValue,
'point-group.value:'+data.point_group);
//InfoSys.addElementToInfoSystem(this.wyckoffValue, 'wyckoff-position-population.value:'+);
}
......
......@@ -227,7 +227,8 @@ class MaterialList {
<!--<span info-sys-data="system-type">-->${mat.system_type} <!--</span>-->
</td>
<td style="text-align:center" >
${mat.space_group === null ? '' : mat.space_group } </td>
${mat.space_group_number === null ? '' : mat.space_group_number}
</td>
<td> ${mat.structure_type === null ? '' : mat.structure_type } </td>
<td style="text-align:center" > ${mat.nr_of_calculations} </td>
</tr>`;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment