diff --git a/build/lemonldap-ng/Makefile b/build/lemonldap-ng/Makefile index da5e77158..e5b99be58 100644 --- a/build/lemonldap-ng/Makefile +++ b/build/lemonldap-ng/Makefile @@ -300,6 +300,7 @@ install_manager_site: install_conf_dir install -v -d $(RMANAGERSKINSDIR)/$$skin; \ done @cp -pR --remove-destination ${SRCMANAGERDIR}/example/index.pl ${RMANAGERDIR} + @cp -pR --remove-destination ${SRCMANAGERDIR}/example/notfound.html ${RMANAGERDIR} @cp -pR --remove-destination ${SRCMANAGERDIR}/example/skins/* $(RMANAGERSKINSDIR) @if [ "$(MANAGERDIR)/skins/" != "$(MANAGERSKINSDIR)/" ]; then \ for skin in $$(ls lemonldap-ng-manager/example/skins/); do \ diff --git a/build/lemonldap-ng/_example/etc/manager-apache.conf b/build/lemonldap-ng/_example/etc/manager-apache.conf index 59b2dc1a1..2c81a7378 100644 --- a/build/lemonldap-ng/_example/etc/manager-apache.conf +++ b/build/lemonldap-ng/_example/etc/manager-apache.conf @@ -24,6 +24,7 @@ Order deny,allow Allow from all + ErrorDocument 404 /notfound.html # Perl script diff --git a/build/lemonldap-ng/_example/etc/manager-apache2.conf b/build/lemonldap-ng/_example/etc/manager-apache2.conf index 23cefe111..655481fbe 100644 --- a/build/lemonldap-ng/_example/etc/manager-apache2.conf +++ b/build/lemonldap-ng/_example/etc/manager-apache2.conf @@ -24,6 +24,7 @@ Order deny,allow Allow from all + ErrorDocument 404 /notfound.html # Perl script diff --git a/modules/lemonldap-ng-manager/MANIFEST b/modules/lemonldap-ng-manager/MANIFEST index e39830503..9e3a7bd49 100644 --- a/modules/lemonldap-ng-manager/MANIFEST +++ b/modules/lemonldap-ng-manager/MANIFEST @@ -2,6 +2,7 @@ Changes example/index.pl example/mrtg/lmng-mrtg example/mrtg/mrtg.cfg.example +example/notfound.html example/scripts/lmConfigEditor example/sessions.pl example/skins/default/css/accordion.css diff --git a/modules/lemonldap-ng-manager/example/notfound.html b/modules/lemonldap-ng-manager/example/notfound.html new file mode 100644 index 000000000..318d9f9be --- /dev/null +++ b/modules/lemonldap-ng-manager/example/notfound.html @@ -0,0 +1,9 @@ + + +Page not found + + +

Page not found

+

Please install documentation package to get offline doc

+ + diff --git a/modules/lemonldap-ng-manager/example/skins/default/css/manager.css b/modules/lemonldap-ng-manager/example/skins/default/css/manager.css index d5608b511..9b91b5ff5 100644 --- a/modules/lemonldap-ng-manager/example/skins/default/css/manager.css +++ b/modules/lemonldap-ng-manager/example/skins/default/css/manager.css @@ -145,8 +145,15 @@ option #help_content { - text-align:left; - max-height:200px; + padding:5px; + overflow:hidden; + text-align:center; +} + +#help_content iframe +{ + width:100%; + height:100%; } #query-switch @@ -241,10 +248,3 @@ input#skinText { text-align: center; } -/* Force font color for help pages */ -#help_content .note, #help_content .noteimportant, #help_content .notewarning, #help_content .notetip, #help_content table { - color: #000; -} -div.dokuwiki h1,div.dokuwiki h2, div.dokuwiki h3, div.dokuwiki h4, div.dokuwiki h5 { - color: inherit; -} diff --git a/modules/lemonldap-ng-manager/example/skins/default/js/manager.js b/modules/lemonldap-ng-manager/example/skins/default/js/manager.js index a8f2dd2c4..817190b13 100644 --- a/modules/lemonldap-ng-manager/example/skins/default/js/manager.js +++ b/modules/lemonldap-ng-manager/example/skins/default/js/manager.js @@ -4,7 +4,7 @@ /* Help chapters */ var helpCh={ - 'authParams':'/pages/documentation/1.0/start.html#authentication_and_users_database', + 'authParams':'/pages/documentation/1.0/start.html#authentication_users_and_password_databases', 'cookies':'/pages/documentation/1.0/ssocookie.html', 'headers':'/pages/documentation/1.0/writingrulesand_headers.html#headers', 'menu':'/pages/documentation/1.0/portalmenu.html', @@ -29,6 +29,7 @@ if (treejquerycss.match('true')){ treejquerycss = true; } else { treejquerycss = $(document).ready(function(){ /* Menu height */ + resizeMenu(); jQuery.event.add(window, "load", resizeMenu); jQuery.event.add(window, "resize", resizeMenu); @@ -414,13 +415,12 @@ function display(div,title) { $('#newapplicationr,#delapplication').hide(); $('#newpostr,#delpost').hide(); $('#newpostdatar,#delpostdata').hide(); - /* TODO: conflict with loadAndScroll */ - /*var height_cur=$('#buttons').height()+$('#edition').height()+$('#help').height(); - var height_max=$('#menu').height(); - if(height_cur > height_max || $('#help_content').is(':visible')==false){ - $('#help h1 img').toggle(); - $('#help_content').toggle(); - }*/ + // Resize (or hide) Help window + var height_menu=$('#menu').height(); + var height_buttons_edition=$('#buttons').height()+$('#edition').height(); + var help_height=height_menu-height_buttons_edition-50; + if(help_height<1){$('#help h1 img').toggle();$('#help_content').toggle();} + else{$('#help_content').height(help_height);} } function none(id) { currentId=id; @@ -1392,55 +1392,14 @@ function networkPb(){ } /* Help management */ -function loadAndScroll(url,prefix){ - var t=url.match(/^(.*?)(?:#(.*))?$/); - var dir=t[1].match(/(.*\/)/); - $.ajax({url:t[1], - type:'GET', - dataType:'html', - complete:function(res,status){ - if(status=="success"||status=="notmodified"){ - var tmp=$(res.responseText.replace(/\n/g,'')); - /* keep just html content element */ - res='
'; - var i; - for(i=0;i'; + $('#help_content').html(html); lasthelp=ch; } }