Skip to content

Commit

Permalink
Merge pull request #478 from FelixSchwarz/jquery-noconflict-compatibi…
Browse files Browse the repository at this point in the history
…lity

enable compatibility with jQuery's "noConflict" mode in contentchooser.js
  • Loading branch information
rodfersou committed Feb 23, 2015
2 parents 54c3a2f + de379ff commit 95c3e64
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/collective/cover/static/contentchooser.js
@@ -1,3 +1,4 @@
(function ($) {
var ajaxSearchRequest = [];
function contentSearchFilter(url) {
var queryVal = $("#contentchooser-content-search-input").val();
Expand All @@ -15,16 +16,14 @@ function contentSearchFilter(url) {
return false;
}

(function ($) {
$.fn.liveDraggable = function (opts) {
$(document).on("mouseover", this.selector, function() {
if (!$(this).data("init")) {
$(this).data("init", true).draggable(opts);
}
});
return $();
};
}(jQuery));
$.fn.liveDraggable = function (opts) {
$(document).on("mouseover", this.selector, function() {
if (!$(this).data("init")) {
$(this).data("init", true).draggable(opts);
}
});
return $();
};


function contentchooserMaker(options) {
Expand Down Expand Up @@ -172,6 +171,7 @@ $(function() {
});

});
}(jQuery));


var coveractions = {
Expand Down Expand Up @@ -380,6 +380,7 @@ var coveractions = {
coveractions.preInit();


(function ($) {
function filterOnKeyUp() {
$("#contentchooser-content-search-button").css("display", "none");
$(".contentchooser-content-trees").keyup(function() {
Expand All @@ -395,3 +396,4 @@ function filterOnKeyUp() {
$(document).ready(function() {
filterOnKeyUp();
});
}(jQuery));

0 comments on commit 95c3e64

Please sign in to comment.