Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
arnapou committed Nov 21, 2016
1 parent a3cf5dc commit aaffe66
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 178 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1 +1 @@
.idea
nbproject
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -5,6 +5,8 @@ Cron jQuery plugin

Originaly created in july 2012.

Live demo there : http://jqcron.arnapou.net/

Features
========
* multi select
Expand Down
20 changes: 0 additions & 20 deletions demo/demo.css

This file was deleted.

32 changes: 12 additions & 20 deletions demo/demo.tpl
@@ -1,20 +1,12 @@
<html>
<head>
<title>__DEMO__</title>
<link rel="stylesheet" type="text/css" href="reset.css" />
<link rel="stylesheet" type="text/css" href="demo.css" />
<link rel="stylesheet" type="text/css" href="../src/jqCron.css" />
</head>
<body>
<table>
<td><pre>__JSPRE__</pre></td>
<td>__HTML__</td>
</table>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../src/jqCron.js"></script>
<script type="text/javascript" src="../src/jqCron.en.js"></script>
<script type="text/javascript">
__JS__
</script>
</body>
</html>
<div class="row">
<div class="col-lg-6">
<pre>__JSPRE__</pre>
<pre>__HTMLPRE__</pre>
</div>
<div class="col-lg-6">
__HTML__
</div>
</div>
<script type="text/javascript">
__JS__
</script>
1 change: 1 addition & 0 deletions demo/demo_1.php
Expand Up @@ -7,6 +7,7 @@
'__JS__' => $elements[1],
'__JSPRE__' => htmlspecialchars($elements[1]),
'__HTML__' => $elements[2],
'__HTMLPRE__' => htmlspecialchars($elements[2]),
)
);

Expand Down
1 change: 1 addition & 0 deletions demo/demo_2.php
Expand Up @@ -7,6 +7,7 @@
'__JS__' => $elements[1],
'__JSPRE__' => htmlspecialchars($elements[1]),
'__HTML__' => $elements[2],
'__HTMLPRE__' => htmlspecialchars($elements[2]),
)
);

Expand Down
1 change: 1 addition & 0 deletions demo/demo_3.php
Expand Up @@ -7,6 +7,7 @@
'__JS__' => $elements[1],
'__JSPRE__' => htmlspecialchars($elements[1]),
'__HTML__' => $elements[2],
'__HTMLPRE__' => htmlspecialchars($elements[2]),
)
);

Expand Down
1 change: 1 addition & 0 deletions demo/demo_4.php
Expand Up @@ -7,6 +7,7 @@
'__JS__' => $elements[1],
'__JSPRE__' => htmlspecialchars($elements[1]),
'__HTML__' => $elements[2],
'__HTMLPRE__' => htmlspecialchars($elements[2]),
)
);

Expand Down
1 change: 1 addition & 0 deletions demo/demo_5.php
Expand Up @@ -7,6 +7,7 @@
'__JS__' => $elements[1],
'__JSPRE__' => htmlspecialchars($elements[1]),
'__HTML__' => $elements[2],
'__HTMLPRE__' => htmlspecialchars($elements[2]),
)
);

Expand Down
1 change: 1 addition & 0 deletions demo/demo_6.php
Expand Up @@ -7,6 +7,7 @@
'__JS__' => $elements[1],
'__JSPRE__' => htmlspecialchars($elements[1]),
'__HTML__' => $elements[2],
'__HTMLPRE__' => htmlspecialchars($elements[2]),
)
);

Expand Down
153 changes: 65 additions & 88 deletions demo/index.php
@@ -1,94 +1,71 @@
<?php
header('Content-Type: text/html; charset=utf-8');
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>jqCron Demos</title>
<link rel="stylesheet" type="text/css" href="reset.css" />
<style type="text/css">
h1 {
font-weight: bold;
font-size: 2em;
margin: 1em 0;
}
/*
* This file is part of the Arnapou jqCron package.
*
* (c) Arnaud Buathier <arnaud@arnapou.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

body {
background: #eee;
}
$pages = array(
'demo_1' => 'Demo 1',
'demo_2' => 'Demo 2',
'demo_3' => 'Demo 3',
'demo_4' => 'Demo 4',
'demo_5' => 'Demo 5',
'demo_6' => 'Demo 6',
);

#container {
width: 1000px;
margin: 0 auto;
}
if (isset($_GET['page']) && in_array($_GET['page'], array_keys($pages), true)) {
$current = $_GET['page'];
}
if (!isset($current)) {
foreach ($pages as $page => $title) {
$current = $page;
break;
}
}
?><!DOCTYPE html>
<html>
<head>
<title>jqCron</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="../src/jqCron.js"></script>
<script src="../src/jqCron.en.js"></script>
<link rel="stylesheet" href="../src/jqCron.css">
</head>
<body>
<div class="container">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">jqCron</a>
</div>

#menu {
display: block;
}
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<?php foreach ($pages as $page => $title): ?>
<li<?= ($current == $page ? ' class="active"' : '') ?>><a href="?page=<?= $page ?>"><?= $title ?></a></li>
<?php endforeach; ?>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/arnapou/jqcron"><i class="github-icon"></i> Github</a>
</li>
</ul>
</div>
</div>
</nav>

#menu li {
display: inline-block;
margin: 0 1px;
padding: 0.4em;
border-left: 1px solid #888;
border-top: 1px solid #888;
border-right: 1px solid #888;
vertical-align: bottom;
}
#menu li:nth-child(1) {
margin-left: 0;
}
<?php include __DIR__.'/'.$current.'.php' ?>

#menu li.active {
padding: 0.5em;
background: #fff;
}

#menu a {
color: #333;
text-decoration: none;
}
#menu a:hover {
color: black;
text-decoration: underline;
}

#demo {
width: 100%;
border: 1px solid #888;
height: 400px;
}


</style>
</head>
<body>
<div id="container">
<h1>jqCron Demos</h1>
<ul id="menu">
<?php
$files = glob(dirname(__FILE__) . '/demo_*.php');

foreach ( $files as $file ) {
$demo = basename($file, '.php');
echo '<li><a href="' . $demo . '.php">' . str_replace('_', ' ', $demo) . '</a></li>';
}
?>
</ul>
<iframe id="demo"></iframe>
</div>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
$(function() {
$('#menu a').click(function(e) {
$('#menu li').removeClass('active');
$(this).parent().addClass('active');
$('#demo').attr('src', $(this).attr('href'));
e.preventDefault();
return false;
}).eq(0).trigger('click');
});
</script>
</body>
</html>
</div>
<script type="text/javascript">
var currentPage = <?= json_encode($pages[$current]) ?>;
</script>
</body>
</html>
49 changes: 0 additions & 49 deletions demo/reset.css

This file was deleted.

25 changes: 25 additions & 0 deletions demo/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aaffe66

Please sign in to comment.