Open create content form modal and refresh view display in Drupal - drupal

I have a website developed using Drupal. What I want is to create a link which launches a modal window with a custom content create form, then when the form submits and the child window closes, a view or a display of a view in the parent must be refreshed.
I have tried using an excellent module like automodal and ajax_views_refresh but I can't get to set it right.
Any clues?

Figured out how to do this not so long ago, and while looking for a method to Preview content from the Modal Frame, came across your post. Hope this isn't to late to help.
Open parent.js under modules/modalframe/js
and insert location.reload(); around line 250 within this if statement:
if ($.isFunction(self.options.onSubmit)) {
self.options.onSubmit(args, statusMessages);
}
Now, when you click "Save" the child window closes and triggers a parent page refresh.

Related

Drop dialog on a list page not disappearing automatically

When I add a drop-dialog to a list page, the drop dialog drops down when I click on it, but does not disappear when I click somewhere else.
I am trying to add my own drop-dialog, but I can reproduce this issue with standard Dynamics AX objects. I guess I am just missing some property on an object, but I just cannot figure out which one.
If you want to reproduce my problem in order to solve it, do the following:
Create a new Form. (Form 1)
Change the FormTemplate property to ListPage (Click on Yes)
Add the query MainAccountListPage to the DataSources
Create an ActionPanTab.
Add a Drop-dialog button with the menu item MainAccountListPageBalanceParameters.
Save and open the new List page by right clicking and choosing open. (or open the menu item)
In my case, when I click on Parameters, the drop dialog drops down. When I then click outside the drop-dialog, it disappears as it should.
Create a new display menu item. Set the object to the new list page (Form 1)
Drag the Menu item to any menu. I added mine to General ledger (Common)
Restore, open new workspace. Click on the new menu item in the general ledger menu.
Click on “parameters” and click outside the drop dialog.
When I do this the drop dialog does not disappear again. You can see this same drop dialog working fine on the Main Accounts list page. I have tried changing properties on both menu items, on the menu, on the form etc. I have tried different drop dialogs and different list pages. It always works on the details page and when opened from the AOT.
Am I missing a property? Is the entire way I am adding the drop dialog wrong?
The answer to the above example is.. add the MainAccountDetailPart Form part to the list page's (Form1) Parts.
With my other example, EcoResProductPerCompanyListPage, I had to add the EcoResProductVariantsPerCompanyFactBox to Parts.
I have no idea why this is, but adding a part to a list page fixes the drop dialogs. For example, adding MainAccountDetailPart Form part to a new list page not only fixes the MainAccountListPageBalanceParameters in my example, but it also fixes any other drop dialog that previously did not want to close. Removing the part the breaks all the drop dialogs in the list page again.
Thanks, FH-Inway, for the suggestion, I would have never have found the answer without your method. The solution really surprised me!

Bootstrap 3 modal popup disappear on button click

I used bootstrap 3 modal dialog for search function in my asp.net inventory application.When I press the search button on my modal content whole popup up dialog went disappeared.I want to lock the the modal dialog in my current page window.How can I resolve this using bootstrap.I tried putting data-backdrop: static.But it's still not work for me.
Try also passing the
{keyboard: false}
Option as well as data-backdrop: false. Technically speaking data-backdrop should be solving your problem. Is theres something that makes your project unique?

How can I create a home button?

I am pretty new in the programming world. I am using Titanium, and I want a button that when I clicked on it, it will go back to the home window. Obviously, the button will be in another window.
I tried win2.open() and win2.show(), but it is not working. Any ideas?
Use titanium navigational controller
https://github.com/vuinguyen/Ti-Navigation-Controller
it would give you button for previous and home window
Jacl,
If you are in second window, just close that window on the click event of your button in the second window.
Try the following in second window
//I'm assuming that you have came from window1 to window2
//and you have a button btnHome at window 2 used to navigate back to home page
var thisWindow = Ti.UI.currentWindow;
btnHome.addEventListener('click', function(e){
thisWindow.close(); //Will close the current window and display the previous one
});
There is a similar question which is used to navigate between windows. Go through Titanium Mobile: cant navigate between pages.
You can use the following links also for references
http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-url
http://docs.appcelerator.com/titanium/latest/#!/api/Global-method-require

Forms as modal windows

i got a form and i want to show it as window dialog and able to submit it via dialog
how i do that? what module i need?
also, how can i make that i get unique class for each form element?
The Popups module is awesome for this.
You can easily target a page (with your form), and it puts the content of the page in the popup. It opens it similarly to a lightbox, but it does not open a new browser window.
Drupal has a module for modals.
As for the unique class names in your form, this article may be helpful.

drupal how to refresh the page when the content is created in the popups

i have designed a panel where i have to used
to popup links and automodal class for creation of content....
view objects
now after saving the content , and closing the popup the panel page is to be refreshed
how it is done.....
it sounds simple but
i m newbie to drupal
From your class name, it would seem you are using the popups module? If that is true, and you want the parent where the popup is launched from to refresh when the popup is closed, you want the class to be "popups-form-reload"
view objects
Seems like you have a link on a page that launches the popup when clicked. You can use the Drupal l syntax, l for link
l("view objects", 'testviewprintpdf', array('attributes'=>array
(array('class' => 'popups-form-reload'))))

Resources