YOUWEB.ru

BUEditor

Смайлы модуля Smileys в виде кнопки BUEditor / Drupal6 / Bueditor 6.x-2.x

Posted On: сб, 2010-01-23 15:56 by OFF

Код кнопки:

php: $L = drupal_to_js(_smileys_list()); $P = base_path(); drupal_add_js("(function($){ var click = function() { BUE.active.replaceSelection(this.firstChild.alt, 'end'); return false; }; var map = function(s) { return $('').css('margin', '0.5em').click(click)[0]; }; var links = $.map($L, map); BUE.smlyWrap = function() { return $('

').append(links); }; })(jQuery);", 'inline');

Смайлы модуля Smileys в виде кнопки BUEditor / код Drupal6 / Bueditor 6.x-1.x

Posted On: вт, 2009-07-07 14:25 by OFF

код кнопки:

php: $L = drupal_to_js(_smileys_list()); $P = base_path(); drupal_add_js(" var smlyList = $L, smlyPath = '$P'; var smlyWrap = \$('

'); \$.each(smlyList, function(i, s) {\$('').css('margin', '0.5em').appendTo(smlyWrap)}); ", 'inline'); return 'js: editor.dialog.open("Smileys"); $("tr.body>td", editor.dialog.popup).empty().append(smlyWrap);

( categories: )