sof...@adullact.net
unread,Jul 12, 2018, 10:26:32 AM7/12/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openmairi...@googlegroups.com
Author: softime
Date: 2018-07-12 16:26:29 +0200 (Thu, 12 Jul 2018)
New Revision: 7973
Modified:
branches/4.7.0_evo_redaction_libre/app/css/app.css
branches/4.7.0_evo_redaction_libre/app/js/script.js
branches/4.7.0_evo_redaction_libre/obj/instruction.class.php
branches/4.7.0_evo_redaction_libre/obj/om_formulaire.class.php
Log:
* Bouton d'actualisation pour le preview (en cours de d?\195?\169v)
Modified: branches/4.7.0_evo_redaction_libre/app/css/app.css
===================================================================
--- branches/4.7.0_evo_redaction_libre/app/css/app.css 2018-07-12 11:16:28 UTC (rev 7972)
+++ branches/4.7.0_evo_redaction_libre/app/css/app.css 2018-07-12 14:26:29 UTC (rev 7973)
@@ -1871,3 +1871,12 @@
.redac-complement-16 { background-image: url("../img/redac-complement-16x16.png"); }
.redac-libre-16 { background-image: url("../img/redac-libre-16x16.png"); }
+
+.btn-refresh-preview {
+ padding: .4em 1em;
+}
+.btn-refresh-preview:hover { border: 1px solid #999999; background: #dadada url(../../om-theme/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #212121; }
+
+.col_1, .col_2, .col_3, .col_4, .col_5, .col_6,
+.col_7, .col_8, .col_9, .col_10, .col_11, .col_12
+{display: block; float: left; margin: 0;}
Modified: branches/4.7.0_evo_redaction_libre/app/js/script.js
===================================================================
--- branches/4.7.0_evo_redaction_libre/app/js/script.js 2018-07-12 11:16:28 UTC (rev 7972)
+++ branches/4.7.0_evo_redaction_libre/app/js/script.js 2018-07-12 14:26:29 UTC (rev 7973)
@@ -2472,6 +2472,22 @@
no_results_text: "Aucun résultat",
allow_single_deselect: true
});
+
+ // Si le bouton de refresh de la preview existe sur la page
+ if ($('.btn-refresh-preview').exists()) {
+ // Position initiale du bouton pour rafraîchir la preview
+ btn_refresh_top = $('.btn-refresh-preview').offset().top
+ // Le bonton de refresh de la preview suit le scroll de la page
+ $(window).scroll(function (event) {
+ if ($(window).scrollTop() > btn_refresh_top){
+ $(".btn-refresh-preview").css("position","fixed");
+ $(".btn-refresh-preview").css("top", 20);
+ } else {
+ $(".btn-refresh-preview").css("position","relative");
+ $(".btn-refresh-preview").css("top", 0);
+ }
+ });
+ }
}
@@ -3762,7 +3778,7 @@
* @return void
*/
function reload_pdf_viewer() {
- var link = "../scr/form.php?obj=instruction&action=777&idx="+$(".form-content #instruction").val();
+ var link = "../app/index.php?module=form&obj=instruction&action=777&idx="+$(".form-content #instruction").val();
var params ='';
if (tinyMCE.get('corps_om_htmletatex') != null) {
params += '&corps='+encodeURIComponent(tinyMCE.get('corps_om_htmletatex').getContent());
Modified: branches/4.7.0_evo_redaction_libre/obj/instruction.class.php
===================================================================
--- branches/4.7.0_evo_redaction_libre/obj/instruction.class.php 2018-07-12 11:16:28 UTC (rev 7972)
+++ branches/4.7.0_evo_redaction_libre/obj/instruction.class.php 2018-07-12 14:26:29 UTC (rev 7973)
@@ -552,7 +552,7 @@
}
if ($this->f->is_option_preview_pdf_enabled($collectivite_di) === true) {
//
- $form->setType('btn_refresh', 'httpclick');
+ $form->setType('btn_refresh', 'httpclickbutton');
$form->setType('live_preview', 'pdf');
}
Modified: branches/4.7.0_evo_redaction_libre/obj/om_formulaire.class.php
===================================================================
--- branches/4.7.0_evo_redaction_libre/obj/om_formulaire.class.php 2018-07-12 11:16:28 UTC (rev 7972)
+++ branches/4.7.0_evo_redaction_libre/obj/om_formulaire.class.php 2018-07-12 14:26:29 UTC (rev 7973)
@@ -375,4 +375,37 @@
}
}
+ /**
+ * WIDGET_FORM - httpclick.
+ *
+ * lien http en formulaire - passage d argument sur une
+ * application tierce
+ *
+ * @param string $champ Nom du champ
+ * @param integer $validation
+ * @param boolean $DEBUG Parametre inutilise
+ *
+ * @return void
+ */
+ function httpclickbutton($champ, $validation, $DEBUG = false) {
+
+ //
+ if (isset($this->select[$champ][0])) {
+ $aff = $this->select[$champ][0];
+ } else {
+ $aff = $champ;
+ }
+ //
+ // $params = array(
+ // 'value' => $aff,
+ // 'name' => $aff,
+ // 'onclick' => $this->val[$champ],
+ // );
+ // $this->f->layout->display_form_button($params);
+ echo "<a class='btn-refresh-preview om-button ui-button ui-widget ui-state-default ui-corner-all' href='#' onclick=\"".$this->val[$champ]."; return false;\" >";
+ echo $aff;
+ echo "</a>\n";
+
+ }
+
}