Wow I was soooo close to figuring this out. Thanks.
Announcement
Collapse
No announcement yet.
Miva 9 Bartch Screens (like Categories)
Collapse
X
-
Bit by bit I'm getting there. The Product and Category admin screens have a dropdown options for "Show Products" and "Show Categories." When Map Location successfully geolocates an address, it marks the record active.
I have created the dropdown for "Show Maps" with options "All, Unmapped and Mapped" but does not do anything yet other than display. I'm seeking guidance on how to go about this.
Here is what I have so far. Inside function Gmap_List() I added.
Code:this.filter_map_show = 'All'; this.button_map_show = this.Feature_Buttons_AddButton_Persistent_Dropdown( '', 'Show Maps', 'list' ); this.button_map_show_all = this.button_map_show.Menu_Append_Item_Toggle( 'All', function( event, data, active ) { self.Map_Show( 'All' ); }, null ); this.button_map_show_unmapped = this.button_map_show.Menu_Append_Item_Toggle( 'Unmapped', function( event, data, active ) { self.Map_Show( 'Unmapped' ); }, null ); this.button_map_show_mapped = this.button_map_show.Menu_Append_Item_Toggle( 'Mapped', function( event, data, active ) { self.Map_Show( 'Mapped' ); }, null );
It looks like I have to either...
Create a seperate Gmap_List.prototype.Construct and then add all of the other prototype functions like Category_Show_SetActive, OnSearch_GetFilter_AddHook, and so on.
Or...
Continue constructing everything inside Gmap_List().
Either way I think I have to construct the prototype functions like Category_Show_SetActive etc. and hook this back into the search function.
Before I spend time too much time, Is this the correct path or is there another way that already provided?
Ray Yates
"If I have seen further, it is by standing on the shoulders of giants."
--- Sir Isaac Newton
Comment
-
Originally posted by compumate99 View PostI am writing vis_cust module and I want to get customer address data for currently selected customer. What variable holds current customer id and how do I pass this to batchlist_load_query and how do I get the data from this query.
Thank you.
Comment
-
Originally posted by compumate99 View PostI still have some basic questions never mentioned in pdf file.
1. JS files will be included in module executable, is it correct?
Originally posted by compumate99 View Post2. How do I pass parameter to batchlist_load_query function in function.js from my batchlist.js?
Comment
-
If you are going to use the Ajax features (as opposed to the traditional method of submitting form data) then you will also need to implement the "json " feature and add the function Module_JSON()
Code:<MvFUNCTION NAME="Module_JSON" PARAMETERS="module var" STANDARDOUTPUTLEVEL=""> <MvFUNCTIONRETURN> </MvFUNCTION>
Last edited by RayYates; 07-25-16, 08:32 AM.Ray Yates
"If I have seen further, it is by standing on the shoulders of giants."
--- Sir Isaac Newton
Comment
-
Ah, that is apparently something that has not made it into the released LSK yet.
In your JavaScript list, you should have the following:
Code:compumate99_list.prototype.onLoad = function( filter, sort, offset, count, callback, delegator ) { // this.customer_id would be passed in as a constructor parameter (MMScreenContext.customer.id) to your list and then saved to this.customer_id for later use, ie... here compumate99_list_Load_Query( this.customer_id, filter, sort, offset, count, callback, delegator ); }
Code:function compumate99_list_Load_Query( product_id, filter, sort, offset, count, callback, delegator ) { return AJAX_Call_Module( callback, 'admin', 'compumate99', 'compumate99_listList_Load_Query', 'Customer_ID=' + encodeURIComponent( customer ) + '&Filter=' + EncodeArray( filter ) + '&Sort=' + encodeURIComponent( sort ) + '&Offset=' + encodeURIComponent( offset ) + '&Count=' + encodeURIComponent( count ), delegator ); }
Comment
Comment