Koha-clms/Koha
Marcel de Rooy 0082a4587b Bug 10480: New module and unit test for framework plugins
This patch introduces the Koha::FrameworkPlugin object to Koha.
This object supports the current "old-style" plugins while adding a new
style based on the concept of two anynomous subroutines for building and
launching.

I will summarize the advantages of this new approach, justifying the
additional lines of code in this patch:

[1] Centralizing the code for building and launching plugins.
[2] Extensive unit testing: this was not possible before.
[3] Simplicity: Only define what you need in the plugin.
    A follow-up patch will delete 1500 lines with *empty* routines.
[4] Make it possible to restore the warnings pragma for all plugins.
    New style plugins do no longer depend on redefinition.
[5] Event binding moved from HTML attributes moved to jQuery code.
    This separates behavior and presentation.
[6] Much more documentation, including EXAMPLE plugin in follow-up.
[7] Improved error handling.
[8] Usability: property noclick tells you if plugin's buttonDot is active.
[9] More events supported: Change, keyboard/mouse events. See EXAMPLE.

NOTE ON EXAMPLE PLUGIN:
The example plugin is added in the third patch of this report. Since
it is new style, it can be used only after we start using this object. It
also contains an example for a keypress and mouseover event.

NOTE ON ITEM PLUGINS:
Old style plugins for items contain an additional parameter in the js
functions for Blur, Focus and Change. This distinction has no actual use
and is resolved for new plugins in the object code. When converting
item plugins, this minor correction will be addressed. In the meantime
old style item plugins behave as expected.

TEST PLAN:
Run the new test t/db_dependent/FrameworkPlugin.t
At this point in time, you do not need to do anything more. Follow-up
patches will incorporate the object in real-life Koha and provide
additional test plans.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-16 14:48:35 -03:00
..
Acquisition Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber 2015-02-10 11:24:08 -03:00
Borrower Bug 12784: Patron cannot change his personal details 2014-08-21 09:36:19 -03:00
Cache Bug 12041 - improve Koha::Cache 2014-06-19 13:05:04 -03:00
Filter/MARC Bug 9620: IncludeSeeFromInSearches and data in $9 subfields can break indexing 2013-03-07 09:31:11 -05:00
Indexer Bug 10143 - Fixing license headers 2013-05-01 06:47:50 -04:00
Item/Search Bug 11425: Add unit tests 2014-11-04 19:10:28 -03:00
List Bug 15065: (follow-up) update license header 2013-10-14 21:50:10 +00:00
Misc Bug 3050 - Add an option to upload scanned invoices #1/3 2014-05-25 21:14:00 +00:00
Number Bug 13836: Does not separate symbol and value if symbol is not displayed. 2015-03-19 14:10:21 -03:00
Plugins Bug 9971 - Plugins system is broken! 2013-04-03 06:02:09 -04:00
QueryParser/Driver Bug 12647: PQF QueryParser driver and unit tests fixes 2014-08-11 10:09:38 -03:00
RecordProcessor Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
Schema/Result Bug 13539: (RM followup) DBIx schema update 2015-04-13 13:26:06 -03:00
SuggestionEngine Bug 11944: Fix encoding issue for the "Did you mean" feature 2015-01-13 13:07:26 -03:00
Template/Plugin Bug 13021: guarantor search - main patch 2015-03-19 14:19:34 -03:00
Util Bug 13223: [QA Follow-up] Trivial change to one POD line 2014-11-19 13:28:23 -03:00
AuthUtils.pm Bug 11944: Authentication 2015-01-13 13:07:14 -03:00
Authority.pm Bug 5202: QA follow-up - correct license and POD errors 2013-10-10 21:39:15 +00:00
Borrower.pm Bug 13019 - Add base classes on which to build Koha objects 2015-02-12 15:21:01 -03:00
Borrowers.pm Bug 13019 - Add base classes on which to build Koha objects 2015-02-12 15:21:01 -03:00
Cache.pm Bug 13431 [QA Follow-up]: Shared FastMmap file causes issues 2015-02-11 10:18:56 -03:00
Calendar.pm Bug 11634 [QA Followup] - Make unit tests pass 2014-11-12 14:56:41 -03:00
Database.pm Bug 13645: Cache the DBIx connection 2015-02-20 14:37:08 -03:00
DateUtils.pm Bug 13601: The fallback regex should contain the time part 2015-03-30 13:40:07 -03:00
Email.pm Bug 9530: Adding a new Koha::Email module 2014-10-27 10:38:14 -03:00
FrameworkPlugin.pm Bug 10480: New module and unit test for framework plugins 2015-04-16 14:48:35 -03:00
I18N.pm Bug 11848: (follow-up) update license statment 2014-05-05 04:51:42 +00:00
Linktracker.pm Bug 8917 : [ Sign followup ] Track clicks to links external to Koha 2013-03-07 11:14:25 -05:00
MetadataRecord.pm Bug 9755 QA follow-up: move MARC-specific functionality to utility class 2013-07-23 23:10:21 +00:00
NorwegianPatronDB.pm Bug 11401: QA followup - Make the tests pass 2014-11-14 09:42:56 -03:00
Object.pm Bug 13019 [QA Followup] - Allow chaining 2015-02-12 15:21:13 -03:00
Objects.pm Bug 13892: Make ysearch.pl not using C4::Members::Search 2015-03-30 12:25:56 -03:00
Plugins.pm Bug 9907 - Plugins test dies early on some servers 2013-03-22 17:50:09 -04:00
RecordProcessor.pm Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
Schema.pm Bug 11891: (follow-up) remove custom storage class 2014-06-19 11:55:03 -03:00
SimpleMARC.pm Bug 11413: Fix field_numbers 2014-11-14 12:05:47 -03:00
SuggestionEngine.pm Bug 8726: ExplodedTerms suggestion plugin (functionality) 2012-09-28 17:08:21 +02:00
XSLT_Handler.pm Bug 13262 - Add parameters to XSLT Handler transform method 2015-02-05 15:24:29 -03:00