Notes

Linux, WebDev and other…

javascript

Confirm form submit using bootbox modal for Laravel resource deletion

I’m currently playing with Laravel and it’s resourceful controllers. Resource deletion is made by DELETE request (which, by the way, is not available from HTML forms and it’s actually POST with “_method” key). So delete button must be submit button wrapped in form. I wanted to add customizable confirm question for resources deletion using bootbox plugin. […]

, , , , ,

TCX workouts map

I wanted to put all my workouts from endomondo on single map. First, I exported all workouts as TCX files using endomondo-export python script. Then, I created this simple tool to visualise workouts on google maps.  Tools and technology Google Maps Javascript API was used to render workouts Jquery was used for TCX parsing and DOM […]

, , , ,

Google Maps – handling huge amount of markers

Problem We have a huge amount of markers and we want to display it to user using google maps.  Solution use ajax requests to fetch markers only for area visible by user display message “please zoom in”, if we have too many markers (let’s say that limit is 500) use MarkerClustererPlus to display fetched markers […]

, , ,

Alert popup view for Backbone with jQuery Mobile

Here is a backbone view for alert popups in jquery mobile. General information about mixing backbone with jquery mobile is here. I just use it like bootstrap, but in the end of render function I manually call $el.trigger(‘create’) to initialize markup (I don’t have fancy page transitions).

, , ,

Collection pagination view for Backbone with jQuery Mobile

Here is a view that listens to backbone collection “reset” event and renders/refreshes pagination. Template is based on jquery mobile, but can be easily changed. General information about mixing backbone with jquery mobile is here. I just use it like bootstrap, but in the end of render function I manually call $el.trigger(‘create’) to initialize markup […]

, , ,