Results 1 to 6 of 6
Like Tree3Likes
  • 1 Post By rafael.q.g@hotmail.com
  • 1 Post By tobydz
  • 1 Post By rafael.q.g@hotmail.com

Thread: Using existing Sugar popup for displaying a detailview

  1. #1
    tobydz is offline Sugar Community Member
    Join Date
    Mar 2011
    Location
    Las Vegas, NV
    Posts
    144

    Default Using existing Sugar popup for displaying a detailview

    Is there a way to use the sugar popup (or any built in popup class for that matter) where I can just pass in a module & record ID and have it display the data? I just want to display a pop-up with *just* the data from a relate field.

  2. #2
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Using existing Sugar popup for displaying a detailview

    Yes sugar supporst that.
    Try to find out inside include/javascript/.... folder a file named DCMenu.js.
    This class already have a method to present a record in detail/edit views into a build-in sugar popup.
    This file exists on sugar PRO, on CE I haven't sure.
    tobydz likes this.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  3. #3
    tobydz is offline Sugar Community Member
    Join Date
    Mar 2011
    Location
    Las Vegas, NV
    Posts
    144

    Default Re: Using existing Sugar popup for displaying a detailview

    Found the "Dashlet Container" code (DCMenu). Any idea how to use the DCMenu.miniDetailView(id,mod) function? I'm trying to do exactly that for pop-ing up a relate field detail view.


    Quote Originally Posted by rafael.q.g@hotmail.com View Post
    Yes sugar supporst that.
    Try to find out inside include/javascript/.... folder a file named DCMenu.js.
    This class already have a method to present a record in detail/edit views into a build-in sugar popup.
    This file exists on sugar PRO, on CE I haven't sure.

  4. #4
    tobydz is offline Sugar Community Member
    Join Date
    Mar 2011
    Location
    Las Vegas, NV
    Posts
    144

    Default Re: Using existing Sugar popup for displaying a detailview

    Here's the code that got it working for my "Realtor's" module. This code is in the parent module that displays the Realtor relate field in editviewdefs.php

    Code:
    array (
                'name' => 'realtor_c',
                'customCode' => '<a href="javascript:DCMenu.miniDetailView(\'{$fields.realtor_c.module}\',\'{$fields.con_realtors_id_c.value}\');">{$fields.realtor_c.value}</a>',
                'studio' => 'visible',
                'label' => 'LBL_REALTOR',
              ),

  5. #5
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Using existing Sugar popup for displaying a detailview

    Very good. The DCMenu object also can be used to present a div or an external page as a popup into sugar, and always using a nice layout according sugar theme.
    tobydz likes this.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  6. #6
    tobydz is offline Sugar Community Member
    Join Date
    Mar 2011
    Location
    Las Vegas, NV
    Posts
    144

    Default Re: Using existing Sugar popup for displaying a detailview

    Quote Originally Posted by rafael.q.g@hotmail.com View Post
    Very good. The DCMenu object also can be used to present a div or an external page as a popup into sugar, and always using a nice layout according sugar theme.
    Thanks again for the help Rafael!!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 2010-12-30, 06:07 AM
  2. Replies: 5
    Last Post: 2010-04-21, 06:05 PM
  3. Replies: 0
    Last Post: 2010-04-01, 11:06 AM
  4. Problem displaying parent_name in detailview
    By piccirm in forum Developer Help
    Replies: 4
    Last Post: 2009-02-19, 02:21 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
  •