HtmlWidget source? - orchardcms

I added a HtmlWidget and it displays fine on the webpage.
I would like to know where the source code is for HtmlWidget. I would like to step through the code when I create a new HtmlWidget, when I save a HtmlWidget, when a HtmlWidget is rendered, etc. Can someone point me where to look.
Thanks

It's just a ConentType which has a BodyPart, CommonPart, IdentityPart and a WidgetPart, you can see where it's created here: http://orchard.codeplex.com/SourceControl/latest#src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs

Related

How to redirect to a website in Godot Web

I'm planning on trying to see if it's possible to make a website in Godot(Yes, I know I shouldn't I just want to try just to try). I thinking about and looking over the features I need and I have one problem.
I just need a way for a person to press a button and get redirected to my itch games. I don't care if it creates a new tab or changes the current tab. Thank you for any help.
If you dont export to web you can call
OS.shell_open("url")
Sadly this does not work in an html export. A solution I found for myself is the JavaScript Interface. As the name suggested it allows you to execute Javascript.
So to open a URL you could connect the pressed signal of a button to something like this:
if OS.has_feature('JavaScript'):
JavaScript.eval("""
window.open('https://google.com', '_blank').focus();
""")
This will open a new tab in the active browser.
I also found an article on the godot site, basically asking the same question (https://godotengine.org/qa/46978/how-do-i-open-richtextlabel-bbcode-links-in-an-html5-export). Here they tried to use an RichTextLabel with BBCode.
The solution did not work for me, when I tested it, though.
As pointed in the comments you can try OS.shell_open, for example:
OS.shell_open("https://example.com")
That only works if it is not an HTML export.
Your other alternative is to eval JavaScript, for example this navigates the current tab:
JavaScript.eval("window.location.href='https://example.com'")
Which only works if it is an HTML export.
Since that only works for an HTML export and the other does not work on an HTML export... If you need both you can do this:
if OS.get_name() == "HTML5":
JavaScript.eval("window.location.href='https://example.com'")
else:
OS.shell_open("https://example.com")
See also Close a game in Godot.

Etherpad: setHTML API response is successful but updated html is not visible on etherpad

When I create a new pad and use newly created padID in /setHTML API, this updates HTML and updated
HTML is visible on pad. But, when I use the same process for a pad where I'm creating sessions etc the and use padID in /setHTML, this call is successful but updated HTML is not visible on the pad. However, this is getting saved in DB.
Please help!
Regards,
I've found the mistake which I was making in calling etherpad.The correct way is given below. This is working fine for me.
<iframe src='http://pad.domain/p/PAD_NAME?sessionID=sessionID&userName=userName&showChat=false&showLineNumbers=false' width=600 height=400></iframe>
PAD_NAME and padID are sam in my case. /setHTML is working fine when I use padID.

Adding a slideshow to a webpage

I need help. Apologies if the information I provide is not sufficient. I'm sort of an all-arounder at this job and this task has been thrown at me.
I need to add a slideshow to a a webpage. I am not even sure what code I need: jQuery, CSS, or HTML.
The homepage of the website has a Nivio slider (can't access the code to this because its owned by a management company we can't afford to pay).
This is what the editing page looks like: screenshot
The website is http://evelyns-kitchen.com
I am looking to add something like the Nivio slider (if I can't actually add a Nivio slider). Smooth transition, clean, dots below photo to represent the image, left/right arrow. Let me know what other information I can provide! Thank you so much.
Use zoho reports www.reports.zoho.com where you can create reports dashboards slideshows and many more

Vaadin - SVG Generator, any alternative?

I have been working with Vaadin charts during this week and I found a problem that I cannot solve. I need to send several charts to a PDF generation (using iTextpdf) and I could do it using SVGGenerator. The main problem is I cannot use this solution because the final laptop doesn't allow any installation, and Phantomjs is required for SVG Generator (no add-on can be installed neither). I tried to find a different solution to convert the chart content into file or buffer that I can manage, but I think I have been reading so much posts and I am not able to distinguish the solution.
So, I will try to clarify basic questions first:
a) Is it possible to manage SVG Generator without any installation in the laptop?
b) If not, is there a different way to convert a chart into an object which class could be managed to insert it into a PDF?
I can assure you I tried to read all documentation in this forum and official Vaadin forum related to this topic but I couldn't find any solution. I don't want to seem lazy, I only want to avoid spending more time and clarify the maining pre-conditions to solve this issue.
thanks in advance for your time and help.
Kind regards,
David.
You can take a screenshot of your chart and append it to pdf:
Screenshot screenshot = new Screenshot();
screenshot.setTargetComponent(myTargetComponent);
myChartLayout.addComponent(screenshot);
//when complete
screenshot.addScreenshotListener(new ScreenshotListener() {
public void screenshotComplete(ScreenshotImage image) {
//do something
}
});
//take screenshot
screenshot.takeScreenshot();
You will not be able to render a Vaadin Chart without a web browser engine of some kind. That's what PhantomJS provides. If you have a full-blown web browser at your disposal, though, you can grab the SVG markup manually from there; it's just a bit more difficult to automate. This works in Chrome:
Open your Charts app in the browser
Open the JavaScript console (Ctrl/Cmd + Shift + J)
Type something like this: copy(document.getElementsByTagName('svg')[0].outerHTML)
Paste the contents of your clipboard to a new text file and save it as an SVG.
You don't need to install phantomjs, just bundle its binary along with your web application (Reference). I did the same thing with my Amazon AWS deployment and it works just fine.

masonry images loaded not working

Dear community im using the masonry script on this site: http://www.hoeckernetworks.impulsfaktor.abcde.biz/
I was searching for an option to fix the picture loading problem and i found imagesLoaded. I try to get it to work, but it wont do its job. I am not a great javascript programmer and tryed it with the example code. Maybe someone has a hint for me. Just to inform: i use masonry working with html. If its needed i can send my source but i think one can see it on the site.
regards an already thanks for any help

Resources