code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/**
* 'Portfolio' is an portfolio management module for ImpressCMS
*
* File: /scripts/portfolio.js
*
* js file for portfolio module
*
* @copyright Copyright QM-B (Steffen Flohrer) 2012
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* -----------------------... | JavaScript |
/*!
* jQuery Form Plugin
* version: 3.31.0-2013.03.22
* @requires jQuery v1.5 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form
* Dual licensed under the MIT and GPL licenses:
* http://malsup.github.com/mit-license.txt
* http:/... | JavaScript |
/*!
* FullCalendar v1.6.1 Google Calendar Plugin
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
(function($) {
var fc = $.fullCalendar;
var formatDate = fc.formatDate;
var parseISO8601 = fc.parseISO8601;
var addDays = fc.addDays;
var applyAll = fc.applyAll;
fc.sourceNormalizers.push... | JavaScript |
/*!
* FullCalendar v1.6.1
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
/*
* Use fullcalendar.css for basic styling.
* For event drag & drop, requires jQuery UI draggable.
* For event resizing, requires jQuery UI resizable.
*/
(function($, undefined) {
;;
var defaults = {
// ... | JavaScript |
/*
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
*
* http://www.heise.de/extras/socialshareprivacy/
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
*
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
* Heise Zeitschriften Ver... | JavaScript |
(function($) {
$.fn.paginate = function(options) {
var opts = $.extend({}, $.fn.paginate.defaults, options);
return this.each(function() {
$this = $(this);
var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
var selectedpage = o.start;
$.fn.draw(o,$this,selectedpage);
});
};
var outsidewidth_... | JavaScript |
/*!
* liScroll 1.0
* Examples and documentation at:
* http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html
* 2007-2010 Gian Carlo Mingati
* Version: 1.0.2.1 (22-APRIL-2011)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/... | JavaScript |
/**
* 'Article' is an article management module for ImpressCMS
*
* File: /scripts/article_block.js
*
* js file for article module
*
* @copyright Copyright QM-B (Steffen Flohrer) 2011
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* -------------------------... | JavaScript |
/**
* 'Article' is an article management module for ImpressCMS
*
* File: /scripts/article.js
*
* js file for article module
*
* @copyright Copyright QM-B (Steffen Flohrer) 2011
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* ----------------------... | JavaScript |
/*!
* jQuery Form Plugin
* version: 3.18 (28-SEP-2012)
* @requires jQuery v1.5 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form
* Dual licensed under the MIT and GPL licenses:
* http://malsup.github.com/mit-license.txt
* http:... | JavaScript |
/**
* 'Guestbook' is a small, light weight guestbook module for ImpressCMS
*
* File: /scripts/guestbook.js
*
*
* @copyright Copyright QM-B (Steffen Flohrer) 2011
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* -----------------------------------------------... | JavaScript |
/**
* 'Album' is a light weight gallery module
*
* File: /language/german/german.js
*
*
* @copyright Copyright QM-B (Steffen Flohrer) 2011
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* ------------------------------------------------------------------------... | JavaScript |
/**
* 'Album' is a light weight gallery module
*
* File: /language/english/english.js
*
*
* @copyright Copyright QM-B (Steffen Flohrer) 2013
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* ----------------------------------------------------------------------... | JavaScript |
/**
* 'Album' is a light weight gallery module
*
* File: /scripts/album.js
*
* script to initiate some jQuery Effekts for Downloads
*
* @copyright Copyright QM-B (Steffen Flohrer) 2013
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* -------------------------... | JavaScript |
(function( $ ) {
$.fn.aeImageResize = function( params ) {
var aspectRatio = 0
// Nasty I know but it's done only once, so not too bad I guess
// Alternate suggestions welcome :)
, isIE6 = $.browser.msie && (6 == ~~ $.browser.version)
;
// We cannot do much unless we have one of the... | JavaScript |
/*
Copyright (C) 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 law or agreed to in writing, softwa... | JavaScript |
(function(window) {
var ORIGIN_ = location.protocol + '//' + location.host;
function SlideController() {
this.popup = null;
this.isPopup = window.opener;
if (this.setupDone()) {
window.addEventListener('message', this.onMessage_.bind(this), false);
// Close popups if we reload the main window.
win... | JavaScript |
/*
* Hammer.JS
* version 0.4
* author: Eight Media
* https://github.com/EightMedia/hammer.js
*/
function Hammer(element, options, undefined)
{
var self = this;
var defaults = {
// prevent the default event or not... might be buggy when false
prevent_default : false,
css_hacks ... | JavaScript |
/**
* @authors TODO
* @fileoverview TODO
*/
document.cancelFullScreen = document.webkitCancelFullScreen ||
document.mozCancelFullScreen;
/**
* @constructor
*/
function SlideDeck(el) {
this.curSlide_ = 0;
this.prevSlide_ = 0;
this.config_ = null;
this.container = el || document.... | JavaScript |
require(['order!../slide_config', 'order!modernizr.custom.45394',
'order!prettify/prettify', 'order!hammer', 'order!slide-controller',
'order!slide-deck'], function(someModule) {
});
| JavaScript |
var SLIDE_CONFIG = {
// Slide settings
settings: {
title: 'Building Web Applications that use Google APIs and the JavaScript Client for Google APIs',
subtitle: '',
useBuilds: true, // Default: true. False will turn off slide animation builds.
usePrettify: true, // Default: true
enableSlideAreas:... | JavaScript |
/*
* 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 law or agreed to ... | JavaScript |
/*
* jsTree 1.0-rc3
* http://jstree.com/
*
* Copyright (c) 2010 Ivan Bozhanov (vakata.com)
*
* Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* $Date: 2... | JavaScript |
/*
* 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 law or agreed to ... | JavaScript |
/*
* 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 law or agreed to ... | JavaScript |
/*
* 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 law or agreed to ... | 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 applicable law o... | 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 applicable law o... | 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 applicable law o... | 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 applicable law o... | JavaScript |
( function( $ ) {
$( document ).ready(function() {
$('#cssmenu').prepend('<div id="menu-button">Menu</div>');
$('#cssmenu #menu-button').on('click', function(){
var menu = $(this).next('ul');
if (menu.hasClass('open')) {
menu.removeClass('open');
}
else {
menu.addClass('open');
}
});
});
} )(... | JavaScript |
function handleSubmit(args, dialog) {
var jqDialog = jQuery('#' + dialog);
if (args.validationFailed) {
jqDialog.effect('shake', {times: 3}, 100);
} else {
PF(dialog).hide();
}
}
| JavaScript |
PrimeFaces.locales['es'] = {
closeText: 'Cerrar',
prevText: 'Anterior',
nextText: 'Siguiente',
monthNames: ['Enero','Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun','Jul','A... | JavaScript |
$(document).ready(function(){
var DEBUG = false;
var loading = $("#loading");
var content = $("#content");
var amazonID = "";
//show the loading bar
showLoading();
var getFromURL = window.location.pathname.slice(window.location.pathname.indexOf('/') + 1);
var regex = /[\w]+\W/ig;
var amazonID = getFromU... | JavaScript |
define(['promptTypes','jquery','underscore', 'prompts'],
function(promptTypes, $, _) {
return {
"breathcounter" : promptTypes.launch_intent.extend({
type: "breathcounter",
datatype: "breathcounter",
buttonLabel: {
'default': 'Launch breath cou... | JavaScript |
define(['promptTypes','jquery','underscore', 'prompts'],
function(promptTypes, $, _) {
return {
"pulseox" : promptTypes.launch_intent.extend({
type: "pulseox",
datatype: "pulseox",
intentString: 'org.opendatakit.sensors.PULSEOX',
buttonLabel: {
... | JavaScript |
/*!
* XRegExp-All 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan © 2012 MIT License
*/
// Module systems magic dance
;(function(definition) {
// Don't turn on strict mode for this function, so it can assign to global
var self;
// RequireJS
if (typeof define === 'function') {
... | JavaScript |
/*
Copyright (C) 2011 by Yehuda Katz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | JavaScript |
(function( $ ){
$.fn.qrcode = function(options) {
// if options is string,
if( typeof options === 'string' ){
options = { text: options };
}
// set default values
// typeNumber < 1 for automatic calculation
options = $.extend( {}, {
render : "canvas",
width : 256,
height : 256,
typeNumb... | JavaScript |
// Backbone.js 1.0.0
// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(){
// Initial Setup
// -------------
// Save a reference to the global... | JavaScript |
/**
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
/*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject,
define, window, process, Packag... | JavaScript |
// Underscore.js 1.4.4
// ===================
// > http://underscorejs.org
// > (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// > Underscore may be freely distributed under the MIT license.
// Baseline setup
// --------------
(function() {
// Establish the root object, `window` in the browser, or `... | JavaScript |
/*!
* jQuery JavaScript Library v1.10.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-07-03T13:48Z
*/
(function( window, undef... | JavaScript |
/*jslint eqeq: true, plusplus: true, undef: true, sloppy: true, vars: true, forin: true */
(function ($) {
var ms = $.mobiscroll,
date = new Date(),
defaults = {
dateFormat: 'mm/dd/yy',
dateOrder: 'mmddy',
timeWheels: 'hhiiA',
timeFormat: 'hh:ii A',
... | JavaScript |
/*
Copyright (c) 2012 Sergio Gabriel Teves
All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program i... | JavaScript |
/*jslint eqeq: true, plusplus: true, undef: true, sloppy: true, vars: true, forin: true, nomen: true */
/*!
* jQuery MobiScroll v2.5.4
* http://mobiscroll.com
*
* Copyright 2010-2013, Acid Media
* Licensed under the MIT license.
*
*/
(function ($) {
function Scroller(elem, settings) {
var m,
... | JavaScript |
(function ($) {
$.mobiscroll.themes.jqm = {
defaults: {
jqmBorder: 'a',
jqmBody: 'c',
jqmHeader: 'b',
jqmWheel: 'd',
jqmClickPick: 'c',
jqmSet: 'b',
jqmCancel: 'c'
},
init: function (elm, inst) {
... | JavaScript |
/*jslint eqeq: true, plusplus: true, undef: true, sloppy: true, vars: true, forin: true */
(function ($) {
var defaults = {
inputClass: '',
invalid: [],
rtl: false,
group: false,
groupLabel: 'Groups'
};
$.mobiscroll.presetShort('select');
$.mobiscroll.presets.s... | JavaScript |
/*jslint eqeq: true, plusplus: true, undef: true, sloppy: true, vars: true, forin: true */
(function ($) {
var ms = $.mobiscroll,
defaults = {
invalid: [],
showInput: true,
inputClass: ''
},
preset = function (inst) {
var s = $.extend({}, defa... | JavaScript |
(function ($) {
$.mobiscroll.i18n.de = $.extend($.mobiscroll.i18n.de, {
// Core
setText: 'OK',
cancelText: 'Abbrechen',
// Datetime component
dateFormat: 'dd.mm.yy',
dateOrder: 'ddmmyy',
dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Fr... | JavaScript |
/*
* Translation by: Ivan Gomes <contato@ivangomes.com.br>
*
*/
(function ($) {
$.mobiscroll.i18n['pt-BR'] = $.extend($.mobiscroll.i18n['pt-BR'], {
// Core
setText: 'Selecionar',
cancelText: 'Cancelar',
// Datetime component
dateFormat: 'dd/mm/yy',
dateOrder: 'ddMM... | JavaScript |
(function ($) {
$.mobiscroll.i18n.hu = $.extend($.mobiscroll.i18n.hu, {
// Core
setText: 'OK',
cancelText: 'Mégse',
// Datetime component
dateFormat: 'dd.mm.yy',
dateOrder: 'ddmmyy',
dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szo... | JavaScript |
(function ($) {
$.mobiscroll.i18n.zh = $.extend($.mobiscroll.i18n.zh, {
// Core
setText: '确定',
cancelText: '取消',
// Datetime component
dateFormat: 'dd/mm/yy',
dateOrder: 'ddmmyy',
dayNames: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesShort: ['日','一',... | JavaScript |
(function ($) {
$.mobiscroll.i18n.es = $.extend($.mobiscroll.i18n.es, {
// Core
setText: 'Aceptar',
cancelText: 'Cancelar',
// Datetime component
dateFormat: 'dd/mm/yy',
dateOrder: 'ddmmyy',
dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Vier... | JavaScript |
(function ($) {
$.mobiscroll.i18n.no = $.extend($.mobiscroll.i18n.no, {
// Core
setText: 'OK',
cancelText: 'Avbryt',
// Datetime component
dateFormat: 'dd.mm.yy',
dateOrder: 'ddmmyy',
dayNames: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lø... | JavaScript |
(function ($) {
$.mobiscroll.i18n.fr = $.extend($.mobiscroll.i18n.fr, {
// Core
setText: 'Terminé',
cancelText: 'Annuler',
// Datetime component
dateFormat: 'dd/mm/yy',
dateOrder: 'ddmmyy',
dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Ven... | JavaScript |
(function ($) {
$.mobiscroll.i18n.it = $.extend($.mobiscroll.i18n.it, {
// Core
setText: 'OK',
cancelText: 'Annulla',
// Datetime component
dateFormat: 'dd-mm-yyyy',
dateOrder: 'ddmmyy',
dayNames: ['Domenica', 'LunedÌ', 'MertedÌ', 'Mercoled&Igrav... | JavaScript |
/**
* jQuery-csv (jQuery Plugin)
* version: 0.70 (2012-11-04)
*
* This document is licensed as free software under the terms of the
* MIT License: http://www.opensource.org/licenses/mit-license.php
*
* Acknowledgements:
* The original design and influence to implement this library as a jquery
* plugin is influ... | JavaScript |
/*!
* jQuery Mobile 1.3.2
* Git HEAD hash: 528cf0e96940644ea644096bfeb913ed920ffaef <> Date: Fri Jul 19 2013 22:17:57 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
*/
(function ( root, doc, factory ... | JavaScript |
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with... | JavaScript |
'use strict';
/**
* circular dependency:
*
* Responsibilities:
* Performs the actions necessary to make a prompt visible on the screen (setScreen).
* Receives click and swipe events for navigating across pages.
* Displays pop-up dialogs and toasts.
* Displays the options dialog for changing languag... | JavaScript |
'use strict';
/**
* Manages the execution state and screen history of the overall survey,
* including form validation, saving and marking the form as 'complete'.
*
* Delegates the display of individual screens to the screenManager.
* On page advance, asks the screen manager whether advancing off the
* sc... | JavaScript |
/**
* Global object that is the container for
* - formDef
* - model structure metadata
* - instance metadata
* - survey instance data
*
* The data is accessed via the database.js utilities.
* Those utilities are responsible for write-through
* update of the database. Data is cached here to
* simp... | JavaScript |
/*
This shim object is just a facade for browser testing.
It defines the interface that ODK Survey or other container apps
must implement to work with the javascript library.
It will be replaced by one injected by Android Java code.
*/
window.shim = window.shim || {
showAlerts: false,
refId: null,
... | JavaScript |
/**
* Object that is used by prompts.js to insert all the prompts available to the form designer.
* Declared as a separate empty object so as to eliminate many circular dependencies.
*/
define({}); | JavaScript |
'use strict';
/**
* This is a random collection of methods that don't quite belong anywhere.
*
* A set of utilities, some of which wrap the Java interface (shim.js), and others
* provide useful parsing or interpretation of localization details.
*
*/
define(['mdl','underscore'],function(mdl,_) {
verifyLoa... | JavaScript |
/**
* Simple boilerplate for defining the requirejs settings,
* to initialize parsequery dependencies, and to invoke
* the parsequery.changeUrlHash to interpret the
* window.location.hash value.
*
* Also sets up a timer polling for the completion of the
* jquery mobile platform. After it is initialized,... | JavaScript |
'use strict';
// TODO: Instance level: locale (used), at Table level: locales (available), formPath,
define(['mdl','databaseUtils','opendatakit'], function(mdl, databaseUtils,opendatakit) {
verifyLoad('databaseSchema',
['mdl','databaseUtils','opendatakit'],
[mdl,databaseUtils,opendatakit]);
return {
... | JavaScript |
//Dont use usestrict here or the evaluator will break
/**
* Common functions accessible from the user's Javascript eval environment
* (for use within their formulas).
*/
//TODO: These functions need unit testing.
define(['opendatakit','database', 'underscore'],
function(opendatakit, database, _) {
ve... | JavaScript |
/*
The landing object is loaded very early in the page-load process
and is used by the container app to publish a doAction() response
back into the javascript application.
If the javascript application has a controller registered, then
the publishing is an immediate pass-through to the controller.
Otherwise,... | JavaScript |
'use strict';
/**
* This file contains utilities that operate on the data as represented in the JSON
* and as serialized into and out of the database or session storage.
*/
define(['mdl','opendatakit','XRegExp'], function(mdl,opendatakit,XRegExp) {
verifyLoad('databaseUtils',
['mdl','opendatakit','XRegExp... | JavaScript |
/**
* Object that is used by screens.js to insert all the screens available to the form designer.
* Declared as a separate empty object so as to eliminate many circular dependencies.
*/
define({});
| JavaScript |
/**
* Configuration settings for jquery mobile to disable
* dynamic page transitions (loadings of pages via links),
* disable page history and to disable all hashChange
* detection or handling (do our own navigation handling).
*/
define(['jquery'], function($){
}); | JavaScript |
'use strict';
/**
circular dependency upon: controller, builder (set via initialize)
2 public APIs:
initialize(controller, builder) -- initialize to avoid circular load dependency.
changeUrlHash(ctxt) -- handle changes to the window.location.hash
*/
define(['opendatakit','database','jquery'],
funct... | JavaScript |
'use strict';
// TODO: Instance level: locale (used), at Table level: locales (available), formPath,
define(['mdl','opendatakit','databaseUtils','databaseSchema','jquery'], function(mdl,opendatakit,databaseUtils,databaseSchema,$) {
verifyLoad('database',
['mdl','opendatakit','databaseUtils','databaseSchema','j... | JavaScript |
/**
* Handlebars helper functions for use within handlebars templates.
*
* These are invoked via {{helperFunction arg1}} or {{helperFunction arg1 arg2}}
* within the handelbars templates.
*/
define(['database','opendatakit','handlebars','formulaFunctions', 'text!templates/labelHint.handlebars','jquery'],
fu... | JavaScript |
/*jslint eqeq: true, evil: true, plusplus: true, todo: true, vars: true, white: true, devel: true */
'use strict';
/**
* All the standard prompts available to a form designer.
*/
define(['mdl','database','opendatakit','controller','backbone','formulaFunctions','handlebars','promptTypes','jquery','underscore', 'trans... | JavaScript |
'use strict';
/**
* circular dependency: 'controller' -- to avoid a circular dependency, 'controller' is passed
* in during initialize() and stored in a member variable.
*
* Responsibilities:
* Performs the actions necessary to make a screen visible on the screen (setScreen).
* Receives click and swipe ev... | JavaScript |
//'use strict';
/**
* Main entry point: buildSurvey
*
* Given a form definition (formDef.json), constructs the calculations and prompts lists that are then
* injected into the controller.
*
* Major task is to construct function()s for the calculates, constraints and other equations.
*
*/
define(['co... | JavaScript |
requirejs.config({
baseUrl: '../../',
paths: {
// third-party libraries we depend upon
jqmobile : 'libs/jquery.mobile-1.2.0/jquery.mobile-1.2.0',
jquery : 'libs/jquery.1.8.2',
backbone : 'libs/backbone.0.9.2',
handlebars : 'libs/handlebars.1.0.0.beta.6',
... | JavaScript |
beforeEach(function() {
this.addMatchers({
toBePlaying: function(expectedSong) {
var player = this.actual;
return player.currentlyPlayingSong === expectedSong &&
player.isPlaying;
}
});
});
| JavaScript |
//TODO: I would like to see builder function as more of a standalone module
//without all the dependencies.
//Importing mdl and setting its formDef property is a hack to avoid dealing
//with all the configuration that would normally be done in
//in parsequery.js and main.js
//TODO: Invariants that might be useful to te... | JavaScript |
require(['underscore', 'formulaFunctions'], function(_, formulaFunctions){
describe("Formula Functions:", function() {
describe("selected", function() {
it("should be true if the given value is in the select array.", function() {
expect(formulaFunctions.selected(['a', 'b', 'c... | JavaScript |
require(['underscore', 'prompts'], function(_, promptTypes){
describe("Prompts", function() {
it("should only have lower case names.", function() {
//This is because the prompt names in the formDef
//are all converted to lowercase.
expect(_(promptTypes).keys().every(funct... | JavaScript |
describe("Player", function() {
var player;
var song;
beforeEach(function() {
player = new Player();
song = new Song();
});
it("should be able to play a Song", function() {
player.play(song);
expect(player.currentlyPlayingSong).toEqual(song);
//demonstrates use of custom matcher
e... | JavaScript |
function Song() {
}
Song.prototype.persistFavoriteStatus = function(value) {
// something complicated
throw new Error("not yet implemented");
}; | JavaScript |
function Player() {
}
Player.prototype.play = function(song) {
this.currentlyPlayingSong = song;
this.isPlaying = true;
};
Player.prototype.pause = function() {
this.isPlaying = false;
};
Player.prototype.resume = function() {
if (this.isPlaying) {
throw new Error("song is already playing");
}
this.i... | JavaScript |
jasmine.HtmlReporterHelpers = {};
jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
var el = document.createElement(type);
for (var i = 2; i < arguments.length; i++) {
var child = arguments[i];
if (typeof child === 'string') {
el.appendChild(document.createTextNode(ch... | JavaScript |
var isCommonJS = typeof window == "undefined" && typeof exports == "object";
/**
* Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
*
* @namespace
*/
var jasmine = {};
if (isCommonJS) exports.jasmine = jasmine;
/**
* @private
*/
jasmine.unimplementedMethod_ = function() {
t... | JavaScript |
/**
* Simple boilerplate for defining the requirejs settings,
* to initialize parsequery dependencies, and to establish
* the parsequery.hashChangeHandler for hash change events.
*
* Also sets up a timer polling for the completion of the
* jquery mobile platform. After it is initialized, the
* timer then... | JavaScript |
/**
* This modules defines all the translations used within the ODK Survey core code.
* It may end up being preferable to separate the translations into multiple files,
* one per language.
*/
define({
"acknLabel" : {
"default": "Acknowledge",
"hindi": "स्वीकार करना"
},
"deselec... | JavaScript |
load('WebContent/js-xlsx/jszip.js');
load('WebContent/js-xlsx/xlsx.js');
load('WebContent/XRegExp-All-3.0.0-pre-2013-08-27.js');
load('WebContent/underscore.js');
load('WebContent/XLSXConverter.js');
function removeEmptyStrings(rObjArr){
var outArr = [];
_.each(rObjArr, function(row){
var outRow = Objec... | JavaScript |
/*!
* XRegExp-All 3.0.0-pre
* <http://xregexp.com/>
* Steven Levithan © 2012 MIT License
*/
// Module systems magic dance
;(function(definition) {
// Don't turn on strict mode for this function, so it can assign to global
var self;
// RequireJS
if (typeof define === 'function') {
... | JavaScript |
/*
* Copyright (C) 2013 University of Washington
*
* 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 ... | JavaScript |
var JSZip = function(data, options) {
this.files = {};
this.root = "";
if (data) {
this.load(data, options);
}
};
JSZip.signature = {
LOCAL_FILE_HEADER: "PK",
CENTRAL_FILE_HEADER: "PK",
CENTRAL_DIRECTORY_END: "PK",
ZIP64_CENTRAL_DIRECTORY_LOCATOR: "PK",
ZIP64_CENTRAL... | JavaScript |
/* vim: set ts=2: */
/*jshint eqnull:true */
/* Spreadsheet Format -- jump to XLSX for the XLSX code */
var SSF = (function() {
var SSF = {};
String.prototype.reverse=function(){return this.split("").reverse().join("");};
var _strrev = function(x) { return String(x).reverse(); };
function fill(c,l) { return new Array(... | JavaScript |
// Underscore.js 1.4.4
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on... | JavaScript |
// override default scrolling behavior
function FixRibbonAndWorkspaceDimensions(){
ULSxSy:;
g_frl = true;
var elmRibbon = GetCachedElement("s4-ribbonrow");
var elmWorkspace = GetCachedElement("s4-workspace");
var elmTitleArea = GetCachedElement("s4-titlerow");
var elmBodyTable = GetCachedElement("s4-... | JavaScript |
var TSF_currentVideo;
var TSF_VideoPlatform = "Flash"; // "Silverlight" || "Flash"
function TSF_DoInit() {
var oImgs= window.document.getElementsByTagName('img');
var oNewDiv;
var oPlaceHolder;
var oLinkContainer;
var oVideoContainer;
var sVideoAlign;
var sLo... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.