Commit c429ee8e authored by Raph El's avatar Raph El
Browse files

Modif api

parent 8c8dc02b
......@@ -56,11 +56,11 @@ class ApiModule extends CWebModule
}
public function getTheme() {
$theme = "ph-dori";
$theme = "CO2";
if (!empty(Yii::app()->params['theme'])) {
$theme = Yii::app()->params['theme'];
} else if (empty(Yii::app()->theme)) {
$theme = "ph-dori";
$theme = "CO2";
}
if(@$_GET["tpl"] == "iframesig"){ $theme = $_GET["tpl"]; }
......
<?php
$cssAnsScriptFilesModule = array(
$cssAnsScriptFilesModule = array(
//l'ordre est a respecter
'/plugins/swagger-ui/css/reset.css',
'/plugins/swagger-ui/css/screen.css',
......@@ -18,16 +18,32 @@
'/plugins/swagger-ui/lib/swagger-oauth.js'
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl);
?>
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
<?php
$server = ((isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') ? 'https://' : 'http://').$_SERVER['HTTP_HOST'];
$server = ( (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') ? 'https://' : 'http://').$_SERVER['HTTP_HOST'];
$url = $server.Yii::app()->createUrl("/api/data/get/");
?>
<!-- <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/css/reset.css' ; ?>">
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/css/screen.css' ; ?>">
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/jQuery/jquery-2.1.1.min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/jquery.slideto.min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/jquery.wiggle.min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/handlebars-4.0.5.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/lodash.min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/backbone-min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/swagger-ui.min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/highlight.9.1.0.pack.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/highlight.9.1.0.pack_extended.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/jsoneditor.min.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/marked.js' ; ?>" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl.'/plugins/swagger-ui/lib/swagger-oauth.js' ; ?>" type="text/javascript"></script> -->
<script type="text/javascript">
var url = "<?php echo $url ; ?>"
var url = "<?php echo $url ; ?>";
jQuery(document).ready(function() {
hljs.configure({
highlightSizeThreshold: 5000
......
Supports Markdown
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