From 2906f8a3aaa60071a842a79fc3ed19eca1f8ff76 Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Fri, 17 Mar 2017 08:53:36 -0700 Subject: [PATCH] Some fixes for drawable images with larger image sizes. (#566) --- library/options.inc.php | 10 ++++++---- sql/5_0_0-to-5_0_1_upgrade.sql | 4 ++++ sql/database.sql | 2 +- version.php | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/library/options.inc.php b/library/options.inc.php index 8dc2465eb..4e530cc88 100644 --- a/library/options.inc.php +++ b/library/options.inc.php @@ -1095,7 +1095,9 @@ function generate_form_field($frow, $currvalue) { $currvalue = $GLOBALS['web_root'] . '/sites/' . $_SESSION['site_id'] . '/images/' . $matches[1]; } } - echo "
"; + $mywidth = 50 + ($canWidth > 250 ? $canWidth : 250); + $myheight = 31 + ($canHeight > 261 ? $canHeight : 261); + echo "
"; // Hidden form field exists to send updated data to the server at submit time. echo ""; // Hidden image exists to support initialization of the canvas. @@ -3189,9 +3191,9 @@ function lbf_current_value($frow, $formid, $encounter) { // This returns stuff that needs to go into the section of a caller using // the drawable image field type in a form. -// A TRUE argument makes the widget 25% less tall. +// A TRUE argument makes the widget controls smaller. // -function lbf_canvas_head($small=FALSE) { +function lbf_canvas_head($small=TRUE) { $s = << @@ -3204,7 +3206,7 @@ EOD; * This makes the widget 25% less tall and adjusts some other things accordingly. */ .literally { - min-height:292px;min-width:300px; /* Was 400, unspecified */ + min-height:100%;min-width:300px; /* Was 400, unspecified */ } .literally .lc-picker .toolbar-button { width:20px;height:20px;line-height:20px; /* Was 26, 26, 26 */ diff --git a/sql/5_0_0-to-5_0_1_upgrade.sql b/sql/5_0_0-to-5_0_1_upgrade.sql index 91fc26e42..8993b6150 100644 --- a/sql/5_0_0-to-5_0_1_upgrade.sql +++ b/sql/5_0_0-to-5_0_1_upgrade.sql @@ -414,3 +414,7 @@ UPDATE `registry` SET `aco_spec` = 'encounters|coding' WHERE directory = 'fee_sh UPDATE `registry` SET `aco_spec` = 'encounters|coding' WHERE directory = 'misc_billing_options'; UPDATE `registry` SET `aco_spec` = 'patients|lab' WHERE directory = 'procedure_order'; #EndIf + +#IfNotColumnType lbf_data field_value longtext +ALTER TABLE `lbf_data` CHANGE `field_value` `field_value` longtext NOT NULL; +#EndIf diff --git a/sql/database.sql b/sql/database.sql index 83bad4c6b..c4a013cf4 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -6957,7 +6957,7 @@ CREATE TABLE `users_facility` ( CREATE TABLE `lbf_data` ( `form_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'references forms.form_id', `field_id` varchar(31) NOT NULL COMMENT 'references layout_options.field_id', - `field_value` TEXT, + `field_value` LONGTEXT, PRIMARY KEY (`form_id`,`field_id`) ) ENGINE=InnoDB COMMENT='contains all data from layout-based forms'; diff --git a/version.php b/version.php index 382b4f6b2..df0bf488b 100644 --- a/version.php +++ b/version.php @@ -17,7 +17,7 @@ $v_realpatch = '0'; // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // -$v_database = 214; +$v_database = 215; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used -- 2.11.4.GIT