Unexpected output: Affected paths: relative - resubmit patch.
⚙ D58 INP-1418 - Wrap custom toolbar button HTML with markup that allows showing/hiding
Page MenuHomeIn-Portal Phabricator

INP-1418 - Wrap custom toolbar button HTML with markup that allows showing/hiding
ClosedPublic

Authored by alex on Apr 9 2015, 7:44 AM.

Details

Test Plan
NOTE: If no buttons are initially visible, then add toolbar button names to the toolbar_buttons array of title preset used in combined_header block.
  1. go to any section, that has a toolbar (grid or edit template)
  2. add visible toolbar button using a_toolbar.AddButton( new ToolBarMarkup('test_tb1', 'custom tbdata1') ); code (before a_toolbar.Render(); call)
  3. confirm, that button is visible
  4. add hidden toolbar button using a_toolbar.AddButton( new ToolBarMarkup('test_tb2', 'custom tbdata2', true) ); code (before a_toolbar.Render(); call)
  5. confirm, that button is hidden
  6. dynamically hide initially visible button using a_toolbar.HideButton('test_tb1'); code (after a_toolbar.Render(); call)
  7. confirm, that button is hidden
  8. dynamically show initially hidden button using a_toolbar.ShowButton('test_tb2'); code (after a_toolbar.Render(); call)
  9. confirm, that button is visible

Before made code changes attempt to hide/show toolbar button would result in JavaScript error.

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

alex updated this revision to Diff 152.Apr 9 2015, 7:44 AM
alex retitled this revision from to INP-1418 - Unable to show/hide custom toolbar button.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1418.
alex edited the test plan for this revision. (Show Details)Apr 9 2015, 7:46 AM
alex edited edge metadata.
glebs accepted this revision.May 21 2015, 2:54 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.May 21 2015, 2:54 AM
This revision was automatically updated to reflect the committed changes.
alex edited edge metadata.Mar 10 2016, 6:13 AM
alex added a project: Restricted Project.
alex retitled this revision from INP-1418 - Unable to show/hide custom toolbar button to INP-1418 - Wrap custom toolbar button HTML with markup that allows showing/hiding.Mar 27 2016, 5:47 AM