abidibo.net

Weblog

Drag and drop touch compatible with mootools

drag&drop javascript mobile mootools

Drag and drop is a nice feature which often can increase the usability of our web applications. Mootools has a good support for drag and drop in the more package, which actually works well for desktop environments.

But unfortunately we are in 2014, and now targeting our apps for desktop only is something which should be avoided except if we are sure no one will use them with mobile or tablets.

So the problem is, how to extend the drag ...

read the full post


AWR - abidibo's web radio software

awr gtk python software

Today I'll introduce you AWR, my first python/GTK software which actually acts as an interface to mplayer in order to manage web radio streams.

AWR is a free, open source, python project, the code is hosted on github, feel free to use, fork, contribute and so on...

License

© 2013 Stefano Contini - MIT License (http://opensource.org/licenses/MIT).

Features

  • The web radios appearing in the interface inside genre-tabs are configurable through a simple json file, you can add ...

read the full post


Wordevents boosted up

javascript mootools wordevents

Wordevents is a mootools plugin which allows to listen for word typed events, and execute given callbacks if the word belongs to a given dictionary. Till release 0.1.x it the dictionary could be only filled with strings, which represent the words to listen for. Now things are different.

Improvements

Wordevents accepts as an option a function which says if the typed character should be considered or not, allowing to consider only a certain set of characters (i.e ...

read the full post



About responsive tables

css3 html5 responsive-design

2013 was the year of responsive design. And 2014 too.

There are many html5/css3 frameworks which provide components, css classes, js libraries etc... that you can use to speed up the process of creating a good and responsive web interface.

There is a sort of vacuum indeed, when dealing with html tables. Do not get me wrong, this is not a fault of the frontend frameworks, but it is an intrinsic problem, due to the nature of tables. The ...

read the full post


How to get the mouseovered half of an element

events javascript

Today I'll write a very simple and short post about a very simple function that you can use to retrieve in which half (left/right) of an element the mouse is moving towards. The function is written in vanilla javascript, no frameworks are involved.

Given the element which captures the event and the event itself the function return the string 'left' or 'right' depending on the cursor position over the element.

/*
 * Gets the mouseovered half of an element
  ...

read the full post


Singleton, the PHP way

patterns php programming singleton

I realized that even if the great part of my work consists in programming PHP stuff, I rarely write about PHP in my posts, maybe because I really don't like it?

But today I'll write about a way to implement the singleton pattern with PHP.

This is quite an easy job making use of PHP 5.3.0, thanks to the "Late Static Binding" feature. In particular we'll use the get_called_class method and the static keyword. Notice that ...

read the full post


Javascript frameworks are really powerful, when you need them

javascript jquery mootools performance programming testing

Introduction

I've always used some kind of javascript framework when developing frontend stuffs. Mootools, jQuery, extjs and friends. All such frameworks provide a set of useful functionality, but above all in my opinion, they provide what is crucial for a web developer: cross browser compatibility.
The time you'll spend in writing cross browser code, even for a small project, is huge, especially if your software must support IE<9, and especially at the beginning, since you need to learn all browser ...

read the full post


Javascript event dispatcher

javascript programming

Update 11/2017

This ideas finally became a npm package: js-event-dispatcher

Introduction

Too much time has passed since my last post, so today I'll write about a simple javascript component, an event dispatcher which allows two entities to communicate each other.

The simplest use case I can think of is the one in which we have an object which emits an event and another object which should listen to such event.

We could implement all the stuff without the event ...

read the full post


Playing with tideSDK, create a brightness controller for fluxbox

applications fluxbox tideSDK

My ubuntu machine running fluxbox has all the features I desire. I've set up all kinds of short-cuts, menu and so on..., I've written my scripts to toggle between the notebook LCD and external monitors and I'm very happy with it. One thing more which I wanted was a brigthness control widget, but at the same time I disliked to install gnome or kde packages, and I could live simply with xbacklight and its get and set options. So what I needed is a simple interface to controll the xbacklight command.

And here comes tideSDK. After some reading about xlib and watching some examples I understood that now I don't have enough time to dive into it, so I decided ...

read the full post


Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!

Featured