Commit 5ae758c6 authored by Xavier Guimard's avatar Xavier Guimard

Remove all inline CSS/JS (#1137)

parent f8e7e906
......@@ -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
......
......@@ -212,6 +212,27 @@ sub handler { _mustBeDefined(@_) }
sub sendHtml {
my ( $self, $req, $template, %args ) = @_;
my $sp = $self->staticPrefix;
$sp =~ s/\/*$/\//;
my $sc = $req->script_name;
$sc = '.' unless ($sc);
$sc =~ s#/*$#/#;
if ( defined $req->param('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]
];
}
$args{code} ||= 200;
$args{headers} ||= $req->respHeaders || [];
my $htpl;
......@@ -232,13 +253,9 @@ sub sendHtml {
# TODO: replace app
# TODO: warn if STATICPREFIX does not end with '/'
my $sp = $self->staticPrefix;
$sp =~ s/\/*$/\//;
$htpl->param(
SCRIPT_NAME => $req->script_name,
STATIC_PREFIX => $sp,
AVAILABLE_LANGUAGES => $self->languages,
PORTAL => $self->portal,
STATIC_PREFIX => $sp,
SCRIPTNAME => $sc,
(
$args{params}
? %{ $args{params} }
......
......@@ -19,7 +19,8 @@ use Lemonldap::NG::Common::PSGI::Constants;
our $VERSION = '2.0.0';
extends 'Lemonldap::NG::Common::Conf::AccessLib', 'Lemonldap::NG::Handler::PSGI::Router';
extends 'Lemonldap::NG::Common::Conf::AccessLib',
'Lemonldap::NG::Handler::PSGI::Router';
## @method boolean init($args)
# Launch initialization method
......@@ -106,12 +107,17 @@ sub init {
}
sub tplParams {
my $self = shift;
return (
LINKS => $self->links ? to_json( $self->links ) : '""',
MENULINKS => $self->menuLinks ? to_json( $self->menuLinks ) : '""',
VERSION => $VERSION,
);
return ( VERSION => $VERSION, );
}
sub javascript {
my ($self) = @_;
return
'var formPrefix=staticPrefix+"forms/";var confPrefix=scriptname+"confs/";'
. ( $self->links ? 'var links=' . to_json( $self->links ) . ';' : '' )
. ( $self->menuLinks
? 'var menulinks=' . to_json( $self->menuLinks ) . ';'
: '' );
}
1;
......
......@@ -129,7 +129,11 @@ llapp.directive 'script', ['$htmlParams', ($htmlParams) ->
terminal: true
compile: (element, attr) ->
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
]
# Modal controller used to display messages
......
......@@ -160,6 +160,10 @@ llapp.controller 'TreeCtrl', [
$scope.message.title = 'saveReport'
$scope.showModal 'message.html'
# Download raw conf
$scope.downlaodConf = (c,$scope) ->
window.open $scope.confPrefix + $scope.currentCfg.cfgNum + '?full'
# Main save function
$scope.save = ->
$scope.showModal('save.html').then ->
......@@ -294,6 +298,13 @@ llapp.controller 'TreeCtrl', [
logo: "network.png"
display: "auto"
# Add host
$scope.addHost = (cn,scope) ->
cn.data=[] unless cn.data
cn.data.push
k: "newHost"
h: [{"k":"key","v":"uid"}]
# SAML attribute entry
$scope.addSamlAttribute = ->
node = $scope._findContainer()
......@@ -719,4 +730,10 @@ llapp.controller 'TreeCtrl', [
# Import Filesaver.js saveAs()
$scope.saveAs = (content, type, filename) ->
saveAs(new Blob([content], {"type": type}), filename)
# Save as pem, text,...
$scope.saveAsPem = (cs,scope) ->
scope.saveAs "#{cs.data[0].data}\n#{cs.data[2].data}", 'application/x-pem-file', "#{cs.title}.pem"
$scope.saveAsText = (cs,scope) ->
scope.saveAs cs.data, 'text/plain', "#{cs.title}.txt"
]
......@@ -237,3 +237,11 @@ dl,
.new {
color: #0A0;
}
/* 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}.old{color:#A00}.new{color:#0A0}
\ 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}.old{color:#A00}.new{color:#0A0}.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>
......@@ -34,7 +34,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",
......
......@@ -147,9 +147,14 @@ LemonLDAP::NG base app module
restrict: 'E',
terminal: true,
compile: function(element, attr) {
var t;
var e, error, t;
if (t = attr.type.match(/text\/(menu|parameters)/)) {
return $htmlParams.set(t[1], eval(element[0].text));
try {
return $htmlParams.set(t[1], JSON.parse(element[0].text));
} catch (error) {
e = error;
console.log("Parsing error:", e);
}
}
}
};
......
(function(){var llapp;llapp=angular.module("llApp",[]);llapp.provider("$translator",function(){var al,j,k,langs,langs2,len,len1,nl,nlangs,ref,res;res={};if(navigator){langs=[];langs2=[];nlangs=[navigator.language];if(navigator.languages){nlangs=navigator.languages}for(j=0,len=nlangs.length;j<len;j++){nl=nlangs[j];ref=window.availableLanguages;for(k=0,len1=ref.length;k<len1;k++){al=ref[k];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){var d;if(!lang){lang=res.lang}d=$q.defer();if(res.last!==lang){res.last=lang;$http.get(window.staticPrefix+"languages/"+lang+".json").then(function(response){var h,l,len2,ref1;res.translationFields=response.data;ref1=res.deferredTr;for(l=0,len2=ref1.length;l<len2;l++){h=ref1[l];h.e[h.f](res.translationFields[h.m])}res.deferredTr=[];return d.resolve("Translation files loaded")},function(response){return d.reject("")})}else{d.resolve("No change")}return d.promise};return res}];return this});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})}return elem.text(attr.trspan)},template:""}}]);llapp.provider("$htmlParams",function(){this.$get=function(){var params;params={};return{set:function(key,obj){return params[key]=obj},menu:function(){return params.menu},params:function(){return params.params}}};return this});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)/)){return $htmlParams.set(t[1],eval(element[0].text))}}}}]);llapp.controller("ModalInstanceCtrl",["$scope","$uibModalInstance","elem","set","init",function($scope,$uibModalInstance,elem,set,init){var currentNode,oldValue,oldvalue;oldvalue=null;$scope.elem=elem;$scope.set=set;$scope.result=init;$scope.staticPrefix=window.staticPrefix;currentNode=elem("currentNode");$scope.translateP=elem("translateP");if(currentNode){oldValue=currentNode.data;$scope.currentNode=currentNode}$scope.ok=function(){set("result",$scope.result);return $uibModalInstance.close(true)};$scope.cancel=function(){if(currentNode){$scope.currentNode.data=oldValue}return $uibModalInstance.dismiss("cancel")};return $scope.inSelect=function(value){var i,j,len,ref;ref=$scope.currentNode.select;for(j=0,len=ref.length;j<len;j++){i=ref[j];if(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;fn=$parse(attrs.onReadFile);return element.on("change",function(onChangeEvent){var reader;reader=new FileReader();reader.onload=function(onLoadEvent){return scope.$apply(function(){return fn(scope,{$fileContent:onLoadEvent.target.result})})};return reader.readAsText((onChangeEvent.srcElement||onChangeEvent.target).files[0])})}}}]);llapp.directive("resizer",["$document",function($document){var hsize,rsize;hsize=null;rsize=null;return function($scope,$element,$attrs){var mousemove,mouseup;$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);return $document.on("mouseup",mouseup)});mousemove=function(event){var x,y;if($attrs.resizer==="vertical"){x=event.pageX;if($attrs.resizerMax&&x>$attrs.resizerMax){x=parseInt($attrs.resizerMax)}$($attrs.resizerLeft).css({width:x+"px"});return $($attrs.resizerRight).css({width:(rsize-x)+"px"})}else{y=event.pageY-$("#navbar").height();$($attrs.resizerTop).css({height:y+"px"});return $($attrs.resizerBottom).css({height:(hsize-y)+"px"})}};return mouseup=function(){$document.unbind("mousemove",mousemove);return $document.unbind("mouseup",mouseup)}}}]);llapp.factory("$lmhttp",["$q","$location",function($q,$location){return{responseError:function(rejection){if(rejection.status===401&&window.portal){return window.location=(window.portal+"?url=")+window.btoa(window.location).replace(/\//,"_")}else{return $q.reject(rejection)}}}}]);llapp.config(["$httpProvider",function($httpProvider){return $httpProvider.interceptors.push("$lmhttp")}])}).call(this);
\ No newline at end of file
(function(){var a;a=angular.module("llApp",[]);a.provider("$translator",function(){var l,h,f,g,e,m,i,b,c,d,n;n={};if(navigator){g=[];e=[];c=[navigator.language];if(navigator.languages){c=navigator.languages}for(h=0,m=c.length;h<m;h++){b=c[h];d=window.availableLanguages;for(f=0,i=d.length;f<i;f++){l=d[f];if(l===b){g.push(l)}else{if(l.substring(0,1)===b.substring(0,1)){e.push(l)}}}}n.lang=g[0]?g[0]:e[0]?e[0]:"en"}else{n.lang="en"}n.deferredTr=[];n.translationFields={};n.translate=function(j){if(n.translationFields[j]){j=n.translationFields[j]}return j};n.translateField=function(j,k){return n.translate(j[k])};n.translateP=function(j){if(j&&n.translationFields.portal){j=j.replace(/__(\w+)__/g,function(o,k){return n.translate(k)})}return j};this.$get=["$q","$http",function(j,k){n.last="";n.init=function(p){var o;if(!p){p=n.lang}o=j.defer();if(n.last!==p){n.last=p;k.get(window.staticPrefix+"languages/"+p+".json").then(function(t){var u,q,s,r;n.translationFields=t.data;r=n.deferredTr;for(q=0,s=r.length;q<s;q++){u=r[q];u.e[u.f](n.translationFields[u.m])}n.deferredTr=[];return o.resolve("Translation files loaded")},function(q){return o.reject("")})}else{o.resolve("No change")}return o.promise};return n}];return this});a.directive("trspan",["$translator",function(b){return{restrict:"A",replace:false,transclude:true,scope:{trspan:"@"},link:function(d,e,c){if(b.translationFields.portal){c.trspan=b.translate(c.trspan)}else{b.deferredTr.push({e:e,f:"text",m:c.trspan})}return e.text(c.trspan)},template:""}}]);a.provider("$htmlParams",function(){this.$get=function(){var b;b={};return{set:function(c,d){return b[c]=d},menu:function(){return b.menu},params:function(){return b.params}}};return this});a.directive("script",["$htmlParams",function(b){return{restrict:"E",terminal:true,compile:function(g,c){var h,d,f;if(f=c.type.match(/text\/(menu|parameters)/)){try{return b.set(f[1],JSON.parse(g[0].text))}catch(d){h=d;console.log("Parsing error:",h)}}}}}]);a.controller("ModalInstanceCtrl",["$scope","$uibModalInstance","elem","set","init",function(b,f,e,i,h){var d,c,g;g=null;b.elem=e;b.set=i;b.result=h;b.staticPrefix=window.staticPrefix;d=e("currentNode");b.translateP=e("translateP");if(d){c=d.data;b.currentNode=d}b.ok=function(){i("result",b.result);return f.close(true)};b.cancel=function(){if(d){b.currentNode.data=c}return f.dismiss("cancel")};return b.inSelect=function(o){var m,l,k,n;n=b.currentNode.select;for(l=0,k=n.length;l<k;l++){m=n[l];if(m.k===o){return true}}return false}}]);a.directive("onReadFile",["$parse",function(b){return{restrict:"A",scope:false,link:function(f,d,c){var e;e=b(c.onReadFile);return d.on("change",function(h){var g;g=new FileReader();g.onload=function(i){return f.$apply(function(){return e(f,{$fileContent:i.target.result})})};return g.readAsText((h.srcElement||h.target).files[0])})}}}]);a.directive("resizer",["$document",function(d){var b,c;b=null;c=null;return function(g,f,e){var h,i;f.on("mousedown",function(j){if(e.resizer==="vertical"){c=$(e.resizerRight).width()+$(e.resizerLeft).width()}else{b=$(e.resizerTop).height()+$(e.resizerBottom).height()}j.preventDefault();d.on("mousemove",h);return d.on("mouseup",i)});h=function(k){var j,l;if(e.resizer==="vertical"){j=k.pageX;if(e.resizerMax&&j>e.resizerMax){j=parseInt(e.resizerMax)}$(e.resizerLeft).css({width:j+"px"});return $(e.resizerRight).css({width:(c-j)+"px"})}else{l=k.pageY-$("#navbar").height();$(e.resizerTop).css({height:l+"px"});return $(e.resizerBottom).css({height:(b-l)+"px"})}};return i=function(){d.unbind("mousemove",h);return d.unbind("mouseup",i)}}}]);a.factory("$lmhttp",["$q","$location",function(b,c){return{responseError:function(d){if(d.status===401&&window.portal){return window.location=(window.portal+"?url=")+window.btoa(window.location).replace(/\//,"_")}else{return b.reject(d)}}}}]);a.config(["$httpProvider",function(b){return b.interceptors.push("$lmhttp")}])}).call(this);
\ No newline at end of file
......@@ -195,6 +195,9 @@ This file contains:
}
return $scope.showModal('message.html');
};
$scope.downlaodConf = function(c, $scope) {
return window.open($scope.confPrefix + $scope.currentCfg.cfgNum + '?full');
};
$scope.save = function() {
$scope.showModal('save.html').then(function() {
$scope.waiting = true;
......@@ -345,6 +348,20 @@ This file contains:
}
});
};
$scope.addHost = function(cn, scope) {
if (!cn.data) {
cn.data = [];
}
return cn.data.push({
k: "newHost",
h: [
{
"k": "key",
"v": "uid"
}
]
});
};
$scope.addSamlAttribute = function() {
var node;
node = $scope._findContainer();
......@@ -833,7 +850,9 @@ This file contains:
$scope.showModal('message.html');
}
$scope.form = 'home';
return $scope.waiting = false;
console.log('OK', $scope.waiting);
$scope.waiting = false;
console.log('OK', $scope.waiting);
}, readError);
};
c = $location.path().match(new RegExp('^/confs/(latest|[0-9]+)'));
......@@ -853,11 +872,17 @@ This file contains:
$scope.replaceContent = function(node, $fileContent) {
return node.data = $fileContent;
};
return $scope.saveAs = function(content, type, filename) {
$scope.saveAs = function(content, type, filename) {
return saveAs(new Blob([content], {
"type": type
}), filename);
};
$scope.saveAsPem = function(cs, scope) {
return scope.saveAs(cs.data[0].data + "\n" + cs.data[2].data, 'application/x-pem-file', cs.title + ".pem");
};
return $scope.saveAsText = function(cs, scope) {
return scope.saveAs(cs.data, 'text/plain', cs.title + ".txt");
};
}
]);
......
......@@ -5,7 +5,7 @@
<link rel="prefetch" href="<TMPL_VAR NAME="STATIC_PREFIX">struct.json" />
</head>
<body ng-app="llngConfDiff" ng-controller="DiffCtrl">
<body ng-app="llngConfDiff" ng-controller="DiffCtrl" ng-csp>
<TMPL_INCLUDE NAME="menubar.tpl">
......@@ -33,7 +33,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">
......
......@@ -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">
......@@ -28,7 +28,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