|
|
|
|
@ -6,12 +6,15 @@ $(document).ready(function($){ |
|
|
|
|
} else { |
|
|
|
|
$('.sidebar .panel-body .img-circle').parent().parent().after('<div class="enjoy-cardgame-active" onClick="installCardView()" ></div>'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* This function inserts the <article> element 'home-card' for the card game |
|
|
|
|
* before the .page-content element on the page (the right side of the |
|
|
|
|
* "my courses" page) only if the element with id 'home-card' does not exist |
|
|
|
|
* yet. |
|
|
|
|
*/ |
|
|
|
|
function installCardView(){ |
|
|
|
|
|
|
|
|
|
if (!document.getElementById("home-card")) { |
|
|
|
|
var mess1 = $("#cardgamemessage").html(); |
|
|
|
|
var h = '<article id="home-card" style="border:solid 1px gray;" >'; |
|
|
|
|
@ -58,7 +61,7 @@ function installCardView(){ |
|
|
|
|
$('.page-content').before(h); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
$('#home-card').fadeOut(); |
|
|
|
|
$('#home-card').fadeToggle(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ -168,6 +171,9 @@ function randomOpenCardView(){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* This function changes the visibility of blocks inside the puzzle area |
|
|
|
|
*/ |
|
|
|
|
function onlyOpenCardView(){ |
|
|
|
|
|
|
|
|
|
installCardView(); |
|
|
|
|
|