In assets/plugins/managermanager/widgets/mg_backend_manager/mg_backend_manager.php change:
On another note I’m using maxigallery backend manager with managermanager. When I add the widget:
mm_widget_mg_backend_manager('4','Gallery','','8');
I get a popup with this error when editing a document:
ManagerManager: An error has occurred: TypeError - $("iframe") is null
Although the gallery works after I OK it and move on. If I remove the widget the error doesn’t appear. I’ve looked around in the forum for this issue to no avail. Any ideas?
$('iframe').load(function()
\$j('iframe').load(function()
Quote from: grabenfub at Aug 05, 2009, 06:21 PMIn assets/plugins/managermanager/widgets/mg_backend_manager/mg_backend_manager.php change:
On another note I’m using maxigallery backend manager with managermanager. When I add the widget:
mm_widget_mg_backend_manager('4','Gallery','','8');
I get a popup with this error when editing a document:
ManagerManager: An error has occurred: TypeError - $("iframe") is null
Although the gallery works after I OK it and move on. If I remove the widget the error doesn’t appear. I’ve looked around in the forum for this issue to no avail. Any ideas?
to$('iframe').load(function()
\$j('iframe').load(function()
or use attached file
saveRefreshPreview();
document.mutate.save.click();
mm_widget_showimagetvs();
p.s. mm_changeFieldHelp - is not working, anybody can fix it?
<form name="mutate" id="mutateContent" method="post" enctype="multipart/form-data" action="index.php">
<form name="mutate" id="mutate" class="content" method="post" enctype="multipart/form-data" action="index.php">
Try this
Just had a quick play with the latest version of ManagerManager for Evo on Evo 1.0 Final and have had some trouble with mm_requireFields.
<?php /* added by Jelle Jager AKA TobyL - Make fields required Probably could do with some cleanup. Made in a hurry :) @version: 0.2 - added TVs handling. */ function mm_requireFields($fields, $roles='', $templates=''){ global $mm_fields, $modx; $e = &$modx->Event; // if we've been supplied with a string, convert it into an array $fields = makeArray($fields); // if the current page is being edited by someone in the list of roles, and uses a template in the list of templates if (useThisRule($roles, $templates)) { $output = " // ----------- Require field -------------- \n"; $output .= '$j("#mutate").bind("submit", function(){ var count=0; var msg = "";'."\n"; //$output .= '$j("input[name=menuindex]")'; foreach ($fields as $field) { //ignore for now switch ($field) { // fields for which this doesn't make sense - in my opinion anyway :) case 'keywords': case 'metatags': case 'hidemenu': case 'which_editor': case 'template': case 'menuindex': case 'show_in_menu': case 'parent': case 'is_folder': case 'is_richtext': case 'log': case 'searchable': case 'cacheable': case 'clear_cache': case 'content_type': case 'content_dispo': case 'which_editor': $output .=''; break; // Ones that follow the regular pattern default: // What type is this field? if (substr($field, 0, 2) == 'tv') { $output .= 'if($j("#'.$field.'").val()==""){ count++; var clr = $j("#'.$field.'").css("background-color"); $j("#'.$field.'").css({"background-image":"none","background-color":"#ff9999"}).bind("focus", function(){$j(this).css("background-color",clr);});}'."\n"; //$output .= '$("#'.$field.'").parents("tr").hide(); '; } elseif (isset($mm_fields[$field])) { $fieldtype = $mm_fields[$field]['fieldtype']; $fieldname = $mm_fields[$field]['fieldname']; $output .= 'if($j("'.$fieldtype.'[name='.$fieldname.']").val()==""){ count++; var clr = $j("'.$fieldtype.'[name='.$fieldname.']").css("background-color"); $j("'.$fieldtype.'[name='.$fieldname.']").css({"background-image":"none","background-color":"#ff9999"}).bind("focus", function(){$j(this).css("background-color",clr);}); }'."\n"; } else { break; } break; } } $output .= 'if(count>0){ alert( count + " required fields are missing!\n\n Please correct the indicated fields." ); return false; }else{ return true; } });'."\n"; $e->output($output . "\n"); } // end if } // end function ?>
Quote from: /Robin at Aug 14, 2009, 12:28 PMTry this
Just had a quick play with the latest version of ManagerManager for Evo on Evo 1.0 Final and have had some trouble with mm_requireFields.