Page 1 of 3 123 LastLast
Results 1 to 10 of 26
Like Tree3Likes

Thread: Hide Panels in EditView (6.5)

  1. #1
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,638

    Default Hide Panels in EditView (6.5)

    In 5.5 I can hide subpanels in editview using JavaScript

    Code:
    document.getElementById("LBL_PANEL_3").style.display = 'none';
    But after upgrading to 6.5 this no longer works properly

    The panel gets hidden but the Panel Title Still Shows

    Is there a way to hide the panel & it's title in 6.5?
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk

    SugarCRM Enterprise 6.5.12

  2. #2
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    1,539

    Default Re: Hide Panels in EditView (6.5)

    Maybe this link could be helpful for you:
    Hiding Subpanels, thru Configuration and thru Code
    Stefan Ulrich Sauer
    System Analyst

    Devoteam GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.com
    http://www.devoteam.de

  3. #3
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,638

    Default Re: Hide Panels in EditView (6.5)

    Quote Originally Posted by sts View Post
    Maybe this link could be helpful for you:
    Hiding Subpanels, thru Configuration and thru Code
    Thanks but it is not subpanels that I need to hide

    It is a panels on EditView
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk

    SugarCRM Enterprise 6.5.12

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,858

    Default Re: Hide Panels in EditView (6.5)

    The DOM changed a bit. Here is a typical panel now in 6.5:

    PHP Code:
    <div class="edit view edit508  expanded" id="detailpanel_3">
    <
    h4>&nbsp;&nbsp;
    <
    a onclick="collapsePanel(3);" class="collapseLink" href="javascript:void(0)">
    <
    img border="0" src="themes/Sugar5/images/basic_search.gif?v=R3ujsVxRZ9GvxU6GIXpbiQ" id="detailpanel_3_img_hide"></a>
    <
    a onclick="expandPanel(3);" class="expandLink" href="javascript:void(0)">
    <
    img border="0" src="themes/Sugar5/images/advanced_search.gif?v=R3ujsVxRZ9GvxU6GIXpbiQ" id="detailpanel_3_img_show"></a>
    Other
    <script>
    document.getElementById('detailpanel_3').className += ' expanded';
    </script>
    </h4>
    <table width="100%" cellspacing="1" cellpadding="0" border="0" class="edit view panelContainer" id="LBL_PANEL_ASSIGNMENT">
    <tbody><tr>
    <td width="12.5%" valign="top" scope="col" id="assigned_user_name_label">
    Assigned to:
    </td>
    <td width="37.5%" valign="top" colspan="3">
    .....
    </td></tr>
    </tbody></table>
    ...
    </div> 
    So basically you need to now hide the parent:
    Code:
    $('#LBL_PANEL_3').parent().hide();
    mikesolomon likes this.
    [SIGPIC][/SIGPIC]

    Using CE and have 2 or more users? You need SecuritySuite - Teams

  5. #5
    neel1154's Avatar
    neel1154 is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Pune, Maharashtra, India
    Posts
    301

    Default Re: Hide Panels in EditView (6.5)

    Hi Mike,

    not sure about hiding but of making tab as read only in edit view I have code, let me know if you think its useful.

    Quote Originally Posted by mikesolomon View Post
    In 5.5 I can hide subpanels in editview using JavaScript

    Code:
    document.getElementById("LBL_PANEL_3").style.display = 'none';
    But after upgrading to 6.5 this no longer works properly

    The panel gets hidden but the Panel Title Still Shows

    Is there a way to hide the panel & it's title in 6.5?

  6. #6
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,638

    Default Re: Hide Panels in EditView (6.5)

    Quote Originally Posted by eggsurplus View Post
    The DOM changed a bit. Here is a typical panel now in 6.5:

    PHP Code:
    <div class="edit view edit508  expanded" id="detailpanel_3">
    <
    h4>&nbsp;&nbsp;
    <
    a onclick="collapsePanel(3);" class="collapseLink" href="javascript:void(0)">
    <
    img border="0" src="themes/Sugar5/images/basic_search.gif?v=R3ujsVxRZ9GvxU6GIXpbiQ" id="detailpanel_3_img_hide"></a>
    <
    a onclick="expandPanel(3);" class="expandLink" href="javascript:void(0)">
    <
    img border="0" src="themes/Sugar5/images/advanced_search.gif?v=R3ujsVxRZ9GvxU6GIXpbiQ" id="detailpanel_3_img_show"></a>
    Other
    <script>
    document.getElementById('detailpanel_3').className += ' expanded';
    </script>
    </h4>
    <table width="100%" cellspacing="1" cellpadding="0" border="0" class="edit view panelContainer" id="LBL_PANEL_ASSIGNMENT">
    <tbody><tr>
    <td width="12.5%" valign="top" scope="col" id="assigned_user_name_label">
    Assigned to:
    </td>
    <td width="37.5%" valign="top" colspan="3">
    .....
    </td></tr>
    </tbody></table>
    ...
    </div> 
    So basically you need to now hide the parent:
    Code:
    $('#LBL_PANEL_3').parent().hide();
    Jason thats perfect thanks

    now using
    $('#LBL_PANEL_3').parent().hide(); to hide
    $('#LBL_PANEL_3').parent().show(); to display
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk

    SugarCRM Enterprise 6.5.12

  7. #7
    CastleBravo is offline Sugar Community Member
    Join Date
    Feb 2012
    Location
    California
    Posts
    52

    Default Re: Hide Panels in EditView (6.5)

    Quote Originally Posted by eggsurplus View Post
    The DOM changed a bit. Here is a typical panel now in 6.5:

    PHP Code:
    <div class="edit view edit508  expanded" id="detailpanel_3">
    <
    h4>&nbsp;&nbsp;
    <
    a onclick="collapsePanel(3);" class="collapseLink" href="javascript:void(0)">
    <
    img border="0" src="themes/Sugar5/images/basic_search.gif?v=R3ujsVxRZ9GvxU6GIXpbiQ" id="detailpanel_3_img_hide"></a>
    <
    a onclick="expandPanel(3);" class="expandLink" href="javascript:void(0)">
    <
    img border="0" src="themes/Sugar5/images/advanced_search.gif?v=R3ujsVxRZ9GvxU6GIXpbiQ" id="detailpanel_3_img_show"></a>
    Other
    <script>
    document.getElementById('detailpanel_3').className += ' expanded';
    </script>
    </h4>
    <table width="100%" cellspacing="1" cellpadding="0" border="0" class="edit view panelContainer" id="LBL_PANEL_ASSIGNMENT">
    <tbody><tr>
    <td width="12.5%" valign="top" scope="col" id="assigned_user_name_label">
    Assigned to:
    </td>
    <td width="37.5%" valign="top" colspan="3">
    .....
    </td></tr>
    </tbody></table>
    ...
    </div> 
    So basically you need to now hide the parent:
    Code:
    $('#LBL_PANEL_3').parent().hide();
    I'm experience the same issue after upgrading to 6.5.5 Pro in a test environment. We're currently running 6.2.3 Pro in production and had been hiding panels in the edit/detail views in the Cases module by making updates in custom/modules/Cases/metadata/editviewdefs.php and detailviewdefs.php.

    Since upgrading to 6.5.5 in my test environment, the panels are still hiding properly, but the unexpanded title of the panel is still visible and is making our Cases module look extremely cluttered.

    Where/what files do I need to edit to do this change? Once in the correct files, where in the code do I insert the $('#LBL_PANEL_3').parent().hide(); ? I'm assuming I will need to inspect the element to get the correct DIV id?

  8. #8
    CastleBravo is offline Sugar Community Member
    Join Date
    Feb 2012
    Location
    California
    Posts
    52

    Default Re: Hide Panels in EditView (6.5)

    As a quick follow up, I've attached a screenshot. I need the items that are obfuscated in the screenshot to be completely hidden. We currently have code that hides the panel based on the value of a dropdown. If I were to try and expand the panel titles as show in the attached screenshot, there would be no information available, which is working as we want it. However, having the titles of the panels visible makes the module very cluttered.
    Attached Images Attached Images  

  9. #9
    CastleBravo is offline Sugar Community Member
    Join Date
    Feb 2012
    Location
    California
    Posts
    52

    Default Re: Hide Panels in EditView (6.5)

    As a quick follow-up to my post that I made yesterday (which still hasn't appeared yet due to moderation time!), this is how we are currently hiding panels based on the value of a dropdown, but this is not working 100% anymore when we upgraded our test environment to 6.5.5 Pro. To be clear, if the value of $record_type_dd_c is equal to any of the IDs in the formula, the fields in the panel are not visible if you try to expand the title of the panel -- in fact, you cannot expand the panel, as clicking the chevron/arrow does nothing. However, as noted in my screenshot and prior post, the names of the panels still apear and clutter up our detail/edit views.

    Any ideas how to fix this in 6.5.5 Pro? I'm still learning PHP/JavaScript, so detailed help is very much appreciated! Thank you!

    Code:
    'panelDependencies' => 
          array (
            'lbl_editview_panel1' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel14' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel13' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel12' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel11' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel10' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel15' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel16' => 'or(equal($record_type_dd_c, "012300000000Ji6"), equal($record_type_dd_c, "012300000000Cqw"))',
            'lbl_editview_panel18' => 'equal($record_type_dd_c, "012300000000Cqw")',
            'lbl_editview_panel19' => 'equal($record_type_dd_c, "012300000000Cqw")',
            'lbl_editview_panel20' => 'equal($record_type_dd_c, "0124000000013gH")',
            'lbl_editview_panel21' => 'equal($record_type_dd_c, "0124000000013gH")',
            'lbl_editview_panel22' => 'equal($record_type_dd_c, "012300000000OQ2")',
            'lbl_editview_panel23' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel24' => 'equal($record_type_dd_c, "0123000000094Wh")',
            'lbl_editview_panel25' => 'equal($record_type_dd_c, "0123000000094Wh")',
            'lbl_editview_panel26' => 'equal($record_type_dd_c, "0123000000094Wh")',
            'lbl_editview_panel27' => 'equal($record_type_dd_c, "012300000000CvI")',
            'lbl_editview_panel28' => 'equal($record_type_dd_c, "012300000000Chf")',
            'lbl_editview_panel29' => 'equal($record_type_dd_c, "0124000000015HJ")',
            'lbl_editview_panel3' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel30' => 'equal($record_type_dd_c, "0124000000015HJ")',
            'lbl_editview_panel31' => 'equal($record_type_dd_c, "0124000000015HJ")',
            'lbl_editview_panel34' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel35' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel36' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel37' => 'or(equal($record_type_dd_c, "0124000000014qm"), equal($record_type_dd_c, "012300000000OQ2"))',
            'lbl_editview_panel4' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel5' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel6' => 'equal($record_type_dd_c, "0124000000097fm")',
            'lbl_editview_panel7' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel8' => 'equal($record_type_dd_c, "0124000000014DL")',
            'lbl_editview_panel9' => 'equal($record_type_dd_c, "0124000000014DL")',

  10. #10
    dougancil Guest

    Default Re: Hide Panels in EditView (6.5)

    Quote Originally Posted by CastleBravo View Post
    As a quick follow-up to my post that I made yesterday (which still hasn't appeared yet due to moderation time!), this is how we are currently hiding panels based on the value of a dropdown, but this is not working 100% anymore when we upgraded our test environment to 6.5.5 Pro. To be clear, if the value of $record_type_dd_c is equal to any of the IDs in the formula, the fields in the panel are not visible if you try to expand the title of the panel -- in fact, you cannot expand the panel, as clicking the chevron/arrow does nothing. However, as noted in my screenshot and prior post, the names of the panels still apear and clutter up our detail/edit views.

    Any ideas how to fix this in 6.5.5 Pro? I'm still learning PHP/JavaScript, so detailed help is very much appreciated! Thank you!

    Code:
    'panelDependencies' => 
          array (
            'lbl_editview_panel1' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel14' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel13' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel12' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel11' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel10' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel15' => 'equal($record_type_dd_c, "01240000000141F")',
            'lbl_editview_panel16' => 'or(equal($record_type_dd_c, "012300000000Ji6"), equal($record_type_dd_c, "012300000000Cqw"))',
            'lbl_editview_panel18' => 'equal($record_type_dd_c, "012300000000Cqw")',
            'lbl_editview_panel19' => 'equal($record_type_dd_c, "012300000000Cqw")',
            'lbl_editview_panel20' => 'equal($record_type_dd_c, "0124000000013gH")',
            'lbl_editview_panel21' => 'equal($record_type_dd_c, "0124000000013gH")',
            'lbl_editview_panel22' => 'equal($record_type_dd_c, "012300000000OQ2")',
            'lbl_editview_panel23' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel24' => 'equal($record_type_dd_c, "0123000000094Wh")',
            'lbl_editview_panel25' => 'equal($record_type_dd_c, "0123000000094Wh")',
            'lbl_editview_panel26' => 'equal($record_type_dd_c, "0123000000094Wh")',
            'lbl_editview_panel27' => 'equal($record_type_dd_c, "012300000000CvI")',
            'lbl_editview_panel28' => 'equal($record_type_dd_c, "012300000000Chf")',
            'lbl_editview_panel29' => 'equal($record_type_dd_c, "0124000000015HJ")',
            'lbl_editview_panel3' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel30' => 'equal($record_type_dd_c, "0124000000015HJ")',
            'lbl_editview_panel31' => 'equal($record_type_dd_c, "0124000000015HJ")',
            'lbl_editview_panel34' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel35' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel36' => 'equal($record_type_dd_c, "0124000000014qm")',
            'lbl_editview_panel37' => 'or(equal($record_type_dd_c, "0124000000014qm"), equal($record_type_dd_c, "012300000000OQ2"))',
            'lbl_editview_panel4' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel5' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel6' => 'equal($record_type_dd_c, "0124000000097fm")',
            'lbl_editview_panel7' => 'equal($record_type_dd_c, "01240000000990R")',
            'lbl_editview_panel8' => 'equal($record_type_dd_c, "0124000000014DL")',
            'lbl_editview_panel9' => 'equal($record_type_dd_c, "0124000000014DL")',

    Merrick,

    A case has been created that is viewable via the Support Portal. An engineer will review the case and contact you as soon as possible.

    Thank you,
    Doug Ancil
    SugarCRM Support

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. hide panels in detailview
    By sreekanths478 in forum Developer Help
    Replies: 2
    Last Post: 2012-01-26, 09:16 AM
  2. Editview Panels not working in IE8
    By shyam007 in forum Developer Help
    Replies: 1
    Last Post: 2011-06-06, 01:36 PM
  3. How to Hide Layout Panels in usermodule??
    By m3suriya in forum Developer Help
    Replies: 1
    Last Post: 2010-07-14, 01:50 PM
  4. Editview panels show/hide?
    By madhrishi in forum Help
    Replies: 5
    Last Post: 2009-05-05, 03:47 PM
  5. Hide Panels
    By kasperd in forum Help
    Replies: 0
    Last Post: 2008-12-10, 12:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •