Skip to content

Instantly share code, notes, and snippets.

View mabe-at's full-sized avatar

Matthias Bendel mabe-at

View GitHub Profile
@mabe-at
mabe-at / otrs_generic-agent_salearn.pl
Last active August 29, 2015 14:05
OTRS Generic Agent salearn
#!/usr/bin/perl -w
# use ../ as lib location
use File::Basename;
use FindBin qw($RealBin);
use lib dirname($RealBin);
use lib dirname($RealBin)."/Kernel/cpan-lib";
use strict;
# to get it readable for the webserver user and writable for otrs
# group (just in case)
umask 002;
@mabe-at
mabe-at / ffos_bb_nice.css
Created August 27, 2014 00:26
overriding building blocks css
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea {
-moz-box-sizing: border-box;
}
@mabe-at
mabe-at / ffos_input-reset.js
Last active August 29, 2015 14:05
Firefox OS Building Blocks Input Reset JS
// helper for iterating NodeList of element objects
var forEach = Array.prototype.forEach;
forEach.call(
document.querySelectorAll('form p input + button[type="reset"], form p textarea + button[type="reset"]'),
function( el ) {
el.addEventListener ('mousedown', function () {
var field = document.querySelector('input:focus , textarea:focus');
field.value = field.defaultValue;
});