drupal.js

kkaefer's picture

Idea: General structure of the new drupal.js

Some of my ideas for the future drupal.js:

Note: This is demo/fake code, not actual, working code.

var Drupal = {
  jsEnabled: false,
  basePath: 'http://example.com/drupal',
  locales: {},
  settings: {},

addLocales: function(translations) { ... }, t: function(str, args) { ... }, watchdog: function(type, message, severity, link) { ... }, parseJson: function(data) { ... } };

jQuery.dimensions = function() { ... }; jQuery.absolutePosition = function() { ... }; jQuery.freezeHeight = function() { ... }; jQuery.redirectFormButton = function() { ... };

1 comment · Read more
Syndicate content