jquery-ui-dialog

jQueryUI dialog hides close (X) button if title contains right-aligned text. How can I fix this?

烈酒焚心 提交于 2019-12-08 05:30:18
问题 I have the following code sample: <div id="dlgTest1" style="display: none"> <p> Lorem ipsum test popup dialog<br /> <br /> Click the OK button to resume activity. </p> </div> <script type="text/javascript"> $(document).ready(function () { var myTitle = "<div style='float: left'>LEFT TEXT</div><div style='float: right'>RIGHT TEXT</div>"; $("#dlgTest1").dialog({ title: '', // new jquery-ui-1.10.2 doesn't allow HTML here autoOpen: false, minWidth: 500, width: 500, minHeight: 200, height: 200,

how to set edit form position and size in jqgrid combining with other properties

烈酒焚心 提交于 2019-12-08 04:57:37
问题 How to create jqgrid edit form at specified position and size which can changed in runtime? Edit window postition should combined with other edit parameters in navGrid. I tried code below but alert box does not appear and edit form is shown in default position. var oldJqDnRstop, editWindowParams = { left: 10, width: window.innerWidth-18, top: 5, height: 100 }; if ($.jqDnR) { oldJqDnRstop = $.jqDnR.stop; // save original function $.jqDnR.stop = function (e) { var $dialog = $(e.target).parent()

Checkbox not checkable in dialog ui

蹲街弑〆低调 提交于 2019-12-08 01:46:51
问题 I am trying to solve a z-index problem with the jQuery UI Dialog, similar to question Can't select or deselect checkboxes inside jQuery UI Modal Dialog , knowing there is a bug report out there. So in trying to up the z-index as recommended, I added the following code: $('#interface').click(function(evform){ $('#interface').prop('z-index')=99999; }); where the chrome and firefox console.log states: Uncaught ReferenceError: Invalid left-hand side in assignment HOWEVER, despite the error, the

Why is my animated GIF not animated when I call an AJAX method?

左心房为你撑大大i 提交于 2019-12-07 19:39:22
问题 Using the code below, I can get the dialog to display properly while the AJAX data loads, but the animated GIF is not animated - looks really crappy. CSS: .loading { background: url('/images/loading.gif'); } JavaScript: $(function() { $("#createButton").click(function(e){ e.preventDefault(); var $form = $(this).closest("form"); $("#pleaseWait-dialog").dialog({ modal: true, height: 200, resizable: false, draggable: false }); $.ajax({ type: "GET", url: "myScript.cfm", async: true, success:

Can I center a jQuery UI dialog to a div?

孤街醉人 提交于 2019-12-07 16:59:21
问题 I've got a main content div, and I'd like to centre the dialog to that div, rather than to the page. Any ideas? I know there's a position utility, but I can't work out how to use it with the dialog position options. 回答1: You're correct, .position() is the way to go here, like this: ​$("#dialog").dialog() .parent() //remember .dialog() wraps the content in another <div> .position({ my: 'center', at: 'center', of: '#parent' }); //or just .position({ of: '#parent' }); ​ In the above #parent it

jQuery UI confirmation dialog and asp.net postback

别说谁变了你拦得住时间么 提交于 2019-12-07 16:14:27
问题 I have a delete button in a gridview. For those not familiar with asp.net my delete button outputs like so: <a id="ctl00_cp1_dtgrAllRates_ctl02_lbDelete" class="lb" href="javascript:__doPostBack('ctl00$cp1$dtgrAllRates$ctl02$lbDelete','')"> Delete</a> I have a confirmation dialog hooked up to all the delete links in the gridview to ask the user if they are sure they want to delete. It pops up no problem but I want to fire the postback (the href value) if they click confirm. I'm not sure how

How to build a jQuery dialog for confirmation (yes/no) that can work anywhere in an app?

孤街醉人 提交于 2019-12-07 12:10:53
问题 I have the following: <ol id="listItems> <li id="listItem-1"> <span class="title">Item 1</span> <span class="delete">delete</span> </li> <li id="listItem-2"> <span class="title">Item 2</span> <span class="delete">delete</span> </li> <li id="listItem-3"> <span class="title">Item 3</span> <span class="delete">delete</span> </li> <li id="listItem-4"> <span class="title">Item 4</span> <span class="delete">delete</span> </li> </ol> What I want to do here is anytime .delete is clicked, I want to

How to combine UI Dialog with UI Tabs in jQuery?

好久不见. 提交于 2019-12-07 11:33:39
问题 So I'm trying to combine the Dialog with the Tabs UI components form jQuery UI am I'm almost there but I cannot seem to move the dialog close button from the Dialog UI titlebar into the Tabs UI. I tried to move the existant Dialog UI titlebar close button to the Tabs UI bar but that presented lots of problems and the button moved on mouse hover. I tried to create buttons with the close icon in the Tabs UI bar but this is proving to be difficult to position the button on the far right side,

jQuery UI - Override plugin method

限于喜欢 提交于 2019-12-07 09:41:17
问题 I am having trouble getting to grips with OOP in jQuery UI, with regards to classic OOP that I'm used to. As far as I can tell, I have created a new plugin (widget) called 'modal' that extends the UI dialog widget. Now how do I override dialog's close() method, but also call the original method so that I don't lose its functionality? $.widget('ui.modal', $.ui.dialog, { close: function() { // How do I do something to the current modal DOM object? // Is this correct? $(this).addClass('test'); /

Setting max height of a dialog, then allow scrolling

老子叫甜甜 提交于 2019-12-07 07:36:28
问题 I can't seem to understand how to set the height correctly for the jquery ui dialog. I want it to display the height to however much content is present, but if it exceeds 400 pixels, then I want a scroll bar. So, if the content has 200 pixels in height, then the dialog should have a height of 200 pixels. If the content has a height larger than 400 pixels, then the dialog shouldn't expand past 400 pixels and a scroll bar should be visible. I have this so far: $("#popup").dialog({ modal: true,