How to access Odoo11 web client HTML elements through my module to make some changes to them? - odoo-11

As shown in the previous image i want to access the body and the sidebar elements of Odoo 11 web client to add a custom button inside the sidebar.
I want to access the sidebar element to add my button, and i want to access the body element to add a script with the method definition for my button to function.
I want to do this through Odoo 11 module and i want this button to be seen from any other installed module.
Knowing that i am a pure beginner in Odoo development so it is appreciated if you try to be as simple as you can.

Related

How to create a Pop up box on laravel

I want to create a popup box which will be load after website full loading. I want show some notice or advertisement to user by this pop up box which will be auto appear after web loading. So how do i do this?
This is majorly a frontend task. So, Id do it in the following way:
Use laravel to render the page i want to display the popup
On the blade view of the page I will use html, css and javascript to structure, style and show the pop up when the page loads.
This link might provide you more information: https://websolutionstuff.com/post/how-to-add-bootstrap-modal-in-laravel?ref=morioh.com&utm_source=morioh.com

How can I hide/display add to cart button from Shopify product pages using Shopify app in Laravel or Node?

I am writing an app and I want to make a switch button to hide/display 'Add to Cart' button by using this app. How can I write code and implement this in Liquid.
Assuming you are using PHP (Laravel) as the backend for your Shopify App you could use the "phpclassic/php-shopify" library and call the "ScriptTag" method to load an external Javascript file into a store's front-end. The JavaScript file would have to manipulate the DOM to hide/display the Add to Cart button.
Code to hide any add-to-cart buttons might look like:
Array.from(document.querySelectorAll('button.add-to-cart')).map(el=>el.style.display='none');
If you wanted to conditionally hide buttons for specific products, then the JavaScript file would need to talk to your App back-end to obtain that information.
Note that this does not involve Liquid at all. Liquid is the theme template laguage Shopify uses. Programmatically modifying the theme's liquid files is a more difficult approach and liquid files you've added via an App get left behind if your App is uninstalled.

Change Sidedrawer content dynamically

I´m at that point on my app, where the user Logged in, receive the data from the server and now i need to make same changes. One of the changes is change the button that appears on my Sidedrawer saying Log In to Log Out and vice-versa when the user Logs Out...I could talk about other changes but i think the main thing is...
How do I access the Sidedrawer content in order to change/add buttons. I already entered the app-root.xml and made same testing adding the navigatingTo="onNavigatingTo" function and also in the .js file just to see if it responds, but it doesn´t...
How do i perform this?
You can show/hide your button via visibility, text binding or via a structural directive like *ngIf (if using Angular). For example, take a look here - I am showing/hiding a button based on whether the user is logged in or not (here is the related code-behind code).
The above example is using an Angular directive and can be applied only in Angular based applications, but with the same logic, you can substitute ****ngIf*** with visibility and achieve the same in TypeScript or plain JavaScript app.
The easiest way to do it is put the frame inside drawer content area, then navigate frame to another page.

User interface of Custom module in Kentico CMS issues

I added a user interface in a custom module. To use the kentico FCKEditor editable region I added the CMSEditableRegion and CMSPortalManager. When I click on the page link from the Page tab, it works just fine as expected. But when I click on the link from the design tab it give error (see the pic).
Also when I move another page in the content tree my module does not update its content.
Any help would be appreciated.
Thanks!
You are trying to access an object's value without initializing it.

Joomla Custom Module Development - Backend administration Extra requirement

I am currently in the process of developing a custom joomla module for one of my client’s requirement. As part of the administration panel of that module, I have created a radio button group, well in that group; I have two more radio buttons
My question for you leaders in the web arena is I need an option that "should display extra fields when I select one of the radio buttons"
For example: I have a radio button group named as 'No of fields'. In that group, I have two radio buttons named as 'Show', 'Hide'. I need an option which should display extra fields, when I select 'show' radio button
Is this equation possible? If yes, please post me your thoughts
This kind of behavior is not provided as a part of Joomla's default administration functions. You'll have to code it yourself and call that JS file when the module is opened in the backend. I would recommend you check the code used in Mod_news_pro by Gavick. The module loads a custom JS file that add a lot of custom functions and layout options that wasn't available in Joomla.
It's quite simple, just create a custom element checkout the official docs:
http://docs.joomla.org/Creating_a_custom_form_field_type

Resources