掲示板

Modal dialog not working on switch to 6.2 SP9 from SP8

8年前 に a b によって更新されました。

Modal dialog not working on switch to 6.2 SP9 from SP8

New Member 投稿: 24 参加年月日: 13/08/20 最新の投稿
In my MVC-portlet i have a button that opens a modal dialog and fetches its contents from server. The buttons function is:

function() {
    NCVoting.createDialog = new NCVoting.Modal('<%= createVotingURL%>');
    A.one('#voting-wizard-header-title')._node.innerHTML = '<liferay-ui:message key="nv.label.wizard.new.details.title" />';
});


The modal dialog is created this way:

AUI()
	.use(
			'node',
			'aui-modal',
			'aui-io',
			function(A) {
				
				function VotingModalImpl(uri) {
					this.modal = new A.Modal({
						headerContent: '<span id="voting-wizard-header-title">&nbsp;</span>',				   	
						draggable : true,		            
						modal : true,
						resizeable : false,
						centered: true,
						height: 700,
						width: 750,
						zIndex : 400,
						destroyOnHide: true,
						cssClass: 'nabucco-voting',
					}).plug(A.Plugin.IO, { 
						uri: uri,
						method: 'GET',
						failureMessage : '',
						on : {
							success : function (event, id, response) {
							},
							failure : function () {
								alert('failure');
							}
						} 
					
					}).render();
					
					// prevent close modal on key down of esc key
					this.modal.get('boundingBox').on('key', function(e) {
						e.halt();
					}, 'down:27');

					
				};
				
				NCVoting.Modal = VotingModalImpl;
			});


This all works fine until sp8 (1, 5...) but on SP9 the url is not requested from server. If i enter the generated url in browser the resource is loaded fine (serveResource in portlet is executed). But if i click on the button i get an empty dialog (with correct title) but "serverResource" in portlet class is not hit.

So how to fix the modal so that it is requesting the given url like in previous service packs.

thanks in advance
thumbnail
8年前 に Nate Cavanaugh によって更新されました。

RE: Modal dialog not working on switch to 6.2 SP9 from SP8

Junior Member 投稿: 94 参加年月日: 06/11/27 最新の投稿
Hi there,
That's pretty strange... Do you get any JS errors?
Is the dialog opened?
Also, have you tried putting some breakpoints in the JS you pasted to see if and where it reaches into the code?

If so, do you know where it stops running?
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: Modal dialog not working on switch to 6.2 SP9 from SP8

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Why stop at SP9? SP11 is out and they're probably working on 12 already...