[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 140/151: ManageTable use icon
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 140/151: ManageTable use icon |
Date: |
Sat, 4 Feb 2017 17:14:35 +0000 (UTC) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 426d5b549fefa330464c576e8747a36837971b2f
Author: Dany De Bontridder <address@hidden>
Date: Wed Jan 25 22:36:38 2017 +0100
ManageTable use icon
---
html/image/edit.png | Bin 0 -> 745 bytes
include/lib/class_html_input.php | 13 +++++++++++++
include/lib/class_manage_table_sql.php | 8 ++++----
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/html/image/edit.png b/html/image/edit.png
new file mode 100644
index 0000000..54b5c9a
Binary files /dev/null and b/html/image/edit.png differ
diff --git a/include/lib/class_html_input.php b/include/lib/class_html_input.php
index e5d1e2f..c4dad1f 100755
--- a/include/lib/class_html_input.php
+++ b/include/lib/class_html_input.php
@@ -469,6 +469,19 @@ class HtmlInput
}
/**
+ * Image to click ,
+ * @param string $p_image filename of the image under image/
+ * @param string $p_js javascript when the image is clicked
+ * @param string $p_message Message
+ */
+ static function image_click($p_image,$p_js,$p_message)
+ {
+ $ret=sprintf('<a class="nav" style="display:inline" href="#"
title="%s"><img src="image/%s" onclick="%s"></a>',
+ $p_message,$p_image,$p_js);
+ return $ret;
+
+ }
+ /**
* button Html image
address@hidden $javascript javascript to execute
* @param $id id of the button
diff --git a/include/lib/class_manage_table_sql.php
b/include/lib/class_manage_table_sql.php
index c1019e2..8dc931e 100644
--- a/include/lib/class_manage_table_sql.php
+++ b/include/lib/class_manage_table_sql.php
@@ -490,19 +490,19 @@ class Manage_Table_SQL
echo "<td>";
if ($this->can_update_row())
{
- $js=sprintf("onclick=\"%s.input('%s','%s');\"", $this->object_name,
+ $js=sprintf("%s.input('%s','%s');", $this->object_name,
$p_row[$this->table->primary_key], $this->object_name
);
- echo HtmlInput::anchor(_("Modifier"), "", $js);
+ echo HtmlInput::image_click("edit.png",$js,_("Modifier"));
}
echo "</td>";
echo "<td>";
if ($this->can_delete_row())
{
- $js=sprintf("onclick=\"%s.delete('%s','%s');\"",
$this->object_name,
+ $js=sprintf("%s.delete('%s','%s');", $this->object_name,
$p_row[$this->table->primary_key], $this->object_name
);
- echo HtmlInput::anchor(_("Effacer"), "", $js);
+ echo HtmlInput::image_click("delete.gif", $js,_("effacer"));
}
echo "</td>";
echo '</tr>';
- [Noalyss-commit] [noalyss] 95/151: Problème htmlentities : charset par défaut différent entre version, (continued)
- [Noalyss-commit] [noalyss] 95/151: Problème htmlentities : charset par défaut différent entre version, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 91/151: Improve Performance Acc_Bilan::warning, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 104/151: Improve Noalyss_SQL : add set and get, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 107/151: Add Receipt number to detail operation, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 118/151: correct typo, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 124/151: Test ManageTable ; fix parseXML function, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 129/151: #1380 : Duplication d'opérations, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 138/151: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 134/151: Fix Bug : Predefined operation in Sales , impossible to add new items, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 139/151: ManageTable correct color of HighLigthed row, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 140/151: ManageTable use icon,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 136/151: Esthetic for duplicate operation & Correct esthetic, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 72/151: Documentation Task #2 - Documentation nouveau code, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 76/151: Ajout options Task #9 - PDF_Operation : ajout des options, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 83/151: Performance : improve VERIF, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 74/151: Export en PDF d'operation : PDF_Operation::print_section Task #10 - PDF_Operation : ajout titre Analytique, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 84/151: Performance : improve VERIF , change query pour fiche utilisé avec 2 postes, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 115/151: Correct doxygen, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 109/151: Add a class to manage the Param table (CRUD), Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 113/151: Correct doxygen doc, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 131/151: Doxygen, Dany De Bontridder, 2017/02/04