nivo slider - loading gif keeps on and on and on - slider

i have done 'everything' that manual says.
included all files, adding it properly to html structure, loaded images,..
please, you can view live problem here

You are using ajaxpage to load the div with id=slider for certain categories for page.php. However, Nivo slider is looking for a div after the primary page has loaded (the $(window).load function).
Somehow, you need to attach the .load function call to the page being loaded by ajaxpage.
You might try adding the $(window).load call to the bottom of each page whenever you are setting up a Nivo slideshow.
If you were using jQuery's ajax library/module calls, you might be able to attach the load action to fire when the ajax has loaded.
I looked at the source of one of your page.php pages with Nivo and I think that you set up the HTML correctly, but the Nivo module just has not been started, partly because of the way the page is pulling in the content using ajax.
This is a clever way of doing things, but just needs a different trick to starting Nivo.

Related

Odoo : "t-call" issue with website editor

I am trying to include a t-call inside the homepage template in Odoo (between two sections). It works fine but when I open the editor the drageable areas around the other sections are not displaying. Is there a way to ignore the t-call part when the editor loads or is there a way around this?
I have tried using dynamic templates but I would like to avoid the loading time when the page loads and render the page on the server.
I have also tried adding various classes or attributes on the tags surrounding the call but nothing seems to work.
Thanks,

Sitefinity widgets not showing on News Detail page

Inherited a Sitefinity website. There's a news list page, which I discovered is reused by the news detail pages to display content. If I update the list page, the changes are reflected on the detail pages.
Sometimes.
I have a content block that contains a "header" text - updating this in the list page is replicated across the details pages. Adding a javascript widget to the page to inject some custom javascript replicates across the details pages as well.
Adding a new content block or css widget does not replicate across the details pages.
Is there some rhyme or reason to this behavior that I'm missing?
My specifics:
I've successfully created widgets in the MVC several times now. I essentially need to add a new widget to just the news pages. Which seemed simple enough until I discovered that news pages are not individually created pages like... well, pages... but instead are just a content piece that is dynamically inserted in the news widget on the "parent" listing page. At least as far as I can tell that's how it appears to be working.
Adding my widget to the page didn't work, as I explained above. I then tried recreating it in the page itself using javascript, content block, and css widgets, at which time I discovered that the javascript is the only one making it to the details pages. I imagine this has to do with the way javascript widgets actually make it to the page - their placement is selected in advanced options, rather than simply appearing inline.
Sitefinity widgets go beyond presentation, and actually control routing.
As such content widgets (baseline or custom) have two 'modes' that they operate in: list and detail. Slugs for details are automatically generated in the following format.
/News
/News/{News-item-slug}
Of course, a list and a detail should look very different. To accommodate that, the widgets have two separate configurable templates.
So, add your custom html and javascript to the appropriate template to have it only apply in a given mode.

Duplicate dijit widget instead of recreating it

Is there a way by which I can duplicate or clone dijit widgets?
Basically, idea is to improve page rendering performance by minimizing widget creation time.
We have a single page web application and we do not reload the entire page whenever the user performs any action.
The flow of events is as follows,
The main page is loaded by the browser. It contains a dijit ContentPane which acts as a master container and displays the entire page using various other dijit widgets like textboxes, tabs, datefield, Enhanced grid etc.
The user performs an action (e.g. click on a dijit button)
The application sends an ajax call to server which processes the button click event and generates UI of the next page.
Browser receives successful response from ajax call and calls refresh method of dijit ContentPane. Which triggers destruction of existing widgets and new set of widgets are created and placed at appropriate position. (instead of refreshing the entire page)
The user again performs some action and again the refresh method is called which triggers destruction of existing widgets and new set of widgets are created and placed at appropriate position.
Because of such architecture the browser has to destroy existing widgets and recreate them again and again. Which results in slow performance.
The idea is to have a set of widgets always readily available on the browser clone them and place at appropriate position and update them instead of recreating each time.
Yes this is possible with something called _AttachMixin.
Basically there is no getting around the fact that your widgets would need to attach event listeners to the HTML Document. What can be cut out though is the time in the Dijit Widget's lifecycle to generate the DOM. As we well know, simple Dijit widgets like a dijit/form/Button has a div inside a div inside a div etc.
This is explained in detail here http://dojotoolkit.org/reference-guide/1.9/dijit/_AttachMixin.html
Here is an example using Node.JS as a backend. http://jamesthom.as/blog/2013/01/15/server-side-dijit
This is a tough problem and this concept isn't explained very thoroughly. If you have a backend that is not Node.JS you have to manually make the widget string and pass it as a response to your AJAX and an follow the example from the 1st link (Ref Doc)
We have had lots of widgets of our app render nicely within the client side. A far less complicated approach would be to simply show / hide (instead of render and destroy) widgets as and when they are needed. I assume that you app's access policy would focus on data and not which person has access to which widget.

WinRT XAML Toolkit preloaded pages

I have a question to creator of WinRT XAML Toolkit that had helped me a lot.
What is the best mechanism for working with rich pages in WinRT?
These are the conditions:
There are about 2 pages that have a lot of elements and some high resolution images in the background. Obviously they consume time to load their content. That's why I use AlternativeFrame.Preload() method from the Toolkit.
Also these pages are the most frequently used.
That's why I stand before choosing to either constantly preload these pages (create, draw, fill) but when it is needed or creating my own page cache that would store them (maybe I am blind and the Toolkit already has this functionality?).
Can you advise what's the best practice in this problem and whether maybe there's a third way?
To add some more background - the WinRT XAML Toolkit library has two controls: AlternativeFrame and AlternativePage that are alternate implementations of the base Frame and Page classes that come out of the box in Windows 8 SDK for dealing with UI navigation - similar to how you navigate pages in a web browser. The API of these alternative controls is almost the same as in the base ones, but it adds some more support for asynchronous development model, page transition animations and preloading pages before they are requested.
Currently the Preload() method preloads a page of a given type in the background and puts it in a cache and when a Navigate() method is invoked to navigate to the page of that type - instead of instantiating a new page - the one in the cache is used, so it can immediately be shown, but also - the cache gets emptied and the next time you want to navigate to that same page - you need to preload it again. This works well if you don't return to the preloaded page often and the page uses a lot of memory, but if you want to keep that page in cache - there is not built-in support for that. The original Page class has a NavigationCacheMode property that allows to configure a page to be kept in cache once it is loaded the first time and it would be a good option for you, but AlternativePage doesn't have that support yet. I am thinking about adding it there today since I have some free time, so you might decide to wait for me to do it. Other options include
displaying your page on top of the navigation frame instead of navigating to it in the frame - then you could simply show/hide it when needed
or you can switch back to the standard Frame/Page controls and set NavigationCacheMode="Required" on your Page so it stays in memory forever, though you do lose the Preload() feature then.
or you can modify the Toolkit yourself
or you can cache the content of your page yourself - simply save the Content of your page in some sort of cache (e.g. a Dictionary<Type,UIElement> that maps page type to content) and remove it from the page (set Content to null) when you navigate away from the page and then add it back to the page when you navigate to it and the content is found in the cache. In that case you would probably want to make the Content be a separate UserControl and skip calling InitializeComponent() in the constructor if you retrieve the content from the cache since you can only have one Content and having it defined in a separate UserControl will allow you to get auto-generated code that gets executed in InitializeComponent() that grants you easy access to named elements, registers event handlers etc.

jQuery Animation

I am trying to recreate some effects similar to the div loading effects on this site i.e. there is no visible content when you load the page but upon clicking on a navigation link, it dynamically loads the divs.
http://worldofmerix.com
It is for a film studio website and I would like it to be interactive like this site. Does anyone know how I could achieve these effects with Javascript and/or jQuery?
Thanks for all the help in advance!
Have you used jQuery before or looked at the docs? This is really quite simple using jQuery's built-in animation effects such as fadeIn. The site you've linked to doesn't dynamically load the content - it's all part of the same page and simply displayed and hidden as appropriate.
Here's a rough fiddle showing how it works. Of course, you'd need to work out the styles and quirks in animations.