Piecemaker.js 677 B

1234567891011121314151617181920212223
  1. (function ($) {
  2. Drupal.behaviors.Piecemaker = {
  3. attach: function (context, settings) {
  4. $.each(settings.Piecemaker, function($id, $piecemaker) {
  5. Drupal.Piecemaker.embed($id, $piecemaker, settings);
  6. });
  7. }
  8. }
  9. Drupal.Piecemaker = {
  10. embed: function($id, $piecemaker, settings) {
  11. $attributes = {
  12. id: $id + '-flash',
  13. styleclass: 'piecemaker ' + $id + '-style',
  14. name: $id,
  15. };
  16. $url = settings.Piecemaker_URI + '/piecemaker.swf';
  17. swfobject.embedSWF($url , $id, $piecemaker.width, $piecemaker.height, '10', false, $piecemaker.flashvars,
  18. $piecemaker.params, $attributes);
  19. },
  20. }
  21. })(jQuery);