fix more authors bug (#758)
* fix more authors bug * fix * add preview Co-authored-by: Rohan Deb Sarkar <rohandebsarkar@gmail.com>
This commit is contained in:
parent
edd9fb7079
commit
24a5084cb1
|
|
@ -9,7 +9,7 @@
|
||||||
author={Einstein, Albert},
|
author={Einstein, Albert},
|
||||||
year={1956},
|
year={1956},
|
||||||
publisher={Courier Corporation,},
|
publisher={Courier Corporation,},
|
||||||
preview={brownian-motion.gif},
|
preview={brownian-motion.gif}
|
||||||
}
|
}
|
||||||
|
|
||||||
@article{einstein1950meaning,
|
@article{einstein1950meaning,
|
||||||
|
|
@ -77,5 +77,6 @@
|
||||||
title={Letters on wave mechanics},
|
title={Letters on wave mechanics},
|
||||||
author={Einstein, Albert and Schrödinger, Erwin and Planck, Max and Lorentz, Hendrik Antoon and Przibram, Karl},
|
author={Einstein, Albert and Schrödinger, Erwin and Planck, Max and Lorentz, Hendrik Antoon and Przibram, Karl},
|
||||||
year={1967},
|
year={1967},
|
||||||
publisher={Vision}
|
publisher={Vision},
|
||||||
|
preview={wave-mechanics.gif}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,12 +103,12 @@
|
||||||
class="more-authors"
|
class="more-authors"
|
||||||
title="click to view {{more_authors_hide}}"
|
title="click to view {{more_authors_hide}}"
|
||||||
onclick="
|
onclick="
|
||||||
var element = $('span.more-authors');
|
var element = $(this);
|
||||||
|
element.attr('title', '');
|
||||||
var more_authors_text = element.text() == '{{more_authors_hide}}' ? '{{more_authors_show}}' : '{{more_authors_hide}}';
|
var more_authors_text = element.text() == '{{more_authors_hide}}' ? '{{more_authors_show}}' : '{{more_authors_hide}}';
|
||||||
var cursorPosition = 0;
|
var cursorPosition = 0;
|
||||||
var textAdder = setInterval(function(){
|
var textAdder = setInterval(function(){
|
||||||
element.text(more_authors_text.substring(0, cursorPosition + 1));
|
element.text(more_authors_text.substring(0, cursorPosition + 1));
|
||||||
element.attr('title', '');
|
|
||||||
if (++cursorPosition == more_authors_text.length){
|
if (++cursorPosition == more_authors_text.length){
|
||||||
clearInterval(textAdder);
|
clearInterval(textAdder);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
Loading…
Reference in New Issue