environment_notification_plugin.js
912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(function($) {
"use strict";
function notificationBar() {
var completeMessage = $(".notification-bar").remove();
$("#content-inner").before(completeMessage);
},
function hideNotification(){
var notification = $(this).parent();
var id = notification.attr("data-notification");
$.ajax({
url: noosfero_root()+"/admin/plugin/environment_notification/hide_notification",
type: "POST",
data: {notification_id: id},
success: function(response) {
notification.fadeOut();
}
});
}
function mceRestrict() {
tinyMCE.init({
menubar : false,
selector: "textarea",
plugins: [
"autolink link"
],
toolbar: "bold italic underline | link"
});
}
jQuery(document).ready(function(){
notificationBar();
$(".notification-close").on("click", hideNotification);
mceRestrict();
});
})(jQuery);