Commit aa03855f authored by Xavier Guimard's avatar Xavier Guimard

Remove inline CSS/JS (#LEMONLDAP-1137)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_9-bugfixes@5805 1dbb9719-a921-0410-b57f-c3a383c2c641
parent c889505f
......@@ -8,6 +8,7 @@ LogLevel debug
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
<Directory />
Options FollowSymLinks
AllowOverride None
......
......@@ -155,6 +155,27 @@ sub handler { _mustBeDefined(@_) }
sub sendHtml {
my ( $self, $req, $template ) = @_;
my $sp = $self->staticPrefix;
$sp =~ s/\/*$/\//;
my $sc = $req->scriptname;
$sc = '.' unless ($sc);
$sc =~ s#/*$#/#;
if ( defined $req->params('js') ) {
my $s =
sprintf 'var staticPrefix="%s";'
. 'var scriptname="%s";'
. 'var availableLanguages="%s".split(/[,;] */);'
. 'var portal="%s";', $sp, $sc, $self->languages, $self->portal;
$s .= $self->javascript($req) if ( $self->can('javascript') );
return [
200,
[
'Content-Type' => 'application/javascript',
'Content-Length' => length($s)
],
[$s]
];
}
my $htpl;
$template = $self->templateDir . "/$template.tpl";
return $self->sendError( $req, "Unable to read $template", 500 )
......@@ -172,16 +193,10 @@ sub sendHtml {
# TODO: replace app
# TODO: warn if STATICPREFIX does not end with '/'
my $sp = $self->staticPrefix;
$sp =~ s/\/*$/\//;
$htpl->param(
SCRIPT_NAME => $req->scriptname,
STATIC_PREFIX => $sp,
AVAILABLE_LANGUAGES => $self->languages,
PORTAL => $self->portal,
LINKS => $self->links ? to_json( $self->links ) : '""',
MENULINKS => $self->menuLinks ? to_json( $self->menuLinks ) : '""',
VERSION => $Lemonldap::NG::Common::VERSION,
SCRIPTNAME => $sc,
( $self->can('tplParams') ? ( $self->tplParams ) : () ),
);
};
if ($@) {
......
......@@ -105,6 +105,20 @@ sub init {
1;
}
sub tplParams {
return ( VERSION => $VERSION, );
}
sub javascript {
my ($self) = @_;
return
'var formPrefix=staticPrefix+"forms/";var confPrefix=scriptname+"confs/";'
. ( $self->links ? 'var links=' . JSON::to_json( $self->links ) . ';' : '' )
. ( $self->menuLinks
? 'var menulinks=' . JSON::to_json( $self->menuLinks ) . ';'
: '' );
}
1;
__END__
......
......@@ -231,3 +231,11 @@ dl,
min-height: auto;
border: none;
}
/* Some specific styles */
.maxw {
width: 100%;
}
.center {
text-align: center;
}
.tree-node{border-width:1px;border-style:solid;border-radius:4px;margin-bottom:8px}.tree-node-default{background:#fff}.angular-ui-tree-handle{cursor:pointer}#pleaseWait{background-color:#fff;width:100%;min-height:9.9%;height:auto;z-index:5000;position:absolute;left:0;top:0;margin-left:auto;margin-right:auto;padding:30% 20%;text-align:center;opacity:.8;filter:alpha(opacity=80)}.panel .table th{width:20%;vertical-align:middle}ul.cat-tree{list-style-type:square}p.cat-tree-category{font-weight:bold}html,body{margin:0;padding:0;height:100vh;background:radial-gradient(circle at 50% 0,#fff 0,#ddd 100%) no-repeat scroll 0 0 #ddd}header#navbar{height:9vh;margin-bottom:1vh;padding-bottom:0vh}#content{max-height:86vh;height:86vh;margin:0;padding:0;position:relative}header#navbar .navbar-brand{padding:10px 15px}header#navbar .navbar-brand img{background:#fff}textarea{width:100%}textarea#privateKey,textarea#publicKey,textarea#filetext{font-size:8pt}dl,.panel{margin-bottom:8px}.panel-body{padding:5px}.input-group-solid{border:1px solid #CCC;border-radius:4px;padding:6px 12px}.input-group>.input-group-solid:last-child{border-bottom-left-radius:0;border-top-left-radius:0}#cfgnum{position:relative}#cfgnum.label-warning:hover:after{content:attr(comment);padding:4px 8px;color:rgba(0,0,0,0.5);position:absolute;left:100%;bottom:100%;white-space:nowrap;z-index:2;border-radius:5px;background:#f0ad4e}.link{cursor:pointer}#bottom .panel{height:100%;margin-top:8px}#bottom .panel-body{height:100%}#right{display:flex;flex-direction:column}#bottom{flex:1}@media(min-width:768px){.scrollable-sm{max-height:86vh!important;overflow:auto}#right,#left{max-height:86vh!important;height:86vh}#top{overflow-x:hidden}#bottom{height:43vh;overflow:hidden}}#top,#bottom,#right,#left{position:relative}@media(max-width:767px){#right{position:absolute;top:0;z-index:1000}.lmmenu{position:static;float:left;width:100%;min-height:200px;margin-top:0;border:1px solid #ccc;box-shadow:none}#content{position:relative}}.scrollable{overflow:auto}.container{padding-bottom:15px}.hresizer{position:absolute;width:6px;top:0;bottom:0;right:0;background-color:#EEE;cursor:e-resize}.vresizer{position:absolute;height:6px;left:0;right:0;top:0;background-color:#EEE;cursor:n-resize}.angular-ui-tree-empty{min-height:auto;border:0}
\ No newline at end of file
.tree-node{border-width:1px;border-style:solid;border-radius:4px;margin-bottom:8px}.tree-node-default{background:#fff}.angular-ui-tree-handle{cursor:pointer}#pleaseWait{background-color:#fff;width:100%;min-height:9.9%;height:auto;z-index:5000;position:absolute;left:0;top:0;margin-left:auto;margin-right:auto;padding:30% 20%;text-align:center;opacity:.8;filter:alpha(opacity=80)}.panel .table th{width:20%;vertical-align:middle}ul.cat-tree{list-style-type:square}p.cat-tree-category{font-weight:bold}html,body{margin:0;padding:0;height:100vh;background:radial-gradient(circle at 50% 0,#fff 0,#ddd 100%) no-repeat scroll 0 0 #ddd}header#navbar{height:9vh;margin-bottom:1vh;padding-bottom:0vh}#content{max-height:86vh;height:86vh;margin:0;padding:0;position:relative}header#navbar .navbar-brand{padding:10px 15px}header#navbar .navbar-brand img{background:#fff}textarea{width:100%}textarea#privateKey,textarea#publicKey,textarea#filetext{font-size:8pt}dl,.panel{margin-bottom:8px}.panel-body{padding:5px}.input-group-solid{border:1px solid #CCC;border-radius:4px;padding:6px 12px}.input-group>.input-group-solid:last-child{border-bottom-left-radius:0;border-top-left-radius:0}#cfgnum{position:relative}#cfgnum.label-warning:hover:after{content:attr(comment);padding:4px 8px;color:rgba(0,0,0,0.5);position:absolute;left:100%;bottom:100%;white-space:nowrap;z-index:2;border-radius:5px;background:#f0ad4e}.link{cursor:pointer}#bottom .panel{height:100%;margin-top:8px}#bottom .panel-body{height:100%}#right{display:flex;flex-direction:column}#bottom{flex:1}@media(min-width:768px){.scrollable-sm{max-height:86vh!important;overflow:auto}#right,#left{max-height:86vh!important;height:86vh}#top{overflow-x:hidden}#bottom{height:43vh;overflow:hidden}}#top,#bottom,#right,#left{position:relative}@media(max-width:767px){#right{position:absolute;top:0;z-index:1000}.lmmenu{position:static;float:left;width:100%;min-height:200px;margin-top:0;border:1px solid #ccc;box-shadow:none}#content{position:relative}}.scrollable{overflow:auto}.container{padding-bottom:15px}.hresizer{position:absolute;width:6px;top:0;bottom:0;right:0;background-color:#EEE;cursor:e-resize}.vresizer{position:absolute;height:6px;left:0;right:0;top:0;background-color:#EEE;cursor:n-resize}.angular-ui-tree-empty{min-height:auto;border:0}.maxw{width:100%}.center{text-align:center}
\ No newline at end of file
......@@ -38,8 +38,6 @@
},{
"title": "download",
"icon": "save-file",
"action": function(cs,scope) {
scope.saveAs(cs.data[0].data+"\n"+cs.data[2].data,'application/x-pem-file',cs.title+'.pem');
}
"action": "saveAsPem"
}]
</script>
......@@ -35,8 +35,6 @@
},{
"title": "download",
"icon": "save",
"action": function(cs,scope) {
scope.saveAs(cs.data[0].data+"\n"+cs.data[2].data,'application/x-pem-file',cs.title+'.pem');
}
"action": "saveAsPem"
}]
</script>
......@@ -33,10 +33,7 @@ Special container to show hash in hash
<script type="text/menu">
[{
'title': 'newHost',
'action': function(cn,scope){
if(!cn.data) cn.data=[];
cn.data.push({"k":"newHost",h:[{"k":"key","v":"uid"}]});
},
'action': "addHost",
'icon': 'plus-sign'
}]
</script>
......@@ -27,8 +27,6 @@
},{
"title": "download",
"icon": "save-file",
"action": function(cs,scope) {
scope.saveAs(cs.data,'text/plain',cs.title+'.txt');
}
"action": "saveAsText"
}]
</script>
......@@ -33,7 +33,7 @@
<script type="text/menu">
[{
"title": "downloadIt",
"action": function(c,$scope){window.open($scope.confPrefix+$scope.currentCfg.cfgNum+'?full');},
"action": "downloadConf",
"icon": "export"
},{
"title": "restore",
......
......@@ -161,7 +161,12 @@
compile: function(element, attr) {
var t;
if (t = attr.type.match(/text\/(menu|parameters)/)) {
$htmlParams.set(t[1], eval(element[0].text));
try {
return $htmlParams.set(t[1], JSON.parse(element[0].text));
} catch(e) {
console.log("Parsing error:", e);
return;
}
}
}
}
......@@ -306,4 +311,4 @@
$httpProvider.interceptors.push('$lmhttp');
}]);
})();
\ No newline at end of file
})();
(function(){var llapp=angular.module("llApp",[]);llapp.provider("$translator",$Translator);function $Translator(){var res={};if(navigator){var nlangs=[navigator.language];if(navigator.languages){nlangs=navigator.languages}var langs=[],langs2=[];nlangs.forEach(function(nl){availableLanguages.forEach(function(al){if(al==nl){langs.push(al)}else{if(al.substring(0,1)==nl.substring(0,1)){langs2.push(al)}}})});res.lang=langs[0]?langs[0]:langs2[0]?langs2[0]:"en"}else{res.lang="en"}res.deferredTr=[];res.translationFields={};res.translate=function(s){if(res.translationFields[s]){s=res.translationFields[s]}return s};res.translateField=function(node,field){return res.translate(node[field])};res.translateP=function(s){if(s&&res.translationFields.portal){s=s.replace(/__(\w+)__/g,function(match,w){return res.translate(w)})}return s};this.$get=["$q","$http",function($q,$http){res.last="";res.init=function(lang){if(!lang){lang=res.lang}var d=$q.defer();if(res.last!=lang){res.last=lang;$http.get(staticPrefix+"languages/"+lang+".json").then(function(response){res.translationFields=response.data;res.deferredTr.forEach(function(h){h.e[h.f](res.translationFields[h.m])});res.deferredTr=[];d.resolve("Translation files loaded")},function(resp){d.reject("")})}else{d.resolve("No change")}return d.promise};return res}]}llapp.directive("trspan",["$translator",function($translator){return{restrict:"A",replace:false,transclude:true,scope:{trspan:"@"},link:function(scope,elem,attr){if($translator.translationFields.portal){attr.trspan=$translator.translate(attr.trspan)}else{$translator.deferredTr.push({e:elem,f:"text",m:attr.trspan})}elem.text(attr.trspan)},template:""}}]);llapp.provider("$htmlParams",$HtmlParamsProvider);function $HtmlParamsProvider(){this.$get=function(){var params={};return{set:function(key,obj){params[key]=obj},menu:function(){return params.menu},params:function(){return params.params}}}}llapp.directive("script",["$htmlParams",function($htmlParams){return{restrict:"E",terminal:true,compile:function(element,attr){var t;if(t=attr.type.match(/text\/(menu|parameters)/)){$htmlParams.set(t[1],eval(element[0].text))}}}}]);llapp.controller("ModalInstanceCtrl",["$scope","$uibModalInstance","elem","set","init",function($scope,$uibModalInstance,elem,set,init){var oldValue;$scope.elem=elem;$scope.set=set;$scope.result=init;$scope.staticPrefix=staticPrefix;var currentNode=elem("currentNode");$scope.translateP=elem("translateP");if(currentNode){oldValue=currentNode.data;$scope.currentNode=currentNode}$scope.ok=function(){set("result",$scope.result);$uibModalInstance.close(true)};$scope.cancel=function(){if(currentNode){$scope.currentNode.data=oldValue}$uibModalInstance.dismiss("cancel")};$scope.inSelect=function(value){for(var i=0;i<$scope.currentNode.select.length;i++){if($scope.currentNode.select[i].k==value){return true}}return false}}]);llapp.directive("onReadFile",["$parse",function($parse){return{restrict:"A",scope:false,link:function(scope,element,attrs){var fn=$parse(attrs.onReadFile);element.on("change",function(onChangeEvent){var reader=new FileReader();reader.onload=function(onLoadEvent){scope.$apply(function(){fn(scope,{$fileContent:onLoadEvent.target.result})})};reader.readAsText((onChangeEvent.srcElement||onChangeEvent.target).files[0])})}}}]);llapp.directive("resizer",["$document",function($document){var rsize,hsize;return function($scope,$element,$attrs){$element.on("mousedown",function(event){if($attrs.resizer=="vertical"){rsize=$($attrs.resizerRight).width()+$($attrs.resizerLeft).width()}else{hsize=$($attrs.resizerTop).height()+$($attrs.resizerBottom).height()}event.preventDefault();$document.on("mousemove",mousemove);$document.on("mouseup",mouseup)});function mousemove(event){if($attrs.resizer=="vertical"){var x=event.pageX;if($attrs.resizerMax&&x>$attrs.resizerMax){x=parseInt($attrs.resizerMax)}$($attrs.resizerLeft).css({width:x+"px"});$($attrs.resizerRight).css({width:(rsize-x)+"px"})}else{var y=event.pageY-$("#navbar").height();$($attrs.resizerTop).css({height:y+"px"});$($attrs.resizerBottom).css({height:(hsize-y)+"px"})}}function mouseup(){$document.unbind("mousemove",mousemove);$document.unbind("mouseup",mouseup)}}}]);llapp.factory("$lmhttp",["$q","$location",function($q,$location){return{responseError:function(rejection){if(rejection.status==401&&window.portal){window.location=window.portal+"?url="+window.btoa(window.location).replace(/\//,"_")}else{return $q.reject(rejection)}}}}]);llapp.config(["$httpProvider",function($httpProvider){$httpProvider.interceptors.push("$lmhttp")}])})();
\ No newline at end of file
(function(){var b=angular.module("llApp",[]);b.provider("$translator",c);function c(){var e={};if(navigator){var g=[navigator.language];if(navigator.languages){g=navigator.languages}var f=[],d=[];g.forEach(function(h){availableLanguages.forEach(function(i){if(i==h){f.push(i)}else{if(i.substring(0,1)==h.substring(0,1)){d.push(i)}}})});e.lang=f[0]?f[0]:d[0]?d[0]:"en"}else{e.lang="en"}e.deferredTr=[];e.translationFields={};e.translate=function(h){if(e.translationFields[h]){h=e.translationFields[h]}return h};e.translateField=function(h,i){return e.translate(h[i])};e.translateP=function(h){if(h&&e.translationFields.portal){h=h.replace(/__(\w+)__/g,function(j,i){return e.translate(i)})}return h};this.$get=["$q","$http",function(h,i){e.last="";e.init=function(k){if(!k){k=e.lang}var j=h.defer();if(e.last!=k){e.last=k;i.get(staticPrefix+"languages/"+k+".json").then(function(l){e.translationFields=l.data;e.deferredTr.forEach(function(m){m.e[m.f](e.translationFields[m.m])});e.deferredTr=[];j.resolve("Translation files loaded")},function(l){j.reject("")})}else{j.resolve("No change")}return j.promise};return e}]}b.directive("trspan",["$translator",function(d){return{restrict:"A",replace:false,transclude:true,scope:{trspan:"@"},link:function(f,g,e){if(d.translationFields.portal){e.trspan=d.translate(e.trspan)}else{d.deferredTr.push({e:g,f:"text",m:e.trspan})}g.text(e.trspan)},template:""}}]);b.provider("$htmlParams",a);function a(){this.$get=function(){var d={};return{set:function(e,f){d[e]=f},menu:function(){return d.menu},params:function(){return d.params}}}}b.directive("script",["$htmlParams",function(d){return{restrict:"E",terminal:true,compile:function(h,f){var g;if(g=f.type.match(/text\/(menu|parameters)/)){try{return d.set(g[1],JSON.parse(h[0].text))}catch(i){console.log("Parsing error:",i);return}}}}}]);b.controller("ModalInstanceCtrl",["$scope","$uibModalInstance","elem","set","init",function(d,h,g,j,i){var e;d.elem=g;d.set=j;d.result=i;d.staticPrefix=staticPrefix;var f=g("currentNode");d.translateP=g("translateP");if(f){e=f.data;d.currentNode=f}d.ok=function(){j("result",d.result);h.close(true)};d.cancel=function(){if(f){d.currentNode.data=e}h.dismiss("cancel")};d.inSelect=function(l){for(var k=0;k<d.currentNode.select.length;k++){if(d.currentNode.select[k].k==l){return true}}return false}}]);b.directive("onReadFile",["$parse",function(d){return{restrict:"A",scope:false,link:function(h,f,e){var g=d(e.onReadFile);f.on("change",function(j){var i=new FileReader();i.onload=function(k){h.$apply(function(){g(h,{$fileContent:k.target.result})})};i.readAsText((j.srcElement||j.target).files[0])})}}}]);b.directive("resizer",["$document",function(f){var e,d;return function(i,h,g){h.on("mousedown",function(l){if(g.resizer=="vertical"){e=$(g.resizerRight).width()+$(g.resizerLeft).width()}else{d=$(g.resizerTop).height()+$(g.resizerBottom).height()}l.preventDefault();f.on("mousemove",j);f.on("mouseup",k)});function j(m){if(g.resizer=="vertical"){var l=m.pageX;if(g.resizerMax&&l>g.resizerMax){l=parseInt(g.resizerMax)}$(g.resizerLeft).css({width:l+"px"});$(g.resizerRight).css({width:(e-l)+"px"})}else{var n=m.pageY-$("#navbar").height();$(g.resizerTop).css({height:n+"px"});$(g.resizerBottom).css({height:(d-n)+"px"})}}function k(){f.unbind("mousemove",j);f.unbind("mouseup",k)}}}]);b.factory("$lmhttp",["$q","$location",function(d,e){return{responseError:function(f){if(f.status==401&&window.portal){window.location=window.portal+"?url="+window.btoa(window.location).replace(/\//,"_")}else{return d.reject(f)}}}}]);b.config(["$httpProvider",function(d){d.interceptors.push("$lmhttp")}])})();
\ No newline at end of file
......@@ -181,6 +181,10 @@
$scope.showModal('message.html');
};
$scope.downloadConf = function(c,$scope) {
window.open($scope.confPrefix + $scope.currentCfg.cfgNum + '?full');
};
$scope.save = function() {
$scope.showModal('save.html').then(function() {
$scope.waiting = true;
......@@ -345,6 +349,12 @@
});
};
/* Add host*/
$scope.addHost = function(cn,scope) {
if(!cn.data) cn.data = [];
cn.data.push({"k":"newHost",h:[{"k":"key","v":"uid"}]});
};
/* SAML attribute entry */
$scope.addSamlAttribute = function() {
var node = $scope._findContainer();
......@@ -916,6 +926,14 @@
type: type
}), filename);
};
/* Save as pem, text */
$scope.saveAsPem = function(cs,scope) {
scope.saveAs(cs.data[0].data + "\n" + cs.data[2].data, 'application/x-pem-file', cs.title + ".pem");
};
$scope.saveAsText = function(cs,scope) {
scope.saveAs(cs.data, 'text/plain', cs.title + ".txt");
};
}]);
})();
\ No newline at end of file
})();
......@@ -7,21 +7,25 @@
<link rel="shortcut icon" type="image/vnd.microsoft.icon" sizes="16x16 32x32 48x48 64x64 128x128" href="<TMPL_VAR NAME="STATIC_PREFIX">logos/favicon.ico" />
<link rel="icon" type="image/vnd.microsoft.icon" sizes="16x16 32x32 48x48 64x64 128x128" href="<TMPL_VAR NAME="STATIC_PREFIX">logos/favicon.ico" />
<!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/angular.js/angular-csp.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-ui-tree/dist/angular-ui-tree.min.css" />
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">css/manager.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-csp.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-tree/2.13.0/angular-ui-tree.min.css" />
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"></script>
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">css/manager.min.css" />
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular/angular-csp.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-ui-tree/dist/angular-ui-tree.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">css/manager.min.css" />
//else -->
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular/angular-csp.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-ui-tree/dist/angular-ui-tree.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap-theme.css" />
......
......@@ -5,7 +5,7 @@
<link rel="prefetch" href="<TMPL_VAR NAME="STATIC_PREFIX">struct.json" />
</head>
<body ng-app="llngManager" ng-controller="TreeCtrl">
<body ng-app="llngManager" ng-controller="TreeCtrl" ng-csp>
<TMPL_INCLUDE NAME="menubar.tpl">
......@@ -54,9 +54,6 @@
</div>
<!-- Help container -->
<div id="bottom" ng-if="showH" class="hidden-xs">
<div style="position:absolute;top:-3px;right:0;color:red">
<span class="glyphicon glyphicon-remove" ng-click="setShowHelp(false)" tabIndex="10"></span>
</div>
<div class="panel panel-default">
<div class="panel-body">
<iframe id="helpframe" width="100%" height="100%" ng-src="{{translate('/doc/')+'pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe>
......@@ -109,7 +106,7 @@
<h3 class="modal-title" trspan="{{elem('message').title}}" />
</div>
<div class="modal-body">
<div class="input-group" style="width:100%;">
<div class="input-group maxw">
<label class="input-group-addon" for="promptinput" trspan="{{elem('message').field}}"/>
<input id="promptinput" class="form-control" ng-model="result"/>
</div>
......@@ -150,7 +147,7 @@
<h3 class="modal-title" trspan="enterPassword" />
</div>
<div class="modal-body">
<div class="input-group" style="width:100%;">
<div class="input-group maxw">
<label class="input-group-addon" for="mdPwd" trspan="password"/>
<input id="mdPwd" class="form-control" ng-model="result"/>
</div>
......@@ -167,7 +164,7 @@
<h3 class="modal-title" trspan="savingConfirmation" />
</div>
<div class="modal-body">
<div class="input-group" style="width:100%;">
<div class="input-group maxw">
<label class="input-group-addon" for="longtextinput" trspan="cfgLog"/>
<textarea id="longtextinput" rows="5" class="form-control" ng-model="result"/>
</div>
......
......@@ -3,7 +3,7 @@
<title>LemonLDAP::NG notifications explorer</title>
</head>
<body ng-app="llngNotificationsExplorer" ng-controller="NotificationsExplorerCtrl">
<body ng-app="llngNotificationsExplorer" ng-controller="NotificationsExplorerCtrl" ng-csp>
<TMPL_INCLUDE NAME="menubar.tpl">
......@@ -24,7 +24,7 @@
<div class="region region-sidebar-first">
<section id="block-superfish-1" class="block block-superfish clearfix">
<div ui-tree data-drag-enabled="false" id="tree-root">
<div ng-show="data.length==0" style="text-align:center;">
<div ng-show="data.length==0" class="center">
<span class="label label-warning" trspan="noDatas"></span>
</div>
<ol ui-tree-nodes="" ng-model="data">
......
......@@ -19,16 +19,7 @@
<!-- Constants -->
<script type="text/JavaScript">
var staticPrefix = '<TMPL_VAR NAME="STATIC_PREFIX">'.replace(/\/*$/,'/');
var formPrefix = staticPrefix+'forms/';
var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">'.replace(/^$/,'.').replace(/\/*$/,'/');
var confPrefix=scriptname+'confs/';
var availableLanguages='<TMPL_VAR NAME="AVAILABLE_LANGUAGES">'.split(/[,;] */);
var links=<TMPL_VAR NAME="LINKS">;
var menulinks=<TMPL_VAR NAME="MENULINKS">;
var portal ='<TMPL_VAR NAME="PORTAL">';
</script>
<script type="text/JavaScript" src="<TMPL_VAR NAME="SCRIPTNAME">?js"></script>
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
......
......@@ -3,7 +3,7 @@
<title>LemonLDAP::NG sessions explorer</title>
</head>
<body ng-app="llngSessionsExplorer" ng-controller="SessionsExplorerCtrl">
<body ng-app="llngSessionsExplorer" ng-controller="SessionsExplorerCtrl" ng-csp>
<TMPL_INCLUDE NAME="menubar.tpl">
......@@ -26,7 +26,7 @@
<div class="region region-sidebar-first">
<section id="block-superfish-1" class="block block-superfish clearfix">
<div ui-tree data-drag-enabled="false" id="tree-root">
<div ng-show="data.length==0" style="text-align:center;">
<div ng-show="data.length==0" class="center">
<span class="label label-warning" trspan="noDatas"></span>
</div>
<ol ui-tree-nodes="" ng-model="data">
......
......@@ -5,7 +5,7 @@
<div class="region region-sidebar-first">
<section id="block-superfish-1" class="block block-superfish clearfix">
<div ui-tree data-drag-enabled="false" id="tree-root">
<div ng-show="data.length==0" style="text-align:center;">
<div ng-show="data.length==0" class="center">
<span class="label label-warning" trspan="noDatas"></span>
</div>
<ol ui-tree-nodes="" ng-model="data">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment