Save page with some test and prototypes.
This commit is contained in:
parent
11193dd9b8
commit
f12680e7c4
197
htdocs/public/test/test_arrays.php
Normal file
197
htdocs/public/test/test_arrays.php
Normal file
@ -0,0 +1,197 @@
|
||||
<?php
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
{
|
||||
print "Page available onto dev environment only";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/dolibarrnew/theme/eldy/img/favicon.ico"/>
|
||||
<title>Login Dolibarr 3.4.0-alpha</title>
|
||||
<!-- Includes for JQuery (Ajax library) -->
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />
|
||||
<link rel="stylesheet" type="text/css" title="default" href="/dolibarrnew/theme/eldy/style.css.php?dol_use_jmobile=1" />
|
||||
<!-- Includes JS for JQuery -->
|
||||
<script type="text/javascript" src="/dolibarrnew/includes/jquery/js/jquery-latest.min.js"></script>
|
||||
<script type="text/javascript" src="/dolibarrnew/includes/jquery/plugins/datatables/js/jquery.dataTables.js"></script>
|
||||
<!--<script type="text/javascript" src="/dolibarrnew/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>-->
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
<div data-role="page">
|
||||
<br>
|
||||
This page is a sample of page using tables. To make test with<br>
|
||||
- css (edit page to change)<br>
|
||||
- jmobile (edit page to enable/disable)<br>
|
||||
- dataTables.<br><br>
|
||||
|
||||
<br>
|
||||
Example 1 : Table using tags: div+form<br>
|
||||
|
||||
<div class="tagtable centpercent" id="abc">
|
||||
<form class="liste_titre" method="POST" action="1.php">
|
||||
<div>snake<input type="hidden" name="cartitem" value="1"></div>
|
||||
<div><label><input type="checkbox" name="hidedetails" value="2"> A checkbox inside a cell</label></div>
|
||||
<div><input name="count" value="4"></div>
|
||||
<div><input type="submit" name="count" value="aaa"></div>
|
||||
</form>
|
||||
<form class="impair" method="POST" action="2.php">
|
||||
<div>snagfdgfd gd fgf ke<input type="hidden" name="cartitem" value="2"></div>
|
||||
<div>dfsdf</div>
|
||||
<div><input name="count" value="4"></div>
|
||||
<div><input type="submit" value="xxx" class="button"></div>
|
||||
</form>
|
||||
<form class="pair" method="GET" action="3.php">
|
||||
<div>snagfdgfd gd fgf ke<input type="hidden" name="cartitem" value="3"></div>
|
||||
<div>dfsdf</div>
|
||||
<div><input name="count" value="4"></div>
|
||||
<div><input type="submit" value="zzz" class="button"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
Example 2 : Table using tags: table/thead/tbdoy/tr/td + dataTable<br>
|
||||
|
||||
<script type="text/javascript">
|
||||
/*$(document).ready(function(){
|
||||
$('#abc').dataTable();
|
||||
});*/
|
||||
$(document).ready(function(){
|
||||
$('#def').dataTable();
|
||||
});
|
||||
|
||||
/*
|
||||
// counts total number of td in a head so that we can can use it for label extraction
|
||||
var head_col_count = $('xxxthead td').size();
|
||||
// loop which replaces td
|
||||
for ( i=0; i <= head_col_count; i++ ) {
|
||||
// head column label extraction
|
||||
var head_col_label = $('xxxthead td:nth-child('+ i +')').text();
|
||||
// replaces td with <div class="column" data-label="label">
|
||||
$('xxxtr td:nth-child('+ i +')').replaceWith(
|
||||
function(){
|
||||
return $('<div class="column" data-label="'+ head_col_label +'">').append($(this).contents());
|
||||
}
|
||||
);
|
||||
}
|
||||
// replaces table with <div class="table">
|
||||
$('xxxtable').replaceWith(
|
||||
function(){
|
||||
return $('<div class="table">').append($(this).contents());
|
||||
}
|
||||
);
|
||||
// replaces thead with <div class="table-head">
|
||||
$('xxxthead').replaceWith(
|
||||
function(){
|
||||
return $('<div class="table-head">').append($(this).contents());
|
||||
}
|
||||
);
|
||||
// replaces tr with <div class="row">
|
||||
$('xxxtr').replaceWith(
|
||||
function(){
|
||||
return $('<div class="row">').append($(this).contents());
|
||||
}
|
||||
);
|
||||
// replaces th with <div class="column">
|
||||
$('xxxth').replaceWith(
|
||||
function(){
|
||||
return $('<div class="column">').append($(this).contents());
|
||||
}
|
||||
);
|
||||
*/
|
||||
</script>
|
||||
|
||||
<table id="def">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>snake</td>
|
||||
<td><label><input type="checkbox" name="hidedetails" value="2"> A checkbox inside a cell</label></td>
|
||||
<td>dddd</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>snagfdgfd gd fgf ke</td>
|
||||
<td>dfsdf</td>
|
||||
<td> xxx </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user