#210 améliore ergonomie boite de dialogue de recherche
This commit is contained in:
parent
33947d40a8
commit
e1b0611c55
5 changed files with 68 additions and 26 deletions
|
|
@ -899,4 +899,16 @@ div#div_jrn{
|
|||
|
||||
}
|
||||
div.divinfo
|
||||
{ color:red;text-align:right;display:block;width:30em;height:13;}
|
||||
{ color:red;text-align:right;display:block;width:30em;height:13;}
|
||||
|
||||
div#search_form
|
||||
{
|
||||
position:absolute;
|
||||
border:1px solid black;
|
||||
top:15%;left:100;
|
||||
margin-left:25%
|
||||
z-index:2;
|
||||
width:50%;
|
||||
display:none;
|
||||
background-color:#e4e7ed;
|
||||
}
|
||||
|
|
@ -929,3 +929,16 @@ div#div_jrn{
|
|||
|
||||
div.divinfo
|
||||
{ color:red;text-align:right;display:block;width:30em;height:13;font-weight:bold}
|
||||
|
||||
|
||||
div#search_form
|
||||
{
|
||||
position:absolute;
|
||||
border:1px solid black;
|
||||
top:15%;left:100;
|
||||
margin-left:25%
|
||||
z-index:2;
|
||||
width:50%;
|
||||
display:none;
|
||||
background-color:#e4e7ed;
|
||||
}
|
||||
|
|
@ -2449,15 +2449,9 @@ class Acc_Ledger
|
|||
$type=$this->type;
|
||||
|
||||
if ( $type=="" || $this->id==0) $type='ALL';
|
||||
if ( isset($_GET['amount_min']) )
|
||||
{
|
||||
$display='block';
|
||||
}
|
||||
else
|
||||
{
|
||||
$display='none';
|
||||
}
|
||||
$r.='<div id="search_form" style="display:'.$display.'">';
|
||||
$r.='<div id="search_form" style="display:none">';
|
||||
$r.=HtmlInput::anchor_action('Fermer','$(\'search_form\').style.display=\'none\';');
|
||||
$r.=h2info('Recherche');
|
||||
$r.='<FORM METHOD="GET">';
|
||||
$r.=$this->search_form($type);
|
||||
$r.=HtmlInput::submit('search',_('Rechercher'));
|
||||
|
|
@ -2468,14 +2462,17 @@ class Acc_Ledger
|
|||
if (isset($_REQUEST['sb'])) $r.= HtmlInput::hidden("sb",$_REQUEST['sb']);
|
||||
if (isset($_REQUEST['sc'])) $r.= HtmlInput::hidden("sc",$_REQUEST['sc']);
|
||||
if (isset($_REQUEST['f_id'])) $r.=HtmlInput::hidden("f_id",$_REQUEST['f_id']);
|
||||
$r.=HtmlInput::button_anchor('Fermer','javascript:void(0)','fsearch_form','onclick="$(\'search_form\').style.display=\'none\';"');
|
||||
|
||||
$r.='</FORM>';
|
||||
$button=new IButton('tfs');
|
||||
$button->label=_("Afficher recherche");
|
||||
$button->javascript="toggleHideShow('search_form','tfs');";
|
||||
$r.='</div>';
|
||||
$r.=$button->input();
|
||||
|
||||
$r.='</div>';
|
||||
$button=new IButton('tfs');
|
||||
$button->label=_("Filtrer");
|
||||
$button->javascript="toggleHideShow('search_form','tfs');";
|
||||
|
||||
$r.=$button->input();
|
||||
$r.='<hr>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -417,6 +417,35 @@ class HtmlInput
|
|||
$r.='</div>';
|
||||
return $r;
|
||||
}
|
||||
/**
|
||||
* button Html with an action in the top
|
||||
*@param $action action action to perform (message)
|
||||
*@param $javascript javascript of the DIV to close
|
||||
*@see Acc_Ledger::display_search_form
|
||||
*@note not protected against html
|
||||
*@param $div_name is the name of the div to remove
|
||||
*/
|
||||
static function button_action($action,$javascript)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* Return a html string with an anchor looking like anchor_button in the right corner
|
||||
*@param $action action action to perform (message)
|
||||
*@param $javascript javascript
|
||||
*@note not protected against html
|
||||
*@see Acc_Ledger::display_search_form
|
||||
*/
|
||||
static function anchor_action($action,$javascript)
|
||||
{
|
||||
$r='';
|
||||
$r.='<div style="float:right">';
|
||||
$r.= '<A style="background-color:blue;color:white;text-decoration:none" HREF="javascript:void(0)" onclick="'.$javascript.'");">'.$action.'</A>';
|
||||
$r.='</div>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Javascript to print the current window
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,17 +35,6 @@ require_once('class_periode.php');
|
|||
require_once('function_javascript.php');
|
||||
require_once('class_ipopup.php');
|
||||
|
||||
echo ICard::ipopup('ipopcard');
|
||||
echo ICard::ipopup('ipop_newcard');
|
||||
echo IPoste::ipopup('ipop_account');
|
||||
$search_card=new IPopup('ipop_card');
|
||||
$search_card->title=_('Recherche de fiche');
|
||||
$search_card->value='';
|
||||
echo $search_card->input();
|
||||
$pop_tva=new IPopup('popup_tva');
|
||||
$pop_tva->title=_('Choix TVA');
|
||||
$pop_tva->value='';
|
||||
echo $pop_tva->input();
|
||||
|
||||
|
||||
$cn=new Database(dossier::id());
|
||||
|
|
@ -165,6 +154,7 @@ if ($sa == 'l' && $id != -1)
|
|||
show_qw_menu(1);
|
||||
echo '<div class="content">';
|
||||
$Ledger=new Acc_Ledger($cn,$id);
|
||||
|
||||
$type=$Ledger->get_type();
|
||||
$href=basename($_SERVER['PHP_SELF']);
|
||||
|
||||
|
|
@ -176,6 +166,7 @@ if ($sa == 'l' && $id != -1)
|
|||
echo $Ledger->search_form($type,0);
|
||||
echo HtmlInput::submit("qwlist",_("Recherche"));
|
||||
echo '</form>';
|
||||
|
||||
$array=$_GET;
|
||||
list($sql,$where)=$Ledger->build_search_sql($array);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue