ManagerManager (for me) does not work in conjunction with of the ShowImageTVs plugin.
Please refer to this message in the support thread for ShowImageTVs for more information.
ShowImageTVs plugin was incorporated in the coming 0.9.6.2 release, so maybe somebody else can confirm the existence of a problem. It would be great if we could use both plugins together. The cleaner the interface is, the less intimidating it is to a not-so-techie person...
Can you give the line(s) you are using - e.g. mm_hideFields(.....
I can’t get the following items to hide: is_folder, is_richtext, log
This happens in the default installation, under IE7 and FF2
Running PHP Version 4.3.10, Apache/1.3.33, MySQL 4.0.20
Any insight appreciated.
Thanks.
default:
// Lets check the fields exist, or is a TV, so we're not writing JS for elements that don't exist
if (isset($mm_fields[$field]) || substr($field, 0, 2) == 'tv') {
$output .= '$("input[@name='.$field.']").parents("tr").hide(); ';
} else {
break;
}
break;default:
// Is it a TV?
if (substr($field, 0, 2) == 'tv') {
$output .= '$("#'.$field.'").parents("tr").hide(); ';
} else if (isset($mm_fields[$field])) { // Check the fields exist, so we're not writing JS for elements that don't exist
$output .= '$("'.$mm_fields[$field]['fieldtype'].'[@name='.$mm_fields[$field]['fieldname'].']").parents("tr").hide(); ';
} else {
break;
}
break;
Can you give more details exactly how it doesn’t work? Do certain parts of it not work, or does it fail altogether?
) it looks like MM breaks the ShowImageTVs javascript. I can even uncomment all MM rules, the ShowImageTVs javascript still fails.Error: url is undefined Source: http://www.asdf.ch/manager/index.php?a=27&id=11 Line: 799
JavaScript - http://asdf.ch/manager/index.php?a=27&id=11
Event thread: DOMContentLoaded
Error:
name: TypeError
message: Statement on line 31: Type mismatch (usually a non-object value used where an object is required)
Backtrace:
Line 31 of inline#13 script in http://asdf.ch/manager/index.php?a=27&id=11
var img = new Element("img").setProperty("src", full_url(url)).setStyles("max-width:300px; max-height:100px");
Line 1 of eval script
return fn.apply(options.bind, args);
Line 1 of eval script
var args;
if (options.event)
else
var returns = (function ()
{
return fn.apply(options.bind, args);
}
);
if (options.delay)
if (options.periodical)
if (options.attempt)
return returns();
Line 1 of eval script
fn.bind(this, args)();
Line 1 of eval script
for (var i = 0;i < this.length;i++)
Line 1 of eval script
if (this.events && this.events[type])
Line 1 of eval script
if (this.loaded)
this.loaded = true;
if (this.timer)
Element.prototype.fireEvent.call(this, "domready");
this.events.domready = null;
Line 1 of eval script
return fn.apply(options.bind, args);
Line 1 of eval script
var args;
if (options.event)
else
var returns = (function ()
{
return fn.apply(options.bind, args);
}
);
if (options.delay)
if (options.periodical)
if (options.attempt)
return returns();
At unknown location
[statement source code not available]
<script type="text/javascript" charset="utf-8">
var imageNames = ['wmBildURL'];
var pageImages = [];
function full_url(url)
{
return (url != '' && url.search(/http:\/\//i) == -1) ? ('http://www.asdf.ch/' + url) : url;
}
function checkImages()
{
for (var i = 0; i < pageImages.length; i++) {
var elem = pageImages[i];
var url = elem.value;
if (url != elem.oldUrl) {
elem.thumbnail.setProperty('src', full_url(url));
elem.thumbnail.setStyle('display', url=='' ? 'none': 'inline');
elem.oldUrl = url;
}
}
}
window.onDomReady(function() {
for (var i = 0; i < imageNames.length; i++) {
var elem = $('tv' + imageNames[i]);
if (elem) {
var url = elem.value;
// create div and img to show thumbnail
var div = new Element('div').addClass('tvimage');
var img = new Element('img').setProperty('src', full_url(url)).setStyles('max-width:300px; max-height:100px');
elem.getParent().adopt(div.adopt(img));
elem.thumbnail = img; // direct access for when need to update
elem.oldUrl = url; // oldUrl so change HTML only when necessary
pageImages.push(elem); // save so don't have to search each time
}
}
setInterval(checkImages, 1000);
})
</script>
This discussion is closed to further replies. Keep calm and carry on.