Commit b9372b31 by Bence Dányi

webui: magic try-catch added

parent 7f856315
var toggleDetails; var toggleDetails;
$(function() { $(function() {
toggleDetails = function() { toggleDetails = function() {
try {
if ($(this).parent('.entry').hasClass('opened')) { if ($(this).parent('.entry').hasClass('opened')) {
$(this).parent('.entry').removeClass('opened'); $(this).parent('.entry').removeClass('opened');
$(this).next('.details').css('height', '0px'); $(this).next('.details').css('height', '0px');
...@@ -13,6 +14,9 @@ $(function() { ...@@ -13,6 +14,9 @@ $(function() {
$(this).next('.details').find('.details-container')[0].offsetHeight + 15 + 'px'); $(this).next('.details').find('.details-container')[0].offsetHeight + 15 + 'px');
} }
} }
} catch(ex) {
//make sure we never fail :-)
}
} }
$('a[href=#]').click(function(e) { $('a[href=#]').click(function(e) {
e.preventDefault(); e.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment