[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/10: Manage_Table : add CSS Class
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/10: Manage_Table : add CSS Class |
Date: |
Sun, 28 Mar 2021 09:22:02 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 6f169caf78d4223be5611b194068656d7609a092
Author: Dany De Bontridder <dany@alchimerys.be>
AuthorDate: Fri Mar 12 10:09:39 2021 +0100
Manage_Table : add CSS Class
---
html/js/managetable.js | 7 +++++--
include/lib/manage_table_sql.class.php | 18 ++++++++++++++++--
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/html/js/managetable.js b/html/js/managetable.js
index da5b860..78c2ddd 100644
--- a/html/js/managetable.js
+++ b/html/js/managetable.js
@@ -76,6 +76,7 @@ var ManageTable = function (p_table_name)
this.control = "dtr"; //<! Prefix Id of dialog box, table, row
this.mt_style={position: "fixed", top: '15%', width: "auto",
"max-width":"60%","margin-left": "20%"};
this.sort_column=0;
+ this.cssclass="inner_box";
this.param = {"table": p_table_name, "ctl_id": this.control}; //<! default
value to pass
this.set_style=function(p_json) {
this.mt_style=p_json;
@@ -308,13 +309,15 @@ var ManageTable = function (p_table_name)
remove_waiting_box();
try {
var x = here.parseXML(req);
- var obj = {id: control, "cssclass": "inner_box", "html":
loading()};
+ var obj = {id: control, "cssclass": here.cssclass, "html":
loading()};
add_div(obj);
- var pos = calcy(250);
+ var pos = calcy(50);
if (window.innerWidth < 1200) {
here.mt_style["margin-left"]="2%";
here.mt_style["max-width"]="80%";
}
+ here.mt_style["position"]="absolute";
+ here.mt_style["top"]=pos+"px";
console.log(here.mt_style);
$(obj.id).setStyle(here.mt_style);
$(obj.id).update(x['html']);
diff --git a/include/lib/manage_table_sql.class.php
b/include/lib/manage_table_sql.class.php
index 2b56a3e..9e78042 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -88,9 +88,11 @@ class Manage_Table_SQL
private $icon_mod; //!< place of right or left the icon update or mod,
default right, accepted value=left,right,first column for mod
private $icon_del; //!< place of right or left the icon update or mod,
default right, accepted value=left,right
- private $dialogbox_style;
+ private $dialogbox_style; //!< style of the dialog box
private $button_add_top; //!< place of the button add on the top, by
default true
protected $title; //! < give the title of the diabox , default is Data
+ private $cssclass; //! CSS class for the dialog box
+
/**
* @brief Constructor : set the label to the column name,
* the order of the column , set the properties and the
@@ -133,7 +135,15 @@ class Manage_Table_SQL
$this->search_table=true;
$this->button_add_top=true;
$this->title=_("Donnée");
+ $this->cssclass="inner_box";
+
}
+ function setCssClass($p_class) {
+ $this->cssclass=$p_class;
+ }
+ function getCssClass() {
+ return $this->cssclass;
+ }
/**
* Set the title of the diabox , default is Donnée
* @param type $p_title
@@ -450,6 +460,7 @@ function check()
{$this->object_name}.set_sort({$this->get_col_sort()});
{$this->object_name}.set_control(\"{$this->get_dialog_box()}\");
{$this->object_name}.set_style($style);
+ {$this->object_name}.cssclass=\"{$this->cssclass}\";
</script>
";
@@ -978,7 +989,10 @@ function check()
/**
* @brief display into a dialog box the datarow in order
* to be appended or modified. Can be override if you need
- * a more complex form.
+ * a more complex form or add elements with "set_order" before
+ * calling this function.
+ * This function does not add the form , only the table,
+ *
*/
function input()
{
- [Noalyss-commit] [noalyss] branch master updated (a02ebda -> b00558e), Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 01/10: Manage_Table : add CSS Class,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 02/10: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 03/10: Merge branch 'd8103', Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 05/10: Task #0001878: quantité sur deux décimales, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 10/10: Task #0001904: Previsions et budgets Ajout montant initial and estimation cumulée pour avoir évolution passif/actif, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 08/10: Task #0001904: Previsions et budgets rewriting of forecast : missing SQL files, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 07/10: Improve ManageTable : input can return a value + cosmetic, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 06/10: Task #0001904: Previsions et budgets Réécriture prévision, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 09/10: Cosmetic, Dany De Bontridder, 2021/03/28
- [Noalyss-commit] [noalyss] 04/10: Task #1913 : cosmetic CSS, Dany De Bontridder, 2021/03/28