[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Task #1221 - Bouton Fermer dans les b
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Task #1221 - Bouton Fermer dans les boîtes de dialogues #1221 : add hide / close button |
Date: |
Mon, 09 Nov 2015 21:24:35 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 8fc8123cea66502f261e1db65c7743b035bbabd3
Author: Dany De Bontridder <address@hidden>
Date: Mon Nov 9 22:18:13 2015 +0100
Task #1221 - Bouton Fermer dans les boîtes de dialogues
#1221 : add hide / close button
---
include/ajax/ajax_calendar_zoom.php | 5 +++++
include/class/class_calendar.php | 6 +++++-
include/class/class_pre_operation.php | 3 +++
include/lib/ac_common.php | 3 +++
include/lib/class_html_input.php | 15 +++++++++++++++
include/template/action_display_short.php | 9 +++++++++
include/template/dashboard.php | 6 ++++++
include/template/todo_list_display.php | 9 ++++++++-
8 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/include/ajax/ajax_calendar_zoom.php
b/include/ajax/ajax_calendar_zoom.php
index f30e0f6..a95198b 100644
--- a/include/ajax/ajax_calendar_zoom.php
+++ b/include/ajax/ajax_calendar_zoom.php
@@ -29,6 +29,11 @@ if ( $in == "") {
}
$cal->set_periode($in);
echo $cal->zoom($distype,$notitle);
+if ( $notitle== 0 ) {
+ echo '<p style="text-align:center">';
+ echo HtmlInput::button_close("calendar_zoom_div");
+ echo '</p>';
+}
$response= ob_get_clean();
$html=escape_xml($response);
diff --git a/include/class/class_calendar.php b/include/class/class_calendar.php
index a36fac7..a685372 100644
--- a/include/class/class_calendar.php
+++ b/include/class/class_calendar.php
@@ -91,7 +91,11 @@ class Calendar
{
$this->action_div[$day].='<li>'.HtmlInput::detail_action($aAction[$i],
$this->title[$day][$i]).'</li>';
}
- $this->action_div[$day].='</ol></div>';
+ $this->action_div[$day].='</ol>';
+ $this->action_div[$day].=' <p style="text-align:
center">';
+
$this->action_div[$day].=HtmlInput::button_hide('tsk'.$day);
+ $this->action_div[$day].='</p>';
+ $this->action_div[$day].='</div>';
}
}
else if ( $p_style == "long")
diff --git a/include/class/class_pre_operation.php
b/include/class/class_pre_operation.php
index 8d8fc82..b0192fc 100644
--- a/include/class/class_pre_operation.php
+++ b/include/class/class_pre_operation.php
@@ -251,6 +251,9 @@ class Pre_operation_detail
$r.=$hid->input("action","use_opd");
$r.=$hid->input("jrn_type",$this->get("ledger_type"));
$r.= $this->show_button($p_url);
+ $r.=' <p style="text-align: center">'.
+ HtmlInput::button_hide('modele_op_div').
+ '</p>';
$r.='</div>';
return $r;
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index d23f183..9c17bc4 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -1182,6 +1182,9 @@ function
display_dashboard_operation($p_array,$p_title,$p_div)
endfor;
?>
</table>
+ <p style="text-align: center">
+ <?php echo HtmlInput::button_hide($p_div)?>
+ </p>
<?php else: ?>
<h2 class="notice"><?php echo _('Aucune donnée')?></h2>
<?php
diff --git a/include/lib/class_html_input.php b/include/lib/class_html_input.php
index ba33de0..24aa7c3 100755
--- a/include/lib/class_html_input.php
+++ b/include/lib/class_html_input.php
@@ -425,6 +425,21 @@ class HtmlInput
}
/**
+ * @brief Hide the HTML popup
+ * @param type $div_name
+ * @return type
+ */
+ static function button_hide($div_name)
+ {
+ $a=new IButton('Fermer');
+ $a->label=_("Fermer");
+ $a->javascript="$('".$div_name."').hide()";
+ $html=$a->input();
+
+ return $html;
+
+ }
+ /**
* Return a html string with an anchor which close the inside popup.
(top-right corner)
address@hidden name of the DIV to close
*/
diff --git a/include/template/action_display_short.php
b/include/template/action_display_short.php
index f9dc76b..abe0b49 100644
--- a/include/template/action_display_short.php
+++ b/include/template/action_display_short.php
@@ -119,6 +119,15 @@ echo HtmlInput::hidden('gDossier',Dossier::id());
echo HtmlInput::hidden('op','action_save');
?>
<p style="text-align: center">
+<ol style="list-style: none">
+ <li style="display:inline">
<?php echo HtmlInput::submit("action_add_submit", _('Valider'));?>
+ </li>
+ <li style="display:inline">
+ <?php echo HtmlInput::button_close("action_add_div")?>
+ </li>
+
+</ol>
+
</p>
</form>
diff --git a/include/template/dashboard.php b/include/template/dashboard.php
index a81bb1a..3924956 100644
--- a/include/template/dashboard.php
+++ b/include/template/dashboard.php
@@ -219,6 +219,9 @@ endif;
<?php else : ?>
<h2 class='notice'><?php echo _("Aucune action en retard")?></h2>
<?php endif; ?>
+ <p style="text-align: center">
+ <?php echo HtmlInput::button_hide("action_late_div")?>
+ </p>
</div>
<div id="action_now_div" class="inner_box"
style="display:none;margin-left:25%;width: 50%;top:25%;min-height:50%;overflow:
auto;">
@@ -247,6 +250,9 @@ endif;
</li>
<?php endfor;?>
</ol>
+ <p style="text-align: center">
+ <?php echo HtmlInput::button_hide("action_now_div")?>
+ </p>
<?php endif; ?>
</div>
<?php display_dashboard_operation($supplier_now,_("Fournisseurs à payer
aujourd'hui"),'supplier_now_div'); ?>
diff --git a/include/template/todo_list_display.php
b/include/template/todo_list_display.php
index 1970411..38eb214 100644
--- a/include/template/todo_list_display.php
+++ b/include/template/todo_list_display.php
@@ -100,7 +100,14 @@ echo
HtmlInput::title_box("Note","todo_list_div".$this->tl_id,'close',$close_sha
<?php echo HtmlInput::hidden('id',$this->tl_id) ?>
<?php if ($this->use_login == $_SESSION['g_user']) : ?>
<p style='text-align: center'>
- <input type="submit" class="smallbutton" value="<?php echo
_('Sauve');?>" onclick="todo_list_save(<?php echo $this->tl_id?>);return false">
+ <ol style="list-style: none;">
+ <li style="display:inline">
+ <input type="submit" class="smallbutton" value="<?php echo
_('Sauve');?>" onclick="todo_list_save(<?php echo $this->tl_id?>);return false">
+ </li>
+ <li style="display:inline">
+ <?php echo
HtmlInput::button_close("todo_list_div".$this->tl_id);?>
+ </li>
+ </ol>
</p>
<?php endif; ?>
</form>
\ No newline at end of file