From: Joe Hunt Date: Sat, 22 Nov 2008 01:33:44 +0000 (+0000) Subject: Preparing graphic links, changes X-Git-Tag: v2.4.2~19^2~1732 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a578378e067a6af5bbdcdb5881632c29494a8aa1;p=fa-stable.git Preparing graphic links, changes --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2cac1a7f..2f466e1e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,10 +24,16 @@ $ -> Affected files (new field in 0_users, graphic_links) $ config.php /admin/display_prefs.php + /admin/create_coy.php + /admin/inst_lang.php + /admin/inst_module.php /admin/db/users_db.inc /includes/current_user.inc /includes/prefs/userprefs.inc /includes/ui/ui_controls.inc + /includes/ui/ui_input.inc + /includes/ui/ui_view.inc + /reporting/includes/reporting.inc /sql/alter2.1.sql /themes/default/images/add.png, credit.gif, delete.gif, download.gif, edit.gif, gl.png, invoice.gif, money.png, pdf.gif, print.png, remove.png, report.png, view.gif diff --git a/admin/create_coy.php b/admin/create_coy.php index 8324fa7d..cdcb971e 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 20; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -236,9 +245,17 @@ function display_companies() label_cell($conn[$i]['dbname']); label_cell($conn[$i]['tbpref']); label_cell($what); - label_cell("" . _("Edit") . ""); + $edit = _("Edit"); + $delete = _("Delete"); + if (user_graphic_links()) + { + global $path_to_root; + $edit = "\n"; + $delete = "\n"; + } + label_cell("$edit"); label_cell( $i == $coyno ? '' : - "" . _("Delete") . ""); + "$delete"); end_row(); } diff --git a/admin/inst_lang.php b/admin/inst_lang.php index bd23d383..4233418f 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 20; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -265,10 +274,17 @@ function display_languages() else $rtl = _("No"); label_cell($rtl); - edit_link_cell("selected_id=" . $i); - + $edit = _("Edit"); + $delete = _("Delete"); + if (user_graphic_links()) + { + global $path_to_root; + $edit = "\n"; + $delete = "\n"; + } + label_cell("$edit"); label_cell($conn[$i]['code'] == $lang ? '' : - "" . _("Delete") . ""); + "$delete"); end_row(); } diff --git a/admin/inst_module.php b/admin/inst_module.php index 1e001768..4b505734 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 20; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -279,8 +288,16 @@ function display_modules() label_cell($mods[$i]['name']); label_cell($mods[$i]['path']); label_cell($mods[$i]['filename']); - edit_link_cell("selected_id=" . $i); - label_cell("" . _("Delete") . ""); + $edit = _("Edit"); + $delete = _("Delete"); + if (user_graphic_links()) + { + global $path_to_root; + $edit = "\n"; + $delete = "\n"; + } + label_cell("$edit"); + label_cell("$delete"); end_row(); } diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index 69a52f43..8f4c319c 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -135,7 +135,7 @@ function handle_search() label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"))); if ($print_out) label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type)); - label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name], _("View GL"))); + label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name])); end_row(); diff --git a/gl/manage/gl_quick_entries.php b/gl/manage/gl_quick_entries.php index 10e38ec2..fae60668 100644 --- a/gl/manage/gl_quick_entries.php +++ b/gl/manage/gl_quick_entries.php @@ -168,8 +168,8 @@ while ($myrow = db_fetch($result)) label_cell($myrow['description']); label_cell($deposit_text); label_cell($bank_text); - edit_button_cell("Edit".$myrow["id"], _("Edit"), false, ICON_EDIT); - edit_button_cell("Delete".$myrow["id"], _("Delete"), false, ICON_DELETE); + edit_button_cell("Edit".$myrow["id"], _("Edit")); + delete_button_cell("Delete".$myrow["id"], _("Delete")); end_row(); } @@ -236,8 +236,8 @@ if ($selected_id != -1) label_cell(get_dimension_string($myrow['dimension_id'], true)); if ($dim > 1) label_cell(get_dimension_string($myrow['dimension2_id'], true)); - edit_button_cell("BEd".$myrow["id"], _("Edit"), false, ICON_EDIT); - edit_button_cell("BDel".$myrow["id"], _("Delete"), false, ICON_DELETE); + edit_button_cell("BEd".$myrow["id"], _("Edit")); + delete_button_cell("BDel".$myrow["id"], _("Delete")); end_row(); } end_table(); diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index fd2fefb3..4fbdb984 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -185,43 +185,45 @@ function table_header($labels) end_row(); } -function edit_link_cell($param, $title=false) -{ - label_cell("" . _("Edit") . "", "nowrap"); -} - -function delete_link_cell($param, $title=false) -{ - label_cell("" . _("Delete") . "", "nowrap"); -} +//----------------------------------------------------------------------------------- -function edit_button($name, $value, $title=false, $icon=false) +function button($name, $value, $title=false, $icon=false) { // php silently changes dots,spaces,'[' and characters 128-159 // to underscore in POST names, to maintain compatibility with register_globals if (user_graphic_links() && $icon) { global $path_to_root; - $name = htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B'))); - echo "