diff --git a/templates/web/edugain/index.html.tt2 b/templates/web/edugain/index.html.tt2 index f94b940624bdf68e8a2f10ced017f14a56782b47..6ac96e0598f36654c6913e48cee39a53bdda1f4b 100644 --- a/templates/web/edugain/index.html.tt2 +++ b/templates/web/edugain/index.html.tt2 @@ -18,6 +18,74 @@ <script src="[% app.cdn_url %]/libs/jquery/3.7.1/jquery.min.js"></script> <script src="[% app.cdn_url %]/libs/jquery-ui/1.13.3/jquery-ui.min.js"></script> <script src="[% app.cdn_url %]/libs/jquery-validation/1.19.5/jquery.validate.min.js"></script> + <script src="[% app.cdn_url %]/libs/foundation/6.8.1/js/vendor/what-input.js"></script> + <script src="[% app.cdn_url %]/libs/foundation/6.8.1/js/vendor/foundation.min.js"></script> + <script src="js/menu.js"></script> + <script> + $(document).foundation(); + + var Help = new Array(); + Help['Help Entry 1'] = 'Text for Help Entry 1 goes in here'; + Help['Help Entry 2'] = 'Text for Help Entry 2 goes in here'; + + function openHelp($helpTrigger){ + var helpId = $helpTrigger.attr('data-help_id'); + $help = $('#help_dialog'); + $help.html('<p>' + Help[helpId] + '</p>'); + $help.dialog('option', 'title', helpId); + $help.dialog('option', { position: { my: "left top", at: "right bottom", of: $helpTrigger } }); + $help.dialog('open'); + } + + $(function(){ + var $footer = $('footer'); + + var $body = $("body"); + $body.css('margin-top', 0); + $body.css('margin-bottom', 0); + + // function to set the height on fly + function autoHeight() { + // $('#wrap').css('min-height', 0); + $('#wrap').css('min-height', ( + $(document).outerHeight() + - $('header').outerHeight() + + $('#wrap').height() + - $('#wrap').outerHeight() + - $footer.height() + )); + } + + // onDocumentReady function bind + $(document).ready(function() { + autoHeight(); + + $("button").mouseout(function(){ + this.blur(); + }) + }); + + // onResize bind of the function + $(window).resize(function() { + autoHeight(); + }); + + + $footer.css('visibility', 'visible'); + + $('#help_dialog').dialog({ + autoOpen: false + }); + + $('.help').click(function(e){ + e.preventDefault(); + var $helpTrigger = $(this); + openHelp($helpTrigger); + }); + + + }); + </script> <title>[% app.name %]</title> </head> @@ -92,73 +160,5 @@ </div> </footer> - <script src="foundation/js/vendor/what-input.js"></script> - <script src="foundation/js/vendor/foundation.min.js"></script> - <script src="js/menu.js"></script> - <script> - $(document).foundation(); - - var Help = new Array(); - Help['Help Entry 1'] = 'Text for Help Entry 1 goes in here'; - Help['Help Entry 2'] = 'Text for Help Entry 2 goes in here'; - - function openHelp($helpTrigger){ - var helpId = $helpTrigger.attr('data-help_id'); - $help = $('#help_dialog'); - $help.html('<p>' + Help[helpId] + '</p>'); - $help.dialog('option', 'title', helpId); - $help.dialog('option', { position: { my: "left top", at: "right bottom", of: $helpTrigger } }); - $help.dialog('open'); - } - - $(function(){ - var $footer = $('footer'); - - var $body = $("body"); - $body.css('margin-top', 0); - $body.css('margin-bottom', 0); - - // function to set the height on fly - function autoHeight() { - // $('#wrap').css('min-height', 0); - $('#wrap').css('min-height', ( - $(document).outerHeight() - - $('header').outerHeight() - + $('#wrap').height() - - $('#wrap').outerHeight() - - $footer.height() - )); - } - - // onDocumentReady function bind - $(document).ready(function() { - autoHeight(); - - $("button").mouseout(function(){ - this.blur(); - }) - }); - - // onResize bind of the function - $(window).resize(function() { - autoHeight(); - }); - - - $footer.css('visibility', 'visible'); - - $('#help_dialog').dialog({ - autoOpen: false - }); - - $('.help').click(function(e){ - e.preventDefault(); - var $helpTrigger = $(this); - openHelp($helpTrigger); - }); - - - }); - </script> </body> </html>