Patchcord Framework Releaes 3.3 Notes · Patchcord.ca Inc. page 1 of 25 Release 3.3 February 2012...
Transcript of Patchcord Framework Releaes 3.3 Notes · Patchcord.ca Inc. page 1 of 25 Release 3.3 February 2012...
Patchcord.ca Inc. page 1 of 25
Release 3.3
February 2012
Contents User Experience and Features Enhancements ............................................................................................................... 3
Tiny MCE Editor Integration .......................................................................................................................................... 3
Grid Row and Cell CSS ................................................................................................................................................... 3
Code Sample ................................................................................................................................................................. 3
Example Output ........................................................................................................................................................... 4
Doclib Grid/Row CSS ...................................................................................................................................................... 4
Doclib Grid/Row Legend ................................................................................................................................................ 5
Administrator Experience and Features Enhancements .............................................................................................. 5
Clear All and Select All In User Edit ............................................................................................................................ 5
List/Edit Language Enhancement ................................................................................................................................... 6
List/Edit User Enhancement ........................................................................................................................................... 7
Reporting Features Enhancements .................................................................................................................................... 8
Report CMID Enhancements ......................................................................................................................................... 8
Simplified Exception Reporting Tool ................................................................................................................................ 8
PMCMID Log Archive Option ....................................................................................................................................... 9
Login Enhancements .......................................................................................................................................................... 11
Reset Password by email or security question .................................................................................................. 12
Self Register ................................................................................................................................................................ 13
New API’s............................................................................................................................................................................. 13
Create a Custom Register Form ............................................................................................................................... 13
Features ....................................................................................................................................................................... 13
Loading a Custom Register Module ...................................................................................................................... 13
Creating a Custom Register Module .................................................................................................................... 14
Framework Technology Refinement and Improvement ........................................................................................... 15
Master Config Options: LANGUAGE ...................................................................................................................... 15
Master Config Options: PASSWORD_STRENGTH ............................................................................................. 15
Master Config Option: ENCRYPTEDPWD ........................................................................................................... 15
Patchcord.ca Inc. page 2 of 25
Master Config Option: GRID_ADVANCED_SEARCH ....................................................................................... 15
Master Config Option: SWITCHUSER..................................................................................................................... 15
Master Config Option: SWITCHUSER_COMMON ............................................................................................ 15
Master Config Option: ALLOWSTYLECHANGE ................................................................................................. 15
Master Config Option: ALLOWTOPSEARCH....................................................................................................... 16
Master Config Option: ALLOWACCOUNTSEARCH......................................................................................... 16
Master Config Option: GROUP_ACCOUNTS ..................................................................................................... 16
Master Config Option: PASSWORD_FIELD_CASE ............................................................................................. 16
Master Config Option: SESSION_COOKIE_DOMAIN ...................................................................................... 16
Master Config Option: SESSION_TIMEOUT_SECONDS .................................................................................. 16
Master Config Option: GOOGLE_MAPS_KEY ..................................................................................................... 16
Master Config Option: GOOGLE_MAPS_CMID .................................................................................................. 16
Master Config Option: PASSWORD_VISIBLE_IN_USER_GRID ...................................................................... 16
Master Config Option: GRID_SORT_PAGING .................................................................................................... 17
Master Config Option: ALLOW_USER_PREF_EDIT_EMAIL ............................................................................ 17
Master Config Option: ALLOW_USER_PREF_EDIT_PHONE ......................................................................... 17
Master Config Option: ALLOW_USER_PREF_EDIT_FNAME .......................................................................... 17
Master Config Option: ALLOW_USER_PREF_EDIT_LNAME .......................................................................... 17
Master Config Option: EXCEPTION_HANDLING ............................................................................................. 17
Master Config Option: EXCEPTION_HANDLING_SUPPORT_EMAIL ......................................................... 17
Migrate Functions to JQuery ....................................................................................................................................... 18
Framework Security Questions ................................................................................................................................. 19
Security Question and Answer .............................................................................................................................. 20
Doclib V2 Enhancements .................................................................................................................................................. 21
doclibv2_files Table ....................................................................................................................................................... 21
<fl_mappings> Section in Doclib config ................................................................................................................... 21
Multi-Pick enhancements .................................................................................................................................................. 22
Default Search ................................................................................................................................................................ 23
Query-list enhancements ................................................................................................................................................. 25
Patchcord.ca Inc. page 3 of 25
User Experience and Features Enhancements
Tiny MCE Editor Integration
In various framework edit screens the Tiny MCE editor has been used for more flexibility, such as editing
announcements, or company footer.
Grid Row and Cell CSS
Code Sample
my $ct_fh = Tie::Handle::CSV->new( '/var/www/PATCHCORD/sample_grid.csv', header => 1 );
while ( my $c = <$ct_fh> ) {
my %units = ();
my $i = 1;
$units{defaultParam}{id} = $i;
my ( $m, $d, $y ) = split( /\//, $c->{OrderDate} );
$m = sprintf "%02d", $m;
$d = sprintf "%02d", $d;
TDS::trim($c->{Region});
if($c->{Region} eq 'Ontario' ){
$units{defaultParam}{css} = "yellow";
}
$units{$i}{value} = "20" . $y . "-" . $m . "-" . $d;
$units{ $i++ }{field_url} = '#';
$units{$i}{value} = $c->{Region};
$units{ $i++ }{field_url} = '#';
$units{ $i++ }{value} = $c->{Rep};
$units{ $i++ }{value} = $c->{Item};
$units{ $i }{value} = $c->{'Unit Cost'};
if($c->{'Unit Cost'} >= 5 ){
$units{$i}{css} = 'red';
}
$i++;
$units{ $i++ }{value} = $c->{Units};
$units{ $i++ }{value} = $c->{'Total'};
push( @results, \%units );
$pie_values{ $c->{Region} } += 0 + $c->{'Total'};
if ( $c->{Item} eq 'Pencil' ) {
push( @results2, \%units );
}
} ## end while ( my $c = <$ct_fh> )
Patchcord.ca Inc. page 4 of 25
Example Output
Doclib Grid/Row CSS
The document library XML configuration now supports applying css to row and field levels.
<legend>
<!-- Provide a legend div outlining css/static values defined -->
<!-- this works on the record, or cell level -->
<title visible="yes">Legend</title>
<css>
<field/>
<field class="yellow" opp="eq" value_is="$User->{comp} - $User->{uid}" apply_to="row">dlmisc_a3</field>
<field class="red" opp="gt" value_is="3" apply_to="row">dlmisc_dd1</field>
<field class="yellow" opp="ne" value_is="" apply_to="field">dlmisc_b10</field>
</css>
</legend>
The above xml config snip will highlight hours worked column with red if > 3, and high light a complete
row if assigned to the logged in user.
Patchcord.ca Inc. page 5 of 25
Doclib Grid/Row Legend
If the legend is visible, the following button is available describing the css that is being applied to the grid.
Administrator Experience and Features Enhancements
Clear All and Select All In User Edit
Based on customer feedback, we are adding “clear all” and “select all” to the user administration grid.
This will work for Framework Admins, Customer Admins and Sales type users.
Patchcord.ca Inc. page 6 of 25
List/Edit Language Enhancement
Now multiple languages can be updated at once when in edit mode.
Patchcord.ca Inc. page 7 of 25
List/Edit User Enhancement
The default view to list edit users will only show active users (past 6 months) by default. Date range can
also be chosen to show a larger or smaller range of active users. A search with no range will return all the
users defined.
Capture additional data to capture last login timestamp, and last IP
Patchcord.ca Inc. page 8 of 25
Reporting Features Enhancements
PMAUDIT and PCMDLOG tables automatically archive into PMAUDIT_ARCHIVE and
PCMDLOG_ARCHIVE tables. Retention can be set in terms of number of days to keep in the active
table.
Reporting functions automatically query the archive tables for complete record sets.
Report CMID Enhancements
AUD_LIST (Audit Table Information) and PMCMDLOG_ARCHIVE
Possibly additional reports included: PMAUDIT_ARCHIVE and PMCMDLOG_ARCHIVE (such as)
CMID=PERF-CMDLOG1 (portlet performance monitor), REPORT1 (Report by CMID),
REPORT_CHRUN1 (User churn), REPORT_OC (User occurrence report), REPORT_UA (User activity
report)
Enhancements to add:
Date/time stamp for FROM and TO range filter
Add search filter for ATOPP and ATOLD
Add filter to also search archive table
The current portlet, display everything, this change will prompt for filter first then perform search
criteria
Users in a grid will link to UA-START DCCMD=Edit (User edit)
Ref ID will link to detail portion of grid
Simplified Exception Reporting Tool
Exception handling will capture bad code and allow and admin user to easily email Tier 2, Vendor support,
etc… all the details easily.
The “To:” is defaulted to the master configuration value but may be altered by the user.
Patchcord.ca Inc. page 9 of 25
PMCMID Log Archive Option
Batch job to move records out of the PMCMDLOG table into the PMCMDLOG_ARCHIVE table
/frame_admin/.perl/archive_pmcmdlog.pl –cutoff 90 will keep 90 days in the PMCMDLOG table
The following reports have the option to include archive data as part of the report.
View contents
error
information
Patchcord.ca Inc. page 10 of 25
User Churn Report
REPORT_CHURN1
The user churn report is a
comparison tool that allows an
admin to compare users during two
disparate time ranges
Command Trend Reporting
REPORT1
The user churn report is a
comparison tool that allows an
admin to compare users during two
disparate time ranges
Patchcord.ca Inc. page 11 of 25
Login Enhancements
Framework administrators can turn these login features on or off.
User Occurrence Report
REPORT_OC
The user churn report is a
comparison tool that allows an
admin to compare users during two
disparate time ranges
Portlet Performance
PERF_CMDLOG1
The user churn report is a
comparison tool that allows an
admin to compare users during two
disparate time ranges
Patchcord.ca Inc. page 13 of 25
Self Register
New API’s
Create a Custom Register Form
Features
Pre-Register Form/Validation/Save
Custom Form Field/Validation/Save
Loading a Custom Register Module
Patchcord.ca Inc. page 14 of 25
To load a custom register module you must first add the following into the master configuration
with the name of you custom module (located in the /var/www/login folder)
Creating a Custom Register Module
When you are creating a custom register module you can choose to have a pre-register form (to
verify/gather information) which includes validation and saving of data. You can also add custom
fields, validation and saving of additional data to the default form. This is done by the
default_register.mas calling the custom module with the following tasks:
pre_form – Form fields for the pre-register form
o Expects form field to be printed (not returned)
pre_validation – Validation for the pre-register form
o Expects an array reference of errors to be returned
o Submit button must be named "pre_submit"
pre_save – Used to save data from the pre-register form
o Expects no output
form – Form fields to add to the default register form
o Expects form field to be printed (not returned)
validation – Additional validation for the default register form
o Expects an array reference of errors to be returned
save – Additional saving for data for the default register form
o Expects no output
Patchcord.ca Inc. page 15 of 25
Framework Technology Refinement and Improvement
Master Config Options: LANGUAGE
Additional languages can be added using this option.
Master Config Options: PASSWORD_STRENGTH
Options for user password strength are:
Low – greater than 6 chars
Medium – 8 or more chars
High – 8 or more chars at least one number or symbol
Master Config Option: ENCRYPTEDPWD
Option: ENCRYPTDEDPWD with available values of SHA1 or MD5
Feature will store user passwords in either selected digest for added security.
Note: There is a conversion process to update existing data, located in the 3.3 SQL script
Master Config Option: GRID_ADVANCED_SEARCH
Currently the Framework default is an exact match for grid filters. This option will allow the following
types of searches to be defined as the default grid filter search:
Search Option Types:
Fuzzy
Starts
Exact
Master Config Option: SWITCHUSER
Display the switchuser framework control. The Default is Y - anything else is No.
Master Config Option: SWITCHUSER_COMMON
If User->{type} eq ‘ADMIN’ and the value of SWITCHUSER_COMMON is ADMIN then the framework
will track commonly used users that the admin switches to, along with options to search. The default will
list the last used users.
Also showing in the switch user grid is the last login of that user, and if their password has expired.
Master Config Option: ALLOWSTYLECHANGE
Framework control to allow user to change skins.
Default is ‘Y’
Patchcord.ca Inc. page 16 of 25
Master Config Option: ALLOWTOPSEARCH
Framework control to allow if there is a top search input field.
Default is ‘Y’
Master Config Option: ALLOWACCOUNTSEARCH
Framework control to allow if there is an account search change/ or input field.
Default is ‘Y’
Master Config Option: GROUP_ACCOUNTS
Default is ‘Y’ – which is showing in preference and topbar
Value of ‘N’ – turn off
Value of ‘H’ – hidden from top bar, but visible in user perferences
Master Config Option: PASSWORD_FIELD_CASE
Define if login password/change password/reset password controls are forced upper, lower or allowed
mixed case. Default is mixed. Options are: lc – lowercase, uc - uppercase
Master Config Option: SESSION_COOKIE_DOMAIN
Framework control to set the domain for session cookies, if no value present, only host cookies will be
used. This is needed for cluster configurations.
Master Config Option: SESSION_TIMEOUT_SECONDS
Number of seconds allowed for a session to be idle. Default is 3 hours.
Master Config Option: GOOGLE_MAPS_KEY
If using imbedded google maps, or google maps API, you can define you key with this configuration option
and the framework will use the key for defined CMIDS
Master Config Option: GOOGLE_MAPS_CMID
A single CMID that uses google maps API – this item can repeat as necessary
Master Config Option: PASSWORD_VISIBLE_IN_USER_GRID
Y – password is visible to anyone who can use the UA-START DCCMD=list
ADMIN – password is only visible in the grid for User->{type} eq ‘ADMIN’
{blank or not defined} – default, do not show password in grid
Patchcord.ca Inc. page 17 of 25
Master Config Option: GRID_SORT_PAGING
STAY – default is to stay on the current page in the grid after sorting
RESET – will jump back to page 1 after sorting
Master Config Option: ALLOW_USER_PREF_EDIT_EMAIL
Y - yes
N - no (default) regular user class can edit email address on preference screen
Master Config Option: ALLOW_USER_PREF_EDIT_PHONE
Y - yes
N - no (default) regular user class can edit phone on preference screen
Master Config Option: ALLOW_USER_PREF_EDIT_FNAME
Y - yes
N - no (default) regular user class can edit first name preference screen
Note: ALLOW_USER_PREF_EDIT_LNAME needs to also be enabled
Master Config Option: ALLOW_USER_PREF_EDIT_LNAME
Y - yes
N - no (default) regular user class can edit last name preference screen
Note: ALLOW_USER_PREF_EDIT_FNAME needs to also be enabled
Master Config Option: EXCEPTION_HANDLING
Y - enabled for everyone,
TYPE - user type to turn on exception handling eg: ADMIN or special debugging user type
Master Config Option: EXCEPTION_HANDLING_SUPPORT_EMAIL
Default email address to send exceptions to
Patchcord.ca Inc. page 18 of 25
Migrate Functions to JQuery
Updating backend of Framework to JQuery to standardize and allow for greater flexibility in design, some
elements of the Framework currently use JQuery, notably elements from 3.2 such as multi-pick lists.
All prototype javascript library references have been replaced with jQuery equivilant and the prototype
libraries are now no longer available.
The following references have been mapped for backward compatibility.
Prototype
jQuery
$F(‘id’) - Get form field value jQuery(‘#id’).value or $F(‘id’) or $$(‘id’).value
$(‘id’) – get DOM element jQuery(‘#id’) or $$(‘id’)
observer, stopobserving, fire, fireDOMEvent Provided for compatibility, however should be using
bind, unbind, trigger instead
Patchcord.ca Inc. page 19 of 25
Framework Security Questions
Users can now setup a series of questions/answers in case they forget their password. They can either
have their password reset by email, or by answering the correct questions.
This can be setup through the user preferences area.
The actual questions and answer are setup through the master framework control.
Patchcord.ca Inc. page 21 of 25
Doclib V2 Enhancements
doclibv2_files Table
New field addtions allow for meta data to be stored at the file level.
CREATE TABLE `doclibv2_files` (
`flref` BIGINT(20) NOT NULL AUTO_INCREMENT,
`fldlref` BIGINT(20) NOT NULL,
`flsize` BIGINT(20) NOT NULL,
`fltype` VARCHAR(50) NOT NULL DEFAULT '',
`flname` VARCHAR(250) NOT NULL DEFAULT '',
`flfile` VARCHAR(512) NOT NULL DEFAULT '',
`flthumb` VARCHAR(512) NOT NULL DEFAULT '',
`flacomp` VARCHAR(20) NOT NULL DEFAULT '',
`flacust` VARCHAR(20) NOT NULL DEFAULT '',
`flauid` VARCHAR(20) NOT NULL DEFAULT '',
`flmisc_a1` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a2` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a3` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a4` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a5` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a6` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a7` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a8` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_a9` VARCHAR(100) NOT NULL DEFAULT '',
`flmisc_d1` DATETIME NULL DEFAULT NULL,
`flmisc_d2` DATETIME NULL DEFAULT NULL,
`flmisc_d3` DATETIME NULL DEFAULT NULL,
`flmisc_d4` DATETIME NULL DEFAULT NULL,
`flmisc_d5` DATETIME NULL DEFAULT NULL,
`flmisc_d6` DATETIME NULL DEFAULT NULL,
`flmisc_d7` DATETIME NULL DEFAULT NULL,
`flmisc_d8` DATETIME NULL DEFAULT NULL,
`flmisc_d9` DATETIME NULL DEFAULT NULL,
`flmisc_n1` BIGINT(20) NULL DEFAULT NULL,
`flmisc_n2` BIGINT(20) NULL DEFAULT NULL,
`flmisc_n3` BIGINT(20) NULL DEFAULT NULL,
`flmisc_n4` BIGINT(20) NULL DEFAULT NULL,
`flmisc_n5` BIGINT(20) NULL DEFAULT NULL,
`flmisc_bo1` TINYINT(1) NOT NULL DEFAULT '0',
`flmisc_bo2` TINYINT(1) NOT NULL DEFAULT '0',
`flmisc_bo3` TINYINT(1) NOT NULL DEFAULT '0',
`flmisc_bo4` TINYINT(1) NOT NULL DEFAULT '0',
`flmisc_bo5` TINYINT(1) NOT NULL DEFAULT '0',
`flmisc_dd1` DECIMAL(9,2) NOT NULL DEFAULT '0.00',
`flmisc_dd2` DECIMAL(9,2) NOT NULL DEFAULT '0.00',
`flmisc_dd3` DECIMAL(9,2) NOT NULL DEFAULT '0.00',
`flmisc_dd4` DECIMAL(9,2) NOT NULL DEFAULT '0.00',
`flmisc_dd5` DECIMAL(9,2) NOT NULL DEFAULT '0.00',
`flmisc_dd6` DECIMAL(9,2) NOT NULL DEFAULT '0.00',
`flversion_no` BIGINT(20) NOT NULL DEFAULT '0',
`flversion_stamp` DATETIME NULL DEFAULT NULL,
PRIMARY KEY (`flref`),
INDEX `PMDOCLIBV2_FILES_ID1` (`fldlref`)
)
<fl_mappings> Section in Doclib config
Works the same as <mappings> section.
<fl_mappings>
<field lo="010" order="10" visible="yes" visual_name="Type" help="Document Type"
length="25" type="text" size="25" staticlist="yes" >flmisc_a1</field>
<field lo="020" order="20" visible="yes" visual_name="Date Uploaded" help="Date
Uploaded" length="25" type="timestamp" size="25" staticlist="yes" >flmisc_d1</field>
</fl_mappings>
Patchcord.ca Inc. page 22 of 25
Multi-Pick enhancements
Can choose location of saveres window. Can be top, bottom, left, or right
Example of right:
Excerpt from .xml
<saveres title="Save Search Results" width="90%" location="right">
Default search:
The search radio button at the top of the page allows the user to perform searches where their entered
text is at the start of the field, is located anywhere within the field, or exactly equals the field.
The default is Starts with, but the user can set any default in the .xml (see configuration options table for
valid options). Starts with is exactly what you would expect it to be. Like means that your text may
appear anywhere in the field, and Exact Search means that the field must exactly equal what the user has
entered. This may be overridden by field by setting the searchable = ‘exact’ attribute on the field.
Patchcord.ca Inc. page 23 of 25
Default Search
The search radio button at the top of the page allows the user to perform searches where their entered
text is at the start of the field, is located anywhere within the field, or exactly equals the field.
The default is Starts with, but the user can set any default in the .xml (see configuration options table for
valid options). Starts with is exactly what you would expect it to be. Like means that your text may
appear anywhere in the field, and Exact Search means that the field must exactly equal what the user has
entered. This may be overridden by field by setting the searchable = ‘exact’ attribute on the field.
Patchcord.ca Inc. page 24 of 25
Top and/or Bottom Controls refer to the buttons on the source and destination windows.
If you don’t set either top or bottom controls to yes, the default is bottom. You can not turn it off in
both locations
Top and/or bottom paging controls refer to the pagination buttons on the source and destination
windows.
If you don’t set either top or bottom paging to yes, the default is bottom. You can not turn it off in both
locations
top_controls set to YES
in the .xml
bottom_controls set to
YES in the .xml
top_paging set to YES
in the .xml
bottom_paging set to
YES in the .xml
Patchcord.ca Inc. page 25 of 25
Query-list enhancements
Similar to multi-pick the search radio button at the top of the page allows the user to perform searches
where their entered text is at the start of the field, is located anywhere within the field, or exactly equals
the field.
The default is Starts with, but the user can set any default in the .xml (see configuration options table for
valid options). Starts with is exactly what you would expect it to be. Like means that your text may
appear anywhere in the field, and Exact Search means that the field must exactly equal what the user has
entered. This may be overridden by field by setting the searchable = ‘exact’ attribute on the field.