-
1. Re: jQuery pnotify plugin version
lfryc May 30, 2013 5:28 PM (in response to jcharnet)Hey John,
you can try to upgrade a library using Resource Mappong:
http://lukas.fryc.eu/blog/2012/02/re-routing-jsf-resource-requests-with.html
You just need to find out what's a resource key for pnotify now and then place the new version in your app.
Please let me know your findings, we could certainly upgrade.
-
2. Re: jQuery pnotify plugin version
jcharnet Jun 3, 2013 11:49 AM (in response to lfryc)Thanks for your response.
I'm trying your idea, I found some references to jquery.pnotify.js as a ResourceDependency in NotifyRendererBase. But I'm not sure that jquery.pnotify.js is a key. Actually I don't think it is.
Is it possible that there is no key for pnotify ? Or does every resource used by richfaces have necessarily a key ?
If you have some ideas on where I could debug, to find out the correct key, this would help.
I tried debugging ResourceMappingFeature and ResourceMappingConfiguration, but I did not find a key for pnotify, and nor did my property (static-resource-mappings.properties) get called.
The content of static-resource-mappings.properties is:
jquery.pnotify.js=taxit.theme/js/jquery.pnotify.1.2.min.js
The file static-resource-mappings.properties is on my src/main/resources/META-INF/richfaces/static-resource-mappings.properties.
And my pnotify javascript is in:
WebContent/resources/taxit.theme/js/jquery.pnotify.1.2.min.js
Thanks again !
John
John,
-
3. Re: jQuery pnotify plugin version
lfryc Jun 3, 2013 12:34 PM (in response to jcharnet)The resource key is composed from resourceLibrary:resourceName:
so the correct key in properties file is:
org.richfaces\:jquery.pnotify.js=...
-
4. Re: jQuery pnotify plugin version
jcharnet Jun 4, 2013 10:19 AM (in response to lfryc)Perfect, it worked !
One last question, is there any changes on how to use this feature when the following web.xml properties are set to true ?
org.richfaces.resourceOptimization.enabled and org.richfaces.resourceMapping.enabled
When these properties were set to true, pnotify was bundled in a packed.js file, and I could not see any references for org.richfaces:jquery.pnotify.
Thanks again !
John
-
5. Re: jQuery pnotify plugin version
lfryc Jun 4, 2013 4:25 PM (in response to jcharnet)In fact, resource optimization will cause a org.richfaces:jquery.pnotify to point to packed.js, but you can still rewrite it, since custom mappings will be applied later than optimization's mappings.
In this case you have two options:
a) custom version of pnotify.js will be loaded and it will actually overwrite the plugin which was registered before (from packed.js)
b) the (a) won't happen to work and you will need to re-build a packed.js file yourself, from scratch:
-
6. Re: jQuery pnotify plugin version
dabloem Sep 22, 2013 3:17 PM (in response to jcharnet)Hi John,
I tried the above approach, however info, error messages are still displayed as regular notifications (due to css). Did you find a solution for this, if you experienced the same...