Issue with use of fullscreenControl feature - leaflet

I just implement the fullscreenControl on two sites I developed/maintain. The feature works great on the first one I added, but not the second. I've triple checked the coding of both sites and they are identical. It's not that complicated... add 'fullscreenControl: true' to the map initialization and one cdn load to the css and js. Any thoughts as to why the problem.

Problem solved. In my _java_loader I was loading a Leaflet_ajax file twice.

Related

Segment resolving in AEM / CQ5 using initializeTeaserLoader adding multiple divs inside campaign target

The below code is part of teaser.jsp (/libs/cq/personalization/components/teaser/teaser.jsp)
<script type="text/javascript">$CQ(function() {
initializeTeaserLoader(<%=allTeasers%>, "<%=strategy%>", "<%=targetDivId%>", "<%=(WCMMode.fromRequest(request) == WCMMode.EDIT)%>", "<%=trackingURLStr%>", "<%=resource.getPath()%>");
});</script>
Similar code we used in our customized teaser jsp.
The aboveinitializeTeaserLoader method is adding multiple divs inside the target div at the first time when offerpage is resolved.
Ideally it should have only one resolved div. Is there any solution for it?
Note: On page refresh functionality is working fine. But our application is single page application may be this issue is coming.
Its seems to be an existing issue with OOTB teaser component.Apparently same thing happened in our project, we were using Angular Js on top of AEM (6.1).
We we went to ADOBE with a ticket and got one patch for the same problem (and few more, not relevant to this question).
Most probably if you go ahead and use 6.2, this problem should not persist.
Good LUCK (y)

Zend Framework contextually load stylesheets

Is it possible in Zend Framework to contextually autoload a stylesheet based on a unique identifier?
I'd like to load css based on the layout and the action name by first checking if the stylesheet exists then loading it.
Is that possible?
Yes it is possible and surprisingly simple to implement. I have just started trying this for myself in a small project I am working on.
See Andy Baird's blog on this, which also includes the code you need to get you started. He continues it in a second blog which takes the concept slightly further.
He uses the same technique for both CSS and javascript files, so you may want to try it with both too.

GWT suggestBox performance issue

I have a suggestBox with a multiwordsuggestoracle. everything is working fine but there is a performance issue. I have to add around some 12000 Strings to the oracle, but adding this list takes a lot of time, which delays loading of the page. Once the page is loaded it works alright. I am doing just basic things, and i have searched and no one is getting such issue. So is there something i am missing, or is there some other way to remove this problem.
Try deferred loading of this. This will help you the page to load fast and later on you can load the string when needed.
The other choice isy create the whole HTML on server side and then attach it the DOM.

How to integrate TinyMce with Zend Framework with Gzipping and Image managers?

I have done some research on this subject, and found out, that Gzipping and adding a new image manager through a plugin would not be as difficult. The only question is the Image manager.
I have seen some quite good ones, like the Image Manager for JCE, which is a Joomla wysiwyg editor, but none for TinyMce for itself.
Could someone show me a good image plugin?
P.S. SwampyFoot is out of question, as it's download links are broken, and PhP Letters Ajax image manager is quite hard to install.
Thanks!
EDIT: I just found Mad File Manager, which seems to work excelently except for a little glitch: An image can be uploaded, but cant be selected... Thats sad...
EDIT2: I've found KCFinder, which seems to be very promising, but I just can't get it to work properly. Somehow, the configuration is quite difficult.
Ok, So I have been able to answer my question myself. So here it goes:
Set up TinyMce with Sozfo solution. The important ting to remember here is, instead of extending your Forms from Zend_Form, you have to extend them from Sozfo_Form. As to the defining your own extendable controller, it didnt work for me, So I put the path defining helpers in my Bootstrap. And if the whole ordeal works, there is a textarea that should have TinyMCE controls, but there aren't any, try checking the comments at Sozfo, or checking if the page is cached or not. It took me a good hour, to find out, that the only reason why no JavaScript was pushed to the header was because of a very persistent cache.
Set up KCFinder. The main problems I faced here were due to wrong paths to corresponding files. When the paths were correct, the only thing to remember is to enable it. There is a boolean to change in configuration file.
The last issue was adding the KCFinder to my Tinymce, and what I ended up doing was, I added the function needed to call KCFinder in TinyMCE.php View helper. ( Due to some glitch I seem to be unable to post the code here). Once you have set up your paths correctly, everything should work splendidly.
All in all, it took me about 3 days to figure this whole thing out. Talk about steep learning curve...
Have you looked at MCImageManager - its not free but its an option if you're happy to pay for it
Not really a suggest as you've got it but swampy foot download does work
As you're already using zend framework, why not use dojo, set up the dojo form and call the editor element and integrate this http://docs.dojocampus.org/dijit/_editor/plugins/LinkDialog into it?

GWT Lazy Loading

I want to develop a GWT application. The application contains 8 modules and all the modules run in a single page.
I have links for all the 7 options on the top.
When the page loads I want only the home content to be loaded and displayed.
Only when the user clicks the menu options, the menu content should load.
Can anyone suggest the best way to achieve this.
This has been addressed in GWT 2.0... First you'll remove the separate entry points you have for each module - since they're all on the same page, you only need one entry point per page.
Then you can use the GWT.runAsync() method at each point that you feel can be a split... it automatically cuts up the code into chunks that are downloaded as and when necessary.
Look here for the docs.
AFAIK, lazily loaded (or pluggable) modules can't be done in GWT. Partly this is due to the way the GWT compiler works - it likes to import all the code that it is ever going to see and then optimises and prunes it as viciously as possible (to make the resulting JS files as small and lead as possible). If it doesn't have access to all the source code up front, it might make optimisations that will break the pluggable modules (especially since nothing in the "core" application may reference the classes that the lazily-loaded modules need to work properly - the GWT compiler would prune those "unused" classes in the core module).
This stackoverflow question from May 09 asks the same thing and has the same answer - it can't be done.
I searched high and low about six months ago for an answer to this problem, because I really wanted to do what I believe you're asking for. Never found a solution.
(I haven't used GWT 2.0 - it might have addressed the issue)
Thank you for your answer. You are right that the whole Javascript code gets downloaded.
But there must be a way like say on of module is View Profile. Only when the user clicks the view Profile link, the widgets related to displaying my profile needs to be created. is this not possible.