index.php 15 KB
Newer Older
Tibor Katelbach's avatar
Tibor Katelbach committed
1
<style type="text/css">
Clément Damiens's avatar
 
Clément Damiens committed
2 3 4 5 6 7 8 9
	#menu-left{
		position: fixed;
    	z-index: 100000;
	    bottom: 0;
	    top: 60px;
	    left: 0;
	    padding: 0;
	    overflow-y: scroll;
Clément Damiens's avatar
Clément Damiens committed
10
	    	background-color: white;
Clément Damiens's avatar
 
Clément Damiens committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
	}
	#header-doc{
		position: fixed;
		z-index: 100000;
		top: 0px;
		left: 0px;
		height: 60px;
		right: 0px;
		padding-top: 10px;
		background-color: white;
	}
	#header-doc h2{
		float: left;
	    color: #354C57;
	    font-size: 20px;
	    font-variant: small-caps;
	    line-height: 41px;
	    padding: 0px 10px;
	}
	#menu-left ul li{
		list-style: none;
	}
Clément Damiens's avatar
 
Clément Damiens committed
33 34 35 36 37 38 39 40
	#menu-left > ul > li > a{
		font-size: 20px;
	}
	ul.subMenu > li > a{
		font-size:16px;
	}
	#menu-left > ul > li > a, ul.subMenu > li > a{
		color: #354C57;
Clément Damiens's avatar
 
Clément Damiens committed
41 42 43 44 45
		width: 100%;
	    float: left;
	    padding: 5px 20px;
	    text-align: left;
	}
Clément Damiens's avatar
 
Clément Damiens committed
46 47 48 49
	#menu-left ul li .subMenu, #menu-left > ul > li > a{
		border-bottom: 1px solid #ccc;
	}
	#menu-left > ul > li > a.active, #menu-left > ul > li > a:hover{
Clément Damiens's avatar
 
Clément Damiens committed
50
		text-decoration: none;
Tibor Katelbach's avatar
Tibor Katelbach committed
51
		background-color:#65BA91;
Clément Damiens's avatar
 
Clément Damiens committed
52
		color: white;
Clément Damiens's avatar
 
Clément Damiens committed
53 54 55
		font-size: 22px;
	}
	ul.subMenu > li > a.active, ul.subMenu > li > a:hover{
Tibor Katelbach's avatar
Tibor Katelbach committed
56 57
		border-left: 4px solid #65BA91;
		color: #65BA91;
Clément Damiens's avatar
 
Clément Damiens committed
58 59 60 61 62
		font-size:18px;
		text-decoration: none;
	}
	#menu-left ul li a.active span.text-red, #menu-left ul li a:hover span.text-red{
		color:#354C57 !important;
Clément Damiens's avatar
 
Clément Damiens committed
63 64 65 66 67 68 69 70 71 72
	}
	.close-modal{
		top: 10px !important;
    	right: 10px !important;
     	z-index: 100000000000000 !important;
    	position: fixed !important;
	}
	.close-modal .lr, .close-modal .rl{
		height: 40px !important;
	}
Clément Damiens's avatar
doc up  
Clément Damiens committed
73
	ul.subMenu{
Clément Damiens's avatar
 
Clément Damiens committed
74 75 76 77 78
		/*display:none;*/

	}
	ul.subMenu{
		padding-left: 30px
Clément Damiens's avatar
doc up  
Clément Damiens committed
79
	}
Clément Damiens's avatar
Clément Damiens committed
80
#show-menu-xs, #close-docs{
81 82 83 84 85 86 87 88
	    padding: 7px 15px;
    font-size: 20px;
}
.keypan .panel-heading{
	margin-top: 20px;
    min-height: 70px;
}
.keypan{
Clément Damiens's avatar
 
Clément Damiens committed
89
	border: none;
90 91 92
    margin-bottom: 10px;
    box-shadow: none;
}
Clément Damiens's avatar
 
Clément Damiens committed
93 94 95 96 97 98 99 100 101 102 103 104
.keypan, .keypanList{
	box-shadow: none;	
}
.keypanList .panel-title i{
	margin-right: 10px;
}
.keypanList .panel-body ul{
	padding-left: 0px;
}
.keypanList .panel-title span{
	font-size: 24px !important;
}
105 106 107 108 109 110 111
.keypan .panel-body{
	min-height: 200px;
}
.keypan hr {
	width: 75%;
    margin: auto;
}
Clément Damiens's avatar
 
Clément Damiens committed
112
#header-docs .panel-title, .subtitleDocs .panel-title {
113 114
	font-size: 40px;
}
Clément Damiens's avatar
 
Clément Damiens committed
115
#header-docs .panel-title .sub-title, .subtitleDocs .panel-title .sub-title{
116 117 118
	font-size: 20px !important;
	font-style: italic;	
}
Clément Damiens's avatar
 
Clément Damiens committed
119
#container-docs{
Clément Damiens's avatar
Clément Damiens committed
120 121
	background-color: white;
	z-index: 10000;
Clément Damiens's avatar
 
Clément Damiens committed
122
}
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
@media (max-width: 991px) {
 /* .open-type-filter{
        display: block;
    position: absolute;
    right: -33px;
    height: 50px;
    width: 50px;
    border: 1px solid #dadada;
    border-radius: 100%;
    text-align: right;
    padding-right: 8px;
    z-index: -1;
    font-size: 20px;
  }*/
  #menu-left{
    width: 56%;
    left: -56%;
Clément Damiens's avatar
Clément Damiens committed
140
	bottom: 0px;
141 142 143 144 145 146 147 148 149
	}
  
}

@media (min-width: 991px) {
  #menu-left {
    left:0 !important;
  }
}
Tibor Katelbach's avatar
Tibor Katelbach committed
150
</style>
Clément Damiens's avatar
 
Clément Damiens committed
151
<div id="header-doc" class="shadow2">
152
	<a href='javascript:;' id="show-menu-xs" class="visible-xs visible-sm pull-left" data-placement="bottom" data-title="Menu"><i class="fa fa-bars"></i></a>
Tibor Katelbach's avatar
Tibor Katelbach committed
153 154
	<h2 class="elipsis no-margin"><i class="fa fa-book hidden-xs"></i> <?php echo Yii::t("docs", "All <span class='hidden-xs'>you need to know</span> about") ?> LE <span style="color:#65BA91">CONTRAT DE TRANSITION ÉCOLOGIQUE</span></h2>
	
Clément Damiens's avatar
Clément Damiens committed
155
    <a href='javascript:;' class="lbh pull-right" id="close-docs"><span><i class="fa fa-sign-out"></i> <?php echo Yii::t("common","Back") ?></span></a>
Clément Damiens's avatar
 
Clément Damiens committed
156
</div>
Tibor Katelbach's avatar
Tibor Katelbach committed
157 158 159 160 161 162 163 164


<?php 
if(@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["docTpl"]){
	$this->renderPartial(Yii::app()->session["costum"]["docTpl"]); 
 } else { ?>


165 166
<div id="menu-left" class="col-md-3 col-sm-2 col-xs-12 shadow2">
  	<ul class="col-md-12 col-sm-12 col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
167
		<li class="col-xs-12 no-padding">
Clément Damiens's avatar
Clément Damiens committed
168 169
			<a href="javascript:" class="link-docs-menu down-menu" data-type="welcome" data-dir="<?php echo Yii::app()->language ?>">
				<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","WEL<span class='text-red'>CO</span>ME"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
170 171
			</a>
		</li>
Clément Damiens's avatar
 
Clément Damiens committed
172 173 174
		<li class="col-xs-12 no-padding">
			<a href="javascript:" class="link-docs-menu down-menu" data-type="about" data-dir="<?php echo Yii::app()->language ?>">
				<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","A<span class='text-red'>BO</span>UT"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
175
			</a>
Clément Damiens's avatar
 
Clément Damiens committed
176 177
			<ul class="subMenu col-xs-12 no-padding">
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
Clément Damiens committed
178
					<a href="javascript:;" class="link-docs-menu" data-type="openatlas" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
doc up  
Clément Damiens committed
179
						<?php echo Yii::t("common","Open Atlas"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
180 181
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
182
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
Clément Damiens committed
183
					<a href="javascript:;" class="link-docs-menu" data-type="philosophy" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
doc up  
Clément Damiens committed
184
						<?php echo Yii::t("docs","Philosophy"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
185 186
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
187 188
				<li class="col-xs-12 no-padding">
					<a href="javascript:" class="link-docs-menu" data-type="projects" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
doc up  
Clément Damiens committed
189
						<?php echo Yii::t("docs","Projects"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
190 191
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
192
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
193
					<a href="javascript:" class="link-docs-menu" data-type="keywords" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
doc up  
Clément Damiens committed
194
						<?php echo Yii::t("docs","Keywords"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
195 196
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
197
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
198
					<a href="javascript:" class="link-docs-menu" data-type="partners" data-dir="panels">
Clément Damiens's avatar
doc up  
Clément Damiens committed
199
						<?php echo Yii::t("docs","Community"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
200 201
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
202
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
203
					<a href="javascript:" class="link-docs-menu" data-type="history" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
204
						<?php echo Yii::t("docs","History"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
205 206
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
207
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
208
					<a href="javascript:" class="link-docs-menu" data-type="commandement" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
209
						<?php echo Yii::t("docs","10 Commands"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
210 211
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
212
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
213
					<a href="https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md" target="_blank" class="">
Clément Damiens's avatar
 
Clément Damiens committed
214
						<?php echo Yii::t("docs","Social code"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
215 216
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
217
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
218
					<a href="javascript:" class="link-docs-menu" data-type="financement" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
219
						<?php echo Yii::t("docs","Funding"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
220 221 222 223
					</a>
				</li>
			</ul>
		</li>
Clément Damiens's avatar
 
Clément Damiens committed
224 225 226
		<li class="col-xs-12 no-padding">
			<a href="javascript:" class="link-docs-menu down-menu" data-type="modules">
				<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","HOW <span class='text-red'>TO</span> USE"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
227
			</a>
Clément Damiens's avatar
 
Clément Damiens committed
228 229
			<ul class="subMenu col-xs-12 no-padding">
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
230
					<a href="javascript:" class="link-docs-menu" data-type="elements">
Clément Damiens's avatar
 
Clément Damiens committed
231
						 <?php echo Yii::t("docs","The elements"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
232 233
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
234
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
235
					<a href="javascript:" class="link-docs-menu" data-type="modules">
Clément Damiens's avatar
 
Clément Damiens committed
236
						<?php echo Yii::t("docs","Applications"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
237 238
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
239
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
Clément Damiens committed
240
					<a href="javascript:;" class="link-docs-menu" data-type="import" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
241
						<?php echo Yii::t("docs","Game of data"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
242 243
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
244
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
Clément Damiens committed
245
					<a href="javascript:;" class="link-docs-menu" data-type="faq">
Clément Damiens's avatar
 
Clément Damiens committed
246
						<?php echo Yii::t("docs","FAQ"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
247 248 249 250
					</a>
				</li>
			</ul>
		</li>
Clément Damiens's avatar
 
Clément Damiens committed
251
		<li class="col-xs-12 no-padding">
Clément Damiens's avatar
Clément Damiens committed
252
			<a href="javascript:;" class="link-docs-menu down-menu" data-type="contribute" data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
253
				<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","<span class='text-red'>CO</span>NTRIBUTE"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
254 255
			</a>
		</li>
Clément Damiens's avatar
 
Clément Damiens committed
256 257 258
		<li class="col-xs-12 no-padding">
			<a href="javascript:" class="link-docs-menu down-menu" data-type="5w" data-dir="<?php echo Yii::app()->language ?>">
				<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","<span class='text-red'>CO</span>DING"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
259
			</a>
Clément Damiens's avatar
 
Clément Damiens committed
260 261
			<ul class="subMenu col-xs-12 no-padding">
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
262
					<a href="api" target="_blank" >
Clément Damiens's avatar
 
Clément Damiens committed
263
						<?php echo Yii::t("docs","Play with API"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
264 265
					</a>
				</li>
Tibor Katelbach's avatar
Tibor Katelbach committed
266
				
Clément Damiens's avatar
 
Clément Damiens committed
267
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
268
					<a href="javascript:" class="link-docs-menu" data-type="openSourceWeUse"  data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
269
						<?php echo Yii::t("docs","Open Source We use"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
270 271
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
272
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
273
					<a href="javascript:" class="link-docs-menu" data-type="ocdb"  data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
274
						<?php echo Yii::t("common","OCDB"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
275 276
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
277
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
278
					<a href="javascript:" class="link-docs-menu" data-type="rd">
Clément Damiens's avatar
 
Clément Damiens committed
279
					 <?php echo Yii::t("docs","Research&Dev"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
280 281
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
282
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
283
					<a href="javascript:" class="link-docs-menu" data-type="roadmap"  data-dir="<?php echo Yii::app()->language ?>">
Clément Damiens's avatar
 
Clément Damiens committed
284
						<?php echo Yii::t("docs","RoadMap"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
285 286 287 288
					</a>
				</li>
			</ul>
		</li>
Tibor Katelbach's avatar
Tibor Katelbach committed
289
		
Clément Damiens's avatar
 
Clément Damiens committed
290 291 292
		<li class="col-xs-12 no-padding">
			<a href="javascript:" class="link-docs-menu down-menu"  data-type="contact" data-dir="panels">
				<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","<span class='text-red'>CO</span>MMUNICATE"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
293
			</a>
Clément Damiens's avatar
 
Clément Damiens committed
294 295
			<ul class="subMenu no-padding">
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
296
					<a href="javascript:" class="link-docs-menu" data-type="contact" data-dir="panels">
Clément Damiens's avatar
 
Clément Damiens committed
297
						<?php echo Yii::t("docs","Contact"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
298 299
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
300
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
301
					<a href="javascript:" class="link-docs-menu" data-type="affiches" data-dir="communication">
Clément Damiens's avatar
 
Clément Damiens committed
302
						<?php echo Yii::t("docs","Drawings"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
303 304
					</a>
				</li>
Clément Damiens's avatar
 
Clément Damiens committed
305
				<li class="col-xs-12 no-padding">
Clément Damiens's avatar
 
Clément Damiens committed
306
					<a href="javascript:" class="link-docs-menu" data-type="video" data-dir="">
Clément Damiens's avatar
 
Clément Damiens committed
307
					 <?php echo Yii::t("docs","Videos"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
308 309
					</a>
				</li>
Clément Damiens's avatar
doc up  
Clément Damiens committed
310
				<!--<li class="">
Clément Damiens's avatar
 
Clément Damiens committed
311
					<a href="javascript:" class="link-docs-menu" data-type="media">
Clément Damiens's avatar
doc up  
Clément Damiens committed
312
						<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","Medias"); ?>
Clément Damiens's avatar
 
Clément Damiens committed
313
					</a>
Clément Damiens's avatar
doc up  
Clément Damiens committed
314
				</li>-->
Clément Damiens's avatar
 
Clément Damiens committed
315 316 317 318
			</ul>
		</li>
	</ul>
</div>
Tibor Katelbach's avatar
Tibor Katelbach committed
319 320
<?php } ?>

Clément Damiens's avatar
Clément Damiens committed
321
<div id="container-docs" class="col-md-offset-3 col-md-9 col-sm-12 col-xs-12 no-padding text-center">
Tibor Katelbach's avatar
Tibor Katelbach committed
322 323
</div>
<script type="text/javascript">
Clément Damiens's avatar
Clément Damiens committed
324 325
var page="<?php echo @$page ?>";
var dir="<?php echo @$dir ?>"; 
Tibor Katelbach's avatar
Tibor Katelbach committed
326
jQuery(document).ready(function() {
Clément Damiens's avatar
Clément Damiens committed
327 328 329 330 331 332
	if(page != "")
		initDocs(page, dir);
	else
		initDocs("welcome", mainLanguage);

	$(".link-docs-menu").off().on("click",function(){
Clément Damiens's avatar
 
Clément Damiens committed
333 334 335 336 337 338 339 340 341 342 343 344 345
		if($(this).hasClass("down-menu")){
			$("#menu-left > ul > li > a").removeClass("active").find("i").removeClass("fa-angle-down").addClass("fa-angle-right");
			$(".subMenu .link-docs-menu").removeClass("active");
			$(this).addClass("active").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
		}else{
			$(".subMenu .link-docs-menu").removeClass("active");
			$(this).addClass("active");
			if(!$(this).parents().eq(2).find(".link-docs-menu:first").hasClass("active")){
				$("#menu-left > ul > li > a").removeClass("active").find("i").removeClass("fa-angle-down").addClass("fa-angle-right");
				$(this).parents().eq(2).find(".link-docs-menu:first").addClass("active").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
			}
			
		}
346 347 348 349
		if($("#show-menu-xs").is(":visible")){
			$("#show-menu-xs").removeClass("show-dir");
			$("#menu-left").animate({ left : "-56%" }, 400 );
		}
Clément Damiens's avatar
Clément Damiens committed
350 351 352 353 354
		onchangeClick=false;
		hashDocs="#docs.page."+$(this).data("type");
		if(notNull($(this).data("dir")) && $(this).data("dir") != "")
			hashDocs+= ".dir."+$(this).data("dir");
		location.hash=hashDocs;
Tibor Katelbach's avatar
Tibor Katelbach committed
355 356 357 358
		if(moduleId == activeModuleId)
			moduleInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
		else 
			navInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
Clément Damiens's avatar
 
Clément Damiens committed
359
	});
360 361 362 363 364 365 366 367 368 369
	$("#show-menu-xs").click(function(){
    if(!$(this).hasClass("show-dir")){
      $(this).addClass("show-dir").data("title", "<?php echo Yii::t("common","Close") ?>").find("i").removeClass("fa-chevron-right").addClass("fa-times");
      $("#menu-left").animate({ left : "0%" }, 400 );
    }else{
      $(this).removeClass("show-dir").data("title", "<?php echo Yii::t("common","Open filtering by type") ?>").find("i").removeClass("fa-times").addClass("fa-chevron-right");
      $("#menu-left").animate({ left : "-56%" }, 400 );
    
    }
  });
Tibor Katelbach's avatar
Tibor Katelbach committed
370
});
Clément Damiens's avatar
Clément Damiens committed
371
function initDocs(page, dir){
Clément Damiens's avatar
 
Clément Damiens committed
372
	if(urlBackHistory.indexOf("#docs") >= 0){
Clément Damiens's avatar
Clément Damiens committed
373 374 375 376 377
		if(userId!="")
			$("#close-docs").attr("href","#page.type.citoyens.id."+userId);
		else
			$("#close-docs").attr("href","#search");
	}else
Clément Damiens's avatar
 
Clément Damiens committed
378
		$("#close-docs").attr("href",urlBackHistory);
Clément Damiens's avatar
Clément Damiens committed
379 380 381 382 383 384 385
	navInDocs(page, dir);
	$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").addClass("active");
	if(!$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").hasClass("down-menu"))
		$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").parents().eq(2).find(".down-menu").addClass("active").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
	else
		$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
}
Clément Damiens's avatar
 
Clément Damiens committed
386
function navInDocs(page, dir, get){
Clément Damiens's avatar
Clément Damiens committed
387
	simpleScroll(0);
Clément Damiens's avatar
 
Clément Damiens committed
388
	showLoader('#container-docs');
Clément Damiens's avatar
Clément Damiens committed
389
	urlToSend="docs/index/";
Clément Damiens's avatar
 
Clément Damiens committed
390
	if(notNull(dir) && dir !="")
Clément Damiens's avatar
Clément Damiens committed
391 392 393
		urlToSend+="dir/"+dir+"/";
	urlToSend+="page/"+page;
	ajaxPost('#container-docs' ,baseUrl+'/'+moduleId+"/"+urlToSend,
Clément Damiens's avatar
 
Clément Damiens committed
394 395
			 null,function(){},"html");
}
Clément Damiens's avatar
 
Clément Damiens committed
396
function getConceptList(list, dom, type){
397
	str="";
Clément Damiens's avatar
 
Clément Damiens committed
398 399
	classContainer = (notNull(type) && type=="list") ? "col-md-12 col-sm-12 col-xs-12" : "col-md-4 col-sm-6 col-xs-12";
	classKeypan = (notNull(type) && type=="list") ? "keypanList" : "keypan";
400
	$.each(list,function(i,obj) { 
Clément Damiens's avatar
 
Clément Damiens committed
401
		//icon = (obj.icon) ? obj.icon : "fa-tag" ;
402 403
		color = (obj.color) ? obj.color : "#E33551" ;
		size = (obj.size) ? obj.size : "20" ;
Clément Damiens's avatar
 
Clément Damiens committed
404 405 406 407
		str+='<div class="'+classContainer+'"><div class="'+classKeypan+' panel panel-white">';
				if(typeof obj.url != "undefined")
		str+=		'<a href="'+obj.url+'" targte="_blank">';	
		str+=	'<div class="panel-heading border-light ">'+
Clément Damiens's avatar
 
Clément Damiens committed
408
					'<span class="panel-title">'; 
Clément Damiens's avatar
 
Clément Damiens committed
409 410
						if(typeof obj.image != "undefined")
		str+=				'<img class="img-responsive" src="'+obj.image+'"/> ';
Clément Damiens's avatar
 
Clément Damiens committed
411 412 413 414 415 416
						if(typeof obj.icon != "undefined")
		str+=				'<i class="fa '+obj.icon+' faa-pulse animated-hover fa-2x"></i>';
						if(!notNull(type) || type!="list")
		str+=				'<br/>';
		str+=			'<span style="font-size: '+size+'px; color:'+color+';">'+obj.title.toUpperCase()+'</span>';
						if(typeof obj.subtitle != "undefined")
Clément Damiens's avatar
 
Clément Damiens committed
417 418
		str+=				'<span style="font-size: 16px;font-style:italic"> <br/>'+obj.subtitle+'</span>';
		str+=		'</span>'+
Clément Damiens's avatar
 
Clément Damiens committed
419 420 421 422 423 424 425 426 427 428 429 430 431 432
				'</div>';
				if(!notNull(type) || type!="list")
		str+=		'<hr/>';
		str+=	'<div class="panel-body">';
					if(typeof obj.date != "undefined")
		str+=			obj.date+"<br>";
					if(typeof obj.body != "undefined")
		str+=			obj.body+"<br>";
					if(typeof obj.link != "undefined"){
		str+=			"<a class='btn btn-danger btn-sm margin-top-10' href='"+obj.link.url+"'";
						if(typeof obj.link.blank != "undefined" && obj.link.blank)
		str+=				" target='_blank'"
		str+=			">"+obj.link.label+"</a>";
					}
Clément Damiens's avatar
 
Clément Damiens committed
433 434 435 436
		str+=	'</div>';
			if(typeof obj.url != "undefined")
		str+=	'</a>';
		str+="</div></div>";
437 438 439
	 });
	$(dom).html(str);
}
Clément Damiens's avatar
 
Clément Damiens committed
440
</script>