KLanding/grid.php

61 lines
1.5 KiB
PHP
Raw Normal View History

2016-01-28 08:24:06 +00:00
<html>
<head>
<link rel="stylesheet" type="text/css" href="assets/css/jquery.gridster.css">
<link rel="stylesheet" type="text/css" href="assets/css/demo.css">
</head>
<body>
<?php include 'config.php';?>
<div class="gridster">
<ul></ul>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="assets/jquery.gridster.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="assets/gridster_new.js"></script>
<script type="text/javascript">
function myfunction(){
localStorage.clear();
window.location.reload();
}
</script>
<script type="text/javascript" id="code">
var gridster;
$(function(){
gridster = $(".gridster > ul").gridster({
widget_margins: [5, 5],
widget_base_dimensions: [130, 130]
}).data('gridster');
var widgets = [
<?php
if ($jdownloadervisible > "0") {
require "links/jdownloader.php";
}
?>
['<li>1</li>', 1, 1],
['<li>2</li>', 1, 1],
['<li>3</li>', 1, 1],
['<li>4</li>', 1, 1],
['<li>5</li>', 1, 1],
['<li>6</li>', 1, 1],
['<li>7</li>', 1, 1],
['<li>8</li>', 1, 1],
['<li>9</li>', 1, 1],
['<li><input id="def_button" type="button" value="Set Default" onclick="myfunction()"></li>', 1, 1]
];
$.each(widgets, function(i, widget){
gridster.add_widget.apply(gridster, widget)
});
});
</script>
</body>
</html>