? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
6 Mar 2017

Pull Request for Issue #14342.

Summary of Changes

Changes the buttons to hide in the editor custom field to a list of button plugins. This does NOT work with Tynimce, probably a bug or what do you think @dgt41?

Testing Instructions

  • In the global configuration select any editor except Tynimce as default editor.
  • Create a new Editor custom field.
  • Select in the buttons to hide list "Button Module" and "Button Article".
  • Save the field.
  • Open an article

Expected result

The buttons "Module" and "Article" are not visible on the editor field.

Actual result

The buttons "Module" and "Article" are not visible on the editor field.

avatar laoneo laoneo - open - 6 Mar 2017
avatar laoneo laoneo - change - 6 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Mar 2017
Category Front End Plugins
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 6 Mar 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017

I have tested this item successfully on 09faeee


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14390.

avatar infograf768 infograf768 - test_item - 7 Mar 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 7 Mar 2017

I have tested this item successfully on 09faeee


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14390.

avatar infograf768 infograf768 - change - 7 Mar 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 7 Mar 2017

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14390.

avatar infograf768
infograf768 - comment - 7 Mar 2017

@laoneo
TinyMCE: editor field buttons parameters are not considered at all.

avatar laoneo
laoneo - comment - 7 Mar 2017

ok, is there a reason why?

avatar infograf768
infograf768 - comment - 7 Mar 2017

I think so:
If you create an editor field for Users, it will work, but not for Article as we already have the TinyMCE parameters set by the usual instance of TinyMCE.

avatar infograf768
infograf768 - comment - 7 Mar 2017

Code mirror:
Buttons are added or not as

<div id="editor-xtd-buttons" class="btn-toolbar pull-left">
								<a class="btn modal-button" title="Module"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_modules&amp;view=modules&amp;layout=modal&amp;tmpl=component&amp;editor=jform_articletext&amp;ebf88ffcdae262df74454d8225ddddee=1" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
		<span class="icon-file-add"></span> Module	</a>
							<a class="btn modal-button" title="Menu"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_menus&amp;view=items&amp;layout=modal&amp;tmpl=component&amp;ebf88ffcdae262df74454d8225ddddee=1&amp;editor=jform_articletext" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
		<span class="icon-share-alt"></span> Menu	</a>
							<a class="btn modal-button" title="Contact"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_contact&amp;view=contacts&amp;layout=modal&amp;tmpl=component&amp;ebf88ffcdae262df74454d8225ddddee=1&amp;editor=jform_articletext" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
		<span class="icon-address"></span> Contact	</a>
							<a class="btn modal-button" title="Fields"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_fields&amp;view=fields&amp;layout=modal&amp;tmpl=component&amp;context=com_content.article&amp;editor=jform_articletext&amp;ebf88ffcdae262df74454d8225ddddee=1" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
		<span class="icon-puzzle"></span> Fields	</a>
							<a class="btn modal-button" title="Article"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;ebf88ffcdae262df74454d8225ddddee=1&amp;editor=jform_articletext" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
		<span class="icon-file-add"></span> Article	</a>
							<a class="btn modal-button" title="Image"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;e_name=jform_articletext&amp;asset=60&amp;author=464" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
		<span class="icon-pictures"></span> Image	</a>
							<a class="btn modal-button" title="Page Break"  href="http://localhost:8888/testnew/trunkgitnew/administrator/index.php?option=com_content&amp;view=article&amp;layout=pagebreak&amp;tmpl=component&amp;e_name=jform_articletext" rel="{handler: 'iframe', size: {x: 500, y: 300}}">
		<span class="icon-copy"></span> Page Break	</a>
							<a class="btn" title="Read More"  href="http://localhost:8888/testnew/trunkgitnew/administrator/#" onclick="insertReadmore('jform_articletext');return false;" rel="">
		<span class="icon-arrow-down"></span> Read More	</a>

for each instance.
While, for TinyMCE, the parameters are loaded once and for all in
<script type="application/json" etc.

avatar dgt41
dgt41 - comment - 7 Mar 2017

tinyMCE expects the excluded array of buttons, you are return bool,
``php
$fieldNode->setAttribute('buttons', $field->fieldparams->get('buttons', 0) ? 'true' : 'false');
$fieldNode->setAttribute('hide', implode(',', $field->fieldparams->get('hide', array())));

avatar dgt41
dgt41 - comment - 7 Mar 2017

@infograf768 can you check #14417 ?

avatar infograf768
infograf768 - comment - 8 Mar 2017

@dgt41
Done!

avatar rdeutz rdeutz - change - 9 Mar 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-03-09 19:48:30
Closed_By rdeutz
Labels Added: ? ?
avatar rdeutz rdeutz - close - 9 Mar 2017
avatar rdeutz rdeutz - merge - 9 Mar 2017

Add a Comment

Login with GitHub to post a comment