How to add custom image on Navigation List in Oracle APEX 19.2? - oracle-apex

can anyone help me? I would like to show Custom Image (the images uploaded in static file ) in the List. I've already tried it in the by (shared components/list/(Image/Class) /#APP_IMAGES#ad.png)
but that not working fine , how i can do that in below list or how i can add new icon in icon file ?
please any advise .

The following steps were tested on APEX 19.2.
Resize your image to 16px square. The CSS used to add the image will not allow the image to be resized via CSS, so this needs to be done ahead of time. You could choose a different image size, but that would require adjusting other aspects of the menu. See the notes at the bottom about this if needed.
Upload the image to the Shared Components and get the URL from the Reference column in the report. You can use either Static Application Files or Static Workspace Files depending on your needs. I used Static Application Files and the URL was: #APP_IMAGES#dm-16.jpg
Go to Shared Components > Lists. Select the list you'd like to work with and then drill down into the list entry where you'd like to display the image. In the Image/Class field, add a custom class that you can use to target the element. I used: dm-16
Go to the page where you have the button setup to open the menu. If you don't already have this setup, you can use this as a guide. Go into the page-level attributes and add the following CSS to the Inline filed in the CSS section:
.dm-16:before {
content: url(#APP_IMAGES#dm-16.jpg);
}
The CSS is selecting the class from step 3 and setting the content attribute using the value from step 2.
When you run the page you should see something like this:
Here are some notes about using larger images... There's a span that wraps the span with the image and has a class named a-Menu-statusCol. That element has its width attribute set to 32px. This is because its left and right padding are set to 8px each (16px total) so when you add the image at 16px the total width becomes 32px.
Let's say you want to use an image that's 32px wide. You'd need to take the padding (16px) and add the width of the image (32px) and set the span's width to that total. In my example that was 48px. I added the following CSS to the same inline attribute in the page:
.a-Menu-content .a-Menu-statusCol {
width: 48px
}
After that, you'll see that the image doesn't align correctly with the text anymore. This is because the text is in an 'a' element that has its line-height set according to the previous image size. Again, the height is being driven by the span with a class named a-Menu-statusCol. It has top and bottom padding of 10px each (20px total). If you add the default image height (16px) the total comes to 36px, which is what the line-height of the 'a' element is set to. If you add an image with a height of 32px, you'll need to add 20px to that to get a total of 52px. I set the 'a' elements light-height to that value with the following CSS on the same page:
.a-Menu .a-Menu-item {
line-height: 52px;
}
As you can see, the image is now bigger. It doesn't line up with the icon below it as I've not added a larger image to that list entry.

Related

Power BI parameter for image

I wanted to know if there's a way to have a parameter that holds an image.
The problem: I have 10 PBIX, each one containing over 20 screens. every report has the clients logo. it is an image let's say the client changed his logo, that means I'll need to change the logo 200 times!! (10 PBIX X 20 screens).
Wanted solution: is there a way to hold a parameter that will contain the logo, therefore changing the logo only 10 times (for each PBIX) that will be a HUGE improvement for my time and productivity. sorry for not including pictures this is to keep my client anonymous
Thank you!
Here is how you can achieve your requirement as stated below-
Step-1 create a custom function in Power Query as stated below. The function is taken from Here and you can check this blog for more details if you are interested.
let
BinaryToImage = (BinaryContent as binary) as text =>
let
Base64 = "data:image/jpeg;base64, " & Binary.ToText(BinaryContent, BinaryEncoding.Base64)
in
Base64
in
BinaryToImage
Here below is the image for the custom function-
Step-2 create report wise folder in your local directory and keep your image there. I am considering one folder here, but you can do your own once you get the workaround.
Step-3 Create a data connection for Folder as shown below and point to the folder you kept your logo/image-
And now you will have a table as below with one row as there are one image only. I named the table as PBI_Images.
Here basically Content column holding the Binary data for the image and we have to convert it to Base64 using the Function we created earlier.
Step-4 Now lets Invoke the function in our table. Select the table and do what shown in the below image-
Now you have a new column with data like below-
Step-5 Get back to report by clicking "Close & Apply" button.
Step-6 Download the following App from AppStore-
Step-7 Just add the new downloaded visual to your report and put the newly created column to the "Image URL" field as below-
Step-8 Now add the Image visual to all your report pages and tag the Image URL as stated in step-7.
You are all done now. Just Change the Image in your source file keeping the same name and after that refresh your table (PBI_Images my case) and you will see Image changes everywhere in the report.
Finally, if everything works expected, you can first try will all logos from one single folder. If do not work, go for folder per customer as mentioned earlier.

opencart Product page DIV

Not sure if this is where I post but I've got a lot of answers here so I thought I'd ask I'm in the throws of modifying the product page in open cart V2.0.2.0, I'm no web designer or programmer so I need all the help I can get. Here's my problem I want to add content to the left of the main product image on the product page , now I know that in modules I can create HTML content then display it on the product page through layouts but this pushes the description tabs along to the right leaving a large gap under the left hand column, what I would like is to have a div on the left that extends down to the bottom of the main image and keeps the description over to the left.
I've tried modifying the product TPL file in various ways but to no avail. Any ideas would be gratefully received.
How I want it to look
Regards Chris
To help you better understand, opencart calls templates like this
header - column left - column middle - column right - footer
What you need to do is to add that block to the middle column, then make a few template/css adjustments. If you throw it in the column left, it'll them echo the column left, which produces the result you've shown us. Assign the block to the middle or go into the template file catalog/view/theme/(yourtemplate)/product/product.tpl and hardcode that block.
Good luck!

Dynamic text in SAS VA (Visual Analytics)

I am making a nice dashboard. I have Geo-map with projects. When a user clicks on a particular project it will take the user to a detailed page about the project. I want to give this page (sheet) a dynamic title.
For example: The user clicks on the GEO map on the project in Aalst, he will be redirected to the detail page with a tittle "Costs and revenues for Project in Aalst".
Pictures of my dashboard:
enter image description here
enter image description here
I was working with VA 7.1 and there wasn't any way to parameterized text fields in VA reports. I've heard SAS wants to add this function in future release and at this moment you have to find a different way to put dynamic label on the report.
For example you can put a flat table with combination of every posible title you need. Then change style parameters for this table. You can turn off borders and column headers, change table background color, text font size and color, so you can make it looks like as a title field. Then you define filter connection between GEO map and this table, so when you click on the GEO map it will filter single record with correct title.

How to create an image slideshow in an xe:Dialog?

I am trying to create a slideshow in an xe:dialog
within the dialog I have repeat populated from a notesdocumentcollection containing one image for each document. and two buttons. Next and Previous
When the user in the dialog click "Next" the next image in my collection should be displayed and when I click previous the previous image in my collection should be displayed.
As these images can be very big I do not want to preload them, the actual image should be retrieved at the time when the user click the "Next" button.
How can I do this?
the problem I have is that I do not know how to navigate to the next image. there is probably a very simple solution. I have tried using different techniques like setRowIndex and setIndex etc.
I first thought I could set the repeats repeat limit to "1" and then navigate to next by incrementing the index but could not get that to work.
So what I thought about then was to set the repeat limit to 1000 and hide all images using css but then all images would be preloaded.
Instead of document collection, you can store document id's in a vector and put it into viewscope. You also put a current index in the viewScope. Next/previous will change index variable and since xe:dialog supports partial refresh, it will be easy and convenient.

Make input field small?

I have a form based on a model. I create a modelformset and need to display many (possibly hundreds) of individual form fields on a single page. I need to reduce the input size and am achieving this by using this:
widgets = {
'm1_pf': forms.TextInput(attrs={'size':1}),
}
However, this smallest size of 1 is still too big. Is there some other way of accomplishing a data-grid like presentation?
I have looked at using a Datatable with "editable cells" but this will not work for my situation. I need to be able to enter several values quickly by entering the first value, hitting tab, entering the next value, hitting tab, etc. Using the mouse to "click" into each cell and edit it (as is how Datatables works) is out of the question.
Thanks
Nevermind -- I figured it out. I added this to my CSS sheet:
input {
width: 1px;
}
I am OK with all input tags having this value.