rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
}); | }).appendTo('body'); | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }); var el = $('<div></div>').dialog({ position: { my: "left top", at: "top left", of: parent } }); var dialog = el.closest('.ui-dialog'); var offset = dial... |
at: "top left", | at: "left top", | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }); var el = $('<div></div>').dialog({ position: { my: "left top", at: "top left", of: parent } }); var dialog = el.closest('.ui-dialog'); var offset = dial... |
var dialog = el.closest('.ui-dialog'); | var dialog = el.dialog('widget'); | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }); var el = $('<div></div>').dialog({ position: { my: "left top", at: "top left", of: parent } }); var dialog = el.closest('.ui-dialog'); var offset = dial... |
var parentOffset = parent.offset(); | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }); var el = $('<div></div>').dialog({ position: { my: "left top", at: "top left", of: parent } }); var dialog = el.closest('.ui-dialog'); var offset = dial... | |
same(offset.left, parentOffset.left); same(offset.top, parentOffset.top); | same(offset.left, 600); same(offset.top, 400); | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }); var el = $('<div></div>').dialog({ position: { my: "left top", at: "top left", of: parent } }); var dialog = el.closest('.ui-dialog'); var offset = dial... |
same(offset.left, parentOffset.left + parent.outerWidth()); same(offset.top, parentOffset.top + parent.outerHeight()); | var offset = dialog.offset(); same(offset.left, 610); same(offset.top, 410); | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }); var el = $('<div></div>').dialog({ position: { my: "left top", at: "top left", of: parent } }); var dialog = el.closest('.ui-dialog'); var offset = dial... |
addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_BUFFER, arg); | addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_TIME, arg); | return function(arg) { switch ($.fn.jwplayerUtils.typeOf(arg)) { case "function": addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_BUFFER, arg); break; default: return $.fn.jwplayerController.mediaInfo(player).buffer; } return jwplayer(player); }; |
return $.fn.jwplayerController.mediaInfo(player).buffer; | return $.fn.jwplayerController.mediaInfo(player).time; | return function(arg) { switch ($.fn.jwplayerUtils.typeOf(arg)) { case "function": addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_BUFFER, arg); break; default: return $.fn.jwplayerController.mediaInfo(player).buffer; } return jwplayer(player); }; |
return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { | (function ($, fluid) { var STATE_INITIAL = "state_initial", STATE_CHANGED = "state_changed", STATE_REVERTED = "state_reverted"; function defaultRenderer(that, targetContainer) { var str = that.options.strings; var markup = "<span class='flc-undo'>" + "<a href='#' class='flc-undo-undoControl'>" + str.undo + "</a>" + ... | return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; }; |
edit(that); return true; | ); that.locate("redoControl").click( function () { if (that.state !== STATE_CHANGED) { that.component.updateModel(that.extremalModel, that); that.state = STATE_CHANGED; refreshView(that); that.locate("undoControl").focus(); } return false; } ); return { modelChanged: function (newModel, oldModel, source) { if (source !... | return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; }; |
}; fluid.undoDecorator = function (component, userOptions) { var that = fluid.initLittleComponent("undo", userOptions); that.container = that.options.renderer(that, component.container); fluid.initDomBinder(that); fluid.tabindex(that.locate("undoControl"), 0); fluid.tabindex(that.locate("redoControl"), 0); that.comp... | return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; }; | |
fluid.deadMansBlur(that.editField, $(editorBody), function () { that.cancel(); }); | return function () {return isEditing; }; | fluid.deadMansBlur(that.editField, $(editorBody), function () { that.cancel(); }); |
.bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); }); | (function($){$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false... | .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); }); |
return fluid.transform(sortrecs, function (row) {return row.index; }); | fluid.inlineEdit.FCKEditor.complete.addListener(function (editor) { var editField = editor.LinkedField; var that = $.data(editField, "fluid.inlineEdit.FCKEditor"); if (that && that.events) { that.events.afterInitEdit.fire(editor); } }); | return fluid.transform(sortrecs, function (row) {return row.index; }); |
var outer = fluid.findAncestor(event.target, function (elem) { if (/input|select|textarea|button|a/i.test(elem.nodeName) || elem === viewEl) {return true; } }); | function (event) { return guard(event); }); | var outer = fluid.findAncestor(event.target, function (elem) { if (/input|select|textarea|button|a/i.test(elem.nodeName) || elem === viewEl) {return true; } }); |
$(control).blur(function () { blurPending = true; setTimeout(function () { if (blurPending) { handler(control); | (function ($, fluid) { var STATE_INITIAL = "state_initial", STATE_CHANGED = "state_changed", STATE_REVERTED = "state_reverted"; function defaultRenderer(that, targetContainer) { var str = that.options.strings; var markup = "<span class='flc-undo'>" + "<a href='#' class='flc-undo-undoControl'>" + str.undo + "</a>" + ... | $(control).blur(function () { blurPending = true; setTimeout(function () { if (blurPending) { handler(control); } }, 150); }); |
}, 150); }); | return false; } ); that.locate("redoControl").click( function () { if (that.state !== STATE_CHANGED) { that.component.updateModel(that.extremalModel, that); that.state = STATE_CHANGED; refreshView(that); that.locate("undoControl").focus(); } return false; } ); return { modelChanged: function (newModel, oldModel, source... | $(control).blur(function () { blurPending = true; setTimeout(function () { if (blurPending) { handler(control); } }, 150); }); |
editables.each(function (idx, editable) { editors.push(fluid.inlineEdit($(editable), options)); }); | function () { if (that.state !== STATE_REVERTED) { fluid.model.copyModel(that.extremalModel, that.component.model); that.component.updateModel(that.initialModel, that); that.state = STATE_REVERTED; refreshView(that); that.locate("redoControl").focus(); } return false; } | editables.each(function (idx, editable) { editors.push(fluid.inlineEdit($(editable), options)); }); |
); that.locate("redoControl").click( function () { if (that.state !== STATE_CHANGED) { that.component.updateModel(that.extremalModel, that); that.state = STATE_CHANGED; refreshView(that); that.locate("undoControl").focus(); } return false; } ); return { modelChanged: function (newModel, oldModel, source) { if (source !... | function () { if (that.state !== STATE_REVERTED) { fluid.model.copyModel(that.extremalModel, that.component.model); that.component.updateModel(that.initialModel, that); that.state = STATE_REVERTED; refreshView(that); ... | |
that.events.afterBeginEdit.addListener(function () { var editor = tinyMCE.get(that.editField[0].id); if (editor) { focusEditor(editor); } | editables.each(function (idx, editable) { editors.push(fluid.inlineEdit($(editable), options)); | that.events.afterBeginEdit.addListener(function () { var editor = tinyMCE.get(that.editField[0].id); if (editor) { focusEditor(editor); } }); |
.bind('keydown', function(event) { return self._keydown(event); }) | (function($){$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false... | .bind('keydown', function(event) { return self._keydown(event); }) |
function (editor) { focusEditor(editor); } | fluid.inlineEdit.FCKEditor.complete.addListener(function (editor) { var editField = editor.LinkedField; var that = $.data(editField, "fluid.inlineEdit.FCKEditor"); if (that && that.events) { that.events.afterInitEdit.fire(editor); } }); | function (editor) { focusEditor(editor); } |
var tree = fluid.transform(opts.columnDefs, function (columnDef) { var ID = iDforColumn(columnDef, opts); var togo; if (!columnDef.components) { return { ID: ID, valuebinding: opts.EL }; | function (editor) { focusEditor(editor); | var tree = fluid.transform(opts.columnDefs, function (columnDef) { var ID = iDforColumn(columnDef, opts); var togo; if (!columnDef.components) { return { ID: ID, valuebinding: opts.EL }; } ... |
else if (typeof columnDef.components === 'function') { togo = columnDef.components(filteredRow.row, filteredRow.index); } else { togo = columnDef.components; } togo = expandPaths({}, togo, opts); togo.ID = ID; return togo; }); | var tree = fluid.transform(opts.columnDefs, function (columnDef) { var ID = iDforColumn(columnDef, opts); var togo; if (!columnDef.components) { return { ID: ID, valuebinding: opts.EL }; } ... | |
function (event) { return guard(event); }); | that.events.onBeginEdit.addListener(function () {isEditing = true; }); | function (event) { return guard(event); }); |
setTimeout(function () { if (blurPending) { handler(control); | function () { if (that.state !== STATE_REVERTED) { fluid.model.copyModel(that.extremalModel, that.component.model); that.component.updateModel(that.initialModel, that); that.state = STATE_REVERTED; refreshView(that); that.locate("redoControl").focus(); | setTimeout(function () { if (blurPending) { handler(control); } }, 150); |
}, 150); | return false; } | setTimeout(function () { if (blurPending) { handler(control); } }, 150); |
editField.focus(function () { editModeInstruction.show(); var editFieldPosition = editField.offset(); editModeInstruction.css({left: editFieldPosition.left}); editModeInstruction.css({top: editFieldPosition.top + editField.height() + 5}); }); | function () { if (that.state !== STATE_CHANGED) { that.component.updateModel(that.extremalModel, that); that.state = STATE_CHANGED; refreshView(that); that.locate("undoControl").focus(); } return false; } | editField.focus(function () { editModeInstruction.show(); var editFieldPosition = editField.offset(); editModeInstruction.css({left: editFieldPosition.left}); editModeInstruction.css({top: editFieldPosition.top + editField.height() + 5}); }); |
fluid.inlineEdit.FCKEditor.complete.addListener(function (editor) { | (function ($, fluid) { fluid.inlineEdit.makeViewAccessor = function (editorGetFn, setValueFn, getValueFn) { return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } return ""; } if (newValue) { setValueFn(edi... | fluid.inlineEdit.FCKEditor.complete.addListener(function (editor) { var editField = editor.LinkedField; var that = $.data(editField, "fluid.inlineEdit.FCKEditor"); if (that && that.events) { that.events.afterInitEdit.fire(editor); } }); |
fluid.inlineEdit.FCKEditor.blurHandlerBinder = function (that) { function focusEditor(editor) { editor.Focus(); } that.events.afterInitEdit.addListener( function (editor) { focusEditor(editor); } ); that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]... | fluid.inlineEdit.FCKEditor.complete.addListener(function (editor) { var editField = editor.LinkedField; var that = $.data(editField, "fluid.inlineEdit.FCKEditor"); if (that && that.events) { that.events.afterInitEdit.fire(editor); } }); | |
this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); }); | (function($){$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false... | this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); }); |
that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { | function (editor) { | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { focusEditor(editor); } }); |
} }); | } | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { focusEditor(editor); } }); |
var bigHeader = fluid.findAncestor(smallHeader, function (element) { return $(element).is(headerSortStylisticOffset); }); | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { focusEditor(editor); } }); | var bigHeader = fluid.findAncestor(smallHeader, function (element) { return $(element).is(headerSortStylisticOffset); }); |
that.events.onBeginEdit.addListener(function () {isEditing = true; }); | that.events.afterFinishEdit.addListener(function () {isEditing = false; }); | that.events.onBeginEdit.addListener(function () {isEditing = true; }); |
setTimeout(function () { that.editView.value(that.model.value); }, 1); | function () { if (that.state !== STATE_CHANGED) { that.component.updateModel(that.extremalModel, that); that.state = STATE_CHANGED; refreshView(that); that.locate("undoControl").focus(); } return false; } | setTimeout(function () { that.editView.value(that.model.value); }, 1); |
that.events.modelChanged.addListener(function () { | (function ($, fluid) { function sendKey(control, event, virtualCode, charCode) { var kE = document.createEvent("KeyEvents"); kE.initKeyEvent(event, 1, 1, null, 0, 0, 0, 0, virtualCode, charCode); control.dispatchEvent(kE); } fluid.setCaretToEnd = function (control, value) { var pos = value ? value.length : 0; try {... | that.events.modelChanged.addListener(function () { fluid.inlineEdit.updateTextEditButton(markup, that.model.value || opts.defaultViewText, opts.strings.textEditButton); }); |
if (outer === selector) { edit(); return false; } }; }; fluid.inlineEdit.defaultDisplayModeRenderer = function (that) { var styles = that.options.styles; var displayModeWrapper = fluid.inlineEdit.setupDisplayModeContainer(styles); var displayModeRenderer = that.viewEl.wrap(displayModeWrapper).parent(); that.textEdi... | that.events.modelChanged.addListener(function () { fluid.inlineEdit.updateTextEditButton(markup, that.model.value || opts.defaultViewText, opts.strings.textEditButton); }); | |
function (editor) { focusEditor(editor); } | return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } return ""; } if (newValue) { setValueFn(editField, editor, newValue); } else { return getValueFn(editor); } } }; }; | function (editor) { focusEditor(editor); } |
this.headers.each(function() { maxHeight -= $(this).outerHeight(); }); | (function($){$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false... | this.headers.each(function() { maxHeight -= $(this).outerHeight(); }); |
setTimeout(function () { editor.focus(); }, 0); | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { focusEditor(editor); } }); | setTimeout(function () { // CKEditor won't focus itself except in a timeout. editor.focus(); }, 0); |
return function () { if (columnDef.sortable === true) { var model = overallThat.model; var newModel = fluid.copy(model); var styles = overallThat.options.styles; var oldKey = model.sortKey; if (columnDef.key !== model.sortKey) { newModel.sortKey = columnDef.key; newModel.sortDir = 1; var oldBig = bigHeaderForKey(oldKey... | setTimeout(function () { editor.focus(); }, 0); | return function () { if (columnDef.sortable === true) { var model = overallThat.model; var newModel = fluid.copy(model); var styles = overallThat.options.styles; var oldKey = model.sortKey; if (columnDef.key !== model.sortKey)... |
that.events.afterFinishEdit.addListener(function () {isEditing = false; }); | return function () {return isEditing; }; | that.events.afterFinishEdit.addListener(function () {isEditing = false; }); |
setTimeout(function () { | (function ($, fluid) { function sendKey(control, event, virtualCode, charCode) { var kE = document.createEvent("KeyEvents"); kE.initKeyEvent(event, 1, 1, null, 0, 0, 0, 0, virtualCode, charCode); control.dispatchEvent(kE); } fluid.setCaretToEnd = function (control, value) { var pos = value ? value.length : 0; try {... | setTimeout(function () { that.editField.focus(); fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); } }, 0); |
that.events.afterBeginEdit.fire(); }; var clearEmptyViewStyles = function (textEl, defaultViewStyle, originalViewPadding) { textEl.removeClass(defaultViewStyle); textEl.css('padding-right', originalViewPadding); }; var showDefaultViewText = function (that) { that.displayView.value(that.options.defaultViewText); that.... | setTimeout(function () { that.editField.focus(); fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); } }, 0); | |
element.click(function (e) { triggerGuard(e); return false; }); | setTimeout(function () { that.editView.value(that.model.value); }, 1); | element.click(function (e) { triggerGuard(e); return false; }); |
setTimeout(function () { | (function ($, fluid) { function sendKey(control, event, virtualCode, charCode) { var kE = document.createEvent("KeyEvents"); kE.initKeyEvent(event, 1, 1, null, 0, 0, 0, 0, virtualCode, charCode); control.dispatchEvent(kE); } fluid.setCaretToEnd = function (control, value) { var pos = value ? value.length : 0; try {... | setTimeout(function () { that.editView.value(that.model.value); }, 1); |
switchToViewMode(that); that.events.afterFinishEdit.fire(that.model.value, that.model.value, that.editField[0], that.viewEl[0]); } }; var finish = function (that) { var newValue = that.editView.value(); var oldValue = that.model.value; var viewNode = that.viewEl[0]; var editNode = that.editField[0]; var ret = that.ev... | setTimeout(function () { that.editView.value(that.model.value); }, 1); | |
that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { focusEditor(editor); } }); | togo = togo.replace(/\<(\S+)[^\>\s]*\>/g, function(match) { return match.toLowerCase(); }); | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.FCKEditor.getEditor(that.editField[0]); if (editor) { focusEditor(editor); } }); |
that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.CKEditor.getEditor(that.editField[0]); if (editor) { fluid.inlineEdit.CKEditor.focus(editor); } }); | setTimeout(function () { editor.focus(); }, 0); | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.CKEditor.getEditor(that.editField[0]); if (editor) { fluid.inlineEdit.CKEditor.focus(editor); } }); |
return function () {return isEditing; }; | editables.each(function (idx, editable) { editors.push(fluid.inlineEdit($(editable), options)); }); | return function () {return isEditing; }; |
that.events.onBeginEdit.addListener(function () { isEditing = true; }); | setTimeout(function () { that.editView.value(that.model.value); }, 1); | that.events.onBeginEdit.addListener(function () { isEditing = true; }); |
fluid.activatable(element, function (event) { return guard(event); }); | setTimeout(function () { fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); } }, 0); | fluid.activatable(element, function (event) { return guard(event); }); |
fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); } }, 0); | that.editView.value(that.model.value); }, 1); | setTimeout(function () { fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); } }, 0); |
editor.focus(); }, 0); | tinyMCE.execCommand('mceFocus', false, that.editField[0].id); if ($.browser.mozilla && $.browser.version.substring(0, 3) === "1.8") { return; } editor.selection.select(editor.getBody(), 1); editor.selection.collapse(0); }, 10); | setTimeout(function () { // CKEditor won't focus itself except in a timeout. editor.focus(); }, 0); |
editor.on("instanceReady", function (e) { fluid.inlineEdit.CKEditor.focus(e.editor); that.events.afterInitEdit.fire(e.editor); | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.CKEditor.getEditor(that.editField[0]); if (editor) { fluid.inlineEdit.CKEditor.focus(editor); } | editor.on("instanceReady", function (e) { fluid.inlineEdit.CKEditor.focus(e.editor); that.events.afterInitEdit.fire(e.editor); }); |
editables.each(function (idx, editable) { editors.push(fluid.inlineEdit($(editable), options)); }); | (function ($, fluid) { fluid.inlineEdit.makeViewAccessor = function (editorGetFn, setValueFn, getValueFn) { return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } return ""; } if (newValue) { setValueFn(edi... | editables.each(function (idx, editable) { editors.push(fluid.inlineEdit($(editable), options)); }); |
that.events.afterFinishEdit.addListener(function () { isEditing = false; if (that.textEditButton) { that.textEditButton.focus(0); | setTimeout(function () { that.editField.focus(); fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); | that.events.afterFinishEdit.addListener(function () { isEditing = false; // Allow textEditButton to regain focus upon completion. if (that.textEditButton) { that.textEditButton.focus(0); } }); |
}); | }, 0); | that.events.afterFinishEdit.addListener(function () { isEditing = false; // Allow textEditButton to regain focus upon completion. if (that.textEditButton) { that.textEditButton.focus(0); } }); |
return function (event) { var outer = fluid.findAncestor(event.target, function (elem) { if (/input|select|textarea|button|a/i.test(elem.nodeName) || elem === selector) { return true; } }); if (outer === selector) { edit(); return false; } }; | that.events.onBeginEdit.addListener(function () { isEditing = true; }); | return function (event) { // FLUID-2017 - avoid triggering edit mode when operating standard HTML controls. Ultimately this // might need to be extensible, in more complex authouring scenarios. var outer = fluid.findAncestor(event.target, function (elem) { if (/in... |
that.events.onBeginEdit.addListener(function () { isEditing = true; }); | setTimeout(function () { fluid.setCaretToEnd(that.editField[0], that.editView.value()); if (that.options.selectOnEdit) { that.editField[0].select(); } }, 0); | that.events.onBeginEdit.addListener(function () { isEditing = true; }); |
that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.CKEditor.getEditor(that.editField[0]); if (editor) { fluid.inlineEdit.CKEditor.focus(editor); } | that.events.afterInitEdit.addListener(function (editor) { focusEditor(editor); var editorBody = editor.getBody(); fluid.deadMansBlur(that.editField, $(editorBody), function () { that.cancel(); }); | that.events.afterBeginEdit.addListener(function () { var editor = fluid.inlineEdit.CKEditor.getEditor(that.editField[0]); if (editor) { fluid.inlineEdit.CKEditor.focus(editor); } }); |
animations[easing] = function(options) { this.slide(options, { easing: easing, duration: duration || 700 }); }; | (function($){$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false... | animations[easing] = function(options) { this.slide(options, { easing: easing, duration: duration || 700 }); }; |
function () { that.cancel(); }); | editor.on("instanceReady", function (e) { fluid.inlineEdit.CKEditor.focus(e.editor); that.events.afterInitEdit.fire(e.editor); }); | function () { that.cancel(); }); |
function (newModel, oldModel) { if (node.val() !== newModel.pageSize) { node.val(newModel.pageSize); } } | function () { that.cancel(); }); | function (newModel, oldModel) { if (node.val() !== newModel.pageSize) { node.val(newModel.pageSize); } } |
return function () { return isEditing; }; | that.events.onBeginEdit.addListener(function () { isEditing = true; }); | return function () { return isEditing; }; |
var outer = fluid.findAncestor(event.target, function (elem) { if (/input|select|textarea|button|a/i.test(elem.nodeName) || elem === selector) { return true; } }); | that.events.afterFinishEdit.addListener(function () { isEditing = false; }); | var outer = fluid.findAncestor(event.target, function (elem) { if (/input|select|textarea|button|a/i.test(elem.nodeName) || elem === selector) { return true; } }); |
that.events.afterFinishEdit.addListener(function () { isEditing = false; | that.events.onBeginEdit.addListener(function () { isEditing = true; | that.events.afterFinishEdit.addListener(function () { isEditing = false; }); |
editor.on("instanceReady", function (e) { fluid.inlineEdit.CKEditor.focus(e.editor); that.events.afterInitEdit.fire(e.editor); }); | fluid.deadMansBlur(that.editField, $(editorBody), function () { that.cancel(); }); | editor.on("instanceReady", function (e) { fluid.inlineEdit.CKEditor.focus(e.editor); that.events.afterInitEdit.fire(e.editor); }); |
(function($){ $.fn.bgIframe = $.fn.bgiframe = function(s) { if ( $.browser.msie && parseInt($.browser.version) <= 6 ) { s = $.extend({ top : 'auto', left : 'auto', width : 'auto', height : 'auto', opacity : true, src : 'javascript:false;' }, s || {}); var prop = function(n){return n&&n.constructor==Num... | function () { that.cancel(); }); | (function($){/** * The bgiframe is chainable and applies the iframe hack to get * around zIndex issues in IE6. It will only apply itself in IE * and adds a class to the iframe called 'bgiframe'. The iframe * is appeneded as the first child of the matched element(s) * with a tabIndex and zIndex of -1. * * By default... |
node.change(function () { that.events.initiatePageSizeChange.fire(node.val()); }); | (function($){ $.fn.bgIframe = $.fn.bgiframe = function(s) { if ( $.browser.msie && parseInt($.browser.version) <= 6 ) { s = $.extend({ top : 'auto', left : 'auto', width : 'auto', height : 'auto', opacity : true, src : 'javascript:false;' }, s || {}); var prop = function(n){return n&&n.constructor==Num... | node.change(function () { that.events.initiatePageSizeChange.fire(node.val()); }); |
return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } return ""; } if (newValue) { setValueFn(editField, editor, newValue); } else { return getValueFn(editor); } } }; }; | togo = togo.replace(/\<(\S+)[^\>\s]*\>/g, function(match) { return match.toLowerCase(); }); | return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } ... |
return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; }; | that.events.afterFinishEdit.addListener(function () { isEditing = false; }); | return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; }; |
function () { that.cancel(); }); | that.events.afterBeginEdit.addListener(function () { var editor = tinyMCE.get(that.editField[0].id); if (editor) { focusEditor(editor); } }); | function () { that.cancel(); }); |
return this.each(function() { | (function($){ $.fn.bgIframe = $.fn.bgiframe = function(s) { if ( $.browser.msie && parseInt($.browser.version) <= 6 ) { s = $.extend({ top : 'auto', left : 'auto', width : 'auto', height : 'auto', opacity : true, src : 'javascript:false;' }, s || {}); var prop = function(n){return n&&n.constructor==Num... | return this.each(function() { if ( $('> iframe.bgiframe', this).length == 0 ) this.insertBefore( document.createElement(html), this.firstChild ); }); |
} return this; }; if (!$.browser.version) $.browser.version = navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]; })(jQuery);/* | return this.each(function() { if ( $('> iframe.bgiframe', this).length == 0 ) this.insertBefore( document.createElement(html), this.firstChild ); }); | |
that.events.onRenderPageLinks.addListener(function (tree, newModel) { var column = that.options.annotateColumnRange; var dataModel = that.options.dataModel; var columnDefs = getColumnDefs(that); if (!column || !dataModel || !columnDefs) { return; } var columnDef = fluid.pager.findColumnDef(columnDefs, column); funct... | return this.each(function() { if ( $('> iframe.bgiframe', this).length == 0 ) this.insertBefore( document.createElement(html), this.firstChild ); }); | that.events.onRenderPageLinks.addListener(function (tree, newModel) { var column = that.options.annotateColumnRange; var dataModel = that.options.dataModel; // TODO: reaching into another component's options like this is a bit unfortunate var columnDefs = getColumnDef... |
togo = togo.replace(/\<(\S+)[^\>\s]*\>/g, function(match) { return match.toLowerCase(); }); | setTimeout(function () { tinyMCE.execCommand('mceFocus', false, that.editField[0].id); if ($.browser.mozilla && $.browser.version.substring(0, 3) === "1.8") { return; } editor.selection.select(editor.getBody(), 1); editor.selection.collapse(0); }, 10); | togo = togo.replace(/\<(\S+)[^\>\s]*\>/g, function(match) { return match.toLowerCase(); }); |
return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } return ""; } if (newValue) { setValueFn(editField, editor, newValue); } else { return getValueFn(editor); } } }; | return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; | return function (editField) { return { value: function (newValue) { var editor = editorGetFn(editField); if (!editor) { if (newValue) { $(editField).val(newValue); } ... |
var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; | return isEditing; | return function () { var prevent = that.events.onBeginEdit.fire(); if (prevent === false) { return false; } edit(that); return true; }; |
(function($){ $.fn.bgIframe = $.fn.bgiframe = function(s) { if ( $.browser.msie && parseInt($.browser.version) <= 6 ) { s = $.extend({ top : 'auto', left : 'auto', width : 'auto', height : 'auto', opacity : true, src : 'javascript:false;' }, s || {}); var prop = function(n){return n&&n.constructor==Num... | fluid.inlineEdit.FCKEditor.complete.addListener(function (editor) { var editField = editor.LinkedField; var that = $.data(editField, "fluid.inlineEdit.FCKEditor"); if (that && that.events) { that.events.afterInitEdit.fire(editor); } }); | (function($){/** * The bgiframe is chainable and applies the iframe hack to get * around zIndex issues in IE6. It will only apply itself in IE * and adds a class to the iframe called 'bgiframe'. The iframe * is appeneded as the first child of the matched element(s) * with a tabIndex and zIndex of -1. * * By default... |
.click(function(event) { event.preventDefault(); }) | (function($){$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false... | .click(function(event) { event.preventDefault(); }) |
fluid.transform(tree, function (cell) { | (function ($, fluid) { function updateStyles(pageListThat, newModel, oldModel) { if (!pageListThat.pageLinks) { return; } if (oldModel.pageIndex !== undefined) { var oldLink = pageListThat.pageLinks.eq(oldModel.pageIndex); oldLink.removeClass(pageListThat.options.styles.currentPage); } var pageLink = pageListThat.p... | fluid.transform(tree, function (cell) { if (cell.ID === "page-link:link") { var page = cell.pageIndex; var start = page * tModel.pageSize; tModel.pageIndex = page; var limit = computePageLimit(tModel); ... |
}); }; fluid.pagerImpl = function (container, options) { var that = fluid.initView("fluid.pager", container, options); var pageIndexConformer = function (model, changeRequest) { if (changeRequest.value < 0) { changeRequest.value = 0; } }; that.events.initiatePageChange.addListener( function (arg) { var newModel = ... | fluid.transform(tree, function (cell) { if (cell.ID === "page-link:link") { var page = cell.pageIndex; var start = page * tModel.pageSize; tModel.pageIndex = page; var limit = computePageLimit(tModel); ... | |
setTimeout(function () { tinyMCE.execCommand('mceFocus', false, that.editField[0].id); if ($.browser.mozilla && $.browser.version.substring(0, 3) === "1.8") { return; } editor.selection.select(editor.getBody(), 1); editor.selection.collapse(0); }, 10); | that.events.afterInitEdit.addListener(function (editor) { focusEditor(editor); var editorBody = editor.getBody(); fluid.deadMansBlur(that.editField, $(editorBody), function () { that.cancel(); }); }); | setTimeout(function () { tinyMCE.execCommand('mceFocus', false, that.editField[0].id); if ($.browser.mozilla && $.browser.version.substring(0, 3) === "1.8") { // Have not yet found any way to make this work on FF2.x - best to do nothing, //... |
adminUsersTest.test("Confirmation delete + cancel", function () { var adminUsers; testOpts.userListEditor.options.details.options.confirmation.options.listeners = { afterFetchTemplate: function () { var re = adminUsers.userListEditor.details; re.events.afterRender.addListener(function () { re.events.afterRender.removeL... | re.events.afterRender.addListener(function () { jqUnit.notVisible("Confiration dialog is now invisible", re.confirmation.dlg); jqUnit.assertEquals("User Name should now be", "Megan Forbes", adminUsers.locate("userName").val()); | adminUsersTest.test("Confirmation delete + cancel", function () { var adminUsers; testOpts.userListEditor.options.details.options.confirmation.options.listeners = { afterFetchTemplate: function () { var re = adminUsers.userListEditor.details; re.events.afterRen... |
}, "initialSelect"); jQuery(jQuery(adminUsers.userListEditor.list.options.selectors.row)[2]).click(); } }; adminUsers = cspace.adminUsers(".csc-users-userAdmin", testOpts); stop(); }); | }); | adminUsersTest.test("Confirmation delete + cancel", function () { var adminUsers; testOpts.userListEditor.options.details.options.confirmation.options.listeners = { afterFetchTemplate: function () { var re = adminUsers.userListEditor.details; re.events.afterRen... |
test("resizable", function() { expect(4); | test("position, at another element", function() { var parent = $('<div></div>').css({ position: 'absolute', top: 400, left: 600, height: 10, width: 10 }).appendTo('body'); | test("resizable", function() { expect(4); el = $('<div></div>').dialog(); shouldresize("[default]"); el.dialog('option', 'resizable', false); shouldnotresize('disabled after init'); el.remove(); el = $('<div></div>').dialog({ resizable: false }); shouldnotresize("disabled in init options"); el.dialog('option', 're... |
el = $('<div></div>').dialog(); shouldresize("[default]"); el.dialog('option', 'resizable', false); shouldnotresize('disabled after init'); | var el = $('<div></div>').dialog({ position: { my: "left top", at: "left top", of: parent } }); var dialog = el.dialog('widget'); var offset = dialog.offset(); same(offset.left, 600); same(offset.top, 400); el.dialog('option', 'position', { my: "left top", at: "right bottom", of: parent }); var offset = dialog.offs... | test("resizable", function() { expect(4); el = $('<div></div>').dialog(); shouldresize("[default]"); el.dialog('option', 'resizable', false); shouldnotresize('disabled after init'); el.remove(); el = $('<div></div>').dialog({ resizable: false }); shouldnotresize("disabled in init options"); el.dialog('option', 're... |
el = $('<div></div>').dialog({ resizable: false }); shouldnotresize("disabled in init options"); el.dialog('option', 'resizable', true); shouldresize('enabled after init'); el.remove(); | parent.remove(); | test("resizable", function() { expect(4); el = $('<div></div>').dialog(); shouldresize("[default]"); el.dialog('option', 'resizable', false); shouldnotresize('disabled after init'); el.remove(); el = $('<div></div>').dialog({ resizable: false }); shouldnotresize("disabled in init options"); el.dialog('option', 're... |
test( "auto-destroy - .empty()", function() { | test( "auto-destroy - .remove() on child", function() { | test( "auto-destroy - .empty()", function() { $.widget( "ui.testWidget", { _create: function() {}, destroy: function() { ok( false, "destroyed from .empty()" ); } }); $( "#widget" ).testWidget().empty(); // http://github.com/jquery/qunit/pull/34 $.ui.testWidget.prototype.destroy = $.noop;}); |
ok( false, "destroyed from .empty()" ); | ok( false, "destroyed from .remove() on child" ); | test( "auto-destroy - .empty()", function() { $.widget( "ui.testWidget", { _create: function() {}, destroy: function() { ok( false, "destroyed from .empty()" ); } }); $( "#widget" ).testWidget().empty(); // http://github.com/jquery/qunit/pull/34 $.ui.testWidget.prototype.destroy = $.noop;}); |
$( "#widget" ).testWidget().empty(); | $( "#widget" ).testWidget().children().remove(); | test( "auto-destroy - .empty()", function() { $.widget( "ui.testWidget", { _create: function() {}, destroy: function() { ok( false, "destroyed from .empty()" ); } }); $( "#widget" ).testWidget().empty(); // http://github.com/jquery/qunit/pull/34 $.ui.testWidget.prototype.destroy = $.noop;}); |
(function($) { $.fn.jwplayerMediaFlash = function(options) { return this.each(function() { $(this).data("media", $.fn.jwplayerMediaFlash); var model = $(this).data("model"); model.autostart = true; model.controlbar = 'none'; model.icons = false; $.fn.jwplayerView.embedFlash($(this), model); }); }; })(jQuery); | return function() { $.fn.jwplayerController.pause(player); return jwplayer(player); }; | (function($) { $.fn.jwplayerMediaFlash = function(options) { return this.each(function() { $(this).data("media", $.fn.jwplayerMediaFlash); var model = $(this).data("model"); model.autostart = true; model.controlbar = 'none'; model.icons = false; $.fn.jwplayerView.embedFlash($(this), model); }); }; })(jQue... |
this.anchors.bind( "click.tabs", function(){ return false; | this.anchors.bind( "click.tabs", function( event ){ event.preventDefault(); | this.anchors.bind( "click.tabs", function(){ return false; }); |
addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_LOADED, arg); | if (!$.fn.jwplayerUtils.isNull(eventType)) { player.addEventListener(eventType, arg); } | return function(arg) { switch ($.fn.jwplayerUtils.typeOf(arg)) { case "function": addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_LOADED, arg); break; default: $.fn.jwplayerController.load(player, arg); } return jwplayer(player.id); }; |
$.fn.jwplayerController.load(player, arg); | if (!$.fn.jwplayerUtils.isNull(dataType)) { return player.controller.mediaInfo[dataType]; } return player.controller.mediaInfo; | return function(arg) { switch ($.fn.jwplayerUtils.typeOf(arg)) { case "function": addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_LOADED, arg); break; default: $.fn.jwplayerController.load(player, arg); } return jwplayer(player.id); }; |
return jwplayer(player.id); | return $.jwplayer(player.id); | return function(arg) { switch ($.fn.jwplayerUtils.typeOf(arg)) { case "function": addEventListener(player, $.fn.jwplayer.events.JWPLAYER_MEDIA_LOADED, arg); break; default: $.fn.jwplayerController.load(player, arg); } return jwplayer(player.id); }; |
return function(type, data) { for (var listener in player.model.listeners[type]) { player.model.listeners[type][listener](data); } | return function(type, listener) { removeEventListener(player, type, listener); | return function(type, data) { for (var listener in player.model.listeners[type]) { player.model.listeners[type][listener](data); } }; |
re.events.afterRender.addListener(function () { jqUnit.notVisible("Confiration dialog is now invisible", re.confirmation.dlg); jqUnit.assertEquals("User Name should now be", "Megan Forbes", adminUsers.locate("userName").val()); start(); }); | setupConfirmation(function (re) { re.events.afterRender.removeListener("initialSelect"); re.remove(); jqUnit.assertEquals("Confirmation Text Should Say", "Delete this record?", re.confirmation.locate("message:", re.confirmation.dlg).text()); jqUnit.isVisible("Delete button should be visible", re.confirmation.locate("ac... | re.events.afterRender.addListener(function () { jqUnit.notVisible("Confiration dialog is now invisible", re.confirmation.dlg); jqUnit.assertEquals("User Name should now be", "Megan Forbes", adminUsers.locate("userName").val()); start(); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.