Angular-Strap Modal questions - Controller and Callback Functions - angular-strap

At the moment I am using the bootstrap-ui modal and it give me the possibility to create an own controller for each modal where I can assing some values from the current form and when I close the modal with the "OK" button an callback function is called, where I can get also some values I've selected in the Modal before when I assing them to the callback function.
And its also possible to open the modal with $q and return the modal as promise.
Are these options also possible with the angular-strap modals? I can't find something about this in the documentation.

I found the AngularStrap documentation (if they want to call it that) quite lacking. You've really either gotta check the source, or find an example elsewhere for many common issues.
Yes, the $modal object can accept promises, but I haven't touched that in a while. I'm a little knowledgeable about Bootstrap-UI's modal implementation and found that it was more robust, so I can't say for certain that you'll find what you need in AS'.

Related

Bind featherlight to modal content but without also opening the modal

Is it possible to bind/setup/init featherlight without also opening the modal?
Currently var modal = $.featherlight($target,config) binds and then opens.
I have worked around it for now by immediately invoking modal.close() but this feels hacky.
Possible options:
1) New config option openOnBind (true/false)
2) Bind should not open by default - user can choose to use .open() afterwards as needed.
I have also tried var modal = $target.featherlight(config) but
both $target.open() and modal.open() then fail - neither contain the featherlight object/instance.
Where is the featherlight instance hiding? :)
Fiddled:
http://jsfiddle.net/eybb104r/2/
P.S. The context for this is launching a modal based on the presence of a cookie, so I need to bind a modal without a DOM element trigger.
It's really unclear why you want to do this, as there aren't any useful methods to call on a closed featherlight.
It's not documented (nor really supported), but you can do:
var fl = new $.Featherlight($content, config);
// Do something here, really unclear what though
fl.open();

WxPerl make modal Frame

I'm trying create modal window (wxFrame) in perl with xwPerl library (and WxWidget 3.0.2). Reason is, that is important for me to code will interrupt after window will be showed, until user close it. I found https://stackoverflow.com/a/2573660/5746693.
I would like use this code in in WxPerl library, but I have problem with using Wx::EventLoop class. It seems there is problem with loading this library. I didn't even find this class in WxWidget documentation. Sorry for probably stupid question.
Or is here some possibility to implement custom (with own controls in there) modal frame based on WxDialog class?
Thank for reply
If you need a modal window, use a wxDialog, not a wxFrame. Using the latter just doesn't make sense, the main difference between the two is that a dialog can be (and usually is) modal while the frame can't. Otherwise they are almost exactly the same.

Zend framework --- Action code before rendering view

When I use zend framework, how to run action code in controller before rendering view?
Now I use 2 action functions,
The first one have no view. The second one have the expected view.
When the first function is called, at the end of the function it will be redirected to call the second function.
Although I find this method works, the user cannot go back to last page by browser back button.
i don't understand your question so much but ...
Controller is always run before render action. Its a logic which running before render is called. I dont know from your question what you really need =( try be more objective pls. If you need run any code before action in controller on all actions in controller, you use init or preDispatch functions.
http://zfreak.wordpress.com/2011/04/14/usage-of-init-vs-predispatch-methods-in-zend-front-controller-zend-framework/
If you need 2 separated logics, you can make own function or class in your project and call it or create instance anywhere you need. If your problem is with any render as ACL restrictions... i use own function in controller which retrieve error_access_page and after call $this->_helper->viewRenderer->setNoRender(). If my users not have access, this show error_page and no render action's phtml file.
hope help =]

Woodwing: how to trigger the ModalViewController using custom web/html embedded content

Using Woodwing, we have a page that has custom html in it, using the custom web widget.
That widget has an anchor tag, that when tapped, opens a page in safari.
However, if we create the same page using the HTML widget, and a link overlay, that triggers a ModalView to display.
I'm assuming this has something to do with WoodWing's (un)documented protocols for the anchor tags, that are captured by the WoodWing shell application and used to trigger the "ModalView" display. Since everything in Woodwing generates an XML that is parsed when the app is loaded, and I've done numerous applications, this seems reasonable. However, there is very little technical documentation.
My question is: does anyone know any documentation on those protocols, or a way I can use custom-html to trigger the ModalView? I've tried replacing "http" with "ww" but no dice. It's possible it's javascript but I'm suspecting protocols...
The UIWebViewDelegate defines the webView:shouldStartLoadWithRequest:navigationType: method that your view controller can implement. In this implementation, your code shoudl decide if it wants to handle the request (user click) or let the UIWebView handle it normally.
For displaying a modal as a result of a click, this method would display the modal and return NO.
The default HTML widget implementation doesn't support this out of the box. There are two ways that you can do to achieve this;
Implement what they call a 'custom object'. They documented this feature, if you have access to their documentation this should be relatively easy to figure out. It allows you to write native objects and inject them into both the .ofip format and the application.
Implement a modal dialog within the widget (in HTML). This is less convenient but possible to do (if you have a fullscreen widget).
Create the specific URL for open as you mention in your comment(ww://string.string).
Then in UIWebView Delegate method (webView: shouldStartLoadWithRequest: navigationType:) get the redirect URL. If redirect URL is equal to you mention before then perform your action.
Let me know if this answer help you.
Thanks,

run an action in all of pages

i need to show variables in part of layout(i know placeholder is useful!) but this variables assigning in actions of controller, so i need render of view be after action running and this variables will show in all of pages (like menu but not exastly).
some of actions load with ajax!
what is your idea?! what is best way?
If I understand your question, Action Helpers might be what you are looking for. Take a look at the documentation http://framework.zend.com/manual/en/zend.controller.actionhelpers.html