Convert CofeeScript to JavaScript

Compiled using `coffee -c` with CoffeeScript 1.12.6.
This commit is contained in:
Javi Martín
2019-07-03 00:11:16 +02:00
parent 2ff2100ebb
commit d93a029ce5
121 changed files with 2428 additions and 1924 deletions

View File

@@ -0,0 +1,38 @@
// Generated by CoffeeScript 1.12.6
(function() {
"use strict";
App.LegislationAllegations = {
toggle_comments: function() {
if (!App.LegislationAnnotatable.isMobile()) {
$(".draft-allegation").toggleClass("comments-on");
return $("#comments-box").html("").hide();
}
},
show_comments: function() {
if (!App.LegislationAnnotatable.isMobile()) {
return $(".draft-allegation").addClass("comments-on");
}
},
initialize: function() {
$(".js-toggle-allegations .draft-panel").on({
click: function(e) {
e.preventDefault();
e.stopPropagation();
if (!App.LegislationAnnotatable.isMobile()) {
return App.LegislationAllegations.toggle_comments();
}
}
});
return $(".js-toggle-allegations").on({
click: function() {
if (!App.LegislationAnnotatable.isMobile()) {
if ($(this).find(".draft-panel .panel-title:visible").length === 0) {
return App.LegislationAllegations.toggle_comments();
}
}
}
});
}
};
}).call(this);