rel8100
Merge branch 'master' into entreprise
This commit is contained in:
commit
3867346d28
297 changed files with 22561 additions and 7418 deletions
|
|
@ -47,9 +47,11 @@ require_once NOALYSS_INCLUDE.'/lib/itext.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/lib/itextarea.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/itva_popup.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/input_switch.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/input_checkbox.class.php';
|
||||
|
||||
$http=new HttpInput();
|
||||
?>
|
||||
<script src="js/noalyss_checkbox.js"></script>
|
||||
<pre>
|
||||
<?php var_dump($_GET);?>
|
||||
</pre>
|
||||
|
|
@ -61,26 +63,44 @@ $http=new HttpInput();
|
|||
<pre>
|
||||
|
||||
$input_switch=new InputSwitch('input_switch_value',<?php echo $http->get("input_switch_value","string","0")?>);
|
||||
$input_switch->input();
|
||||
echo $input_switch->input();
|
||||
</pre>
|
||||
input_switch
|
||||
<?php
|
||||
|
||||
$input_switch=new InputSwitch('input_switch_value',$http->get("input_switch_value","string","0"));
|
||||
$input_switch->input();
|
||||
|
||||
echo $input_switch->input();
|
||||
?>
|
||||
<h2>ReadOnly</h2>
|
||||
<pre>
|
||||
$input_switch=new InputSwitch('input_switch_readonly',0);
|
||||
$input_switch->readOnly=TRUE;
|
||||
$input_switch->input();
|
||||
echo $input_switch->input();
|
||||
</pre>
|
||||
input_switch
|
||||
<?php
|
||||
$input_switch=new InputSwitch('input_switch_readonly',0);
|
||||
$input_switch->readOnly=TRUE;
|
||||
$input_switch->input();
|
||||
echo $input_switch->input();
|
||||
?>
|
||||
<h2>InputCheckBox (Check Box)</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<?php
|
||||
for ($i = 0 ; $i < 10 ; $i ++) :
|
||||
echo '<li>';
|
||||
$check[$i]=new InputCheckBox("check[]",1,"checkid".$i);
|
||||
$check[$i]->classrange="improvechkbox";
|
||||
echo $i, " - name = ",$check[$i]->value_container,",id = " , $check[$i]->id_icon,$check[$i]->input();
|
||||
|
||||
echo '</li>';
|
||||
endfor;
|
||||
?>
|
||||
</ul>
|
||||
<aside>les selections par plage ne fonctionnent pas encore avec les CHECKBOX améliorés</aside>
|
||||
<script> activate_checkbox_range("improvechkbox")</script>
|
||||
<h1>Submit</h1>
|
||||
<pre>
|
||||
echo HtmlInput::submit("submit", _("Envoi"));
|
||||
|
|
@ -88,4 +108,74 @@ $http=new HttpInput();
|
|||
<p>
|
||||
<?php echo HtmlInput::submit("submit", _("Envoi"));?>
|
||||
</p>
|
||||
</form>
|
||||
<h2>ICheckBox</h2>
|
||||
<p>
|
||||
For using range all the checkbox must have the same name , like checkbox[]
|
||||
</p>
|
||||
<ol>
|
||||
<?php
|
||||
|
||||
for ($i=0;$i<10;$i++) {
|
||||
$icheckbox=new ICheckBox('icheckbox[]',0);
|
||||
$icheckbox->id=uniqid();
|
||||
$icheckbox->set_range("icheckbox11");
|
||||
echo '<li>';
|
||||
printf ("%s ".$icheckbox->input(),$i);
|
||||
echo '</li>';
|
||||
|
||||
}
|
||||
echo ICheckBox::javascript_set_range("icheckbox11");
|
||||
?>
|
||||
</ol>
|
||||
</form>
|
||||
<h2>
|
||||
Fichier - IFile
|
||||
</h2>
|
||||
<form method="POST" enctype="application/x-www-form-urlencoded" onsubmit="check_size();return false;">
|
||||
<span id="file-info"></span>
|
||||
<?php
|
||||
|
||||
$file=new IFILE("file_to_upload");
|
||||
$file->id="file_to_upload";
|
||||
echo "fichier ",$file->input();
|
||||
|
||||
echo HtmlInput::submit("file","Upload");
|
||||
?>
|
||||
<p>Vérifier le changement de taille fichier dans la console JS</p>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function check_size()
|
||||
{
|
||||
var aFile=document.getElementsByTagName("input");
|
||||
console.debug("afile");
|
||||
console.debug(aFile);
|
||||
var info=document.getElementById("file-info");
|
||||
for (var i = 0;i < aFile.length;i++) {
|
||||
if ( aFile[i].getAttribute("type")==="file" ) {
|
||||
|
||||
console.debug("file"+aFile[i].files[0].size);
|
||||
info.innerHTML+="file : "+aFile[i].files[0].name+":"+aFile[i].files[0].size+" bytes <br>";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
document.getElementById("file_to_upload").addEventListener("change",function() {
|
||||
|
||||
if ( this.files[0] ) {
|
||||
console.debug("file"+this.files[0].size);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<h2>ICArd</h2>
|
||||
<h3>Aucun param suppl.</h3>
|
||||
<?php
|
||||
$icard=new ICard("test");
|
||||
echo $icard->input();
|
||||
echo $icard->search();
|
||||
?>
|
||||
|
||||
<div id="debug_box"></div>
|
||||
|
||||
|
||||
|
|
@ -83,4 +83,9 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";
|
|||
</p>
|
||||
<p>
|
||||
Comment<?php echo Icon_Action::comment("Allo ? l'heure d'été ?")?>
|
||||
</p>
|
||||
<p>
|
||||
<div id="enlarge_it" class="inner_box">
|
||||
enlarge <?php echo Icon_Action::full_size("enlarge_it")?>
|
||||
</div>
|
||||
</p>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
if (!defined('ALLOWED'))
|
||||
die('Appel direct ne sont pas permis');
|
||||
//@description:Test the class Inplace_Edit , ajax and javascript
|
||||
|
||||
$db=Dossier::connect();
|
||||
|
||||
require_once NOALYSS_INCLUDE . '/lib/itext.class.php';
|
||||
require_once NOALYSS_INCLUDE . '/lib/inum.class.php';
|
||||
|
|
@ -44,13 +44,9 @@ if (!isset($_REQUEST["TestAjaxFile"])) {
|
|||
echo "TEXT #".$ajax_hello->input()."#";
|
||||
|
||||
$select = new ISelect ("ajax_select");
|
||||
$select->value=$db->make_array("select fd_id,fd_label from fiche_def order by 2");
|
||||
$select->id=uniqid("sel");
|
||||
$select->value=[
|
||||
["value"=>1,"label"=>"ONE"],
|
||||
["value"=>2,"label"=>"TWO"],
|
||||
["value"=>3,"label"=>"THREE"],
|
||||
];
|
||||
$select->selected="2";
|
||||
$select->selected="10001";
|
||||
$ajax_select = new Inplace_Edit($select);
|
||||
$ajax_select->set_callback("ajax_test.php");
|
||||
$ajax_select->add_json_param("TestAjaxFile", __FILE__) ;
|
||||
|
|
|
|||
|
|
@ -3,16 +3,47 @@
|
|||
<script src="prototype.js"></script>
|
||||
|
||||
<style>
|
||||
/* The container <div> - needed to position the dropdown content */
|
||||
.select_box{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Dropdown Content (Hidden by Default) */
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* Links inside the dropdown */
|
||||
.dropdown-content a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Change color of dropdown links on hover */
|
||||
.dropdown-content a:hover {background-color: #f1f1f1}
|
||||
|
||||
/* Show the dropdown menu on hover */
|
||||
.dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
.select_box {
|
||||
border:solid 0.5px darkblue;
|
||||
background:white;
|
||||
width:455px;
|
||||
max-width:250px;
|
||||
padding:3px;
|
||||
margin:0px;
|
||||
display:none;
|
||||
top:-17px;
|
||||
position:absolute;
|
||||
border:solid 0.5px darkblue;
|
||||
background:white;
|
||||
width:455px;
|
||||
max-width:250px;
|
||||
padding:3px;
|
||||
margin:0px;
|
||||
display:none;
|
||||
position:absolute;
|
||||
z-index:10;
|
||||
}
|
||||
div.select_box ul {
|
||||
list-style:none;
|
||||
|
|
@ -44,10 +75,13 @@ div.select_box a:hover,div.select_box ul li:hover {
|
|||
Le CSS est important , surtout la position, il faut qu'il soit dans
|
||||
un élément positionné en absolu.
|
||||
</p>
|
||||
<h2>in-absolute</h2>
|
||||
<p style="float : static">
|
||||
<?php
|
||||
require_once NOALYSS_INCLUDE.'/lib/select_box.class.php';
|
||||
$a=new Select_Box("test","click me !");
|
||||
$a=new Select_Box("test","position in-absolute click me !");
|
||||
$a->set_position("in-absolute");
|
||||
|
||||
$a->add_url("List (link)","?id=5&".Dossier::get());
|
||||
$a->add_javascript("Hello (Javascript)","alert('hello')");
|
||||
$a->add_value("Value = 10 (set value)",10);
|
||||
|
|
@ -56,10 +90,15 @@ div.select_box a:hover,div.select_box ul li:hover {
|
|||
|
||||
echo $a->input();
|
||||
|
||||
?>
|
||||
?>
|
||||
</p>
|
||||
<h2>normal and absolute</h2>
|
||||
<p>
|
||||
<?php
|
||||
$a=new Select_Box("test2","click me !");
|
||||
$a=new Select_Box("test2","position normal click me !");
|
||||
$a->set_filter(_("recherche"));
|
||||
$a->set_position("normal");
|
||||
|
||||
$a->add_value("Value = 10 (set value)",10);
|
||||
$a->add_value("Value = 1 (set value)",1);
|
||||
$a->add_value("Value = 17 (set value)",15);
|
||||
|
|
@ -74,7 +113,8 @@ div.select_box a:hover,div.select_box ul li:hover {
|
|||
|
||||
echo $a->input();
|
||||
|
||||
?>
|
||||
?>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue