head.tpl 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <meta charset="{$system_charset}" />
  2. <link href="http://www.chamilo.org/documentation.php" rel="Help" />
  3. <link href="http://www.chamilo.org/team.php" rel="author" />
  4. <link href="http://www.chamilo.org" rel="Copyright" />
  5. {$favico}
  6. {* This fires some HTML5 errors *}
  7. {* <link rel="top" href="{$_p.web_main}index.php" title="" />
  8. <link rel="courses" href="{$_p.web_main}auth/courses.php" title="{"OtherCourses"|get_lang}"/>
  9. <link rel="profil" href="{$_p.web_main}auth/profile.php" title="{"ModifyProfile"|get_lang}"/> *}
  10. <meta name="Generator" content="{$_s.software_name} {$_s.system_version|substr:0:1}" />
  11. {* Use the latest engine in ie8/ie9 or use google chrome engine if available *}
  12. <!--[if ie]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
  13. {* Improve usability in portal devices*}
  14. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  15. <title>{$title_string}</title>
  16. <style type="text/css" media="screen">
  17. /*<![CDATA[*/
  18. {$css_style}
  19. /*]]>*/
  20. </style>
  21. <style type="text/css" media="print">
  22. /*<![CDATA[*/
  23. {$css_style_print}
  24. /*]]>*/
  25. </style>
  26. <script type="text/javascript">
  27. //<![CDATA[
  28. // This is a patch for the "__flash__removeCallback" bug, see FS#4378.
  29. {literal}
  30. if ((navigator.userAgent.toLowerCase().indexOf('msie') != -1 ) && ( navigator.userAgent.toLowerCase().indexOf('opera') == -1 )) {
  31. window.attachEvent( 'onunload', function() {
  32. window['__flash__removeCallback'] = function ( instance, name ) {
  33. try {
  34. if ( instance ) {
  35. instance[name] = null ;
  36. }
  37. } catch ( flashEx ) {
  38. }
  39. } ;
  40. });
  41. }
  42. {/literal}
  43. //]]>
  44. /* Global chat variables */
  45. var ajax_url = '{$_p.web_ajax}chat.ajax.php';
  46. var online_button = '{$online_button}';
  47. var offline_button = '{$offline_button}';
  48. var connect_lang = '{"ChatConnected"|get_lang}';
  49. var disconnect_lang = '{"ChatDisconnected"|get_lang}';
  50. </script>
  51. {$js_file_to_string}
  52. {$css_file_to_string}
  53. {$extra_headers}
  54. <script type="text/javascript">
  55. $(document).scroll(function() {
  56. // Top bar scroll effect
  57. if($('body').width() > 959) {
  58. if ($('.subnav').length) {
  59. if (!$('.subnav').attr('data-top')) {
  60. // If already fixed, then do nothing
  61. if ($('.subnav').hasClass('subnav-fixed')) return;
  62. // Remember top position
  63. var offset = $('.subnav').offset()
  64. $('.subnav').attr('data-top', offset.top);
  65. }
  66. if ($('.subnav').attr('data-top') - $('.subnav').outerHeight() <= $(this).scrollTop())
  67. $('.subnav').addClass('subnav-fixed');
  68. else
  69. $('.subnav').removeClass('subnav-fixed');
  70. }
  71. }
  72. });
  73. $(document).ready(function() {
  74. //Dropdown effect
  75. $('.dropdown-toggle').dropdown();
  76. //Responsive effect
  77. $(".collapse").collapse();
  78. $('.ajax').on('click', function() {
  79. var url = this.href;
  80. var dialog = $("#dialog");
  81. if ($("#dialog").length == 0) {
  82. dialog = $('<div id="dialog" style="display:hidden"></div>').appendTo('body');
  83. }
  84. // load remote content
  85. dialog.load(
  86. url,
  87. {},
  88. function(responseText, textStatus, XMLHttpRequest) {
  89. dialog.dialog({
  90. modal : true,
  91. width : 540,
  92. height : 400
  93. });
  94. });
  95. //prevent the browser to follow the link
  96. return false;
  97. });
  98. /*
  99. $(".td_actions").hide();
  100. $(".td_actions").parent('tr').mouseover(function() {
  101. $(".td_actions").show();
  102. });
  103. $(".td_actions").parent('tr').mouseout(function() {
  104. $(".td_actions").hide();
  105. });*/
  106. });
  107. </script>
  108. {$header_extra_content}
  109. <!-- head end-->