How to change loading animation (Spinner) to a set of images? - odoo

I want to change the loading (Spinner) animation when the website is loading something.
I don't know if it currently is CSS animation, a set of images, or anything else.
I want to replace that with a set of images that I have as I am going to make it a module.
The question is how to do just that?

Add template in static folder
<templates id="template" xml:space="preserve">
<t t-name="Throbber">
Then add in manifest qweb [template.xml]

Related

Webflow - logo image turns into to grayscale while the element and all parent elements have this Effect set to off

I'm very new to Webflow. I am somewhat familiar with CSS and web design concepts.
I downloaded one of the clonable templates to use as a practice:
https://webflow.com/made-in-webflow/website/Spaces-Urbanistic
With this template, I try to replace the logo image on the upper left.
I have a colorful webpage logo and inside the designer, I see all the colors.
When I click on preview, the logo turns into a grayscale image.
Webflow has Effects option that I could enable, but it is currently set to off, for Logo image element as well as all parent nodes up to the body tag.
When I inspect the logo in chrome dev tools, the immediate parent has this CSS:
element.style {
filter: invert(100%)
grayscale(100%)
contrast(128%);
}
My question is, where do those filter parameters are stored in webflow interface, if not under Style->Effects->Filters? Is there any other place I don't yet know about where the above code can be injected?
Thank you,
edit-1: I just noticed this code on top of the main HTML file:
Still, doesn't help me to identify where this code comes from. Thank you,

In FXML Controller, fxml fields are null, only the action responds [duplicate]

Maybe a really newbie's question....
I'm starting learning JavaFX in a FMXL Application using the Scene Builder, by reading this tutorials:
http://docs.oracle.com/javase/8/javafx/get-started-tutorial/fxml_tutorial.htm
So once i applied some changes, an issue with this 2 IDs came up... I might have missed or confused something about them...
Can anyone tell me in which cases they are used one or another?
id you use to set a CSS ID to your Component, for example <Text id="welcome-text" .../> and in your stylesheet you have something like #welcome-text { font-size: 16pt; } so this will be applied to your Text.
fx:id you use if you want to work with your Components in your Controller class, where you annotate them with #FXML Text myWelcomeText.
The fx:id is the identity associated to component in fxml to build a controller, and the id is used for css.
I took a look at an FXML document generated using the JavaFX Scene Builder. You access controls from Java Controller with the fx:id. (edit) I stand corrected, the id does matter.
You can apply css from the FXML document like this:
<Slider id="css_id" fx:id="myslider" styleClass="style_name" .../>
(Replace slider with any control)
And Java controller interaction:
#FXML
Slider myslider;
In JavaFX id is used to set a CSS ID to a component. And fx:id is used for accessing that component in code (i.e. in a controller class). fx:id works like a components name.

Bigcommerce Stencil use handlebars helper in css to set background image

Is there any way to reference a cdn image location from a CSS file in order to set a background image? For example, in a component file I can reference an image file using:
{{cdn 'img/my-image.jpg'}}
If I want to use that image as a background image in css, I need to set it in the stylesheet. For example:
.element {
background-image: url({{cdn 'img/my-image.jpg'}});
}
Is this possible, or do I need to set the background image inline in the html?
I see that there is a custom stencilString method, but I don't know how this would work in my situation, since I wouldn't want to hardcode the entire URL of the image on the CDN.
Currently with Stencil, there is not a way to reference it with a variable. This is available with blueprint.
You could always set it using an inline style:
<div class="element" style="url( {{getImage image 'gallery' (cdn 'img/my-image.jpg') }}">
'gallery refers to the size of image to get. See {{getImage}} helper doc here

XPages Extension library DOJO Tab container control CSS Modifications

I want to know, Is there any way to change the Style sheets of the extension library DOJO Tab container control?
Thanks & regards,
Yogesh Kashid
The best way to change the Style sheets of the extension library DOJO Tab container control is to create and use an own css resource. This way you can change every single table part's look and it would be valid for all DOJO Tab container controls in your application.
Create under Resources\Style Sheet a my.css file
Add the Style changes for DOJO Tab classes in my.css file. The style classes start with "dijitTab..." and you can find them analyzing the rendered page in browser.
For changing the tab labels to red you would write e.g.
.dijitTabContainerTopNone {
color: red;
}
3 . Add the my.css class to your theme
<theme extends="oneuiv2.1">
<resource>
<content-type>text/css</content-type>
<href>my.css</href>
</resource>
</theme>

Change Global Variable onclick/img source update with javascript variable

First off I am completely new to Javascript but I have some HTML/CSS experience. I've been trying to create an html/javascript image gallery for a website; (It would probably be a lot easier to do in PHP but the web coordinator disabled PHP on our server for security reasons).
Anyway What I have is a page showing an Album-list, Album-browser and Photo-viewer in different a div and 2 iframes respectively. I have it set up so that when someone clicks on an album from the album list, a page is opened up in the album browser section (iframe:"browser-frame" showing thumbnails of all the images in the particular album). I've been trying to set it up so that when someone clicks on an image in the album browser the image will appear in the Photo-viewer section (iframe:"viewer-frame" showing the photo itself).
I didn't want the photo's in the viewer-frame to be larger than the set dimensions for the viewer-frame so I created a page for the viewer-frame that puts the image in a div with a class of set dimensions (defined in a stylesheet) as follows:
...<body>
<div class="photoview">
<img id="viewed_image" class="large" src="images/album1/1.jpg" />
</div>
</body>...
I then created a script that updates the image src to a variable:image_to_be_viewed and called it image-changer.js
// JavaScript Document
{
var image_to_be_viewed="images/album1/1.jpg";
document.getElementById("viewed_image").src=image_to_be_viewed;
}
And added a script to the viewer-frame page so it looks like:
...<body>
<div class="photoview">
<img id="viewed_image" class="large" src="images/album1/1.jpg" />
<script src="image-changer.js"></script>
</div>
</body>...
Now I wanted the gallery to work so that in the page loaded in the browser-frame, whenever one clicked on one of the pictures, the value of the global variable 'image_to_be_viewed' would be changed to the source of the clicked image as follows:
<body>
<div class="photobrowse">
<img class="medium" src="images/album1/1.jpg" onClick="image_to_be_viewed='images/album1/1.jpg'"/>
<img class="medium" src="images/album1/2.jpg" onClick="image_to_be_viewed='images/album1/2.jpg'"/>
<img class="medium" src="images/album1/3.jpg" onClick="image_to_be_viewed='images/album1/3.jpg'"/>
</div>
</body>
It doesn't work....
the gallery i'm working on is on http://ptc.tamu.edu/test/gallery_directory/test_gallery.html
everything up to the loading of the selected picture in the viewer frame works (I'm running the onlick event on the default loaded pictures 1,2,3 in the browser-frame page)(default pic's 4 and 5 simply load the image in the iframe but with no way to adjust the size it is too big and gets cut off and i don't want that)
I've been working on for an entire day and I'm sure I'm doing something wrong here but I can't figure out what exactly it is. I have a feeling it has to do with changing the global variable: image_to_be_viewed from the browser-frame page but I wanted to confirm with experts instead of flopping about like a headless fish. I'm going to continue trying to figure this out but i thought maybe having some expert assistance would speed up the process.
What the onclick triggers should be a javascript function call.
e.g. onclick="changeImg('images/album1/1.jpg')"
And the function itself should looks like this
function changeImg (image_to_be_viewed) {
document.getElementById("viewed_image").src = image_to_be_viewed;
}
btw, you probably should learn javascript a little bit more before work on something real. I recommend this book
thank you I got it to work! I figured that the changeImg function was targeting the wrong document/wrong frame and I fixed it by changing the js script to:
function changeImg (image_to_be_viewed) {
window.parent.viewer_frame.document.getElementById("viewed_image").src = image_to_be_viewed;
}