grouper-dev - RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI
Subject: Grouper Developers Forum
List archive
RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI
Chronological Thread
- From: "Hyzer, Chris" <>
- To: "Black, Carey M." <>, "" <>
- Subject: RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI
- Date: Tue, 23 Apr 2019 19:40:42 +0000
Patch grouper_v2_4_0_ui_patch_23 has the JS update and the built in class that lets you put messages of different colors on the screen or run arbitrary _javascript_
https://bugs.internet2.edu/jira/browse/GRP-2108
thanks Chris
From: Black, Carey M. <>
Chris,
As usual, ( your magic ) > ( my magic ) . I tested your changes, and they work for me. 😊 Thank you. I now have message that follow the rest of the UI message pattern!
And I am starting to think that I might want my "auto removing messages" and other "sticky messages" too. [ "Cake and eat it too" problem. ] So I might be injecting a custom div somewhere else in the UI to append message to as well. 😊 ( You know that you are creating a monster right? 😊 )
I plan on using my own custom GrouperUiHookShim class. Is it your intention for deployers to use that specific class name or make up their own?
FWIW: I am planning on adding more features in my version. Support for different message types: AlertPrimary¸ AlertSuccess, AlertError, AlertInfo ( to start with.) I added an enum "MessageTypes" in the class to support mapping to methods to produce the output by type.
Then I enhanced the signature of the method in my hook class to "public static void addMessageToScreen(MessageTypes type, String message)" and the reflection used the enum to get the method name to call based on the MessageTypes value. ( GrouperUtil.callMethod(grouperUiHookShimClass, type.getMethodName(), GrouperUtil.toSet(String.class), GrouperUtil.toSet(message)); )
I might even get "crazy enough" to support more dynamic HTML control from the hook too. ( Time will tell.)
Thank you again. This is a good start on what I am after.
I would love to see a "sample/simple base class" included in the UI and the JS changes added to the UI as a minimum. ( a patch in 2.4 would be fine. ) Just to avoid "patching issue" on the JS side. 😊
-- Carey Matthew
-----Original Message-----
You said you wanted a message to display, you didn’t mention you wanted it to go away 😊
The only thing I can think of involves a small tweak to Grouper... and a tweak to the wiki (see that). Want to try it and let me know if you want me to make a 2.4 patch for that 😊
Thanks Chris
grouperUi.js:
FROM: function guiV2link(url, options) {
if (typeof options == 'undefined') {
TO: function guiV2link(url, options) {
$('.messaging').hide().empty();
if (typeof options == 'undefined') {
#################################################
FROM: function guiProcessUrlForAjax(url) {
//clear the error div... $('#messaging').hide().empty();
TO: function guiProcessUrlForAjax(url) {
//clear the error div(2)... $('#messaging').hide().empty(); $('.messaging').hide().empty();
-----Original Message----- From: <> On Behalf Of Black, Carey M. Sent: Monday, April 15, 2019 12:58 AM To: Subject: RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI
I have the example working.
However, as documented any custom messages are not "removed from the page" the way the default "status message" is removed.
If a hook sends, 3 messages, and there is a 4th "Success" message from the system displayed. When a user navigates away to a different folder ( ... etc ) the 4th message is removed, but the other 3 remain until the user closes them.
Is there a way to have the removal of the "system message" also remove any additional messages?
I suspect this could be solved in a few ways, but I really don't know which would be more "preferred". :)
-- Carey Matthew Black Office of the Chief Information Officer (OCIO) |
- RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI, Black, Carey M., 04/15/2019
- RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI, Hyzer, Chris, 04/15/2019
- RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI, Black, Carey M., 04/15/2019
- RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI, Hyzer, Chris, 04/23/2019
- RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI, Black, Carey M., 04/15/2019
- RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI, Hyzer, Chris, 04/15/2019
Archive powered by MHonArc 2.6.19.