lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

Deprecated functions being used in admin javascript #660

Closed tylerforesthauser closed 2 years ago

tylerforesthauser commented 9 years ago

I've noticed that much of the javascript for the admin area of the web store uses the deprecated jQuery .live() function. For those of us wishing to use newer versions of jQuery (Bootstrap 3.0.0+ requires jQuery 1.9.0+, for instance), we aren't able to because it will break functionality of the admin area...

...not to mention, there is actually a minified copy of jQuery 1.9.1 in the very same javascript assets folder as the guilty files.

The guilty files I've found are as follows:

/core/protected/modules/admin/assets/js/destinationrates.js - line 6
/core/protected/modules/admin/assets/js/edit.js - line 8
/core/protected/modules/admin/assets/js/integratedcats.js - line 9, 17, 18, 19, 20, 21, and 22
/core/protected/modules/admin/assets/js/pay.js - line 8
/core/protected/modules/admin/assets/js/promoset.js - line 69
/core/protected/modules/admin/assets/js/resetpw.js - line 8
/core/protected/modules/admin/assets/js/shippingrestrictions.js - line 69
/core/protected/modules/admin/assets/js/tiers.js - line 6
/core/protected/modules/admin/assets/js/wishlist.js - line 8

Switching each instance of .live() to .on() corrects the issue.

Not having to manually do this for each installation would be cool. :stuck_out_tongue_winking_eye:

gabeguz commented 9 years ago

Thanks @tylerforesthauser we're tracking this internally as WS-4280