diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css index 940c1606c..b93171e37 100644 --- a/html/css/style-classic7.css +++ b/html/css/style-classic7.css @@ -3562,4 +3562,17 @@ span.widget-name { padding: 5px; border-style: groove; margin: 2px; + } +/** + * show the number in the widget + */ + .box_ident { + border-radius: 10px; + background: beige; + color: navy; + font-size: 3.4rem; + padding: 20px; + margin-left: 10px; + margin-top: 10px; + position:absolute; } \ No newline at end of file diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js index 2b2ec4dcb..836b0e182 100644 --- a/html/js/noalyss_script.js +++ b/html/js/noalyss_script.js @@ -4378,6 +4378,7 @@ Widget.prototype.display = function (box,user_widget_id,widget_code) { */ Widget.prototype.manage = function () { try { + this.show_ident(); var box = 'widget_box_id'; var queryString = { gDossier: this.dossier_id, @@ -4399,10 +4400,9 @@ Widget.prototype.manage = function () { var y = calcy(200); style = style + ' ;top : ' + y + 'px'; - add_div({id: box, cssclass: 'inner_box', html: loading(), style: style}) + add_div({id: box, cssclass: 'inner_box', html: loading(), style: style,drag:true}) $(box).update(req.responseText); - } } ); @@ -4462,12 +4462,14 @@ Widget.prototype.save = function () { { alert_box(e.message); } + this.remove_ident(); } /** * refresh the DASHBOARD (dashboard_div_id) */ Widget.prototype.refresh = function () { try { + var here = this; var dgbox='dashboard_div_id' var queryString = { op : 'widget', @@ -4553,7 +4555,6 @@ Widget.prototype.add=function (widget_code) { here=this; var param = {}; if ($(widget_code+"_param")) { - console.debug(`found a FORM`) param=$(widget_code+"_param").serialize() } query = { @@ -4578,8 +4579,7 @@ Widget.prototype.add=function (widget_code) { $('contain_widget').appendChild(new_element); new_element.replace(req.responseText) removeDiv('widget_box_select_id') - here.create_sortable() - here.refresh() + here.create_sortable() } } @@ -4589,4 +4589,34 @@ Widget.prototype.add=function (widget_code) { alert_box(e.message); } -} \ No newline at end of file +} +/** + * Show the number in the widget to improve the ergonomy + */ +Widget.prototype.show_ident = function () +{ + var aBox = document.getElementsByClassName('widget-box') ; + var nb=aBox .length + var idx=1; + for (var e=0;e exec_sql(" INSERT INTO widget_dashboard (wd_code,wd_description,wd_parameter,wd_name) VALUES -('agenda','Présentation d''un calendrier avec les dates de rappel des événements',0,'Agenda')"); +('agenda','Présentation d''un calendrier avec les dates de rappel des événements',0,'Calendrier')"); diff --git a/include/widget/ajax.php b/include/widget/ajax.php index b6f095490..883778a51 100644 --- a/include/widget/ajax.php +++ b/include/widget/ajax.php @@ -77,7 +77,7 @@ if ( $action == 'widget.manage') { echo '