Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
7d11dfdf
Commit
7d11dfdf
authored
Dec 11, 2009
by
Yadd
Browse files
New manager in progress
parent
b301a5b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/lemonldap-ng-manager/example/index.pl
View file @
7d11dfdf
...
...
@@ -40,6 +40,7 @@ my $template = HTML::Template->new(
cache
=>
0
,
filter
=>
sub
{
$manager
->
translate_template
(
@
_
)
},
);
$template
->
param
(
SCRIPT_NAME
=>
$ENV
{
SCRIPT_NAME
});
$template
->
param
(
MENU
=>
$manager
->
menu
());
$template
->
param
(
DIR
=>
"
$skin_dir
/
$skin
");
print
$manager
->
header
('
text/html; charset=utf-8
');
...
...
modules/lemonldap-ng-manager/example/
images
/manager.js
→
modules/lemonldap-ng-manager/example/
skins/default
/manager.js
View file @
7d11dfdf
...
...
@@ -147,3 +147,12 @@ function delKey(){
$
(
'
#
'
+
currentId
).
prev
().
remove
();
$
(
'
#
'
+
currentId
).
remove
();
}
function
uploadConf
(){
$
.
post
(
scriptname
,{
data
:
$
(
'
#li_cm9vdA2
'
).
html
()},
function
(
data
){
var
tmp
=
lmtext
(
'
li_cm9vdA2
'
);
tmp
=
tmp
.
replace
(
/
\d
+/
,
data
.
result
.
cfgNum
);
setlmtext
(
'
li_cm9vdA2
'
,
tmp
);
setlmdata
(
'
li_cm9vdA2
'
,
data
.
result
.
cfgNum
);
}
,
'
json
'
);
}
modules/lemonldap-ng-manager/example/skins/default/manager.tpl
View file @
7d11dfdf
...
...
@@ -9,9 +9,9 @@
<script
src=
"<TMPL_VAR NAME="
DIR
"
>
/
jquery
.
js
"
type=
"
text
/
JavaScript
"
>
</script>
<script
src=
"<TMPL_VAR NAME="
DIR
"
>
/
tree
.
js
"
type=
"
text
/
JavaScript
"
>
</script>
<script
type=
"text/JavaScript"
>
//
<!
[
CDATA
[
var
scriptname
=
'
/experimental.cgi
'
;
var
imagepath
=
'
<TMPL_VAR NAME="DIR">/
'
;
var
scriptname
=
'
<TMPL_VAR NAME="SCRIPT_NAME">
'
;
var
imagepath
=
'
<TMPL_VAR NAME="DIR">/
'
;
//]]>
</script>
<script
src=
"
/images/
/manager.js"
type=
"text/JavaScript"
></script>
<script
src=
"
<TMPL_VAR NAME="
DIR
"
>
/
manager
.
js
"
type=
"
text
/
JavaScript
"
>
</script>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf8"
/>
</head>
<body>
...
...
@@ -26,7 +26,7 @@ var scriptname='/experimental.cgi';var imagepath='<TMPL_VAR NAME="DIR">/';
<div
style=
"z-index: 2;overflow:auto;height:500px;"
id=
"haut"
class=
"clsPane"
>
<h2
id=
"content_title"
>
Lemonldap::NG Manager
</h2>
<div
id=
"buttons"
>
<button
id=
"bsave"
onclick=
"
$.post(scriptname,
{
data
:
$
(
'#li_cm9vdA2'
).
html
()
}
,function(data)
{
return
1
}
,'html');
"
>
<button
id=
"bsave"
onclick=
"
uploadConf()
"
>
<lang
en=
"Save"
fr=
"Sauver"
/>
</button>
<button
id=
"bapply"
onclick=
"$.post(scriptname,
{
apply
:
1
}
,function(data)
{
return
1
}
,'html');"
>
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Uploader.pm
View file @
7d11dfdf
...
...
@@ -129,6 +129,7 @@ sub confUpload {
#print STDERR Dumper( $newConf, \%errors, \%warnings );
close
LOG
;
$res
->
{
result
}
->
{
cfgNum
}
=
$self
->
confObj
->
saveConf
(
$newConf
);
my
$buf
=
'
{
';
my
$i
=
0
;
while
(
my
(
$type
,
$h
)
=
each
%$res
)
{
...
...
@@ -139,7 +140,7 @@ sub confUpload {
$i
++
;
}
$buf
.=
'
}
';
print
$self
->
header
(
-
type
=>
'
text/javascript
',
-
Content_Length
=>
length
(
$buf
)
)
.
$buf
;
print
$self
->
header
(
-
type
=>
'
application/json
',
-
Content_Length
=>
length
(
$buf
)
)
.
$buf
;
$self
->
quit
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment