MyBB Community Forums

Full Version: Prototype.js suggestion.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Eric J. made a really good suggestion on this thread post.

He said, "but hopefully while it's being rewritten for 1.8 the inline moderation will check for a certain class and highlight a certain class, instead of searching for HTML and highlighting a table row"

Is the prototype.js going to be class dependent instead of table dependent?
That way Div, tables, and/or flex can be used instead of limited to just tables.

It will be easier to implement CSS frameworks for MyBB themes if this is done.
1.8 will use jquery - but yes, it should hopefully be made so that it is more flexible than the original code using prototype.
I believe 1.8 does this at the moment.
Yeah looks like it does now (As of 11 days ago or something). Though it still seems a little flawed:

var post = element.up('div.post_content');
...
		$$('div.trow_selected').each(function(element) {
			element.removeClassName('trow_selected');
		});
...
		$$('fieldset.inline_selected').each(function(element) {
			element.removeClassName('inline_selected');
		});
...
etc.

Seems overqualified (div.post_content, div.trow_selected, fieldset.inline_selected specifically), and means tables can't be used anymore (not that I personally want them, but just the classname means either works. That is unless .up() doesn't allow only classes, still yet .parent() in jQuery definitely will).

Also it's too bad all the checkboxes are selected by tagname rather than a class, just because of replacement scripts that can be used to style them.