Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

support jQuery.noConflict for hostile environments towards the $

  • Loading branch information...
commit f32c8a965a630dfe8d0f1b0da66bdc85aace5b96 1 parent 737db24
@brandonaaron brandonaaron authored mleibman committed
View
28 slick.editors.js
@@ -71,7 +71,7 @@
var scope = this;
this.init = function() {
- $input = $("<INPUT type=text class='editor-text' />");
+ $input = jQuery("<INPUT type=text class='editor-text' />");
if (value != null)
{
@@ -127,7 +127,7 @@
var scope = this;
this.init = function() {
- $input = $("<INPUT type=text class='editor-text' />");
+ $input = jQuery("<INPUT type=text class='editor-text' />");
if (value != null)
{
@@ -185,7 +185,7 @@
var scope = this;
this.init = function() {
- $input = $("<INPUT type=text class='editor-text' />");
+ $input = jQuery("<INPUT type=text class='editor-text' />");
if (value != null)
{
@@ -244,7 +244,7 @@
var scope = this;
this.init = function() {
- $select = $("<SELECT tabIndex='0' class='editor-yesno'><OPTION value='yes'>Yes</OPTION><OPTION value='no'>No</OPTION></SELECT>");
+ $select = jQuery("<SELECT tabIndex='0' class='editor-yesno'><OPTION value='yes'>Yes</OPTION><OPTION value='no'>No</OPTION></SELECT>");
if (defaultValue)
$select.val('yes');
@@ -295,7 +295,7 @@
var scope = this;
this.init = function() {
- $select = $("<INPUT type=checkbox value='true' class='editor-checkbox' hideFocus>");
+ $select = jQuery("<INPUT type=checkbox value='true' class='editor-checkbox' hideFocus>");
if (defaultValue)
$select.attr("checked", "checked");
@@ -347,7 +347,7 @@
var scope = this;
this.init = function() {
- $input = $("<INPUT type=text class='editor-percentcomplete' />");
+ $input = jQuery("<INPUT type=text class='editor-percentcomplete' />");
if (value != null)
{
@@ -358,7 +358,7 @@
$input.width($container.innerWidth() - 25);
$input.appendTo($container);
- $picker = $("<div class='editor-percentcomplete-picker' />").appendTo($container);
+ $picker = jQuery("<div class='editor-percentcomplete-picker' />").appendTo($container);
$picker.append("<div class='editor-percentcomplete-helper'><div class='editor-percentcomplete-wrapper'><div class='editor-percentcomplete-slider' /><div class='editor-percentcomplete-buttons' /></div></div>");
@@ -376,8 +376,8 @@
});
$picker.find(".editor-percentcomplete-buttons button").bind("click", function(e) {
- $input.val($(this).attr("val"));
- $picker.find(".editor-percentcomplete-slider").slider("value", $(this).attr("val"));
+ $input.val(jQuery(this).attr("val"));
+ $picker.find(".editor-percentcomplete-slider").slider("value", jQuery(this).attr("val"));
})
};
@@ -398,7 +398,7 @@
};
this.getValue = function() {
- var val = $.trim($input.val());
+ var val = jQuery.trim($input.val());
return (val == "") ? 0 : parseInt($input.val(), 10);
};
@@ -428,7 +428,7 @@
var scope = this;
this.init = function() {
- $input = $("<INPUT type=text class='editor-text' />");
+ $input = jQuery("<INPUT type=text class='editor-text' />");
if (value != null)
{
@@ -490,7 +490,7 @@
var scope = this;
this.init = function() {
- $input = $("<INPUT type=text class='editor-text' />");
+ $input = jQuery("<INPUT type=text class='editor-text' />");
var resources = dataContext ? dataContext["resources"] : null;
@@ -526,7 +526,7 @@
var names = $input.val().split(",");
for (var i = 0; i < names.length; i++)
- names[i] = $.trim(names[i]);
+ names[i] = jQuery.trim(names[i]);
return names;
};
@@ -574,7 +574,7 @@
}
this.init = function() {
- $input = $("<IMG src='../images/bullet_star.png' align=absmiddle tabIndex=0 title='Click or press Space to toggle' />");
+ $input = jQuery("<IMG src='../images/bullet_star.png' align=absmiddle tabIndex=0 title='Click or press Space to toggle' />");
if (defaultValue)
$input.css("opacity", 1);
View
6 tests/dataview/dataview.js
@@ -1,3 +1,4 @@
+(function($) {
module("basic");
@@ -883,4 +884,7 @@ test("delete at the end", function() {
});
// TODO: paging
-// TODO: combination
+// TODO: combination
+
+
+})(jQuery);
View
5 tests/dataview/index.html
@@ -16,9 +16,10 @@ <h2 id="qunit-userAgent"></h2>
<script type="text/javascript" src="../../lib/qunit.js"></script>
<script type="text/javascript" src="../../lib/jquery-1.4.2.min.js"></script>
+<script type="text/javascript">
+ jQuery.noConflict();
+</script>
<script type="text/javascript" src="../../slick.model.js"></script>
-
-
<script type="text/javascript" src="dataview.js"></script>
View
3  tests/grid/grid.js
@@ -1,3 +1,5 @@
+(function($) {
+
var grid;
var el, offsetBefore, offsetAfter, dragged;
@@ -65,3 +67,4 @@ test("onColumnsResized is fired on column resize", function() {
});
+})(jQuery);
View
6 tests/grid/index.html
@@ -27,11 +27,11 @@ <h2 id="qunit-userAgent"></h2>
<script type="text/javascript" src="../../lib/jquery.rule-1.0.1.1-min.js"></script>
<script type="text/javascript" src="../../lib/jquery.simulate.js"></script>
<script type="text/javascript" src="../../lib/qunit.js"></script>
+<script type="text/javascript">
+ jQuery.noConflict();
+</script>
<script type="text/javascript" src="../../slick.model.js"></script>
<script type="text/javascript" src="../../slick.grid.js"></script>
-
-
-
<script type="text/javascript" src="grid.js"></script>
Please sign in to comment.
Something went wrong with that request. Please try again.