I'm getting the following error when I try to close an Explorer modal dialog.

TypeError: Result of expression '$(widget).val(value).blur' [undefined] is not a function.

nodereference_explorer_plugin_content_nodereference.js line 15, inside nodereference_explorer_plugin_content_nodereference_setValue() function.

Gonna keep looking into this further.. I'm also trying to figure out why there is support for "Popups: Add & Reference", but the popups module is not available in the list of Modal Dialog APIs to use on the field edit page. Commented out? :/

CommentFileSizeAuthor
#7 explorer.dialog.css_.patch775 bytesIvo.Radulovski
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilson3’s picture

More info... since I wanted to use Popups: Add & Reference module... so i updated jquery_ui to 1.7 (as required by the popups module).

gnindl’s picture

Title: $(widget).val(value).blur [undefined] » jQuery 1.7 compatiblity

I could reproduce you error by
- Updating to the latest jQuery UI 1.7 http://code.google.com/p/jquery-ui/downloads/list?can=3&q=1.7
- Not using jquery_update or using jquery_update version 6.x-2.x-dev

Then you can open the dialog, but the tabs do not align and their URLs are messed up. Requires some work in explorer.tabs.js and nodereference_explorer.menu.inc

Further the theme looks a bit awkward.

It has no priority for me now, but if anyone can take this up it would be great. Shouldn't be too work intensive.

gnindl’s picture

Title: jQuery 1.7 compatiblity » jQuery UI 1.7 compatiblity

change title

gnindl’s picture

Status: Active » Needs work

This issue has partially been resolved. It works, but the theme still looks a bit messed up. Have a look at the latest release http://drupal.org/node/859402.

gnindl’s picture

Another issue was posted #875984: What's going on with the theme? Expands on click?. The dialog increases its height when you click on it. This is probably caused by the JavaScript function Drupal.nodereference_explorer.dialog.resetDialogContentSize() in js/explorer.dialog.js. In jQuery UI 1.6 the dialog container has to be synchronized with the button pane which was solved in 1.7.

A solution which works in both version is desirable.

gnindl’s picture

As expected it were the resize listeners needed as as hack for jQuery UI 1.6, so make it version dependent:

//In jQuery UI 1.6 the scrollbar size has to be synchronized with the dialog container and button pane manually.
  //Therefore we have to assign listeners which react on dialog resize. In jQuery UI 1.7 this has been fixed.
  if (parseFloat($.ui['version']) < 1.7) {
    $.extend(options, 
	  {
	    focus:       function() {Drupal.nodereference_explorer.dialog.resetDialogContentSize(this, options.height);},
  	    resize:      function() {Drupal.nodereference_explorer.dialog.resetDialogContentSize(this, options.height);},
  	    resizeStart: function() {Drupal.nodereference_explorer.dialog.resetDialogContentSize(this, options.height);},
  	    resizeStop:  function() {Drupal.nodereference_explorer.dialog.resetDialogContentSize(this, options.height);}
	  }
    );
  }

TODO: Still the theme looks a bit messed up and the scrollbars do not align.

Ivo.Radulovski’s picture

FileSize
775 bytes

Here's a small fix for the dialog window, it should fix the scrollbar-alignment-problem and make the dialog-content-box appear flush with the title/bottom-bar.
Is there anything more specific that needs theming?

Ivo.Radulovski’s picture

Oops, I just checked the attachment - will work on the styleguide ;)
What do you think of me co-maintaining the module?

stacysimpson’s picture

Subscribe

davidburns’s picture

subscribe

notasheep’s picture

subscribe

tahiticlic’s picture

I've the same problem of modal frame height increasing on each click. When resizing the frame, the problem disappears and I can click "Ok" with a correct behavior.

This is with JQuery UI 1.7.3 and all correct stuffs.

The solution I've found is to comment this line (around line 40) in nodereference_explorer/js/explorer.dialog.js :
// focus: function() {Drupal.nodereference_explorer.dialog.resetDialogContentSize(this, options.height)},

I've not time enough to investigate why I've this behavior, I've done an update of Drupal core and before it was ok, so I guess there's now a conflict...

gnindl’s picture

Status: Needs work » Fixed

Please use Modalframe http://drupal.org/project/modalframe. It's stable to use with jQuery UI version 1.6 and 1.7. The in-built dialog API is deprectated in future releases and Modalframe will become a dependency of NRE.

To select modalframe as a dialog, go to your field settings and watch out for "Dialog API".

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.