Joomla Custom Module Development - Backend administration Extra requirement - joomla

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

Related

Microsoft USD - Open different entities in a different tab

I have a Phonecall hosted control opened inside unified service desk as one of the tab and i have a few grids on that page.
On click of any grid inside my phone call page the respective entity is displayed on the same page.
Like for example if I click on customer product grid entity then that grid is opened similarly, there are other grids on which the user can click and it will load that entity on the same tab.
Now, the issue is as i said earlier that my new entity is being loaded on the same hosted control that is my phone call page. I want to prevent this from happening.
I want to display a different tab for whatever record is clicked within my PhoneCall Hosted control so this way my Phone Call Page is still there.
I know i can do this using Windows Navigation Rule but I will have to create different navigation rules for my different entities and then in future if any other grid is added in my phone call page then i will need to add another navigation rule to cater it. This is not the best approach, I want it to be dynamic. Is there any other way where I can open a different tab if a record is clicked from my phonecall page?
Create a new windows navigation rule. The "From" field should be your Phone Call Page. Leave the Entity, From search, and URL fields in the "Route Logic" section blank. Windows Nav Rules get executed in order, and once they find a match it stops executing. So make the order low enough so that it gets executed where you want it to.
The "Target Tab" and "Show Tab" fields should be a new hosted control that you want the popup to open in. The action is "Route Window".
As far as route type, you are going to have to play with this a bit. I think opening stuff from a subgrid is Route Type "Popup", but you might need to create 2 very similar rules (one with route type "popup" and the other with route type "in place") to account for all scenarios.
See the example screenshot below:

Button Click events with Dynamic actions in Oracle Apex

I have created an Edit button with associated Dynamic Action. In the dynamic action, set it to the Click event of the Edit button. I've created the actual action by reference to a JavaScript executing code. And then an update of the area.
In JavaScript code I wanted to enable items that are read only by pressing the edit button.
APEX_UTIL.PUBLIC_CHECK_AUTHORIZATION('ADMIN')
This was the check I made in the JavaScript code.
In this way I enabled edit mode for the region where I am applying.
ADMIN is a role.
How can I make the button click so that the items associated with the region that are just as read only, when clicking appear in an editable way?
In my opinion, you're reinventing the wheel.
OK, there's the ADMIN role (perhaps some other roles as well). If you know which user (identified by :APP_USER) has which role, then use
server-side condition (to decide whether to render (or process) certain page component (items, buttons, ...)
read only property (to decide whether user will be able to modify the value or not)
authorization scheme (under "Security")
So, there's no need for the EDIT button you currently have. Everything can be done declaratively by setting certain properties within Apex.
this function
APEX_UTIL.PUBLIC_CHECK_AUTHORIZATION('ADMIN')
is a plsql function, did you use it in your javascript code or as a server side condition?
you can make an ajax request to get the user role using that function and after getting the role in your javascript code you can disable/enable the items using the javascript api.
apex.item( "P1_ITEM" ).enable() ;

Create ribbon button Dynamically in CRM 2011

Can any one help me to create a ribbon button dynamically in CRM 2011. The scenario is, when we create a record, one ribbon button has to be created dynamically based the optionset value selected in that record. Can we get it work using JScript or Plug-in or Workflow? Enable or Display rules are not useful here and should not touch XML code.
Quick principle: Ribbon Buttons are not a part the record, they are a part of the UI. You can make the UI change based on the record you are looking. Therefore you cannot 'add' a button to a record. You can add a button to an entity form.
Plugins definetly wont work here, they peform logic on the 'back-end'. JavaScript might work but I would expect this to be quite awkward. What you should do is edit the ribbon Xml. Now there is an excellent for editing the ribbon: Ribbon Workbench, this tool make it significantly easier to
edit the ribbon (this is editing the XML but this is the way its meant to be done).
Then I think you will need to
Create a ribbon button for each action.
Then follow this tutorial to enable and disable them: Enable/Disable a ribbon button dynamically based on a form value.
Using a display rule would be the right way to do this.
Create multiple buttons and set their display rule when selected option is equal
to the button's name.
We can get it done by two ways-
Through plug-in:(Note: It won't works in Sandbox mode and consume some time.)
Create one solution and add specified entity to it. Go through the source code here
Export this solution to Temp folder and unzip it.
Edit customizations.xml file to add our own RibbondiffXml tag.
Zip all the XML files and Import it to CRM.
Publish the Customization.
Through XML edit:
Export Application Ribbon, update XML to add button and replace entity name with {!EntityLogicalName} in all the places.
Ex: <CustomAction Id="New.{!EntityLogicalName}.MyButton.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Management.Controls._children" Sequence="70">...
Add EnableRule to enable this button only if Config record exist for current entity.
<EnableRule Id="New.{!EntityLogicalName}.MyButton.Check">
<CustomRule FunctionName="checkConfigRecord" Library="$webresource:new_/Scripts/ValidateConfigRecords.js">
<CrmParameter Value="SelectedEntityTypeName" />
</CustomRule>
</EnableRule>
Create one JavaScript library with name new_/Scripts/ValidateConfigRecords.js which contains function checkConfigRecord which counts config records exists for particular entity. If count is greater than 1 return true. Otherwise false.
Import the ApplicationRibbon Zipped file
I ran into the same problem on Dynamics 365 and found a solution.
RibbonWorkbench includes a feature called "Fly Out Anchor Buttons"
This includes a property called PopulateQueryCommand.
You can use this command to dynamically (using JScript) add menu options to the Anchor Buttons at runtime.
The RibbonWorkbench documentation includes all the information you need to use this feature.

Sitefinity 4 attach user control to page on creation

I'm using Sitefinity 4.2. I have created a masterpage, with content placeholders, which I am using as a template when creating a new page. I then have several different custom user controls, which I drop into the different placeholders, and set the parameters for them through the control edit forms. This standard scenario works fine.
As our end users are not very sophisticated, I would like to create a new scenario in which, when a new page is created via the admin console on the basis of my masterpage, different controls are programmatically inserted into the various placeholders, and values for control properties are set. All the end user then has to do is to tweak the property values on one or two controls, and he's done.
Any ideas on how I would go about doing this?
For what you're describing, I'd suggest utilizing page templates. You can specify a master page to use and also drop widgets in to the placeholders you've established. Users can then create new pages based off of this template and your settings will carry over.
Widgets that you configure in a template can't be modified outside of it so you'll want to leave any that the user should be able to change, from the page editor, out.
You can create a page template by going to Design->Page Templates in the admin section.

How do I make a component in Joomla display as an article?

More specifically I am trying to make the mailto component show within my template; the same way as an article does.
By default the mailto component opens in a new window. So far I changed the code so it opens on the same window, but that way the whole template is gone.
Any suggestions?
In the template there is a tag which takes the contents of a component. An article is a com_content component. you are trying to put in a caom_mail_to component? The beauty is that they both plug into the same slot.
Now you can only ever have one component on a page. you can have lots of modules, but only one component.
you set which component is on a page by choosing it from the menu comands. (each menu item refers to a component.) generaly the componetsn are of the com_content type, and are articles, but in your case you are wanting to add a component called com_mailto? Asuming the component is installed, all you have to do is select the new butto0n when in menu item manager, and then select the mailto component type.
the tag that is being used in a joomla 1.5 template is:
<jdoc:include type="component" />
If on the other hand you are trying to add a module to the template, that is a different kettle of fish. Youy need to create an instance of teh module, assign it to a tag (which exiusts in teh template) then select which menu items the module will be published on. The tag in a template for a module is like:
<jdoc:include type="modules" name="module_name_place_holder" />
you can put more than one module into a single place holder.
If you already have this basic knowlge, pass on the details of this component, and we will see if we cant find you a better solution.
use "component as content" plugin
http://extensions.joomla.org/extensions/core-enhancements/embed-&-include/5947/details
I'm afraid I can't entirely follow your question - do you want to have a sign up form for membership or email notifications shown as an article? If so, then the easiest way is to install 'm2c' - the 'module to component' component. Then you can put any module (ie the sign up box) in the centre content area.
The m2c component can be found here: http://joomla.focalizaisso.com.br/en/componentes/index.php

Resources