Commit d99b279f9e5bf23dbdf07205a0698d8c9d60a0d7

Authored by Bartłomiej Nitoń
1 parent 682b7f2a

Minor preview loading fix.

dictionary/static/js/lemma-view.js
... ... @@ -412,7 +412,7 @@ function load_content(id) {
412 412 ShowProgressAnimation();
413 413 $('#preview_lemma').load(ajax_lemma_preview, 'id='+id+'&main_lemma_id='+window.lemma_id, function(){
414 414 window.prev_lemma_id=id;
415   - loadPrevSchemataAndExamples();
  415 + loadPrevSchemataAndExamples(true);
416 416 createSplitter('prevFramesSplit', 'prev-lemma-tables', 'prev_tabs');
417 417 areNewPreviewEntriesRelated();
418 418 });
... ... @@ -521,7 +521,7 @@ function load_content(id) {
521 521  
522 522 $('#preview_lemma').load(ajax_lemma_preview, 'id='+prevId+'&main_lemma_id='+id, function(){
523 523 window.prev_lemma_id=prevId;
524   - loadPrevSchemataAndExamples();
  524 + loadPrevSchemataAndExamples(false);
525 525 createSplitter('prevFramesSplit', 'prev-lemma-tables', 'prev_tabs');
526 526 areNewPreviewEntriesRelated();
527 527 });
... ... @@ -570,7 +570,7 @@ function loadSchemataAndExamples() {
570 570 });
571 571 }
572 572  
573   -function loadPrevSchemataAndExamples() {
  573 +function loadPrevSchemataAndExamples(hideWaitDialog) {
574 574 $.ajaxJSON({
575 575 method: 'get',
576 576 url: ajax_get_schemata_and_examples,
... ... @@ -582,7 +582,9 @@ function loadPrevSchemataAndExamples() {
582 582 window.prev_nkjp_examples = serializedNkjpToObj(result['examples']);
583 583 draw_filtered_frames(window.prev_frames, 'prev-lemma-tables', 'prev-lemma-table', 'prev_frame_filter',
584 584 window.prev_nkjp_examples, 'InactiveFrameTable', window.prev_lemma_entry);
585   - HideProgressAnimation();
  585 + if(hideWaitDialog) {
  586 + HideProgressAnimation();
  587 + }
586 588 },
587 589 });
588 590 }
... ...