code
stringlengths
1
2.08M
language
stringclasses
1 value
var skype_injection_path='chrome://skype_ff_toolbar_win/content/'; var skype_tool=null; /*window.addEventListener("click",skype_click_handler,true); function skype_click_handler(event) { if (skype_tool) skype_tool.closemenu(); //HideSkypeMenuFull(); } */ //CALL BUTTON var ActiveCallButtonPart=0; f...
JavaScript
var skype_injection_path='chrome://skype_ff_toolbar_win/content/'; var skype_tool=null; /*window.addEventListener("click",skype_click_handler,true); function skype_click_handler(event) { if (skype_tool) skype_tool.closemenu(); //HideSkypeMenuFull(); } */ //CALL BUTTON var ActiveCallButtonPart=0; f...
JavaScript
(function() { var isIOS = (/iphone|ipad|ipod/i).test(window.navigator.userAgent.toLowerCase()); if (isIOS) { console = {}; console.log = function(log) { var iframe = document.createElement('iframe'); iframe.setAttribute('src', 'ios-log: ' + log); document.documentElement.appendChild(ifram...
JavaScript
ListBox = function() { Node.apply(this, arguments); this.frameNode = this; this.itemNodes = []; this.itemData = []; }; ListBox.prototype = { __proto__: Node.prototype, base: 0, offset: 0, get selectedIndex() { return this.base + this.offset; }, get selectedData() { return this.itemData[this....
JavaScript
Slider = function() { Node.apply(this, arguments); }; Slider.prototype = { __proto__: Node.prototype, size: 1, direction: 'horizontal', _traits: {horizontal:{pos:'x', size:'w'}, vertical:{pos:'y', size:'h'}}, update: function(param) { // size, count, pos this.extend(param || {}); this.size = Math.min(...
JavaScript
Node = function(node) { Observable.call(this); this._node = node; }; Node.prototype = { __proto__: Observable.prototype, _call: function(f, args) { var ary = [this._node]; ary.push.apply(ary, args); return f.apply(null, ary); }, _set: function(f, k, v) { if (this._node[k] != v) f(this._node,...
JavaScript
Hash = function(o) { this.extend(o) }; Hash.prototype = { forEach: function(f, o) { o = o || this; for (var k in this) if (this.hasOwnProperty(k)) f.call(o, k, this[k], this); }, map: function(f, o) { var r = []; this.forEach(function() { r.push(f.apply(o, arguments)); }); return r; }...
JavaScript
Timer = function(reso) { this._proxy = this._fire.bless(this); this._list = []; this._reso = reso || 1000; }; Timer.prototype = { _fire: function() { var now = Date.now(); this._list.sort(function(a, b) { return a.expire - b.expire; }); while (this._list.length && this._list[0].expire <= now) { ...
JavaScript
HTTP = function() { Observable.call(this); this.xhr = new XMLHttpRequest(); this.xhr._owner = this; this.xhr.onreadystatechange = function() { if (this.readyState == 4) this._owner._complete(); }; }; HTTP.prototype = { __proto__: Observable.prototype, _sentq: [], _waitq: [], _max: 3, _pump...
JavaScript
print = (function(f) { return function(o) { ('' + o).match(/.{1,40}/g).forEach(function(line) { f(line.replace(/\%/g, '%%')); }); } })(print);
JavaScript
ListBox = function() { Node.apply(this, arguments); this.frameNode = this; this.itemNodes = []; this.itemData = []; }; ListBox.prototype = { __proto__: Node.prototype, base: 0, offset: 0, get selectedIndex() { return this.base + this.offset; }, get selectedData() { return this.itemData[this....
JavaScript
Slider = function() { Node.apply(this, arguments); }; Slider.prototype = { __proto__: Node.prototype, size: 1, direction: 'horizontal', _traits: {horizontal:{pos:'x', size:'w'}, vertical:{pos:'y', size:'h'}}, update: function(param) { // size, count, pos this.extend(param || {}); this.size = Math.min(...
JavaScript
Node = function(node) { Observable.call(this); this._node = node; }; Node.prototype = { __proto__: Observable.prototype, _call: function(f, args) { var ary = [this._node]; ary.push.apply(ary, args); return f.apply(null, ary); }, _set: function(f, k, v) { if (this._node[k] != v) f(this._node,...
JavaScript
Hash = function() {}; Hash.prototype = { extend: function(o) { for (var k in o) this[k] = o[k]; return this; }, forEach: function(f, o) { for (var k in this) if (this.hasOwnProperty(k)) f.call(o, k, this[k], this); }, map: function(f, o) { var r = []; this.forEach(function() {...
JavaScript
Timer = function(reso) { this._proxy = this._fire.bless(this); this._list = []; this._reso = reso || 1000; }; Timer.prototype = { _fire: function() { var now = Date.now(); this._list.sort(function(a, b) { return a.expire - b.expire; }); while (this._list.length && this._list[0].expire <= now) { ...
JavaScript
HTTP = function() { Observable.call(this); this.xhr = new XMLHttpRequest(); this.xhr._owner = this; this.xhr.onreadystatechange = function() { if (this.readyState == 4) this._owner._complete(); }; }; HTTP.prototype = { __proto__: Observable.prototype, _sentq: [], _waitq: [], _max: 3, _pump...
JavaScript
ListBox = function() { Node.apply(this, arguments); this.frameNode = this; this.itemNodes = []; this.itemData = []; }; ListBox.prototype = { __proto__: Node.prototype, base: 0, offset: 0, get selectedIndex() { return this.base + this.offset; }, get selectedData() { return this.itemData[this....
JavaScript
Slider = function() { Node.apply(this, arguments); }; Slider.prototype = { __proto__: Node.prototype, size: 1, direction: 'horizontal', _traits: {horizontal:{pos:'x', size:'w'}, vertical:{pos:'y', size:'h'}}, update: function(param) { // size, count, pos this.extend(param || {}); this.size = Math.min(...
JavaScript
Node = function(node) { Observable.call(this); this._node = node; }; Node.prototype = { __proto__: Observable.prototype, _call: function(f, args) { var ary = [this._node]; ary.push.apply(ary, args); return f.apply(null, ary); }, _set: function(f, k, v) { if (this._node[k] != v) f(this._node,...
JavaScript
Hash = function(o) { this.extend(o) }; Hash.prototype = { __proto__: Hash.prototype, forEach: function(f, o) { o = o || this; for (var k in this) if (this.hasOwnProperty(k)) f.call(o, k, this[k], this); }, map: function(f, o) { var r = []; this.forEach(function() { r.push(f.apply(o, argum...
JavaScript
Timer = function(reso) { this._proxy = this._fire.bless(this); this._list = []; this._reso = reso || 1000; }; Timer.prototype = { _fire: function() { var now = Date.now(); this._list.sort(function(a, b) { return a.expire - b.expire; }); while (this._list.length && this._list[0].expire <= now) { ...
JavaScript
HTTP = function() { Observable.call(this); this.xhr = new XMLHttpRequest(); this.xhr._owner = this; this.xhr.onreadystatechange = function() { if (this.readyState == 4) this._owner._complete(); }; }; HTTP.prototype = { __proto__: Observable.prototype, _sentq: [], _waitq: [], _max: 3, _pump...
JavaScript
/** * @license * * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
JavaScript
/** * Creates a new level control. * @constructor * @param {IoMap} iomap the IO map controller. * @param {Array.<string>} levels the levels to create switchers for. */ function LevelControl(iomap, levels) { var that = this; this.iomap_ = iomap; this.el_ = this.initDom_(levels); google.maps.event.addList...
JavaScript
/** * Creates a new Floor. * @constructor * @param {google.maps.Map=} opt_map */ function Floor(opt_map) { /** * @type Array.<google.maps.MVCObject> */ this.overlays_ = []; /** * @type boolean */ this.shown_ = true; if (opt_map) { this.setMap(opt_map); } } /** * @param {google.maps.M...
JavaScript
// Copyright 2011 Google /** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wri...
JavaScript
// Copyright 2011 Google Inc. All Rights Reserved. /** * @fileoverview This script posts to the data servlet with a request for data * to display until either the servlet responds with data or responds that it * failed. The servlet responds to each post with a message, which the script * displays to the user and d...
JavaScript
var boardTitle = "Guangdong College Programming Contest 2010"; var teamHeight = 50; var cssYes = "ui-state-active"; var cssPending = "ui-state-highlight"; var cssNo = "ui-state-error"; var cssEmpty = "ui-state-disabled"; var currentBoardFileUrl = "gdcpc2010/current.html"; var finalBoardFileUrl = "gdcpc2010/final...
JavaScript
function TeamScore() { this.ID = "Nobody"; this.currentProblems = []; this.finalProblems = []; } var teams = []; var problemsNumber; function delayMethod(during, callback) { if (callback.name) { setTimeout("(" + callback.toString() + ")()", during); } else { setTimeout("fn = " + callback.toString(...
JavaScript
var tag = document.getElementsByName('tag')[0]; if (tag) { tag.onchange = function(event) { var value = cb_global.form.getValue(); value.attributes = {}; window.parent.frameProxy.setValue(value); var tagName = tag.options[tag.selectedIndex].value; window.location = getAddCustomTagUrl(cb_global, t...
JavaScript
//server communications timeout var ajaxRpcTimeoutMillis = 45 * 1000; // XSSI prefix. Must be kept in sync with models/transforms.py. var xssiPrefix = ")]}'"; /** * Compare two JS objects for equality by value. */ function deepEquals(x, y) { if (typeof(x) != "object") { return x === y; } if (typeof(y) != "...
JavaScript
/** * Define the methods of the GCB rich text editor here. */ function getGcbRteDefs(env, Dom, Editor, Resize) { var IS_NEW_FORM_LAYOUT = false; return { setOptions: function(options) { GcbRteField.superclass.setOptions.call(this, options); this.options.opts = options.opts || {}; this.optio...
JavaScript
/** * The definitions of the controls used by the iframed popup. * * @param frameProxy The proxy which is used to communicate with the editor in * the parent window. * @param env The shared GCB envronment variables. */ function FramedEditorControls(Y, frameProxy, env) { this._Y = Y; this._frameProxy = fra...
JavaScript
function ButterBar(popup, message, close) { this.popup = popup; this.message = message; this.close = close; } ButterBar.prototype.showMessage = function(text) { this.message.textContent = text; // FF, Chrome this.message.innerText = text; // IE ButterBar.keepInView(); if (! $(this.popup).hasClass("sho...
JavaScript
// Defer execution to jQuery ready. jQuery(function($) { // Resize child frames to the size of their contents every 75ms. setInterval(function() { $('iframe.gcb-needs-resizing').each(function(elem) { try { $(this).height($(this).contents().height()); } catch(error) { // Eat errors, w...
JavaScript
var XSRF_TOKEN = $('div.gcb-ratings-widget').data('xsrf-token'); var KEY = window.location.pathname + window.location.search; function parseJson(s) { var XSSI_PREFIX = ')]}\''; return JSON.parse(s.replace(XSSI_PREFIX, '')); } function onRatingClick(target) { target = $(target); target.closest('ul').find('li >...
JavaScript
var isPeerAssessmentTable; $(function() { if (cb_global.schema.properties.course) { // Only activate this functionality on the Settings > Course view init(); } }); function init() { isPeerAssessmentTable = cb_global.schema.properties.course.properties .certificate_criteria._inputex.is_peer_assess...
JavaScript
var VERB_NEW = 1; var VERB_CHANGED = 2; var VERB_CURRENT = 3; var VERB_NEW_CLASS = "verb-new"; var VERB_CHANGED_CLASS = "verb-changed"; var VERB_CURRENT_CLASS = "verb-current"; var EDITED_CLASS = "edited"; var NOT_STARTED_TRANSLATION = 0; var VALID_TRANSLATION = 1; var INVALID_TRANSLATION = 2; function getVerbClassN...
JavaScript
$(function() { var notes = ( 'Note: Uploading translation files will take several seconds, ' + 'and may time out. If this happens, you can try ' + 'importing fewer languages at a time, or use the command ' + 'line tool. See .../modules/i18n_dashboard/jobs.py for ' + 'complete instructi...
JavaScript
$(function() { var notes = ( 'Note: Deleting translations will take several seconds, ' + 'and may time out. If this happens, you can try ' + 'deleting fewer languages at a time, or use the command ' + 'line tool. See .../modules/i18n_dashboard/jobs.py for ' + 'complete instructions and...
JavaScript
$(function() { var notes = ( 'Note: Downloading translation files will take several seconds, ' + 'and may time out. If this happens, you can try ' + 'exporting fewer languages at a time, or use the command ' + 'line tool. See .../modules/i18n_dashboard/jobs.py for ' + 'complete instruc...
JavaScript
// XSSI prefix. Must be kept in sync with models/transforms.py. var xssiPrefix = ")]}'"; var xsrfToken = $("table.i18n-progress-table").data("isTranslatableXsrfToken"); /** * Parses JSON string that starts with an XSSI prefix. */ function parseResponse(s) { return JSON.parse(s.replace(xssiPrefix, '')); } functio...
JavaScript
function parseJson(s) { var XSSI_PREFIX = ")]}'"; return JSON.parse(s.replace(XSSI_PREFIX, "")); } function onSubmitButtonClick(key, xsrfToken, button) { var formData = $("#" + key).serializeArray(); var request = JSON.stringify({ "xsrf_token": xsrfToken, "key": key, "payload": { "form_data":...
JavaScript
CodeMirror.modeURL = "/modules/code_tags/codemirror/mode/%N/%N.js"; $('code.codemirror-container-readonly').each(function() { var code = $(this).text(); $(this).empty(); var cmInstance = CodeMirror(this, { value: code, lineNumbers: true, readOnly: true }); var mode = $(this).data('mode'); cmInst...
JavaScript
var codeEditor = new CodeEditorControl( document.getElementsByName("code")[0]); // force code editor to load the current mode codeEditor.setMode($("select[name='mode']").val()); $("select[name='mode']").change(function() { codeEditor.setMode($(this).val()); });
JavaScript
/** * @fileoverview Utility to add AJAX handler to pages. */ function element(id) { return document.getElementById(id); } // Update a particular HTML element with a new value function updateInnerHTML(elmId, value) { element(elmId).innerHTML = value; } function updateValue(elmId, value) { element(elmId).value...
JavaScript
/* * Copyright 2013 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
JavaScript
/* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
JavaScript
/* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
JavaScript
$(function() { // Hide the other invitation inputs when the "Enable Invitations checkbox" // is unchecked. var checkbox = $("div.invitation-enable > input[type=\"checkbox\"]"); function updateInvitationFields() { if (checkbox.prop("checked")) { $(".invitation-data").parent().show(); } else { ...
JavaScript
$(function() { var XSRF_TOKEN = $("#invitation-div").data("xsrf-token"); // XSSI prefix. Must be kept in sync with models/transforms.py. var XSSI_PREFIX = ")]}'"; function parseJson(s) { return JSON.parse(s.replace(XSSI_PREFIX, '')); } function onSendButtonClick() { var request = JSON.stringify({ ...
JavaScript
<!-- -*- mode: javascript; -*- --> <div> <style scoped> .graph_container { float: left; text-align: center; } h4 { margin: 10px; } .graph_graph { margin: 10px; } </style> <!-- Titles and containers for graphs --> <div class="graph_container"> <h4>Counts of Answers</h4> ...
JavaScript
var SHOW_SCORES_LABEL = 'Assign scores to individual choices'; var HIDE_SCORES_LABEL = 'Return to choice picker view'; var HIDE_SCORES_WARNING_LABEL = 'Return to choice-picker (Note: scores will change)'; /* Whether to show the numeric score or a radio/checkbox. */ var setScores = false; var setScoresToggleButton...
JavaScript
var controller = new AssessmentEditorController( Y, cb_global.form, cb_global.xsrf_token, function(s) { return window.confirm(s); }, cbShowMsg, formatServerErrorMessage ); controller.init();
JavaScript
/** * A class which represents a button which can toggle between two states ("a" * and "b") on a click. * @param {YUI Node} divNode the node which the button will be inserted in * @param {string} aText the text which will be shown when the button is in "a" * state (the default) * @param {string} bText the tex...
JavaScript
<!-- -*- mode: javascript; -*- --> <div id="labels_on_students_graph"></div> <script> function labels_on_students(data){ var dimension = data.labels_on_students.crossfilter.dimension( function byTitle(label){ return label.title; }); var group = dimension.group().reduceSum( function byCount...
JavaScript
function showNoPermissionsMessage() { $("#formContainer > div > form > fieldset > .inputEx-Group > fieldset") .append("There are currently no permissions assigned nor registered."); } function setUpRoleEditorForm() { var all_hidden = true; $(".permission-module").each(function() { if($(this).find(".inputEx...
JavaScript
//XSSI prefix. Must be kept in sync with models/transforms.py. var XSSI_PREFIX = ")]}'"; var ESC_KEY = 27; /** * Parses JSON string that starts with an XSSI prefix. */ function parseJson(s) { return JSON.parse(s.replace(XSSI_PREFIX, "")); } function setDraftStatus(padlock, isDraft) { if (isDraft) { padlock....
JavaScript
function AssessmentEditorController(Y, inputExForm, xsrfToken, confirm, notify, formatError) { this.Y = Y; this.inputExForm = inputExForm; this.xsrfToken = xsrfToken; this.confirm = confirm; this.notify = notify; this.formatError = formatError; } AssessmentEditorController.prototype.exportToHTMLAssessme...
JavaScript
var codeEditor = new CodeEditorControl( document.getElementsByName("markdown")[0]); // force code editor to load the current mode codeEditor.setMode("markdown"); $("select[name='mode']").change(function() { codeEditor.setMode($(this).val()); });
JavaScript
/* * Manages drive tag controls at tag render time. * * Open issues: * * - The structure of the preview frame is not the same as the structure of the * content frame: we write into preview directly; content loads its data via * its src. We patch over the most egregious UI differences, but it's not * possi...
JavaScript
/* * Common utility methods used across clients of Google APIs. * * @param {object} JSON JSON processing module. */ window.GoogleApiClientTools = (function(JSON) { module = {}; module._typeId = 'google-drive'; // XSSI prefix must be kept in sync with models/transforms.py. module._xssiPrefix = ")]}'"; mo...
JavaScript
// embed YouTube API only once if (typeof(window['gcb_tag_youtube_videos']) == "undefined"){ // send a milestone event every time this many seconds of video are watched var GCB_VIDEO_TRACKING_CHUNK_SEC = 30; // video player status var gcb_youtube_player_ready = false; // list of videos to embed var gcb_ta...
JavaScript
function gcbTagHtml5TrackVideo(instanceId) { var index = 0; var video = $('#' + instanceId)[0]; var eventLogger = function(event) { var dataDict = { 'instance_id': instanceId, 'event_id': index, 'position': video.currentTime, 'rate': video.playbackRate, 'default_rate': video.defa...
JavaScript
/* * Child frame code for Google Drive tag functionality. * * Requires parent in google_tag_child_parent.js. The child is rendered as an * InputEx lightbox. It relays commands to the parent, which does actual work * and relays results back to the child. * * It's weird that we're using postMessage here but we sti...
JavaScript
/* * Parent frame code for Google Drive tag functionality. * * Requires child in google_tag_child_frame.js. The parent is loaded after * oeditor.js. It accepts commands from the child frame, which is rendered as an * InputEx lightbox, does work, and relays results back to the child. * * It's weird that we're usi...
JavaScript
GcbGoogleDriveTagChild.main();
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/assets_lib_butterbar/*.js', // Files to test 'mo...
JavaScript
describe('ButterBar', function() { var popup, message, close, butterBar; beforeEach(function() { jasmine.getFixtures().fixturesPath = 'base/'; loadFixtures( 'tests/unit/javascript_tests/assets_lib_butterbar/fixture.html'); popup = $('#gcb-butterbar-top').get(0); message = $('#gcb-butterbar-...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_core_tags/*.js', // Files to test 'modul...
JavaScript
// GoogleDriveTagParent refers to top, but karma tests run inside of an iframe. // Bind top to window so this difference doesn't cause breakage. // TODO(johncox): get rid of this when we write real tests using iframs. top = window; describe('core tags module', function() { window.cb_global = { schema: { p...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_certificate/*.js', // Test resources { ...
JavaScript
describe('certificate criteria user interface', function() { window.cb_global = { schema: { properties: { course: { properties: { certificate_criteria: { _inputex : { is_peer_assessment_table : { 1: true, 2: fals...
JavaScript
basePath = '../../../..'; var YUI_BASE = process.env.YUI_BASE; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, YUI_BASE + '/yui/yui.js', YUI_BASE + '/yui-base/yui-base.js', YUI_BASE + '/node-core/node-core.js', YUI_BASE + '/array-extras/array-extras.js', YUI_BASE + '/dom-scree...
JavaScript
describe('normalize scores', function() { var oldY; function arrayEqual(a, b) { if (a.length != b.length) { return false; } for (var i = 0; i < a.length; i++) { if (a[i] !== b[i]) { return false; } } return true; } beforeEach(function() { if (window.Y) { ...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_assessment_tags/*.js', // Test resources ...
JavaScript
describe('assessment tags', function() { var LOGGING_LOCATION = 'http://localhost:8080/unit?unit=1&lesson=2'; var MESSAGES = { correctAnswer: 'Yes, the answer is correct.', incorrectAnswer: 'No, the answer is incorrect.', partiallyCorrectAnswer: 'The answer is partially correct.', yourScoreIs: 'Your...
JavaScript
{ "multiple_choice_activity": [{ "questionType": "multiple choice", "choices": [ ["A", true, "Correct."], ["B", false, "Incorrect"], ["C", false, "Incorrect"], ["D", false, "Incorrect"] ] }], "multiple_choice_group_activity": [{ "questionType": "multiple choice group", ...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test file 'tests/unit/javascript_tests/assets_lib_activity_generic/tests.js', { patter...
JavaScript
describe('V 1.4 Activities and Assessments', function() { var event_payloads, interactions; var auditDataDict, auditSource, auditIsAsync, mockLocation; function checkAuditValues(expectedData, expectedSource, expectedAsync) { // This addition to the data dict mocks the corresponding action in gcbAudit au...
JavaScript
basePath = '../../../..'; var KARMA_LIB = process.env.KARMA_LIB; files = [ JASMINE, JASMINE_ADAPTER, 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', KARMA_LIB + '/jasmine-jquery-1.5.2.js', // Test files 'tests/unit/javascript_tests/modules_questionnaire/*.js', // Test resources ...
JavaScript
describe("questionnaire library", function () { beforeEach(function () { jasmine.getFixtures().fixturesPath = "base/"; loadFixtures("tests/unit/javascript_tests/modules_questionnaire/" + "fixture.html"); this.payload = JSON.parse(readFixtures( "tests/unit/javascript_tests/modules_question...
JavaScript
basePath = '../../../..'; files = [ JASMINE, JASMINE_ADAPTER, // Test files 'tests/unit/javascript_tests/modules_oeditor/*.js', // Files to test 'modules/oeditor/oeditor.js', 'modules/oeditor/popup.js', 'modules/oeditor/rte.js' ]; exclude = [ '**/karma.conf.js' ]; browsers = ['PhantomJS']; single...
JavaScript
describe('deepEquals', function() { it('matches objects which are equal', function() { var a = { 'a': [1, 2, 3], 'b': {'c': 'C', 'd': null} }; var b = { 'b': {'d': null, 'c': 'C'}, 'a': [1, 2, 3] }; expect(deepEquals(a, b)).toBe(true); }); it('distinguishes objects are ...
JavaScript
<!-- -*- mode: javascript; -*- --> <div id="model_visualizations_dump"></div> <div id="answers_pie_chart"></div> <script> // Integration tests want to know what data page we're on, so give // them some text with which they can tell. Since these values are // supplied by the REST service, we can be sure we're on the ...
JavaScript
<!-- -*- mode: javascript; -*- --> <script src="/static/crossfilter-1.3.7/crossfilter-1.3.7/crossfilter.min.js"> </script> <script src="/static/d3-3.4.3/d3.min.js"> </script> <script src="/static/dc.js-1.6.0/dc.js-1.6.0/dc.min.js"> </script> <link rel="stylesheet" type="text/css" href="/static/dc.js-...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
JavaScript