Announcement

Collapse
No announcement yet.

Hiding Update & Reset Button from admin customer edit screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hiding Update & Reset Button from admin customer edit screen

    I am writing vis_cust module and need to hide [Update] and/or [Reset] button(s) from admin customer edit screen, like [Addresses] tab?
    How do I do that?

    Is there any example how to use built-in utilities, adding action buttons etc., to create vis_cust screen?
    I could not fine any in LSK.

    Thank you.
    Daniel Kim, Compu-Mate
    Developer

    #2
    Overall, the Miva Merchant Module API was designed to allow you to build functions into and onto the Miva Merchant Store. There are facilities within the Module API to build interfaces for these features, and therefore, to build features within the Admin, but the API was not built or structured to allow you to CHANGE the merchant admin. So, no, not really. You can't change Admin functionality via a module. You can, however, build your own from the ground up within the vis_ "content" feature set.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Actually it is possible. The Admin API is Javascript and Ajax based, it's difficult, not fully documented and relies on prototype functions.
      It allows. if you wish, to construct your admin screens almost completely using JavaScript with minimal html coding. Otherwise you can use the more traditional html methods we've all used in the past.

      That said...

      In the Module_Customer_Head() section you can add javascript that will trigger after the page loads.

      In my map locations module I do this:
      Code:
      <script type="text/javascript">
              MMScreen_LoadFinished( function() { new Gmap_List(); } );
      </script>
      Inside Gmap_List() I have...
      Code:
      if ( top.mm9_screen ) {
              var button_update = top.mm9_screen.element_actionbar_actions.firstChild;
              button_update.className = button_update.className + ' mm9_nodisplay';
      }
      Last edited by RayYates; 07-19-16, 12:05 PM.
      Ray Yates
      "If I have seen further, it is by standing on the shoulders of giants."
      --- Sir Isaac Newton

      Comment


        #4
        If you feel like exploring the Admin javascript api this thread contains some information that may be useful to you. <warning> Plan on spending a lot of time in your browser script debugger. </warning>

        http://www.miva.com/forums/forum/des...ike-categories

        Ray Yates
        "If I have seen further, it is by standing on the shoulders of giants."
        --- Sir Isaac Newton

        Comment


          #5
          There actually IS a way to do it in MivaScript without having to resort to JavaScript (Ray's version will work, but is not the best way of doing it). This should ONLY be done when on your own page that contains only content you provide (not on group tab pages, as this will effect functionality outside of your own).

          <MvEVAL EXPR = "{ [ g.Module_Admin ].DrawButtons_Suppress( '[UPDATE]' ) }"> (function found in file admin/ui.mv found in the LSK)

          will hide the update button. Use with care.
          Ryan Guisewite
          Lead UI Developer / Miva, Inc.
          www.miva.com

          Comment


            #6
            That's good to know. I see thatthe LSK file mmlsk-templatebatchreports.mv calls this function.
            Ray Yates
            "If I have seen further, it is by standing on the shoulders of giants."
            --- Sir Isaac Newton

            Comment


              #7
              Tons of golden information here.
              Thanks to everybody.
              Daniel Kim, Compu-Mate
              Developer

              Comment

              Working...
              X