Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

customizing orders_list with colors

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 10-15-2015, 05:46 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: customizing orders_list with colors

I doubt you can find any documentation on the "core.microhandlers.add" function in Internet - this is a new piece of code that exists in X-Cart 5 only.

As for the source code - there is a lot of *.js files using the "core.microhandlers.add" function in the skins/admin/en/ and skins/default/en/ directories.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #12  
Old 10-23-2015, 05:55 AM
  Scott Godin's Avatar 
Scott Godin Scott Godin is offline
 

Advanced Member
  
Join Date: Aug 2014
Location: /diagonally parked in a parallel universe/
Posts: 68
 

Default Re: customizing orders_list with colors

Quote:
Originally Posted by qualiteam
I doubt you can find any documentation on the "core.microhandlers.add" function in Internet - this is a new piece of code that exists in X-Cart 5 only.

As for the source code - there is a lot of *.js files using the "core.microhandlers.add" function in the skins/admin/en/ and skins/default/en/ directories.

yes and I can pick up some of the details from that, but I was hoping someone had gotten around do doing a write up on how to properly use this function, for the wiki and for module authors...

as near as I can tell from looking at the console via the browser developer tools, I want my script to fire *after* 'list.model.table.initialize' mediator's event, in specific (which fires off after page load, post-search, and post-paginate) but I cannot tell by looking at the code, how to ensure my code fires in the correct order with the other scripts on the page using this
__________________
--
Scott Godin
Reply With Quote
  #13  
Old 10-25-2015, 11:50 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: customizing orders_list with colors

Hello Scott,

Did you try to use the microhandlers function? I believe it does exactly what you need - it looks for the specified jQuery selector after every page load / ajax reload and triggers the given JavaScript function over the found element.

Just make sure that you load your .js file with your code through getJSFiles() method of the PHP class that handles the widget that you need.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #14  
Old 10-26-2015, 08:03 AM
  Scott Godin's Avatar 
Scott Godin Scott Godin is offline
 

Advanced Member
  
Join Date: Aug 2014
Location: /diagonally parked in a parallel universe/
Posts: 68
 

Default Re: customizing orders_list with colors

Quote:
Originally Posted by qualiteam
Hello Scott,

Did you try to use the microhandlers function? I believe it does exactly what you need - it looks for the specified jQuery selector after every page load / ajax reload and triggers the given JavaScript function over the found element.

Just make sure that you load your .js file with your code through getJSFiles() method of the PHP class that handles the widget that you need.

if I'm reading things aright from the debugging console, the widget is TableItemsList, but since this is event-based programming, how do I determine WHEN my script fires for that widget, when I need it to fire AFTER certain other events have occurred? how do I specify that ? Just for the purpose of experimentation, how do I ensure that a script only fires immediately after 'list.model.table.initialize' mediator's event?

My point is, 'trying to use the microhandlers function' without more than cursory knowledge of its usage, is not likely to produce useful results, since i have no current knowledge of how to determine exactly where in the chain of events mine will fire.
__________________
--
Scott Godin
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:39 PM.

   

 
X-Cart forums © 2001-2020