Saving minor changes, deleted comments, stuck at drag n drop

This commit is contained in:
Zanz2 2018-08-20 13:45:43 +02:00
parent 1159a32ce2
commit 91f112dc38
2 changed files with 5 additions and 14 deletions

View file

@ -12,23 +12,13 @@
$('.popover_v2').each(function(i,obj) {
var link = $(obj).data('popoverlink')
var text_data = $(obj).data('popovercontent')
/* Testing
var needed_attribute = $(obj).attr("data-content");
if (typeof needed_attribute !== typeof undefined && needed_attribute !== false && needed_attribute !== "") {
// Do nothing, will negate the above logic later
}else{
$(obj).attr( "data-content","content" )
// without a data-content attribute in its parent element, the popover will NEVER render
// it assumes it is empty because I fill data trough the template.
}
*/
$(obj).popover({
html: true,
container: 'body',
placement: 'auto right',
trigger: 'manual',
content: 'should never be empty',
content: 'popovers will not display if empty',
template: '<div class="popover popover_'+i+'_window" role="tooltip" style="background-color:#F0F0F0;font-family:Lato;font-size:14px;" color="#000000" >' +
'<div class="popover-body" >' + text_data + '</div>' +
'<br><br><br>' +
@ -53,6 +43,7 @@
$(".popover_"+i+"_window").on("mouseenter", function () {
$(".popover_"+i+"_window").css("background-color","#DADADA");
});
}
}, 1000);
}).on("mouseleave", function () {

View file

@ -10,12 +10,12 @@
>
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post" do |f| %>
<% if can_manage_experiment?(@experiment) %>
<%=link_to "", type: "button", class: "btn btn-primary popover_v2", id: "canvas-new-module" do %>
<span class="hbtn-default popover_v2">
<%=link_to "", type: "button", class: "btn btn-primary", id: "canvas-new-module" do %>
<span class="hbtn-default">
<span class="glyphicon glyphicon-credit-card"></span>
<%= t("experiments.canvas.edit.new_module") %>
</span>
<span class="hbtn-hover popover_v2">
<span class="hbtn-hover">
<span class="glyphicon glyphicon-credit-card"></span>
<em class="hidden-xs"><%= t("experiments.canvas.edit.new_module_hover") %></em>
<span class="visible-xs-inline"><%= t("experiments.canvas.edit.new_module") %></span>