src/NCBS/WebsiteBundle/Resources/views/layout_inc.html.twig line 1

Open in your IDE?
  1.  <iframe id="Hidden_Frame" style="display:none; visibility:hidden;"></iframe>
  2.  <iframe id="Hidden_Frame2" style="display:none; visibility:hidden;"></iframe>
  3.       
  4. {% include 'NCBSWBundle:Bible:interface/popup/book_popup_for_menu.html.twig' %}      
  5. <!-- Modal for Chooser -->
  6. <div class="modal fade" style="overflow:scroll !important; -webkit-overflow-scrolling:touch !important;" id="modalChooser" tabindex="-1" role="dialog" aria-labelledby="titleChooser" aria-hidden="true">
  7.   <div class="modal-dialog modal-dialog-centered modal-lg" role="document">      
  8.     <div class="modal-content">
  9.       <div class="modal-header">
  10.         <h2 class="modal-title"><span id="titleChooser"></span></h2>        
  11.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  12.           <span aria-hidden="true">&times;</span>
  13.         </button>
  14.       </div>   
  15.       <div id="divChooser" width="100%" style="overflow:auto;height:450px;padding-left:10px;padding-right:10px;" ></div>          
  16. </div>
  17. </div>
  18. </div>
  19. <script>
  20.     $('#modalChooser').on('hidden.bs.modal', function () {      
  21.       $("#divChooser").html("");
  22.     })                
  23. </script>
  24. <!-- End of Modal for Chooser -->
  25. <!-- Modal for Nav -->
  26. <div class="modal fade" style="overflow:scroll !important; -webkit-overflow-scrolling:touch !important;" id="modalNav" tabindex="-1" role="dialog" aria-labelledby="titleNav" aria-hidden="true">
  27.   <div class="modal-dialog modal-dialog-centered" role="document">      
  28.     <div class="modal-content">
  29.       <div class="modal-header">
  30.         <span id="titleNav"></span>       
  31.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  32.           <span aria-hidden="true">&times;</span>
  33.         </button>       
  34.       </div>   
  35.       <div id="divNav" width="100%" style="overflow:auto;height:450px;" ></div>          
  36. </div>
  37. </div>
  38. </div>
  39. <script>
  40.     $('#modalNav').on('hidden.bs.modal', function () {      
  41.       $("#divNav").html("");
  42.     })                
  43. </script>
  44. <!-- End of Modal for Nav -->
  45. {#% include 'NCBSWBundle::modalui_inc.html.twig' %#}
  46.      
  47. <script>
  48. var sMsgLogin = "{{ app.session.get('ui_str')["general.messageforlogin"]|raw }}";
  49. {% if not bInFrame %}
  50. /*    if(self!=top)
  51.     {        
  52.         top.location = self.location;            
  53.     }*/
  54. {% endif %}
  55. {% if translation is defined or 'bible' in sPath %}
  56.     if($('body') != null)
  57.     {
  58.         $('body').on('click', function (e) {
  59.             //did not click a popover toggle or popover
  60.             if ($(e.target).data('toggle') !== 'popover'
  61.                 && $(e.target).parents('.popover.in').length === 0) { 
  62.                 $('[data-toggle="popover"]').popover('hide');
  63.             }   
  64.             
  65.             if ($(e.target).data('poload') !== 'popover'
  66.                 && $(e.target).parents('.popover.in').length === 0) { 
  67.                 $('*[data-poload]').popover('hide');
  68.             }          
  69.         });
  70.     }
  71. {% endif %}
  72.     
  73.     function openMyBookmarks()
  74.     {       
  75.         popupWin('{{ path('bookmark') }}', 'bookmark_win', screen.width*0.8, screen.height*0.7);
  76.     }
  77.     
  78.     function openMyNotes()
  79.     {       
  80.         popupWin('{{ path('mynote') }}', 'note_win', screen.width*0.8, screen.height*0.7);
  81.     }
  82.         
  83.     function addBookmark()
  84.     {    
  85.         {% if not bLoggedIn %}
  86.             if(confirm(sMsgLogin))
  87.             {
  88.                 window.location.href = "{{ path('login') }}";
  89.             }
  90.         {% else %}
  91.             var sUrl = document.URL;
  92.             sUrl = encodeURIComponent(sUrl);
  93.             var sTitle = encodeURIComponent(document.title); 
  94.             {% if linktype_id is defined and linktype_id is not null %} 
  95.                 var nLinkTypeID = {{ linktype_id }}; 
  96.             {% else %}
  97.                 var nLinkTypeID = 3; 
  98.             {% endif %}           
  99.                       
  100.             var sLink = "/dbadmin/sc_addbookmark.php?url="+sUrl+"&title="+sTitle+"&linktypeid="+nLinkTypeID;        
  101.             $.ajax({ url: sLink, success: function(sHtml) {                
  102.                 var nID = sHtml.trim(); 
  103.                 if(nID != '')
  104.                 {
  105.                     nCurrentBookmarkID = nID;
  106.                     showHideBookmarkIcon(true);
  107.                     {% if 'mybookmarks' in sPath %}
  108.                         onSearchMybookmark();
  109.                     {% endif %}    
  110.                 }
  111.             } });
  112.         {% endif %}
  113.     }
  114.         
  115.     function showHideBookmarkIcon(vHasBookmark)
  116.     {
  117.         if(vHasBookmark)
  118.         {
  119.             hideElemByID("liAddBookmark");
  120.             showElemByID("liDeleteBookmark");
  121.         }
  122.         else
  123.         {
  124.             showElemByID("liAddBookmark");
  125.             hideElemByID("liDeleteBookmark");
  126.         }
  127.     }
  128.         
  129.     function addNote(vAddLink)
  130.     {
  131.         {% if not bLoggedIn %}
  132.             if(confirm(sMsgLogin))
  133.             {
  134.                 window.location.href = "{{ path('login') }}";
  135.             }
  136.         {% else %}
  137.             if(vAddLink != 0)
  138.             {
  139.                 var sUrl = encodeURIComponent(document.URL); 
  140.                 var sTitle = encodeURIComponent(document.title); 
  141.                 {% if linktype_id is defined and linktype_id is not null %} 
  142.                     var nLinkTypeID = {{ linktype_id }}; 
  143.                 {% else %}
  144.                     var nLinkTypeID = 3; 
  145.                 {% endif %}
  146.                 popupWin("{{ path('mynote') }}?action=add&link="+sUrl+"&title="+sTitle+"&linktypeid="+nLinkTypeID, 'note_win', screen.width*0.6, screen.height*0.7);
  147.             }
  148.             else
  149.             {
  150.                 popupWin("{{ path('mynote') }}?action=add", 'note_win', screen.width*0.6, screen.height*0.7);
  151.             }
  152.         {% endif %}
  153.     }    
  154.         
  155.     function reloadNotes()
  156.     {
  157.         {% if 'mynotes' in sPath %}
  158.             onSearchMynote();
  159.         {% else %}
  160.             window.location.reload();
  161.         {% endif %}
  162.     }
  163.     
  164.     function addReadingPlanNote(vPlanStepID)
  165.     {
  166.         {% if not bLoggedIn %}
  167.             if(confirm(sMsgLogin))
  168.             {
  169.                 window.location.href = "{{ path('login') }}";
  170.             }
  171.         {% else %}            
  172.             popupWin("{{ path('mynote') }}?action=add&rps="+vPlanStepID, 'note_win', screen.width*0.6, screen.height*0.7);            
  173.         {% endif %}
  174.     }
  175.                     
  176.     sAdvancedSearchLink = "{{ path('advanced_search') }}";    
  177.     sLatinSearchLink = "{{ path('advanced_latin_search') }}";
  178.     sBibleLink = "{{ path('bible') }}";         
  179.             
  180.     function showBibleComparisonAlert()
  181.     {
  182.         alert("{{ app.session.get('ui_str')["popup.biblecomparisonalert"]|raw }}");
  183.     }
  184.     
  185.     // For Bible word popover
  186.     {% if 'bible' in sPath %}    
  187.         var oPopoverLink = null;
  188.         $('*[data-poload]').mouseenter(function() {
  189.         //    $('*[data-poload]').popover('hide');            
  190.             var e = $(this);            
  191.             oPopoverLink = e;
  192.             e.off('hover');
  193.             setTimeout(function () {
  194.                 if(oPopoverLink == e)
  195.                 {
  196.                     $.get(e.data('poload'), function(d) {
  197.                             e.popover({                    
  198.                                 html: true,
  199.                                 content: d
  200.                             }).popover('show');
  201.                     });
  202.                 }
  203.             }, 500);  
  204.         });
  205.         
  206.         $('*[data-poload]').mouseleave(function() {                 
  207.             var e = $(this);  
  208.             oPopoverLink = null;   
  209.           setTimeout(function () {    
  210.                 if (!$(".popover:hover").length) {
  211.                     e.popover("hide")
  212.                 }
  213.             }, 300);              
  214.         }); 
  215.         
  216.         $(document).on('mouseleave','.popover-body',function(){
  217.                 $('*[data-poload]').popover('hide');
  218.         });
  219.     {% endif %}
  220.     // End of Bible word popover
  221.     
  222.     function setReceiveVerseOfDay()
  223.     {
  224.         {% if not bLoggedIn %}    
  225.             if(confirm(sMsgLogin))
  226.             {
  227.                 window.location.href = "{{ path('login') }}?vod=1";
  228.             }
  229.         {% else %}
  230.             var sUrl = "/dbadmin/sc_setreceiveverseofday.php";            
  231.             $.ajax({ url: sUrl, success: function(sHtml) {                                 
  232.                 var sUrl2 = "/set_session/1";    
  233.                 $.ajax({ url: sUrl2, success: function(sHtml2) {                     
  234.                     alert("{{ app.session.get('ui_str')["verseofday.aftersignup"]|raw }}"); 
  235.                     location.reload();            
  236.                 } });
  237.             } });
  238.         {% endif %}
  239.         
  240.     }  
  241.     
  242.     {% if bLoggedIn and app.session.get("user_signed_up_verse_of_day") == 1 %}
  243.         {{ app.session.set("user_signed_up_verse_of_day", "") }}
  244.         alert("{{ app.session.get('ui_str')["verseofday.aftersignup"]|raw }}");
  245.     {% endif %}    
  246.     
  247.     function AnalyzeLatinWord(vWord)
  248.     {        
  249.         if(vWord == 'undefined')
  250.             vWord = "";
  251.     
  252.         {% if bAdminUser or bNeoSearchAdmin or nUserLevelId == '3' or nUserLevelId == '6' %}
  253.             var sPage = "/dbadmin/vneolatin_usedwordlist.php?cmd=search&t=vneolatin_usedword&z_word=%3D&x_word="+vWord+"&z_base=%3D&x_base=&z_type_id=%3D&x_type_id=&z_subtype_id=%3D&x_subtype_id=&z_characteristic=%3D&x_characteristic=&z_latin_case=%3D&x_latin_case=&z_latin_gender=%3D&x_latin_gender=&z_latin_person=%3D&x_latin_person=&z_latin_number=%3D&x_latin_number=&z_latin_tense=%3D&x_latin_tense=&z_latin_voice=%3D&x_latin_voice=&z_latin_mood=%3D&x_latin_mood=&z_is_indeclinable=%3D&x_is_indeclinable=&z_is_irregular=%3D&x_is_irregular=&psearch=&psearchtype=&popup=1";                
  254.         {% else %}    
  255.             var sPage = "/dbadmin/vneolatin_wordforpubliclist.php?cmd=search&t=vneolatin_wordforpublic&z_word=%3D&x_word="+vWord+"&z_base=%3D&x_base=&z_type_id=%3D&x_type_id=&z_subtype_id=%3D&x_subtype_id=";            
  256.         {% endif %}    
  257.         openWin(sPage+'&language=en', screen.width/1.3, screen.height/1.2, 20, 20);        
  258.     }
  259.     
  260.     function showMsg(vIndex)
  261.     {
  262.         var sMsg = "";
  263.         if(vIndex == 'addednote')
  264.         {
  265.             sMsg = "{{ app.session.get('ui_str')["mynote.added"]|raw }}";
  266.         }
  267.         else if(vIndex == 'editednote')
  268.         {
  269.             sMsg = "{{ app.session.get('ui_str')["mynote.edited"]|raw }}";
  270.         }        
  271.         else if(vIndex == 'editedbookmark')
  272.         {
  273.             sMsg = "{{ app.session.get('ui_str')["mybookmark.edited"]|raw }}";
  274.         }
  275.         else if(vIndex == 'addedbookmark')
  276.         {
  277.             sMsg = "{{ app.session.get('ui_str')["mybookmark.added"]|raw }}";
  278.         }
  279.         alert(sMsg);
  280.     }         
  281. </script>