From cc26e7f396d5b7715dbf24e155028112ef37b050 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 8 Dec 2013 11:10:44 +0000 Subject: [PATCH] Merged revisions 5577-5581 via svnmerge from svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel670 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r5577 | danydb | 2013-12-06 17:19:32 +0100 (ven., 06 déc. 2013) | 3 lines bug #931 - Parfois on ne peut pas ajouter le favori Ajout vue v_menu_description_favori Task #931 - Parfois on ne peut pas ajouter le favori ........ r5578 | danydb | 2013-12-06 17:30:55 +0100 (ven., 06 déc. 2013) | 4 lines bug #928 - Fenêtre Journaux dans fenêtre recherche est clippé ajout d'un bouton "Fermer" Task #928 - Fenêtre Journaux dans fenêtre recherche est clippé ........ r5579 | danydb | 2013-12-07 20:16:46 +0100 (sam., 07 déc. 2013) | 4 lines bug #928 - Fenêtre Journaux dans fenêtre recherche est clippé Cosmétique Task #928 - Fenêtre Journaux dans fenêtre recherche est clippé ........ r5580 | danydb | 2013-12-07 21:27:36 +0100 (sam., 07 déc. 2013) | 1 line Cosmétique ........ r5581 | danydb | 2013-12-07 23:07:15 +0100 (sam., 07 déc. 2013) | 1 line Fix some cosmetic bug, works with IE11 ........ --- html/admin/sql/patch/upgrade110.sql | 26 +++++++++++++++++++++++ html/js/scripts.js | 3 ++- include/ajax_bookmark.php | 2 +- include/class_html_input.php | 5 ++++- include/constant.php | 2 +- include/template/action_search_result.php | 2 +- include/template/letter_all.php | 2 +- include/template/letter_prop.php | 2 +- 8 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 html/admin/sql/patch/upgrade110.sql diff --git a/html/admin/sql/patch/upgrade110.sql b/html/admin/sql/patch/upgrade110.sql new file mode 100644 index 000000000..251671dad --- /dev/null +++ b/html/admin/sql/patch/upgrade110.sql @@ -0,0 +1,26 @@ +begin; +create or replace view v_menu_description_favori as + WITH t_menu AS ( + SELECT mr.me_menu, pm.me_code, pm.me_code_dep, pm.p_type_display, pu.user_name, mr.me_file, mr.me_javascript, mr.me_description, mr.me_description_etendue + FROM profile_menu pm + JOIN profile_user pu ON pu.p_id = pm.p_id + JOIN profile p ON p.p_id = pm.p_id + JOIN menu_ref mr USING (me_code) + ) + SELECT DISTINCT (COALESCE(v3.me_code || '/'::text, ''::text) || COALESCE(v2.me_code, ''::text)) || + CASE + WHEN v2.me_code IS NULL THEN COALESCE(v1.me_code, ''::text) + WHEN v2.me_code IS NOT NULL THEN COALESCE('/'::text || v1.me_code, ''::text) + ELSE NULL::text + END AS code, v1.me_code, v1.me_description, v1.me_description_etendue, v1.me_file, v1.user_name, '> '::text || v1.me_menu AS v1menu, + CASE + WHEN COALESCE(v3.me_menu, ''::text) <> ''::text THEN ' > '::text || v2.me_menu + ELSE v2.me_menu + END AS v2menu, v3.me_menu AS v3menu, v3.p_type_display, COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript)) AS javascript + FROM t_menu v1 + LEFT JOIN t_menu v2 ON v1.me_code_dep = v2.me_code + LEFT JOIN t_menu v3 ON v2.me_code_dep = v3.me_code + WHERE v1.p_type_display <> 'P'::text; +update version set val=111; + +commit; diff --git a/html/js/scripts.js b/html/js/scripts.js index f2cf81331..7c70e1942 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -811,7 +811,8 @@ function show_ledger_choice(json_obj) style: ';position:absolute;width:60%;z-index:20;margin-left:20%', drag: 1 }; - var y=calcy(posY); + //var y=calcy(posY); + var y=posY; if (json_obj.div != '')obj.cssclass=""; obj.style="top:"+y+obj.style; add_div(obj); diff --git a/include/ajax_bookmark.php b/include/ajax_bookmark.php index 840d6e80a..d92cf3fb3 100644 --- a/include/ajax_bookmark.php +++ b/include/ajax_bookmark.php @@ -59,7 +59,7 @@ if (isset($_GET['bookmark_delete']) && isset ($_GET['book'])){ $bookmark_sql="select distinct b_id,b_action,b_order,me_description, javascript" . " from bookmark " - . "join v_menu_description on (code=b_action)" + . "join v_menu_description_favori on (code=b_action)" . "where " . "login=$1 order by b_order,b_action"; $a_bookmark=$cn->get_array($bookmark_sql,array($g_user->login)); diff --git a/include/class_html_input.php b/include/class_html_input.php index a375f826c..80780db66 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -318,6 +318,7 @@ class HtmlInput /* create a hidden div for the ledger */ echo '
'; echo HtmlInput::title_box("Journaux", $div."jrn_search"); + echo '
'; echo '
'; echo HtmlInput::hidden('nb_jrn', count($p_array)); echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2', 1); @@ -339,7 +340,7 @@ class HtmlInput } $class=($e%2==0)?' class="even" ':' class="odd" '; echo ''; - echo ''.$r->input().$row['jrn_def_name'].''; + echo ''.$r->input().$row['jrn_def_name'].''; echo ''.$row['jrn_def_description'].''; echo ''.$row['jrn_def_type'].''; echo ''; @@ -348,8 +349,10 @@ class HtmlInput echo ''; echo HtmlInput::hidden('div',$div); echo HtmlInput::submit('save','Valider'); + echo HtmlInput::button_close($div."jrn_search"); echo '
'; echo '
'; + echo '
'; $ret=ob_get_contents(); ob_end_clean(); return $ret; diff --git a/include/constant.php b/include/constant.php index f1b5cdb08..121d75f86 100644 --- a/include/constant.php +++ b/include/constant.php @@ -71,7 +71,7 @@ define ("SITE_UPDATE",'http://www.phpcompta.eu/last_version.txt'); define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/plugin_last_version.txt'); -define ("DBVERSION",110); +define ("DBVERSION",111); define ("MONO_DATABASE",25); define ("DBVERSIONREPO",14); define ('NOTFOUND','--not found--'); diff --git a/include/template/action_search_result.php b/include/template/action_search_result.php index ee59d189d..94d862974 100644 --- a/include/template/action_search_result.php +++ b/include/template/action_search_result.php @@ -57,7 +57,7 @@ - + > content) == 0 ) : content);$i++): $class=""; -if ( ($i % 2) == 0 ) $class="odd"; +$class= ( ($i % 2) == 0 ) ? "odd":"even"; ?> > diff --git a/include/template/letter_prop.php b/include/template/letter_prop.php index 3e7bec073..ddd4ad2c3 100644 --- a/include/template/letter_prop.php +++ b/include/template/letter_prop.php @@ -47,7 +47,7 @@ $linked_limit=count($this->linked); for ($i=0;$icontent);$i++): $class=""; -if ( ($i % 2) == 0 ) $class="odd"; +$class= ( ($i % 2) == 0 ) ? "odd":"even"; if ( $i < $linked_limit ) $class="even"; if ($linked_limit != 0 && $i==$linked_limit) {