Skip to content

Commit

Permalink
FOS Release 20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Raganitsch committed Jan 18, 2021
1 parent b62c162 commit 760776b
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 193 deletions.
6 changes: 1 addition & 5 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@


MIT License
Copyright (c) 2020 FOS - FOEX Open Source
Copyright (c) 2021 FOS - FOEX Open Source

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -21,5 +19,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@


## FOS - Message Actions

![](https://img.shields.io/badge/Plug--in_Type-Dynamic_Action-orange.svg) ![](https://img.shields.io/badge/APEX-19.2-success.svg) ![](https://img.shields.io/badge/APEX-20.1-success.svg)
![](https://img.shields.io/badge/Plug--in_Type-Dynamic_Action-orange.svg) ![](https://img.shields.io/badge/APEX-19.2-success.svg) ![](https://img.shields.io/badge/APEX-20.1-success.svg) ![](https://img.shields.io/badge/APEX-20.2-success.svg)

Show or hide success and error messages declaratively.
<h4>Free Plug-in under MIT License</h4>
Expand All @@ -18,5 +16,3 @@ All FOS plug-ins are released under MIT License, which essentially means it is f

MIT



329 changes: 176 additions & 153 deletions apex/com_fos_message_actions.sql

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions apexplugin.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@


{
"name":"FOS - Message Actions"
,"version":"20.1.1"
,"version":"20.2.0"
,"description":"Show or hide success and error messages declaratively.\r\n\u003Ch4\u003EFree Plug-in under MIT License\u003C\/h4\u003E\r\n\u003Cp\u003E\r\nAll FOS plug-ins are released under MIT License, which essentially means it is free for everyone to use, no matter if commercial or private use. \r\n\u003C\/p\u003E\r\n\u003Ch4\u003EOverview\u003C\/h4\u003E\r\n\u003Cp\u003EThe \u003Cstrong\u003EFOS - Message Actions\u003C\/strong\u003E dynamic action plug-in is an easy and declarative way to deal with APEX success and error messages. It can show errors inline with fields and in notifications, as well as showing page level messages that look the same as regular APEX page notifications. Internally we use the same Javascript API that APEX provides to show these messages.\u003C\/p\u003E\r\n\u003Cp\u003EThe message can be a static string with optional page item substitutions, or derived from a Javascript expression or function.\u003C\/p\u003E\r\n\u003Cp\u003EYou also have control over how escaping should be performed on the message. Either entirely, or only for certain page items if your message contains HTML markup.\u003C\/p\u003E"
,"keywords":[
"message"
Expand Down Expand Up @@ -40,6 +38,7 @@
"versions":[
"19.2.0"
,"20.1.0"
,"20.2.0"
]
,"plugin":{
"internalName":"COM.FOS.MESSAGE_ACTIONS"
Expand All @@ -52,5 +51,3 @@
}




6 changes: 2 additions & 4 deletions db/com_fos_message_actions.pkb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


create or replace package body com_fos_message_actions
as

Expand Down Expand Up @@ -31,6 +29,7 @@ as
l_js_code p_dynamic_action.attribute_04%type := p_dynamic_action.attribute_04;
l_escape boolean := p_dynamic_action.attribute_05 = 'Y';
l_autodismiss boolean := p_dynamic_action.attribute_08 = 'Y';
l_clear_items apex_t_varchar2 := case when p_dynamic_action.attribute_11 is not null then apex_string.split(p_dynamic_action.attribute_11, ',') else apex_t_varchar2() end;

-- Javascript Initialization Code
l_init_js_fn varchar2(32767) := nvl(apex_plugin_util.replace_substitutions(p_dynamic_action.init_javascript_code), 'undefined');
Expand Down Expand Up @@ -120,6 +119,7 @@ begin

when 'clear-errors' then
apex_json.write('actionType' , 'clearErrors');
apex_json.write('pageItems' , l_clear_items);
end case;

apex_json.close_object;
Expand All @@ -135,5 +135,3 @@ end;
/




4 changes: 0 additions & 4 deletions db/com_fos_message_actions.pks
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


create or replace package com_fos_message_actions
as

Expand All @@ -13,5 +11,3 @@ end;
/




18 changes: 11 additions & 7 deletions files/js/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


/* globals apex */

var FOS = window.FOS || {};
Expand All @@ -16,6 +14,7 @@ FOS.message = FOS.message || {};
* @param {number} [config.config.duration] Amount of milliseconds after that the page success message should automatically be dismissed
* @param {string} [config.location] Where to display the error message, on page, inline, both
* @param {string} [config.pageItem] Name of the page item which the error message should be associated with
* @param {string} [config.pageItems] Name of the page items which the error message should be cleared for
* @param {function} [initFn] Javascript Initialization Code Function, it can be undefined
*/
FOS.message.action = function (daContext, config, initFn) {
Expand Down Expand Up @@ -71,7 +70,7 @@ FOS.message.action = function (daContext, config, initFn) {
FOS.message.showError(message, config.config);
break;
case 'clearErrors':
FOS.message.clearErrors();
FOS.message.clearErrors(config.pageItems);
break;
}
};
Expand Down Expand Up @@ -157,10 +156,15 @@ FOS.message.showError = function (message, config) {
}
};

FOS.message.clearErrors = function () {
apex.message.clearErrors();
FOS.message.clearErrors = function (pageItems) {
// check if we are clearing 1 or more page items if not we then clear everything
if (Array.isArray(pageItems) && pageItems.length > 0) {
pageItems.forEach(function (item, index) {
if (item) apex.message.clearErrors(item.trim());
})
} else {
apex.message.clearErrors();
}
};




6 changes: 1 addition & 5 deletions files/js/script.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions files/js/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 760776b

Please sign in to comment.