This commit is contained in:
Sébastien Lucas 2013-11-28 21:51:01 +01:00
parent 7497e6d004
commit d45381e7a7

View file

@ -43,6 +43,8 @@
$test = Base::getDb (); $test = Base::getDb ();
} }
$texteDebug = "Top ";
header ("Content-Type:text/html;charset=utf-8"); header ("Content-Type:text/html;charset=utf-8");
?><!DOCTYPE html> ?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -73,12 +75,11 @@
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/normalize/normalize.css") ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/normalize/normalize.css") ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("styles/font-awesome.css") ?>" media="screen" /> <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("styles/font-awesome.css") ?>" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion(getCurrentCss ()) ?>" media="screen" /> <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion(getCurrentCss ()) ?>" media="screen" />
<?php if (!useServerSideRendering ()) { ?> <?php if (!useServerSideRendering ()) { $texteDebug .= "Start "; ?>
<script type="text/javascript"> <script type="text/javascript">
console.log ("Start");
$(document).ready(function() { $(document).ready(function() {
// Handler for .ready() called. // Handler for .ready() called.
console.log ("Start Ready");
try try
{ {
var url = "<?php echo "getJSON.php?" . addURLParameter ($_SERVER["QUERY_STRING"], "complete", 1); ?>"; var url = "<?php echo "getJSON.php?" . addURLParameter ($_SERVER["QUERY_STRING"], "complete", 1); ?>";
@ -91,7 +92,7 @@
$.get('templates/default/suggestion.html'), $.get('templates/default/suggestion.html'),
$.getJSON(url)).done(function(header, footer, bookdetail, main, page, suggestion, data){ $.getJSON(url)).done(function(header, footer, bookdetail, main, page, suggestion, data){
templateBookDetail = doT.template (bookdetail [0]); templateBookDetail = doT.template (bookdetail [0]);
console.log ("Start When");
var defMain = { var defMain = {
bookdetail: bookdetail [0] bookdetail: bookdetail [0]
}; };
@ -120,18 +121,17 @@
}); });
} }
catch (e) { catch (e) {
console.log ("Catch");
alert (e.message); alert (e.message);
} }
}); });
</script> </script>
<?php } ?> <?php $texteDebug .= "EndScript "; } ?>
</head> </head>
<body> <body>
<?php <?php
echo $texteDebug;
if (useServerSideRendering ()) { if (useServerSideRendering ()) {
// Get the templates // Get the templates
$header = file_get_contents('templates/default/header.html'); $header = file_get_contents('templates/default/header.html');