[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 37/107: Card : allow to specify the max displ
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 37/107: Card : allow to specify the max displaid rows |
Date: |
Mon, 26 Aug 2019 10:31:53 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit aa9fe14bf06e361b8bcc5b2461e051bd23ae3aa6
Author: Dany De Bontridder <address@hidden>
Date: Mon Jul 22 21:37:16 2019 +0200
Card : allow to specify the max displaid rows
---
html/fid_card.php | 4 +++-
include/class/fiche.class.php | 3 ++-
include/lib/icard.class.php | 8 +++++---
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/html/fid_card.php b/html/fid_card.php
index 657e143..c5525df 100644
--- a/html/fid_card.php
+++ b/html/fid_card.php
@@ -45,6 +45,8 @@ require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
$http=new HttpInput();
$jrn= $http->request("j","number",-1);
+$limit=$http->request("limit","number",12);
+
$filter_card="";
$cn=Dossier::connect();
$d=$http->request('e');
@@ -122,7 +124,7 @@ $sql_str="select distinct f_id
join fiche_detail using (f_id)
where
ad_id in (9,1,23)
- and ad_value ilike '%'||$1||'%' ".$filter_card.' limit 12';
+ and ad_value ilike '%'||$1||'%' ".$filter_card.' limit '.$limit;
$fid=$http->request("FID");
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 3d59b9e..e3ad8ef 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -653,6 +653,7 @@ class Fiche
$w->width=$r->ad_size;
$w->extra=$filter;
$w->extra2=0;
+ $w->limit=6;
$label=new ISpan();
$label->name="av_text".$r->ad_id.$uniq."_label";
$fiche=new Fiche($this->cn);
@@ -672,7 +673,7 @@ class Fiche
$w->set_attribute('typecard', $filter);
$w->set_attribute('inp', $w->id);
$w->set_attribute('label', $label->name);
- $w->autocomplete=0;
+ $w->autocomplete=1;
$w->dblclick="fill_ipopcard(this);";
$msg=$w->search();
$msg.=$label->input();
diff --git a/include/lib/icard.class.php b/include/lib/icard.class.php
index af91ed1..d0bfa41 100644
--- a/include/lib/icard.class.php
+++ b/include/lib/icard.class.php
@@ -135,6 +135,7 @@ class ICard extends HtmlInput
$this->autocomplete=1;
$this->style=' ';
$this->accvis=1; //!< account_visible =1 otherwise 0
+ $this->limit=12; //!< Max of row show
}
/**
@@ -252,14 +253,15 @@ class ICard extends HtmlInput
$div=($this->choice_create==1)?sprintf('<div id="%s"
class="autocomplete"></div>',
$this->choice):"";
- $query=dossier::get().'&e='.urlencode($this->typecard);
-
+ $query=http_build_query([
'gDossier'=>Dossier::id(),'e'=>$this->typecard,'limit'=>$this->limit]);
+
$javascript=sprintf('try { new
Ajax.Autocompleter("%s","%s","fid_card.php?%s",'.
'{paramName:"FID",minChars:1,indicator:%s, '.
'callback:%s, '.
+ 'limit:%s,'.
' afterUpdateElement:%s});} catch (e){alert(e.message);};',
$this->id, $this->choice, $query, $this->indicator,
- $this->callback, $this->fct);
+ $this->callback, $this->limit, $this->fct);
$javascript=create_script($javascript.$this->dblclick);
- [Noalyss-commit] [noalyss] 17/107: Mantis #0001651: Problème avec totaux en CA, (continued)
- [Noalyss-commit] [noalyss] 17/107: Mantis #0001651: Problème avec totaux en CA, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 12/107: Code cleaning replace $start and $end by $periode_...>value to avoid to get it several times, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 23/107: Bug javascript mispelled function show_tab, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 21/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into dev7016, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 15/107: Icon_Action : add testing + cosmetic for Icon_Action::menu, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 22/107: typo, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 26/107: Code Cleaning : replace tempname with sys_get_temp_dir Merge commit 'd85d6f8c77083fb997441a672d222bb10836af3e' into dev7109, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 27/107: Improve : depending if pdftk is a snap or not , his path must be a setting, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 30/107: New function PDF:is_fill add documentation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 35/107: indent code, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 37/107: Card : allow to specify the max displaid rows,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 34/107: Clean code , remove useless comment, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 60/107: New message : failed, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 01/107: replace tempname with sys_get_temp_dir, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 03/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 05/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 19/107: Bug with javascript document.viewport cannot be used directly, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 20/107: Bug with javascript global variable width is undefined, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 31/107: translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 25/107: correct js for error, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 29/107: Bug in exception : gettext cannot accept 2 args, Dany De Bontridder, 2019/08/26