rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
modelChanged: function () { jqUnit.assertDeepEq("After search, model should hold search results", expectedModel.results, search.model.results); start();
onSearch: function () { jqUnit.notVisible("When search submitted, results count should be hidden", jQuery(search.options.selectors.resultsCountContainer)); var lookingContainer = jQuery(search.options.selectors.lookingContainer); jqUnit.isVisible("When search submitted, 'looking' message should be visible", lookingCont...
searchTests.test("Search results", function () { expect(2); var expectedModel; jQuery.ajax({ async: false, url: "../../main/webapp/html/data/intake/search/list.json", dataType: "json", success: function (data) { expectedModel = data; ...
jqUnit.assertEquals("After search, display of number of results should be correct", expectedModel.results.length, jQuery(search.options.selectors.resultsCount).text());
var resultsContainer = jQuery(search.options.selectors.resultsCountContainer); jqUnit.isVisible("After search, results count should be visible", resultsContainer); jqUnit.assertEquals("After search submitted, results count should include query string", query, jQuery(search.options.selectors.queryString, resultsContaine...
searchTests.test("Search results", function () { expect(2); var expectedModel; jQuery.ajax({ async: false, url: "../../main/webapp/html/data/intake/search/list.json", dataType: "json", success: function (data) { expectedModel = data; ...
search.model.recordType = "intake"; search.model.keywords = "foofer";
jqUnit.notVisible("Initially, results container should be hidden", jQuery(search.options.selectors.resultsContainer)); jqUnit.notVisible("Initially, results count container should be hidden", jQuery(search.options.selectors.resultsCountContainer)); jqUnit.notVisible("Initially, 'looking' message should be hidden", jQue...
searchTests.test("Search results", function () { expect(2); var expectedModel; jQuery.ajax({ async: false, url: "../../main/webapp/html/data/intake/search/list.json", dataType: "json", success: function (data) { expectedModel = data; ...
return function () { var query = domBinder.locate("searchField").val(); var model = userListEditor.listApplier.model; var url = (cspace.util.isLocal() ? "data/users/search/list.json" : "../../chain/users/search?query=" + query); $.ajax({ url: url, type: "GET", dataType: "json", success: function (data, textStatus) { ...
that.userListEditor.details.events.onSave.addListener(function () { return validate(that.dom, that.userListEditor.detailsApplier); });
return function () { var query = domBinder.locate("searchField").val(); var model = userListEditor.listApplier.model; // TODO: Use the DC for this var url = (cspace.util.isLocal() ? "data/users/search/list.json" : "../../chain/users/search?query=" + query); ...
jqUnit.assertEquals("Message should include default lengths", "Passwords must be between 8 and 24 characters in length.", $.trim(msg.text()));
jqUnit.assertEquals("Message should include default lengths", "Passwords must be between 8 and 23 characters in length.", $.trim(msg.text()));
passwordValidatorTest.test("Message text: default lengths", function () { var pw = jQuery("#password-field"); var msg = jQuery("#message"); var pv = cspace.passwordValidator("#main"); jqUnit.notVisible("To begin, message should not be visible", msg); pw.val("123").change(); ...
}
}, permissions: cspace.tests.sampleUserPerms
pageBuilderTest.test("Assembly of HTML", function () { expect(3); fluid.demands("dateEntry", "cspace.pageBuilder", ["{pageBuilder}.options.selectors.dateEntry", fluid.COMPONENT_OPTIONS]); var options = { pageSpec: testPa...
var confirmation;
confirmationTests.test("Confirmation creation", function () { expect(9); var confirmation; testOpts.successHandlerCreator = sampleSuccessHandlerCreator; testOpts.listeners = { afterRender: function () { var expectedDefaultHREF = "#"; jqUnit.assert...
afterRender: function () {
afterRender: function (confirmation) {
confirmationTests.test("Confirmation creation", function () { expect(9); var confirmation; testOpts.successHandlerCreator = sampleSuccessHandlerCreator; testOpts.listeners = { afterRender: function () { var expectedDefaultHREF = "#"; jqUnit.assert...
confirmation = cspace.confirmation(jQuery("#main"), testOpts);
var confirmation = cspace.confirmation(jQuery("#main"), testOpts);
confirmationTests.test("Confirmation creation", function () { expect(9); var confirmation; testOpts.successHandlerCreator = sampleSuccessHandlerCreator; testOpts.listeners = { afterRender: function () { var expectedDefaultHREF = "#"; jqUnit.assert...
selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting'); selectee.unselecting = false; selectee.selecting = true; selectee.selected = true; self._trigger("selecting", event, {
var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected'); selectee.$element .removeClass(doSelect ? "ui-unselecting" : "ui-selected") .addClass(doSelect ? "ui-selecting" : "ui-unselecting"); selectee.unselecting = !doSelect; selectee.selecting = doSelect; selectee.selected = doSelect; self._trigger(...
$(event.target).parents().andSelf().each(function() { var selectee = $.data(this, "selectable-item"); if (selectee) { selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting'); selectee.unselecting = false; selectee.selecting = true; selectee.selected = true; // selectable SELECTING ...
fluid.model.copyModel(opts, baseOpts);
recordEditorTest.test("Delete", function () { var opts = {}; fluid.model.copyModel(opts, baseOpts); var testModel = { csid: "123.456.789", fields: {} }; opts.model = testModel; opts.dataContext = cspace.dataContext(testModel, {baseUrl: "http://mymuseum...
opts.model = testModel; opts.dataContext = cspace.dataContext(testModel, {baseUrl: "http: opts.uispec = {}; opts.applier = fluid.makeChangeApplier(testModel); opts.confirmation.options.listeners = { afterFetchTemplate: function () { recordEditor.remove(); recordEditor.options.dataContext.events.afterRemove.addListener(...
var opts = { model: testModel, dataContext: cspace.dataContext(testModel, {baseUrl: "http: uispec: {}, applier: fluid.makeChangeApplier(testModel), listeners: { afterRender: function(recordEditor) { fluid.log("RETest: afterRender"); recordEditor.options.dataContext.events.afterRemove.addListener(function () { jqUnit.as...
recordEditorTest.test("Delete", function () { var opts = {}; fluid.model.copyModel(opts, baseOpts); var testModel = { csid: "123.456.789", fields: {} }; opts.model = testModel; opts.dataContext = cspace.dataContext(testModel, {baseUrl: "http://mymuseum...
recordEditor = cspace.recordEditor("#main", opts);
var recordEditor = cspace.recordEditor("#main", opts);
recordEditorTest.test("Delete", function () { var opts = {}; fluid.model.copyModel(opts, baseOpts); var testModel = { csid: "123.456.789", fields: {} }; opts.model = testModel; opts.dataContext = cspace.dataContext(testModel, {baseUrl: "http://mymuseum...
utilitiesTest.test("Model from schema with getBeanValue", function () {
utilitiesTest.test("Model from schema with getBeanValue empty array", function () {
utilitiesTest.test("Model from schema with getBeanValue", function () { setExpectedSchemaBasedModel(); var model = cspace.util.getBeanValue({}, "fields", schema); jqUnit.assertDeepEq("Given a schema, model is build with proper structure and defaults", expectedBase.fields, mo...
schema.fields.properties.role.properties.role = { type: "array" }; expectedBase.fields.role.role = [];
utilitiesTest.test("Model from schema with getBeanValue", function () { setExpectedSchemaBasedModel(); var model = cspace.util.getBeanValue({}, "fields", schema); jqUnit.assertDeepEq("Given a schema, model is build with proper structure and defaults", expectedBase.fields, mo...
if (self.options.disabled) { return; }
.bind('keydown'+namespace, function(event) { if (self._start(event)) { return self._keydown(event); } return true; })
return function (listEditor, callback) { $.ajax({ url: listEditor.options.baseUrl + listEditor.recordType + "/" + applier.model.csid, dataType: "json", success: function (data) { fluid.model.copyModel(listEditor.model.list, data.relations); if (callback) { callback(); } } }); };
that.listEditor.detailsDC.events.afterCreate.addListener(function (data) { var newRelation = [{ source: { csid: that.applier.model.csid, recordtype: that.recordType }, target: { csid: data.csid, recordtype: "objects" }, type: "affects", "one-way": false }]; that.relationManager.addRelations({items: newRelation}); });
return function (listEditor, callback) { $.ajax({ url: listEditor.options.baseUrl + listEditor.recordType + "/" + applier.model.csid, dataType: "json", success: function (data) { fluid.model.copyModel(listEditor.model.list, data.relation...
for (var i = newModel.pageSize * newModel.pageNum; i < limit; ++ i) {
for (var i = newModel.pageSize * newModel.pageIndex; i < limit; ++ i) {
return function (directModel, newModel, permutation) { var searchModel = that.model.searchModel; fluid.log("modelFilter: initialState " + searchModel.initialState + ", renderRequest " + searchModel.renderRequest); if (searchModel.initialState) { se...
XAlert('The request failed: ' + thrownError + pre, 'AJAX Error');
Xalert('The request failed: ' + thrownError + pre, 'AJAX Error');
$(document).ready(function() { // init table-sorter tables - only once! var tables = $('table.tablesorter:not(.noauto)'); if (tables.size() > 0) tables.tablesorter(); // init navigation $('#technav div.ui-state-default').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-...
personas = personas.filter(function(v) !v.id || v.id != persona.id);
this._makeRequest(url, function(evt) { t.onPersonaLoadComplete(evt) }, headers);
personas = personas.filter(function(v) !v.id || v.id != persona.id);
$(document).ajaxError( function(event, XMLHttpRequest, ajaxOptions, thrownError) { var pre = '<br/><pre>'; for (i in event) pre += i + '=' + event[i] + '\n' pre += '</pre>'; Xalert('The request failed: ' + thrownError + pre, 'AJAX Error');
$(document).ajaxError( function(event, req) { Xalert('The request failed: <br/><pre>' + req.statusText + '</pre>', 'AJAX Error');
$(document).ready(function() { // init table-sorter tables - only once! var tables = $('table.tablesorter:not(.noauto)'); if (tables.size() > 0) tables.tablesorter(); // init navigation $('#technav div.ui-state-default').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-...
wait(function () { try { return !B.isMaster().ismaster; } catch(e) { return false; } });
wait(function () { var status = A.runCommand({replSetGetStatus : 1}); return status.members[1].state == 2; });
wait(function () { try { return !B.isMaster().ismaster; } catch(e) { return false; } });
wait(function () { return !B.isMaster().ismaster; });
wait(function () { try { return !B.isMaster().ismaster; } catch(e) { return false; } });
wait(function () { return !B.isMaster().ismaster; });
(opts.hideUndo || $.fn.undoable.hideUndo).call($.fn.undoable, undoable, target);
(opts.hideUndo || $.fn.undoable.hideUndo).call($.fn.undoable, undoable, target, opts);
$.fn.undoable.postToServer(url, data, function(response) { var undoData = $.extend(response, data); target.hide(); target.inlineStyling = opts.inlineStyling; var undoable = (opts.showUndo || $.fn.undoable.showUndo).call($.fn.und...
fluid.model.setBeanValue(that.model, elPath, fluid.model.getBeanValue(model, elPath));
fluid.model.setBeanValue(that.model, elPath, that.fetchModel(model));
that.applier.modelChanged.addListener(elPath, function (model) { fluid.model.setBeanValue(that.model, elPath, fluid.model.getBeanValue(model, elPath)); });
that.outFirer = setTimeout(function() {
that.container.keydown(function() { clearTimeout(that.outFirer); that.outFirer = setTimeout(function() {
that.outFirer = setTimeout(function() { var newValue = that.container.val(); if (newValue !== that.oldValue) { that.oldValue = newValue; that.events.onSearch.fire(newValue, newValue.length >= that.options.minChars); } ...
});
that.outFirer = setTimeout(function() { var newValue = that.container.val(); if (newValue !== that.oldValue) { that.oldValue = newValue; that.events.onSearch.fire(newValue, newValue.length >= that.options.minChars); } ...
jqUnit.notVisible("Add Relation Dialog is initially invisible", cspace.addDialogInst.dlg); relationManager.locate("addButton").click(); jqUnit.notVisible("Add Relation Dialog is invisible becuase the object is not saved", cspace.addDialogInst.dlg); var message = relationManager.locate("feedbackMessage"); jqUnit.isVisib...
createRelationManager({}, { searchToRelateDialog: { options: { listeners: { afterRender: function () { jqUnit.notVisible("Add Relation Dialog is initially invisible", cspace.addDialogInst.dlg); relationManager.locate("addButton").click(); jqUnit.notVisible("Add Relation Dialog is invisible becuase the object is not sav...
relationManagerTest.test("Add Relation Dialog when the object is not saved", function () { jqUnit.notVisible("Add Relation Dialog is initially invisible", cspace.addDialogInst.dlg); relationManager.locate("addButton").click(); jqUnit.notVisible("Add Relation Dialog is invisible becuase the obje...
expect(7);
expect(8);
test( "change", function() { expect(7); var handle; // Test mouseup at end of handle slide (mouse) el = $( "<div></div>" ) .appendTo( "body" ) .slider({ change: function(event, ui) { ok( true, "change triggered by mouseup at end of handle slide (mouse)" ); } }); el.find( ".ui-slider-handle" ).eq( 0 ) .simul...
.simulate( "keyup", { charCode: $.ui.keyCode.LEFT } );
.simulate( "keyup", { keyCode: $.ui.keyCode.LEFT } );
test( "change", function() { expect(7); var handle; // Test mouseup at end of handle slide (mouse) el = $( "<div></div>" ) .appendTo( "body" ) .slider({ change: function(event, ui) { ok( true, "change triggered by mouseup at end of handle slide (mouse)" ); } }); el.find( ".ui-slider-handle" ).eq( 0 ) .simul...
test("label, default", function() { $("#button").button(); same( $("#button").text(), "Label" );
test("text false without icon", function() { $("#button").button({ text: false }); ok( $("#button").is(".ui-button-text-only:not(.ui-button-icon-only)") );
test("label, default", function() { $("#button").button(); same( $("#button").text(), "Label" ); $("#button").button("destroy");});
positionHandler(event, player);
positionHandler({}, player);
player.media.interval = window.setInterval(function() { positionHandler(event, player); }, 100);
that.dataContext.events.afterCreate.addListener(function (modelPath, data) { that.applier.requestChange(that.options.idField, data.fields.csid); that.events.afterCreateObjectDataSuccess.fire(data, that.options.strings.createSuccessfulMessage); displayTimestampedMessage(that, that.options.strings.createSuccessfulMessage...
fluid.fetchResources(resources, function () { var templates = fluid.parseTemplates(resources, ["confirmation"], {}); fluid.reRender(templates, confirmation, {});
that.dataContext.events.afterCreate.addListener(function (modelPath, data) { that.applier.requestChange(that.options.idField, data.fields.csid); that.events.afterCreateObjectDataSuccess.fire(data, that.options.strings.createSuccessfulMessage); displayTimestampedMessage(that, that.o...
rendererTest.test("buildProtoTree(): Fix of selections if model empty", function () {
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () {
rendererTest.test("buildProtoTree(): Fix of selections if model empty", function () { var testUISpec = { selector: { selection: "${field1}", optionlist: ["opt1", "opt2"], optionnames: ["Option 1", "Option 2"] } }; var testThat =...
selector: { selection: "${field1}", optionlist: ["opt1", "opt2"], optionnames: ["Option 1", "Option 2"]
"row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid", "func": "cspace.autocomplete", "options": { "url": "url.com" } }] } }]
rendererTest.test("buildProtoTree(): Fix of selections if model empty", function () { var testUISpec = { selector: { selection: "${field1}", optionlist: ["opt1", "opt2"], optionnames: ["Option 1", "Option 2"] } }; var testThat =...
model: {}
model: testModel
rendererTest.test("buildProtoTree(): Fix of selections if model empty", function () { var testUISpec = { selector: { selection: "${field1}", optionlist: ["opt1", "opt2"], optionnames: ["Option 1", "Option 2"] } }; var testThat =...
var expectedModel = { field1: ""
var expectedProtoTree = { "row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid", "func": "cspace.autocomplete", "options": { "url": "url.com" } }] } }] }
rendererTest.test("buildProtoTree(): Fix of selections if model empty", function () { var testUISpec = { selector: { selection: "${field1}", optionlist: ["opt1", "opt2"], optionnames: ["Option 1", "Option 2"] } }; var testThat =...
jqUnit.assertDeepEq("Process should add missing fields to model", expectedModel, testThat.model);
jqUnit.assertDeepEq("Decorator should be in protoTree", expectedProtoTree, protoTree);
rendererTest.test("buildProtoTree(): Fix of selections if model empty", function () { var testUISpec = { selector: { selection: "${field1}", optionlist: ["opt1", "opt2"], optionnames: ["Option 1", "Option 2"] } }; var testThat =...
self._trigger(doSelect ? "selecting" : "unselecting", event, { selecting: selectee.element });
if (doSelect) { self._trigger("selecting", event, { selecting: selectee.element }); } else { self._trigger("unselecting", event, { unselecting: selectee.element }); }
$(event.target).parents().andSelf().each(function() { var selectee = $.data(this, "selectable-item"); if (selectee) { var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected'); selectee.$element .removeClass(doSelect ? "ui-unselecting" : "ui-selected") .addClass(doSelect ? "ui-sele...
2, $(".csc-organization-groups").length);
2, $(".csc-organizationAuthority-group").length);
organizationTests.test("Repeatable fields: existence", function () { var options = { pageBuilder: { options: { csid: "987.654.321", dataContext: { options: { baseUrl: "../../main/webapp/html/data...
1, $(".csc-organization-functions").length);
1, $(".csc-organizationAuthority-function").length); jqUnit.assertEquals("The History field is repeatable, and has the correct number of entries", 1, $(".csc-organizationAuthority-history").length);
organizationTests.test("Repeatable fields: existence", function () { var options = { pageBuilder: { options: { csid: "987.654.321", dataContext: { options: { baseUrl: "../../main/webapp/html/data...
if (!searchModel.renderRequest) {
var dataRequired = false; var limit = fluid.pager.computePageLimit(newModel); for (var i = newModel.pageSize * newModel.pageNum; i < limit; ++ i) { if (!directModel[i]) { dataRequired = true; break; } } if (!searchModel.renderRequest && dataRequired) {
return function (directModel, newModel, permutation) { var searchModel = that.model.searchModel; fluid.log("modelFilter: initialState " + searchModel.initialState + ", renderRequest " + searchModel.renderRequest); if (searchModel.initialState) { se...
return fluid.transform(directModel, function (row, index) { return { index: index, row: $.extend(row, {selected: false}) }; });
return fluid.pager.directModelFilter(directModel, newModel, permutation);
return function (directModel, newModel, permutation) { var searchModel = that.model.searchModel; fluid.log("modelFilter: initialState " + searchModel.initialState + ", renderRequest " + searchModel.renderRequest); if (searchModel.initialState) { se...
player.sendEvent(handler);
player[handler]();
$('#' + nam).mouseup(function(evt) { evt.stopPropagation(); player.sendEvent(handler); });
that.dlg.dialog("close");
that.close();
that.locate("createNewButton", addDialog).click(function () { that.events.onCreateNewRecord.fire(); that.dlg.dialog("close"); });
clickSource.removeAttr('disabled');
$.fn.undoable.postToServer(url, data, function(response) { var undoData = $.extend(response, data); target.hide(); target.inlineStyling = opts.inlineStyling; var undoable = (opts.showUndo || $.fn.undoable.showUndo).call($.fn.und...
jQuery(adminUsers.options.selectors.email).val(testDataCreateUser.email).change(); jQuery(adminUsers.options.selectors.userName).val(testDataCreateUser.userName).change(); jQuery(adminUsers.options.selectors.password).val(testDataCreateUser.validPassword).change(); jQuery(adminUsers.options.selectors.passwordConfirm).v...
var adminUsersSelectors = adminUsers.options.selectors; jQuery(adminUsersSelectors.email).val(testDataCreateUser.email).change(); jQuery(adminUsersSelectors.userName).val(testDataCreateUser.userName).change(); jQuery(adminUsersSelectors.password).val(testDataCreateUser.validPassword).change(); jQuery(adminUsersSelector...
adminUsersTest.test("Save new user - successful ajax call", function () { var adminUsers; testOpts.listeners = { afterRender: function () { jQuery(adminUsers.userListEditor.options.selectors.addNewListRowButton).click(); //all fields are required ...
test("re-attach", function() { expect(2);
test("keydown DOWN on input, decreases value not less than min", function() { var el = $("#spin").spinner({ min:-100, value:50, step:10 });
test("re-attach", function() { expect(2); el = $("<input>").spinner().spinner("destroy").spinner(); ok(true, '.spinner().spinner("destroy").spinner() called on element'); el = $('<input id="spinner_dis">').spinner().spinner("destroy").spinner().remove(); ok(true, '.spinner().spinner("destroy").spinner() called on disco...
el = $("<input>").spinner().spinner("destroy").spinner(); ok(true, '.spinner().spinner("destroy").spinner() called on element'); el = $('<input id="spinner_dis">').spinner().spinner("destroy").spinner().remove(); ok(true, '.spinner().spinner("destroy").spinner() called on disconnected element');
simulateKeyDownUp(el, $.ui.keyCode.DOWN); equals(el.val(), 40); for (i = 0; i<21; i++) { simulateKeyDownUp(el, $.ui.keyCode.DOWN); } equals(el.val(), -100); el.val(50); simulateKeyDownUp(el, $.ui.keyCode.DOWN); equals(el.val(), 40);
test("re-attach", function() { expect(2); el = $("<input>").spinner().spinner("destroy").spinner(); ok(true, '.spinner().spinner("destroy").spinner() called on element'); el = $('<input id="spinner_dis">').spinner().spinner("destroy").spinner().remove(); ok(true, '.spinner().spinner("destroy").spinner() called on disco...
$(newidsel+"close").bind('click', {'tabcontainer': this}, function(event){ tc = event.data.tabcontainer; tc.removetab(newid); });
$(fullpath+"close").bind('click', {'tabcontainer': this}, function(event){ tc = event.data.tabcontainer; tc.removetab(newid); });
$(newidsel+"close").bind('click', {'tabcontainer': this}, function(event){ tc = event.data.tabcontainer; tc.removetab(newid); });
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () {
rendererTest.test("buildProtoTree(): Repeated rows, repeated data, decorator comes before valuebinding (CSPACE-1888)", function () {
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () { var testUISpec = { "row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid...
"row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid", "func": "cspace.autocomplete", "options": { "url": "url.com" } }] } }]
"rowSelector:": { children: [ { selector1: { decorators: [{ type: "fluid", func: "cspace.testDecorator" }] }, selector2: "${repeated.0.field2}" } ]
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () { var testUISpec = { "row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid...
repeated: []
repeated: [ {field2: "foo"}, {field2: "bar"}, {field2: "bat"} ]
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () { var testUISpec = { "row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid...
"row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid", "func": "cspace.autocomplete", "options": { "url": "url.com" } }] } }]
"rowSelector:": { children: [ { selector1: { decorators: [{ type: "fluid", func: "cspace.testDecorator" }] }, selector2: "${repeated.0.field2}" }, { selector1: { decorators: [{ type: "fluid", func: "cspace.testDecorator" }] }, selector2: "${repeated.1.field2}" }, { selector1: { decorators: [{ type: "fluid", func: "cspa...
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () { var testUISpec = { "row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid...
jqUnit.assertDeepEq("Decorator should be in protoTree", expectedProtoTree, protoTree);
jqUnit.assertDeepEq("One row should be present in proto tree.", expectedProtoTree, protoTree);
rendererTest.test("buildProtoTree(): Repeated decorators, no data", function () { var testUISpec = { "row:": { children: [{ fieldA: "${repeated.0.field1}", fieldB: { decorators: [{ "type": "fluid...
return function (data, textStatus) { if (data === {}) { that.model = { csid: null, fields: {}, termsUsed: [], relations: [] };
$.each(args, function (index, arg) { if (arg) { var type = typeof(arg); if (type === "object") { expandOptions(pageBuilder, arg); } else if (type === "string" && arg.indexOf("{pageBuilder}") === 0) { args[index] = fluid.model.getBeanValue(pageBuilder, arg.substring(14, arg.length)); }
return function (data, textStatus) { if (data === {}) { that.model = { csid: null, fields: {}, termsUsed: [], relations: [] }; } invokeDependencies(that); ...
invokeDependencies(that); that.events.pageReady.fire(); };
});
return function (data, textStatus) { if (data === {}) { that.model = { csid: null, fields: {}, termsUsed: [], relations: [] }; } invokeDependencies(that); ...
var tables = $('table.tablesorter');
var tables = $('table.tablesorter:not(.noauto)');
$(document).ready(function() { // init table-sorter tables - only once! var tables = $('table.tablesorter'); if (tables.size() > 0) tables.tablesorter(); // init navigation $('#technav div.ui-state-default').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover')...
setTimeout(func, that.options.delay);} : function(func) {func()};
var wrapper = that.options.delay? function(func) { setTimeout(func, that.options.delay);} : function(func) {func()};
setTimeout(func, that.options.delay);} : function(func) {func()};
})
});
test("close-on-blur is cancelled when starting a search", function() { var ac = $("#autocomplete").autocomplete({ source: ["java", "javascript"] }).val("ja").autocomplete("search"); same( $(".ui-menu:visible").length, 1 ); ac.blur(); same( $(".ui-menu:visible").length, 1 ); ac.autocomplete("search"); stop(); setTimeou...
that.locate("deleteButton").click(function () {
that.locate("remove").click(function () {
that.locate("deleteButton").click(function () { that.events.afterDelete.fire(); });
that.events.onSearch.addListener(function(term, permitted) { if (permitted) { container.addClass(that.options.styles.loadingStyle); }
container.change(function() { oldValue = container.val();
that.events.onSearch.addListener(function(term, permitted) { if (permitted) { container.addClass(that.options.styles.loadingStyle); } });
if (that.model.csid) { that.locate("messageContainer", "body").hide(); that.searchToRelateDialog.dlg.dialog("open"); } else { cspace.util.displayTimestampedMessage(that.dom, that.options.strings.pleaseSaveFirst); } });
if (that.model.csid) { that.locate("messageContainer", "body").hide(); that.searchToRelateDialog.open(); } else { cspace.util.displayTimestampedMessage(that.dom, that.options.strings.pleaseSaveFirst); } });
that.locate("addButton").click(function (e) { if (that.model.csid) { that.locate("messageContainer", "body").hide(); that.searchToRelateDialog.dlg.dialog("open"); } else { cspace.util.displayTimestampedMessage(that.dom, that.options.strings.plea...
expect(1);
test("stop", function() { expect(1); var stop = 0; el = $("#spin").spinner({ stop: function(){ stop++; } }); simulateKeyDownUp(el, $.ui.keyCode.DOWN); equals(stop, 1, "Stop triggered");});
el = $("#spin").spinner({
var el = $("#spin").spinner({
test("stop", function() { expect(1); var stop = 0; el = $("#spin").spinner({ stop: function(){ stop++; } }); simulateKeyDownUp(el, $.ui.keyCode.DOWN); equals(stop, 1, "Stop triggered");});
return function() { try { player.css("display", "inherit"); player[0].play(); model.state = 'playing'; return true; } catch (err) { } return false; };
$(event.target).data("media").interval = window.setInterval(function() { positionHandler(event); }, 100);
return function() { try { player.css("display", "inherit"); player[0].play(); model.state = 'playing'; return true; } catch (err) { } return false; };
active: $("#list1 a:last")[0]
active: $("#list1 h3:last")[0]
test("{ active: Element }", function() { var ac = $("#list1").accordion({ active: $("#list1 a:last")[0] }); state(ac, 0, 0, 1); ac.accordion('option', 'active', $("#list1 a:eq(1)")[0]); state(ac, 0, 1, 0);});
ac.accordion('option', 'active', $("#list1 a:eq(1)")[0]);
ac.accordion('option', 'active', $("#list1 h3:eq(1)")[0]);
test("{ active: Element }", function() { var ac = $("#list1").accordion({ active: $("#list1 a:last")[0] }); state(ac, 0, 0, 1); ac.accordion('option', 'active', $("#list1 a:eq(1)")[0]); state(ac, 0, 1, 0);});
$(this).addClass('selected');
$('.media-item', $(this)).addClass('selected');
.bind('click', mediaFile, function (e) { // Notify the main browser //this.selectedMedia = mediaFile; $('.media-item').removeClass('selected'); $(this).addClass('selected'); that.mediaSelected([e.data]); //that.settings.onSelect(mediaFile); return false; });
table.focus(function (e) { table.addClass(that.options.styles.focus);
calendarButton.click(function (event) { datePicker.toggle(); cspace.util.globalDismissal($(datePicker).add(calendarButton), function () { closeCalendar(that); }); table.focus();
table.focus(function (e) { table.addClass(that.options.styles.focus); });
that.locate("proceed", that.dlg).click(function (e) { that.navigate();
that.locate("closeButton", that.dlg).click(function () { that.close();
that.locate("proceed", that.dlg).click(function (e) { that.navigate(); });
return function () { that.locate("errorMessage").hide(); that.model.recordType = that.locate("recordType").val(); if (cspace.util.useLocalData() && (that.model.recordType === "object")) { that.model.recordType = "objects";
return function (directModel, newModel, permutation) { var searchModel = that.model.searchModel; fluid.log("modelFilter: initialState " + searchModel.initialState + ", renderRequest " + searchModel.renderRequest); if (searchModel.initialState) { searchModel.initialState = false; return [];
return function () { that.locate("errorMessage").hide(); that.model.recordType = that.locate("recordType").val();// CSPACE-701 if (cspace.util.useLocalData() && (that.model.recordType === "object")) { that.model.recordType = "objects"; } that...
that.model.keywords = that.locate("keywords").val(); that.search();
if (!searchModel.renderRequest) { that.search(newModel); } searchModel.renderRequest = false; return fluid.transform(directModel, function (row, index) { return { index: index, row: $.extend(row, {selected: false}) }; });
return function () { that.locate("errorMessage").hide(); that.model.recordType = that.locate("recordType").val();// CSPACE-701 if (cspace.util.useLocalData() && (that.model.recordType === "object")) { that.model.recordType = "objects"; } that...
test("minLength", function() { var ac = $("#autocomplete").autocomplete({ source: data }); ac.autocomplete("search", ""); same( $(".ui-menu:visible").length, 0, "blank not enough for minLength: 1" ); ac.autocomplete("option", "minLength", 0); ac.autocomplete("search", ""); same( $(".ui-menu:visible").length, 1, "blank...
setTimeout(function() { same( $(".ui-menu:visible").length, 1 ); ac.autocomplete("destroy"); start(); }, 100);
test("minLength", function() { var ac = $("#autocomplete").autocomplete({ source: data }); ac.autocomplete("search", ""); same( $(".ui-menu:visible").length, 0, "blank not enough for minLength: 1" ); ac.autocomplete("option", "minLength", 0); ac.autocomplete("search", ""); same( $(".ui-menu:visible").length, 1, "blan...
this.eventListener(jwplayer.api.events.JWPLAYER_PLAYLIST_ITEM, function(data) { _itemMeta = {}; });
return function(args) { var newstate = args['newstate'], oldstate = args['oldstate']; if (newstate == state) { var callbacks = _stateListeners[newstate]; if (callbacks) { for (var c in callbacks) { if (typeof callbacks[c] == 'function') { callbacks[c].call(this, {oldstate:oldstate, newstate:newstate}); } } } } };
this.eventListener(jwplayer.api.events.JWPLAYER_PLAYLIST_ITEM, function(data) { _itemMeta = {}; });
}).bind("getData.datepicker", function(event, key) { return this._get(inst, key);
inst.trigger.click(function() { if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0]) $.datepicker._hideDatepicker(); else $.datepicker._showDatepicker(input[0]); return false;
}).bind("getData.datepicker", function(event, key) { return this._get(inst, key); });
if ( $("#slideshow-link").html() == "Pause" ) { $("#slideshow-link").html("Play");
if ( $("#slideshow-link").attr("slideshowStatus") == "Pause" ) { $("#slideshow-link").attr("slideshowStatus", "Play"); $("#slideshow-link").html($("#playHtml").html());
$("#slideshow-link").click( function(e) { e.preventDefault(); if ( $("#slideshow-link").html() == "Pause" ) { $("#slideshow-link").html("Play"); clearTimeout(timerId); } else { $("#slideshow-link").html("Pause"); timer(); } });
$("#slideshow-link").html("Pause");
$("#slideshow-link").attr("slideshowStatus", "Pause"); $("#slideshow-link").html($("#pauseHtml").html());
$("#slideshow-link").click( function(e) { e.preventDefault(); if ( $("#slideshow-link").html() == "Pause" ) { $("#slideshow-link").html("Play"); clearTimeout(timerId); } else { $("#slideshow-link").html("Pause"); timer(); } });
test( 'eCSStender.fonts', function(){ ok( eCSStender.fonts instanceof Array, 'eCSStender.fonts is the correct type' ); ok( eCSStender.fonts.length==2, 'eCSStender.fonts contains 2 fonts, as expected' ); ok( eCSStender.fonts[0]['font-weight']=='normal', 'eCSStender.fonts[0]["font-weight"] is the expected value' );
test( 'eCSStender.exec_time', function(){ ok( typeof(eCSStender.exec_time)=='number', 'eCSStender.exec_time is the correct type' ); ok( true, 'eCSStender execution time: ' + eCSStender.exec_time + ' seconds' );
test( 'eCSStender.fonts', function(){ ok( eCSStender.fonts instanceof Array, 'eCSStender.fonts is the correct type' ); ok( eCSStender.fonts.length==2, 'eCSStender.fonts contains 2 fonts, as expected' ); ok( eCSStender.fonts[0]['font-weight']=='normal', 'eCSStender.fonts[0]["font-weight"] is the expected valu...
that.detailsDC.events.afterCreate.addListener(function () { that.locate("newListRow").hide();
that.detailsDC.events.afterRemove.addListener(function () { hideDetails(that.dom); cspace.util.hideMessage(that.dom);
that.detailsDC.events.afterCreate.addListener(function () { that.locate("newListRow").hide(); });
that.events.onSave.addListener(function () { cspace.util.displayTimestampedMessage(that, that.options.strings.savingMessage, ""); });
return function() { if (!$(this).is(exclusions)) { return handler($(this).attr("href")); } }
that.events.onSave.addListener(function () { cspace.util.displayTimestampedMessage(that, that.options.strings.savingMessage, ""); });
$.each(args, function (index, arg) { if (arg) { var type = typeof(arg); if (type === "object") { expandOptions(pageBuilder, arg); } else if (type === "string" && arg.indexOf("{pageBuilder}") === 0) { args[index] = fluid.model.getBeanValue(pageBuilder, arg.substring(14, arg.length)); } } });
function () { that.dependencies = fluid.expander.expandLight(that.dependencies); }
$.each(args, function (index, arg) { if (arg) { var type = typeof(arg); if (type === "object") { expandOptions(pageBuilder, arg); } else if (type === "string" && arg.indexOf("{pageBuilder}") === 0) { arg...
}());APE.namespace("APE.dom");
}());APE.namespace("APE.dom").mixin(function(){
APE.namespace("APE.dom").mixin(function() { var className = "className", Exps = { }; return { hasToken : hasToken, removeClass : removeClass, addClass : addClass, getElementsByClassName : getElementsByClassName, findAncestorWithClass : findAncestorWithClass }; /** @...
console.debug(AMC.count);
GEvent.addListener(AMC.map, 'addoverlay', function(overlay) { AMC.count++; if (AMC.count == AMC.markers.length - 1) { console.debug(AMC.count); var end = new Date(); $('time-add').innerHTML = end - start; GEvent.clearListeners(AMC.map, 'addoverlay'); } });
self.selectedItem = null;
.bind( "focus.autocomplete", function() { self.previous = self.element.val(); })
expect(18);
expect(16);
test("focusable - visible, enabled elements", function() { expect(18); isFocusable('#visibleAncestor-inputTypeNone', 'input, no type'); isFocusable('#visibleAncestor-inputTypeText', 'input, type text'); isFocusable('#visibleAncestor-inputTypeCheckbox', 'input, type checkbox'); isFocusable('#visibleAncestor-inputTypeRa...
isFocusable('#visibleAncestor-areaWithHref', 'area with href'); isNotFocusable('#visibleAncestor-areaWithoutHref', 'area without href');
test("focusable - visible, enabled elements", function() { expect(18); isFocusable('#visibleAncestor-inputTypeNone', 'input, no type'); isFocusable('#visibleAncestor-inputTypeText', 'input, type text'); isFocusable('#visibleAncestor-inputTypeCheckbox', 'input, type checkbox'); isFocusable('#visibleAncestor-inputTypeRa...
repeatableTest.test("Add Functionality + applier/model consistency", function () { repeatable = setupRepeatable(); jqUnit.assertEquals("Model is of lenth 1 initially", 1, fluid.model.getBeanValue(repeatable.model, repeatable.options.elPath).length); jqUnit.assertEquals("Initially, value matched model", "This is brief d...
repeatableTest.test("Add Functionality", function () { expect(3); var myRepeatable = basicSetup(); jqUnit.assertEquals("Model is of length 1 initially", 1, fluid.model.getBeanValue(myRepeatable.model, myRepeatable.options.elPath).length); myRepeatable.locate("add").click(); jqUnit.assertEquals("After clicking 'add', m...
repeatableTest.test("Add Functionality + applier/model consistency", function () { repeatable = setupRepeatable(); jqUnit.assertEquals("Model is of lenth 1 initially", 1, fluid.model.getBeanValue(repeatable.model, repeatable.options.elPath).length); jqUnit.assertEquals("Initiall...
container.change(function() { oldValue = container.val(); });
outFirer = setTimeout(function() { var newValue = container.val(); if (newValue !== oldValue) { oldValue = newValue; onSearch.fire(newValue, newValue.length >= options.minChars); } }, options.delay);
container.change(function() { oldValue = container.val(); });
$('img.media-image',content).each(function (elem) { tagContent = Drupal.wysiwyg.plugins.media.createTag($(this)); $(this).replaceWith(tagContent); });
Drupal.media.popups.mediaStyleSelector(mediaFile, function (formattedMedia) { Drupal.wysiwyg.plugins.media.insertMediaFile(mediaFile, formattedMedia.type, formattedMedia.html, formattedMedia.options, Drupal.wysiwyg.instances[instanceId]); }, options);
$('img.media-image',content).each(function (elem) { tagContent = Drupal.wysiwyg.plugins.media.createTag($(this)); $(this).replaceWith(tagContent); });
if (data === "") {
if (data === "[]") {
return function (request, callback) { $.ajax({ url: that.options.queryUrl + "?q=" + request.term, dataType: "text", success: function (data) { var dataArray; if (data === "") { showConfirmation(r...
var newdata = "[" + data.replace(/}\s*{/g, "},{") + "]"; dataArray = JSON.parse(newdata);
dataArray = JSON.parse(data);
return function (request, callback) { $.ajax({ url: that.options.queryUrl + "?q=" + request.term, dataType: "text", success: function (data) { var dataArray; if (data === "") { showConfirmation(r...
test("cancel search", function() { expect(6); var first = true;
test("change without selection", function() { expect(2); stop();
test("cancel search", function() { expect(6); var first = true; var ac = $("#autocomplete").autocomplete({ delay: 0, source: data, search: function() { if (first) { same( ac.val(), "ja" ); first = false; return false; } same( ac.val(), "java" ); }, open: function() { ok(true); } }); stop(); ac.va...
search: function() { if (first) { same( ac.val(), "ja" ); first = false; return false; } same( ac.val(), "java" ); }, open: function() { ok(true);
change: function(event, ui) { same(event.type, "autocompletechange"); same(ui.item, null); start();
test("cancel search", function() { expect(6); var first = true; var ac = $("#autocomplete").autocomplete({ delay: 0, source: data, search: function() { if (first) { same( ac.val(), "ja" ); first = false; return false; } same( ac.val(), "java" ); }, open: function() { ok(true); } }); stop(); ac.va...
stop(); ac.val("ja").keydown(); setTimeout(function() { same( $(".ui-menu:visible").length, 0 ); ac.val("java").keydown(); setTimeout(function() { same( $(".ui-menu:visible").length, 1 ); same( $(".ui-menu .ui-menu-item").length, 2 ); start(); }, 50); }, 50);
ac.focus().val("ja").blur();
test("cancel search", function() { expect(6); var first = true; var ac = $("#autocomplete").autocomplete({ delay: 0, source: data, search: function() { if (first) { same( ac.val(), "ja" ); first = false; return false; } same( ac.val(), "java" ); }, open: function() { ok(true); } }); stop(); ac.va...
node.setAttribute(attr, function() { return this._Lang.globalEval(val); });
var filter = this._Lang.hitch(this, function(node) { var classes = this.getClasses(node); var len = classes.length; if (len == 0) return false; else { for (var cnt = 0; cnt < len; cnt++) { if (classes[cnt] === styleClass) return true; } } return false; });
node.setAttribute(attr, function() { //event implicitly used return this._Lang.globalEval(val); });
function() {var parent = ui.item.context._parent;
function() {
function() {var parent = ui.item.context._parent; $(this).removeClass("egw_fw_ui_tab_header_hover") }
if (required === container) { return true; }
return function () { var required = domBinder.locate("identificationNumber"); if ( $.trim(required.val()) === "") { cspace.util.displayTimestampedMessage(domBinder, message); return false; } return true; };
.bind( "focus.button", function() { $( this ).addClass( focusClass ); })
.filter(function() { return !this.form; });
.bind( "focus.button", function() { // no need to check disabled, focus won't be triggered anyway $( this ).addClass( focusClass ); })
same( $(".ui-menu").length, 0, "blank not enough for minLength: 1" );
same( $(".ui-menu:visible").length, 0, "blank not enough for minLength: 1" );
test("minLength", function() { var ac = $("#autocomplete").autocomplete({ source: data }); ac.autocomplete("search", ""); same( $(".ui-menu").length, 0, "blank not enough for minLength: 1" ); ac.autocomplete("option", "minLength", 0); ac.autocomplete("search", ""); same( $(".ui-menu").length, 1, "blank enough for min...