I put together a page that shows what's happening here. The dialog is a confirmation that an email was sent, so you'll need to fill out the form to get the dialog to pop up. (I wanted to retain as much as the original functionality as possible.)
I generated a UI theme using Themeroller and the dialog I'm using is completely void of all styling. To the point that the dialog is completely transparent and all that shows in the dialog is the text in the dialog's div and the unstyled close buttons.
I tried both the compressed and un-compressed UI css and js files with no change.
I'm using some UI effects elsewhere in the same site (highlighting, etc), and they work fine.
Is this an issue with the Themeroller generator or am I missing something?
For now I can just display a label with a confirmation message, but I'd really like to use a dialog.
You haven't linked to the jQuery UI css anywhere. Here's a screenshot of the page after I injected the base jQuery UI theme.
Related
Scrolling becomes disabled when opening a jQuery UI dialog, even when it's open as non Modal.
It doesn't seem to be any option to control this behaviour.
How to prevent that?
I've found a working solution myself.
Just after opening the dialog, add this piece of code:
$("html,body").css("scroll", "auto");
IMO, it has no sense at all to block scrolling when opening a non modal dialog. I'd say this is a bug or a missunderstanding of what a non-modal dialog is.
So I am having this issue with using Google VR reticle where I cannot click a button. I have an image attached showing the heirarchy and the PlayButton is what I am trying to click. The Canvas has a Graphic Raycaster, the button has an Event Trigger that calls the method to navigate to the next scene. The UpScrollPanel, and DownScrollPanel work just fine. The EventSystem has the Gaze Input Module, as well as Event System, and Touch Input Module.
Any ideas on how to get this working? I have watched a few videos from NurFACEGAMES and while they helped a little, I haven't gotten the click to work yet.
Oh, and I am using Unity 5.3.4f
Sometimes things can get in the way of the button, make sure that no other UI elements overlap it, for example text borders (which are actually larger than they appear). You can also fix this by moving the button up the hierarchy among its siblings, I believe the first child is top.
Also try moving the button up the hierarchy if possible, sometimes UI having certain parents makes them not work
The canvas object should have a graphic raycaster
I found the issue to be unrelated to anything I thought it was. The menu I was using is a prefab I also use in another view that isn't VR. The scrollrect was loading that prefab, instead of the modified one I was using in the VR menu, and therefore the triggers I had added to the button were no being used when the app loaded.
Page.ClientScript.RegisterStartupScript(this.GetType(), "Alert", "JavaScript:alert('MY Message')", true);
Above code shows message box on top of the page , but I want it to the center of the page.
Alert boxes by default open at the center. Look at #Tomzan's comment, you are probably getting it at the top for just Chrome.
As far as I know it's not possible to make any modifications to that. If you want a custom alert box look into using jQuery ui. It'll allow you to put a messagebox wherever you want.
jQuery ui dialog box
The alert('message') is dialog box shown by browser, with very little to no control over its positioning.
Instead you can use jquery ui dialog to show your message. There are 'n' number of jquery plugins which are available to show the alert messages.
And of course you can control the positioning dialogs of these custom dialogs.
http://jqueryui.com/dialog/
http://needim.github.io/noty/
http://jquery-plugins.net/tag/alert-box
I'm developing an app which works more or less like the Notes app. When user click the + button a modal window with TextEdits is to be slided up,just like the Notes app did. However I was unable to locate any resource mentioning this kind of thing. Any clues?
I think you are looking for the QML Sheet element. You will need to implement the TextEdit part yourself.
I'm having some problems with Jquery UI Dialog and TinyMCE.
Passing data to a text area works well with UI Dialog and Jquery.
So setting data in text area like this works fine:
$("#MessageDialog #messageDto_Body").val(messagedata.Body);
$("#MessageDialog").dialog("open");
When I attach a tinyMCE editor to the text area it correctly adds the editor (and without the UI window the content of the text area is preserved):
tinyMCE.execCommand('mceAddControl', false, 'messageDto.Body');
With UI Dialog the area is empty.
From what I have seen the tinyMCE works hiding the real text-area and adding a new one.
I have also tried setting the content directly but no luck:
tinyMCE.activeEditor.setContent(messagedata.Body, {format : 'bbcode'});
Any advice?
UPDATE: substituted Jquery UI Dialog with jqModal and everything works. I think the problem could rely not in TinyMce but in the Jquery UI Dialog
Perhaps the jQuery TinyMCE plugin will be helpful.
tinyMCE hides the textarea and adds multiple elements using the textarea's ID appended with '_' + element type. To access the contents of the iframe try something like this.
$("#content_ifr").contents().find("body").html(messagedata.Body);
Where #content is the ID of your textarea.
I solved this by initializing the editr with the TinyMCE jQuery plugin with $('#myTextBox').tinymce(..., after opening the dialog. CLosing and reopening the dialog doesn't seem to cause a problem with jQ UI 1.8.16.