Help in progress

environments/ppa-mbqj77/deployments/1
Xavier Guimard 15 years ago
parent 090be1fb93
commit e0f4aca8b3
  1. 71
      modules/lemonldap-ng-manager/example/skins/default/js/manager.js
  2. 7
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm

@ -4,8 +4,18 @@
/* Help chapters */
var helpCh={
'rules':'/pages/documentation/1.0/writingrulesand_headers.html#rules',
'authParams':'/pages/documentation/1.0/start.html#authentication_and_users_database',
'cookies':'/pages/documentation/1.0/ssocookie.html',
'headers':'/pages/documentation/1.0/writingrulesand_headers.html#headers',
'menu':'/pages/documentation/1.0/portalmenu.html',
'issuerdb':'/pages/documentation/1.0/start.html#identity_provider',
'notifications':'/pages/documentation/1.0/notifications.html',
'portalParams':'/pages/documentation/1.0/portal.html',
'redirections':'/pages/documentation/1.0/redirections.html',
'rules':'/pages/documentation/1.0/writingrulesand_headers.html#rules',
'sessiondb':'/pages/documentation/1.0/start.html#sessions',
'logs':'/pages/documentation/1.0/logs.html',
'userdbParams':'/pages/documentation/1.0/start.html#authentication_and_users_database',
'default':'/'
};
@ -1385,32 +1395,43 @@ function networkPb(){
function loadAndScroll(url,prefix){
var t=url.match(/^(.*?)(?:#(.*))?$/);
var dir=t[1].match(/(.*\/)/);
$('#help_content').load(t[1],function(){
/* Scroll to anchor if defined */
if(typeof(t[2])=='string')
$('#help_content').attr('scrollTop',$("a[name='"+t[2]+"']").position().top-$('#help_content').position().top);
/* Replace help_content links */
$('#help_content a').each(function(i){
if(typeof($(this).attr('href'))=='string'){
/* Links must be opened in another window */
$(this).attr('target','_blank');
var href=$(this).attr('href');
/* absolute links are prefixed if needed */
if(typeof(prefix)=='string' && typeof(dir[0])=='string' && href.match(/^\//)){
$(this).attr('href',prefix+href);
}
/* relative links are replaced by absolute ones */
//else if(href.match(/^\.\./)){
else if(!href.match(/^https?:\/\//)){
$(this).attr('href',dir[0]+href);
$.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='<div class="dokuwiki">';
var i;
for(i=0;i<tmp.length;i++){
if(typeof(tmp[i].innerHTML)=='string')res+=tmp[i].innerHTML;
}
$('#help_content').html(res);
$('#help_content').attr('scrollTop',0);
/* Scroll to anchor if defined */
if(typeof(t[2])=='string')
$('#help_content').attr('scrollTop',$("a[name='"+t[2]+"']").position().top-$('#help_content').position().top);
/* Replace help_content links */
$('#help_content a,#help_content img').each(function(i){
var hn;
if(this.tagName=='IMG'){hn='src'}else{hn='href'}
if(typeof($(this).attr(hn))=='string'){
/* Links must be opened in another window */
$(this).attr('target','_blank');
var href=$(this).attr(hn);
/* absolute links are prefixed if needed */
if(typeof(prefix)=='string' && typeof(dir[0])=='string' && href.match(/^\//)){
$(this).attr(hn,prefix+href);
}
/* relative links are replaced by absolute ones */
else if(!href.match(/^https?:\/\//)){
$(this).attr(hn,dir[0]+href);
}
}
});
}
});
/* Remove wiki header tags */
$('#help_content link').remove();
$('#help_content meta').remove();
$('#help_content title').remove();
}
});
}
var lasthelp='';

@ -253,6 +253,7 @@ sub struct {
portalMenu => {
_nodes => [qw(portalModules applicationList)],
_help => 'menu',
portalModules => {
_nodes => [
qw(portalDisplayLogout portalDisplayChangePassword portalDisplayAppslist)
@ -563,6 +564,7 @@ sub struct {
# ISSUERDB PARAMETERS
issuerParams => {
_nodes => [qw(issuerDBSAML issuerDBCAS issuerDBOpenID)],
_help => 'issuerdb',
issuerDBSAML => {
_nodes => [
qw(issuerDBSAMLActivation issuerDBSAMLPath issuerDBSAMLRule)
@ -626,6 +628,7 @@ sub struct {
# LOGS PARAMETERS
logParams => {
_nodes => [qw(syslog useXForwardedForIP whatToTrace)],
_help => 'logs',
syslog => 'text:/syslog',
useXForwardedForIP => 'bool:/useXForwardedForIP',
whatToTrace => 'text:/whatToTrace:whatToTrace:text',
@ -659,6 +662,7 @@ sub struct {
sessionStorage => {
_nodes => [qw(globalStorage cn:globalStorageOptions)],
_help => 'sessionsdb',
globalStorage => 'text:/globalStorage',
globalStorageOptions => {
_nodes => ['hash:/globalStorageOptions:storage:btext'],
@ -737,6 +741,7 @@ sub struct {
_nodes => [
qw(https port useRedirectOnForbidden useRedirectOnError)
],
_help => 'redirections',
https => 'bool:/https',
port => 'int:/port',
useRedirectOnForbidden => 'bool:/useRedirectOnForbidden',
@ -1678,7 +1683,7 @@ sub defaultConf {
notification => '0',
notificationStorage => 'File',
notifyDeleted => '1',
notifyOther => '1',
notifyOther => '0',
openIdSreg_fullname => 'cn',
openIdSreg_nickname => 'uid',
openIdSreg_timezone => '_timezone',

Loading…
Cancel
Save