groups/modules/commons/commons_topics/js/commons_topics.js
Marton Kiss 8ac59801be Refactor commons build process
Update commons modules to release 7.12, and move the codebase under
modules/commons instead of constant fetching from remote repository.
The commons.make file removed so it is not required to rebuild
groups distribution.

Change-Id: I3be393ba1af34427e2915b18ab1ad718fd4e54db
2014-05-28 15:58:33 +02:00

16 lines
530 B
JavaScript

(function ($) {
Drupal.behaviors.commons_topics_update_legend = {
attach: function (context, settings) {
$(':input[name^="field_topics"]').change(function() {
if ($(':input[name^="field_topics"]').val() == "") {
$("[id^='edit-topics-wrapper'] .summary").text(Drupal.t("No topics"));
}
else {
$("[id^='edit-topics-wrapper'] .summary").text($(':input[name^="field_topics"]').val());
}
});
$(':input[name^="field_topics"]').change();
}
};
})(jQuery);