User login

JavaScript

Testing an image file upload for Drupal 8 with Behat, maddeningly requiring a web driver with JavaScript

For a how-to, see Using JavaScript in Behat tests (manual steps for installing, running).

For my stumbling around in the dark... read on.

On the unenviable proposition of having to add JavaScript support to Behat

behat mink extension cannot find fields

JavaScript to open external sites (not on domain or subdomain) in new target

It's bad Web practice to open any links in a separate window, but it does help when going for an HTML mobile app and it's becoming accepted expected behavior for anything with a stream.

So here's the JavaScript:

Translation for a Modern Web Application: Gettext

"The domain setting is which group inside of locale_data that the keys will be looked up in."

seems one can switch the domain application wide (so we would have Gyms, Skiing, Hotels as domains) but i'm not 100% sure about that. But it's not very recommended-- see http://stackoverflow.com/questions/9668471/use-multiple-domains-in-gettext-in-a-php-application

Approaches to in-line editing with a few different JavaScript front-end frameworks

Doesn't seem to be a question of the framework, to judge from the lack of anyone asking or answering the question this way...

http://stackoverflow.com/questions/708801/whats-the-best-edit-in-place-plugin-for-jquery

Define and Use a JQuery Plugin as a Helper Function for Drupal JavaScript

Here's the basics of defining and using a JQuery plugin within the context of Drupal.

This is definitely not the best and highest use of a plugin, and may in fact be a downright abomination-- this isn't a plugin that really works outside the context of the code it is written for, and certainly not outside Drupal. But it was a clean way to abstract out 42 lines of code, so here it is, for the enjoyment of all.

The first part here is simply how to call JQuery from Drupal, the second part is the plugin.

Raphael – Introduction by

Raphael: vector graphics.

Browser support for everything from IE6 (really) to Android (post Honeycomb).

20kb gzipped Javascript.

Completely different thing from HTML5 <canvas>.

Raphael has a low z-index, other things will appear in front of it, by default.

Can select by ID.

Can even use the JQuery selector.

Fonts

Can get fonts with Cufon. [Hmm. I think i'd avoid putting any fonts in here, a drawing program, and avoid Cufon in favor of @fontface anyway.)

CSS and JavaScript aggregation in Drupal 7

stefan:h ave you noticed that javascript and css aggregation does not work as expected on dgd7.org.
17:28 mlncn: how do you expect it to work? they changed it in D7, mostly for the better
17:28 stefan-agaric: there's 3 css and 2 js that seems to be created by it.
17:28 mlncn: there's more files, but they aren't recreated as often
17:28 stefan-agaric: what's the point?
17:29 mlncn: or rather, i should say, there's more files per page but fewer files when browsing around the site
17:29 stefan-agaric: we only need one.

Syndicate content