Skip to content
Permalink
Browse files

fixed #3578 - ALL CODE: e, ui should be changed to event, ui

  • Loading branch information...
rdworth committed Nov 14, 2008
1 parent ed4f58c commit 7ea535fa1df43e8259ab9987a0e8e08866cfb1f5
@@ -73,7 +73,7 @@ $(document).ready(function() {
this.rotate();
this.rotate("right");

this.element.parent().bind("mousewheel", function(e,delta) {
this.element.parent().bind("mousewheel", function(event ,delta) {
if(self.autoRotator) window.clearInterval(self.autoRotator);
self.rotate(delta < 0 ? "right" : "left");
return false;
@@ -125,7 +125,7 @@
minHeight: 100,
resize: function(e, ui) {
resize: function(event, ui) {
var self = $(this).data("resizable");
this.style.backgroundPosition = '-' + (self.position.left) + 'px -' + (self.position.top) + 'px';
@@ -138,7 +138,7 @@
$("#log-width").html(self.size.width+"px");
},
stop: function(e, ui) {
stop: function(event, ui) {
var self = $(this).data("resizable");
this.style.backgroundPosition = (self.position.left * -1) + 'px ' + (self.position.top * -1) + 'px';
}
@@ -150,7 +150,7 @@
containment: $('#resizeme_containment_div_wrapper'),
drag: function(e, ui) {
drag: function(event, ui) {
var self = $(this).data("draggable");
this.style.backgroundPosition = (self.position.left * -1) + 'px ' + (self.position.top * -1) + 'px';
@@ -160,7 +160,7 @@
});
$('.thumbs').find("li a").click(function(e){
$('.thumbs').find("li a").click(function(event){
$('#resizeme_containment_div').css('top', '0');
@@ -43,15 +43,15 @@
item.remove();
};

function sortableChange(e, ui) {
function sortableChange(event, ui) {
if(ui.sender){
var w = ui.element.width();
ui.placeholder.width(w);
ui.helper.css("width",ui.element.children().width());
}
};

function sortableUpdate(e, ui) {
function sortableUpdate(event, ui) {
if(ui.element[0].id == 'trashcan'){
emptyTrashCan(ui.item);
} else {
@@ -87,12 +87,12 @@
//placeholder: 'clone',
//placeholder: 'placeholder',
connectWith: els,
start: function(e,ui) {
start: function(event,ui) {
ui.helper.css("width", ui.item.parent().width());
},
change: sortableChange,
update: sortableUpdate
}).bind("sortreceive", function(e, ui) {
}).bind("sortreceive", function(event, ui) {
$(ui.item).removeClass('ui-draggable').find('dt').each(addControls);
});
$('#components > dl').draggable({
@@ -119,7 +119,7 @@ $(window).bind('load', function() {
});


var sliderChange = function(e, ui){
var sliderChange = function(event, ui){
$('.img_content').each(function(index, item){
var _new = 1.44 * $('#sliderSize').slider("value");

@@ -98,7 +98,7 @@ <h1>Slider Interface Example</h1>
min: 0,
max: 100,
range: true,
change: function(e, ui) {
change: function(event, ui) {
var minValue = $('#slider1').slider('value', 0);
var maxValue = $('#slider1').slider('value', 1);
$('#col-2 div').each(function(){
@@ -291,7 +291,7 @@ test("{ cursor: 'move' }", function() {

el = $("#draggable2").draggable({
cursor: expected,
start: function(e, ui) {
start: function(event, ui) {
actual = getCursor();
}
});
@@ -316,7 +316,7 @@ test("{ cursorAt: { left: -5, top: -5 } }", function() {
var actual = null;
$("#draggable2").draggable({
cursorAt: { left: cax, top: cay },
drag: function(e, ui) {
drag: function(event, ui) {
actual = ui.absolutePosition;
}
});
@@ -340,7 +340,7 @@ test("{ cursorAt: { left: -5, top: -5 } }", function() {
var actual = null;
$("#draggable1").draggable({
cursorAt: { left: cax, top: cay },
drag: function(e, ui) {
drag: function(event, ui) {
actual = ui.absolutePosition;
}
});
@@ -422,7 +422,7 @@ test("{ opacity: 0.5 }", function() {
var opacity = null;
el = $("#draggable2").draggable({
opacity: 0.5,
start: function(e, ui) {
start: function(event, ui) {
opacity = $(this).css("opacity");
}
});
@@ -442,7 +442,7 @@ test("{ zIndex: 10 }", function() {
var zIndex = null;
el = $("#draggable2").draggable({
zIndex: expected,
start: function(e, ui) {
start: function(event, ui) {
actual = $(this).css("zIndex");
}
});
@@ -566,7 +566,7 @@ test("{ helper: 'clone' }, absolute", function() {
var helperOffset = null;
var origOffset = $("#draggable1").offset();

el = $("#draggable1").draggable({ helper: "clone", drag: function(e, ui) {
el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) {
helperOffset = ui.helper.offset();
} });

@@ -582,7 +582,7 @@ test("{ helper: 'clone' }, absolute with scroll offset on parent", function() {
var helperOffset = null;
var origOffset = $("#draggable1").offset();

el = $("#draggable1").draggable({ helper: "clone", drag: function(e, ui) {
el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) {
helperOffset = ui.helper.offset();
} });

@@ -599,7 +599,7 @@ test("{ helper: 'clone' }, absolute with scroll offset on root", function() {
var helperOffset = null;
var origOffset = $("#draggable1").offset();

el = $("#draggable1").draggable({ helper: "clone", drag: function(e, ui) {
el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) {
helperOffset = ui.helper.offset();
} });

@@ -617,7 +617,7 @@ test("{ helper: 'clone' }, absolute with scroll offset on root and parent", func
var helperOffset = null;
var origOffset = $("#draggable1").offset();

el = $("#draggable1").draggable({ helper: "clone", drag: function(e, ui) {
el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) {
helperOffset = ui.helper.offset();
} });

@@ -649,7 +649,7 @@ test("#2965 cursorAt with margin", function() {
var actual, expected;
$("#draggable2").draggable({
cursorAt: { left: ox, top: oy },
drag: function(e, ui) {
drag: function(event, ui) {
actual = ui.absolutePosition;
}
});
@@ -41,7 +41,7 @@ function assertChange(stepping, start, result, action) {
startValue: start,
min: 0,
max: 1000,
change: function(e, ui) {
change: function(event, ui) {
equals(ui.value, result, "changed to " + ui.value);
}
});
@@ -135,7 +135,7 @@ test("defaults", function() {
test("#3019: Stop fires too early", function() {

var helper = null;
el = $("#sortable").sortable({ stop: function(e, ui) {
el = $("#sortable").sortable({ stop: function(event, ui) {
helper = ui.helper;
}});

@@ -47,7 +47,7 @@
// Two methods of adding external items to the spinner
//
// method 1: on initalisation call the add method directly and format html manually
init: function(e, ui) {
init: function(event, ui) {
for (var i=0; i<itemList.length; i++) {
ui.add('<a href="'+ itemList[i].url +'" target="_blank">'+ itemList[i].title +'</a>');
}
@@ -59,19 +59,19 @@
},
// callbacks
's6': {
init: function(e, ui) {
init: function(event, ui) {
console.log('init: '+ ui.value);
},
up: function(e, ui) {
up: function(event, ui) {
console.log('up: '+ ui.value);
},
down: function(e, ui) {
down: function(event, ui) {
console.log('down: '+ ui.value);
},
spin: function(e, ui) {
spin: function(event, ui) {
console.log('spin: '+ ui.value);
},
change: function(e, ui) {
change: function(event, ui) {
console.log('change: '+ ui.value);
}
}
@@ -80,7 +80,7 @@
for (var n in opts)
$("#"+n).spinner(opts[n]);
$("button").click(function(e){
$("button").click(function(event){
var ns = $(this).attr('id').match(/(s\d)\-(\w+)$/);
if (ns != null)
$('#'+ns[1]).spinner( (ns[2] == 'create') ? opts[ns[1]] : ns[2]);
@@ -66,7 +66,7 @@ $.widget("ui.accordion", {
var self=this;
options.headers
.attr('role','tab')
.bind('keydown', function(e) { return self._keydown(e); })
.bind('keydown', function(event) { return self._keydown(event); })
.next()
.attr('role','tabpanel');

@@ -96,17 +96,17 @@ $.widget("ui.accordion", {
}
},

_keydown: function(e) {
if (this.options.disabled || e.altKey || e.ctrlKey)
_keydown: function(event) {
if (this.options.disabled || event.altKey || event.ctrlKey)
return;

var keyCode = $.keyCode;

var length = this.options.headers.length;
var currentIndex = this.options.headers.index(e.target);
var currentIndex = this.options.headers.index(event.target);
var toFocus = false;

switch(e.keyCode) {
switch(event.keyCode) {
case keyCode.RIGHT:
case keyCode.DOWN:
toFocus = this.options.headers[(currentIndex + 1) % length];
@@ -117,11 +117,11 @@ $.widget("ui.accordion", {
break;
case keyCode.SPACE:
case keyCode.ENTER:
return clickHandler.call(this.element[0], { target: e.target });
return clickHandler.call(this.element[0], { target: event.target });
}

if (toFocus) {
$(e.target).attr('tabIndex','-1');
$(event.target).attr('tabIndex','-1');
$(toFocus).attr('tabIndex','0');
toFocus.focus();
return false;

0 comments on commit 7ea535f

Please sign in to comment.
You can’t perform that action at this time.