[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 23/323: Task #1485 : by default the dialog bo
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 23/323: Task #1485 : by default the dialog box are fixed but can be moved |
Date: |
Wed, 14 Mar 2018 17:38:11 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b5795ac97cbf55b2bf83b808f3c9c88bb6f41afa
Author: Dany De Bontridder <address@hidden>
Date: Sun Jan 7 13:48:43 2018 +0100
Task #1485 : by default the dialog box are fixed but can be moved
---
html/js/acc_ledger.js | 16 ++++++++--------
html/js/accounting_item.js | 2 +-
html/js/card.js | 12 ++++++------
html/js/scripts.js | 6 +++---
include/constant.php | 4 +++-
include/lib/html_input.class.php | 7 ++++---
include/template/history_top.php | 4 ++++
include/template/ledger_detail_top.php | 4 ++--
8 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 533f6d2..5257ed2 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -659,10 +659,10 @@ function go_next_concerned()
function view_history_account(p_value, dossier)
{
layer++;
- id = 'det' + layer;
- var popup = {'id': id, 'cssclass': 'inner_box', 'html': loading(), 'drag':
true};
+ var idbox = 'det' + layer;
+ var popup = {'id': idbox, 'cssclass': 'inner_box', 'html': loading(),
'drag': false};
- var
querystring={'gDossier':dossier,'act':'de','pcm_val':p_value,'div':id,'l':layer,'op':'history'};
+ var
querystring={'gDossier':dossier,'act':'de','pcm_val':p_value,'div':idbox,'l':layer,'op':'history'};
waiting_box();
var action = new Ajax.Request(
@@ -725,15 +725,15 @@ function update_history_account(obj)
function view_history_card(p_value, dossier)
{
layer++;
- id = 'det' + layer;
- var popup = {'id':id,
+ var idbox = 'det' + layer;
+ var popup = {'id':idbox,
'cssclass': 'inner_box',
'html':loading(),
- 'drag':true};
+ 'drag':false};
var querystring = { 'gDossier' : dossier ,
'act':'de',
'f_id' : p_value ,
- 'div' : id ,
+ 'div' : idbox ,
"l" : layer,
"op":"history"};
waiting_box();
@@ -862,7 +862,7 @@ function modifyOperation(p_value, dossier)
onFailure: error_box,
onSuccess: function (xml, txt) {
var popup = {'id': id_div, 'cssclass': 'inner_box'
- , 'html': "", 'drag': true};
+ , 'html': "", 'drag': false};
remove_waiting_box();
add_div(popup);
success_box(xml, txt);
diff --git a/html/js/accounting_item.js b/html/js/accounting_item.js
index 4694f73..80cae00 100644
--- a/html/js/accounting_item.js
+++ b/html/js/accounting_item.js
@@ -64,7 +64,7 @@ function search_poste(obj)
var div_style="top:"+sx+"px";
removeDiv('search_account');
-
add_div({id:'search_account',cssclass:'inner_box',html:loading(),style:div_style,drag:true});
+
add_div({id:'search_account',cssclass:'inner_box',html:loading(),style:div_style,drag:false});
var dossier=$('gDossier').value;
diff --git a/html/js/card.js b/html/js/card.js
index 936c470..bc941e6 100644
--- a/html/js/card.js
+++ b/html/js/card.js
@@ -317,8 +317,8 @@ function result_card_search(req)
sx=document.body.scrollTop+60;
}
- var div_style="top:"+sx+"px;height:80%";
-
add_div({id:'search_card',cssclass:'inner_box',html:"",style:div_style,drag:true,effect:'blinddown'});
+ var div_style="top:"+sx+"px;height:auto";
+
add_div({id:'search_card',cssclass:'inner_box',html:"",style:div_style,drag:false,effect:'blinddown'});
$('search_card').innerHTML=code_html;
@@ -459,7 +459,7 @@ function fill_ipopcard(obj)
var str_top=fixed_position(250,nTop)
var str_style=str_top+";width:45em;height:auto;position:absolute";
- var popup={'id':
content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true};
+ var popup={'id':
content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':false};
add_div(popup);
var dossier=$('gDossier').value;
@@ -486,7 +486,7 @@ function fill_ipopcard(obj)
if ( obj.nohistory != undefined) {
queryString+='&nohistory';
}
-
+ queryString=encodeURI(queryString);
var action=new Ajax.Request ( 'ajax_misc.php',
{
method:'get',
@@ -570,7 +570,7 @@ function select_card_type(obj)
var str_style="top:"+sx+"px;height:auto";
waiting_box();
- var popup={'id':
content,'cssclass':'inner_box','style':str_style,'html':"",'drag':true};
+ var popup={'id':
content,'cssclass':'inner_box','style':str_style,'html':"",'drag':false};
add_div(popup);
@@ -658,7 +658,7 @@ function dis_blank_card(obj)
var nLeft=posX;
var str_style="top:"+nTop+"px;right:"+nLeft+"px;height:auto";
- var popup={'id':
content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true};
+ var popup={'id':
content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':false};
add_div(popup);
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 7667920..b09ebdd 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -524,7 +524,7 @@ function popup_select_tva(obj)
var nLeft = "15%";
var str_style = "top:" + nTop + "px;left:" + nLeft
+ ";right:" + nLeft + ";width:55em;height:auto";
- var popup = {'id': 'tva_select', 'cssclass':
'inner_box', 'style': str_style, 'html': code_html, 'drag': true};
+ var popup = {'id': 'tva_select', 'cssclass':
'inner_box', 'style': str_style, 'html': code_html, 'drag': false};
add_div(popup);
$('lk_tva_select_table').focus();
}
@@ -1071,13 +1071,13 @@ function show_calc()
}
var sid = 'calc1';
var shtml = '';
- shtml += '<div
style="float:right;height:10px;display:block;margin-top:2px;margin-right:2px"><span
id="pin_calc1"><a class="input_text" onclick="pin(\'calc1\')"
id="close_div">≊</a></span> <a onclick="removeDiv(\'calc1\');"
href="javascript:void(0)" id="close_div">X</a></div>';
+ shtml += '<div
style="float:right;height:10px;display:block;margin-top:2px;margin-right:2px"><span
id="pin_calc1"><a class="input_text" onclick="pin(\'calc1\')"
id="close_div">⊕</a></span> <a onclick="removeDiv(\'calc1\');"
href="javascript:void(0)" id="close_div">X</a></div>';
shtml += '<div> <h2 class="title">Calculatrice</h2></div>';
shtml += '<form name="calc_line" method="GET" onSubmit="cal();return
false;" >Calculatrice simplifiée: écrivez simplement les opérations que vous
voulez puis la touche retour. exemple : 1+2+3*(1/5) <input class="input_text"
type="text" size="30" id="inp" name="calculator"> <input type="button"
value="Efface tout" class="button" onClick="Clean();return false;" > <input
type="button" class="button" value="Fermer" onClick="removeDiv(\'calc1\')" >';
shtml += '</form><span class="highligth" style="display:block"
id="sub_total"> Taper une formule (ex 20*5.1) puis enter </span><span
style="display:block" id="listing"> </span>';
var obj = {id: sid, html: shtml,
- drag: true, style: ''
+ drag: false, style: ''
};
add_div(obj);
this.document.getElementById('inp').focus();
diff --git a/include/constant.php b/include/constant.php
index 3e44862..73eaab2 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -310,4 +310,6 @@ define ('EXC_PARAM_VALUE',1005);
define ('EXC_PARAM_TYPE',1006);
define ('EXC_DUPLICATE',1200);
define ('ICONON','icon-on.png');
-define ('ICONOFF','icon-off.png');
\ No newline at end of file
+define ('ICONOFF','icon-off.png');
+define ("PINDG","⊕");
+define ("UNPINDG","≊");
\ No newline at end of file
diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php
index 33307ee..9bf9349 100755
--- a/include/lib/html_input.class.php
+++ b/include/lib/html_input.class.php
@@ -785,7 +785,7 @@ class HtmlInput
* @param type $p_draggable , if set to yes the box will be draggable
* @return type
*/
- static function
title_box($p_name,$p_div,$p_mod="close",$p_js="",$p_draggable="y")
+ static function
title_box($p_name,$p_div,$p_mod="close",$p_js="",$p_draggable="n")
{
$r="";
if ($p_mod=='close'){
@@ -810,11 +810,12 @@ class HtmlInput
else
die (__FILE__.":".__LINE__._('Paramètre invaide'));
+ // If draggable : display a icon to unpin and move the dialog box
if ( $p_draggable=="y") {
- $drag=sprintf('<span id="pin_%s"
style="float:right;margin:0px;padding:0px;font-size:120%%;border-width:0px" ><a
class="input_text" onclick="pin(\'%s\')" id="close_div">≊ </a></span>',
+ $drag=sprintf('<span id="pin_%s"
style="float:right;margin:0px;padding:0px;font-size:120%%;border-width:0px" ><a
class="input_text" onclick="pin(\'%s\')" id="close_div">'.PINDG.' </a></span>',
$p_div,
$p_div);
- $r.=$drag;
+ $r.=$drag;
}
$r.=h2($p_name,' class="title" ');
diff --git a/include/template/history_top.php b/include/template/history_top.php
index 259318c..47a1bf6 100644
--- a/include/template/history_top.php
+++ b/include/template/history_top.php
@@ -9,6 +9,10 @@
$str=$_SERVER['QUERY_STRING']."&op=history&act=de&ajax=$callback";
echo '<A id="close_div" HREF="javascript:void(0)" onclick="var
a=window.open(\'popup.php?'.$str.'\',\'\',\'fullscreen=yes,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,statusbar=no,menubar=no,status=no,location=no\');
a.focus();removeDiv(\''.$div.'\')">⬜
</A>';
+ printf('<span id="pin_%s"
style="margin:0px;padding:0px;margin-right:6px;padding-top:2px;font-size:120%%;border-width:0px"
><a class="input_text" onclick="pin(\'%s\')" id="close_div">%s</a></span>',
+ $div,
+ $div,PINDG);
+
echo '<A id="close_div" HREF="javascript:void(0)"
onclick="removeDiv(\''.$div.'\');">⨉</A>';
}
?>
diff --git a/include/template/ledger_detail_top.php
b/include/template/ledger_detail_top.php
index 3327ab4..85c7a3f 100644
--- a/include/template/ledger_detail_top.php
+++ b/include/template/ledger_detail_top.php
@@ -18,9 +18,9 @@
echo '<A id="close_div" title="'.$msg_pop.'" onclick="var
a=window.open(\'popup.php?'.$str.'\',\'\',\'titlebar=no,location=no,statusbar=no,menubar=no,toolbar=no,fullscreen=yes,scrollbars=yes,resizable=yes,status=no\');
a.focus();removeDiv(\''.$div.'\')">⬜
</A>';
- printf('<span id="pin_%s"
style="margin:0px;padding:0px;margin-right:6px;padding-top:2px;font-size:120%%;border-width:0px"
><a class="input_text" onclick="pin(\'%s\')"
id="close_div">≊</a></span>',
+ printf('<span id="pin_%s"
style="margin:0px;padding:0px;margin-right:6px;padding-top:2px;font-size:120%%;border-width:0px"
><a class="input_text" onclick="pin(\'%s\')" id="close_div">%s</a></span>',
$div,
- $div);
+ $div,PINDG);
echo '<A id="close_div" title="'.$msg_close.'"
onclick="removeDiv(\''.$div.'\');">⨉</A>';
}
?>
- [Noalyss-commit] [noalyss] 35/323: Bug in Manage_Table_SQL when an exception is thrown from ajax_input, (continued)
- [Noalyss-commit] [noalyss] 35/323: Bug in Manage_Table_SQL when an exception is thrown from ajax_input, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 44/323: Misplacing of box due to a change in the id name, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 37/323: Task #1518:Modèle de Catégorie de fiche : ajout sécurité + attribut minimum, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 31/323: documentation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 33/323: documentation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 36/323: Bug in Manage_Table_SQL when an exception is thrown from ajax_input, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 41/323: Category of card : dialog box too large for screen cannot be viewed, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 40/323: Category of card : cannot be removed due to FK in attr_min, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 42/323: Manage_Table dialog box draggable, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 46/323: Mix between odd and even row, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 23/323: Task #1485 : by default the dialog box are fixed but can be moved,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 51/323: 0001523: Dans HISTO , Operation History (HISTO) , tiers is clickable, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 50/323: task #0001513: Détail fiche : ajout bouton effacer, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 49/323: Tak #1522 : Journaux peuvent être inactif, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 38/323: Task #1518 : ajout de modèle de catégorie de fiche Modification des attributs minimums, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 34/323: Rewriting Module Template Category of card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 53/323: Bug : search cannot select ledger, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 47/323: Task #0001519: Assouplissement de la sécurité : Administrateur accès à tout, ajout d'utilisateur par défaut securité désactivée, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 72/323: typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 64/323: th.num align right, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 55/323: Task #1457 & 1281 : export PDF with opening writing, Dany De Bontridder, 2018/03/14