code
stringlengths
1
2.08M
language
stringclasses
1 value
(function ($) { Drupal.behaviors.openid = { attach: function (context) { var loginElements = $('.form-item-name, .form-item-pass, li.openid-link'); var openidElements = $('.form-item-openid-identifier, li.user-link'); var cookie = $.cookie('Drupal.visitor.openid_identifier'); // This behavior attach...
JavaScript
(function ($) { Drupal.behaviors.nodeFieldsetSummaries = { attach: function (context) { $('fieldset.node-form-revision-information', context).drupalSetSummary(function (context) { var revisionCheckbox = $('.form-item-revision input', context); // Return 'New revision' if the 'Create new revision' c...
JavaScript
(function ($) { Drupal.behaviors.contentTypes = { attach: function (context) { // Provide the vertical tab summaries. $('fieldset#edit-submission', context).drupalSetSummary(function(context) { var vals = []; vals.push(Drupal.checkPlain($('#edit-title-label', context).val()) || Drupal.t('Requires...
JavaScript
(function ($) { /** * Show/hide the 'Email site administrator when updates are available' checkbox * on the install page. */ Drupal.hideEmailAdministratorCheckbox = function () { // Make sure the secondary box is shown / hidden as necessary on page load. if ($('#edit-update-status-module-1').is(':checked')) { ...
JavaScript
(function ($) { /** * Checks to see if the cron should be automatically run. */ Drupal.behaviors.cronCheck = { attach: function(context, settings) { if (settings.cronCheck || false) { $('body').once('cron-check', function() { // Only execute the cron check if its the right time. if (Math....
JavaScript
/** * @file * Attaches behaviors for the Contextual module. */ (function ($) { Drupal.contextualLinks = Drupal.contextualLinks || {}; /** * Attaches outline behavior for regions associated with contextual links. */ Drupal.behaviors.contextualLinks = { attach: function (context) { $('div.contextual-links-w...
JavaScript
/** * @file * Attaches the behaviors for the Field UI module. */ (function($) { Drupal.behaviors.fieldUIFieldOverview = { attach: function (context, settings) { $('table#field-overview', context).once('field-overview', function () { Drupal.fieldUIFieldOverview.attachUpdateSelects(this, settings); ...
JavaScript
/** * @file * Attaches the behaviors for the Overlay child pages. */ (function ($) { /** * Attach the child dialog behavior to new content. */ Drupal.behaviors.overlayChild = { attach: function (context, settings) { // Make sure this behavior is not processed more than once. if (this.processed) { ...
JavaScript
/** * @file * Attaches the behaviors for the Overlay parent pages. */ (function ($) { /** * Open the overlay, or load content into it, when an admin link is clicked. */ Drupal.behaviors.overlayParent = { attach: function (context, settings) { if (Drupal.overlay.isOpen) { Drupal.overlay.makeDocumentUn...
JavaScript
(function ($) { /** * Add functionality to the profile drag and drop table. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. It shows and hides * a warning message when removing the last field from a profile category. */ Drupal....
JavaScript
(function ($) { Drupal.behaviors.menuFieldsetSummaries = { attach: function (context) { $('fieldset.menu-link-form', context).drupalSetSummary(function (context) { if ($('.form-item-menu-enabled input', context).is(':checked')) { return Drupal.checkPlain($('.form-item-menu-link-title input', contex...
JavaScript
(function ($) { Drupal.behaviors.menuChangeParentItems = { attach: function (context, settings) { $('fieldset#edit-menu input').each(function () { $(this).change(function () { // Update list of available parent menu items. Drupal.menu_update_parent_list(); }); }); } }; /** * F...
JavaScript
/** * @file * Attaches behaviors for the Dashboard module. */ (function ($) { /** * Implements Drupal.behaviors for the Dashboard module. */ Drupal.behaviors.dashboard = { attach: function (context, settings) { $('#dashboard', context).once(function () { $(this).prepend('<div class="customize clear...
JavaScript
(function ($) { /** * Attaches language support to the jQuery UI datepicker component. */ Drupal.behaviors.localeDatepicker = { attach: function(context, settings) { // This code accesses Drupal.settings and localized strings via Drupal.t(). // So this code should run after these are initialized. By placin...
JavaScript
Drupal.t("Standard Call t"); Drupal . t ( "Whitespace Call t" ) ; Drupal.t('Single Quote t'); Drupal.t('Single Quote \'Escaped\' t'); Drupal.t('Single Quote ' + 'Concat ' + 'strings ' + 't'); Drupal.t("Double Quote t"); Drupal.t("Double Quote \"Escaped\" t"); Drupal.t("Double Quote " + "Concat " + "strings " + "t");...
JavaScript
/** * @file * Attaches the behaviors for the Color module. */ (function ($) { Drupal.behaviors.color = { attach: function (context, settings) { var i, j, colors, field_name; // This behavior attaches by ID, so is only valid once on a page. var form = $('#system-theme-settings .color-form', context).o...
JavaScript
/** * @file * Attaches preview-related behavior for the Color module. */ (function ($) { Drupal.color = { callback: function(context, settings, form, farb, height, width) { // Solid background. $('#preview', form).css('backgroundColor', $('#palette input[name="palette[base]"]', form).val()); ...
JavaScript
(function ($) { /** * Provide the summary information for the block settings vertical tabs. */ Drupal.behaviors.blockSettingsSummary = { attach: function (context) { // The drupalSetSummary method required for this behavior is not available // on the Blocks administration page, so we need to make sure this...
JavaScript
(function ($) { /** * Add the cool table collapsing on the testing overview page. */ Drupal.behaviors.simpleTestMenuCollapse = { attach: function (context, settings) { var timeout = null; // Adds expand-collapse functionality. $('div.simpletest-image').once('simpletest-image', function () { var $...
JavaScript
(function ($) { /** * Attaches sticky table headers. */ Drupal.behaviors.tableHeader = { attach: function (context, settings) { if (!$.support.positionFixed) { return; } $('table.sticky-enabled', context).once('tableheader', function () { $(this).data("drupal-tableheader", new Drupal.table...
JavaScript
/** * @file * Conditionally hide or show the appropriate settings and saved defaults * on the file transfer connection settings form used by authorize.php. */ (function ($) { Drupal.behaviors.authorizeFileTransferForm = { attach: function(context) { $('#edit-connection-settings-authorize-filetransfer-defau...
JavaScript
(function ($) { /** * Drag and drop table rows with field manipulation. * * Using the drupal_add_tabledrag() function, any table with weights or parent * relationships may be made into draggable tables. Columns containing a field * may optionally be hidden, providing a better user experience. * * Created tableD...
JavaScript
(function ($) { Drupal.behaviors.textarea = { attach: function (context, settings) { $('.form-textarea-wrapper.resizable', context).once('textarea', function () { var staticOffset = null; var textarea = $(this).addClass('resizable-textarea').find('textarea'); var grippie = $('<div class="grippi...
JavaScript
(function ($) { /** * Toggle the visibility of a fieldset using smooth animations. */ Drupal.toggleFieldset = function (fieldset) { var $fieldset = $(fieldset); if ($fieldset.is('.collapsed')) { var $content = $('> .fieldset-wrapper', fieldset).hide(); $fieldset .removeClass('collapsed') .tri...
JavaScript
(function ($) { /** * The base States namespace. * * Having the local states variable allows us to use the States namespace * without having to always declare "Drupal.states". */ var states = Drupal.states = { // An array of functions that should be postponed. postponed: [] }; /** * Attaches the states. */...
JavaScript
(function ($) { /** * Attaches the batch behavior to progress bars. */ Drupal.behaviors.batch = { attach: function (context, settings) { $('#progress', context).once('batch', function () { var holder = $(this); // Success: redirect to the summary. var updateCallback = function (progress, sta...
JavaScript
(function ($) { /** * Set the client's system time zone as default values of form fields. */ Drupal.behaviors.setTimezone = { attach: function (context, settings) { $('select.timezone-detect', context).once('timezone', function () { var dateString = Date(); // In some client environments, date stri...
JavaScript
(function ($) { /** * Retrieves the summary for the first element. */ $.fn.drupalGetSummary = function () { var callback = this.data('summaryCallback'); return (this[0] && callback) ? $.trim(callback(this[0])) : ''; }; /** * Sets the summary for all matched elements. * * @param callback * Either a functio...
JavaScript
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} }; // Allow other JavaScript libraries to use $. jQuery.noConflict(); (function ($) { /** * Override jQuery.fn.init to guard against XSS attacks. * * See http://bugs.jquery.com/ticket/9521 */ var jquery_init = $.fn.init; $.fn.init = function...
JavaScript
(function ($) { /** * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML). * * Ajax is a method of making a request via JavaScript while viewing an HTML * page. The request returns an array of commands encoded in JSON, which is * then executed to make any changes that are necessary to ...
JavaScript
(function ($) { /** * Attaches the autocomplete behavior to all required fields. */ Drupal.behaviors.autocomplete = { attach: function (context, settings) { var acdb = []; $('input.autocomplete', context).once('autocomplete', function () { var uri = this.value; if (!acdb[uri]) { acdb[ur...
JavaScript
(function ($) { /** * This script transforms a set of fieldsets into a stack of vertical * tabs. Another tab pane can be selected by clicking on the respective * tab. * * Each tab may have a summary which can be updated by another * script. For that to work, each fieldset has an associated * 'verticalTabCallba...
JavaScript
/** * jQuery Once Plugin v1.2 * http://plugins.jquery.com/project/once * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function ($) { var cache = {}, uuid = 0; /** * Filters elements by whether they ha...
JavaScript
(function ($) { /** * Attach the machine-readable name form element behavior. */ Drupal.behaviors.machineName = { /** * Attaches the behavior. * * @param settings.machineName * A list of elements to process, keyed by the HTML ID of the form element * containing the human-readable value. Each ele...
JavaScript
(function ($) { /** * A progressbar object. Initialized with the given id. Must be inserted into * the DOM afterwards through progressBar.element. * * method is the function which will perform the HTTP request to get the * progress bar state. Either "GET" or "POST". * * e.g. pb = new progressBar('myProgressBar'...
JavaScript
/** * Cookie plugin 1.0 * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=...
JavaScript
(function ($) { Drupal.behaviors.tableSelect = { attach: function (context, settings) { // Select the inner-most table in case of nested tables. $('th.select-all', context).closest('table').once('table-select', Drupal.tableSelect); } }; Drupal.tableSelect = function () { // Do not add a "Select all" che...
JavaScript
(function ($) { Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) { // Change the logo to be the real one. if (!this.logoChanged) { $('#preview #preview-logo img').attr('src', Drupal.settings.color.logo); this.logoChanged = true;...
JavaScript
// Copyright 2008 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 ...
JavaScript
/* * Autocomplete - jQuery plugin 1.0.2 * * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.autocomplete....
JavaScript
/** * Ajax Queue Plugin * * Homepage: http://jquery.com/plugins/project/ajaxqueue * Documentation: http://docs.jquery.com/AjaxQueue */ /** <script> $(function(){ jQuery.ajaxQueue({ url: "test.php", success: function(html){ jQuery("ul").append(html); } }); jQuery.ajaxQueue({ url: "test.p...
JavaScript
/*global analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ (function (window) { analogue.extend(Function.prototype, { bind: analogue.bind, extend: analogue.ext...
JavaScript
/*global analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.elements = (function (window) { var booleans = { 'checked': 'checked', 'disabled': 'disabled'...
JavaScript
// Analogue 1.09.5, Copyright (c) Analogue Web Design LLC, all rights reserved. /*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ var analogue = (function () { var build = new Date('June...
JavaScript
/*global analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.selectors = (function () { var trim = function (string) { return string.replace(/^\s+|\s+$/g, ''); ...
JavaScript
/*global analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.events = (function (window) { var guid = 0, meta = null, root = document.documentElement; if (root.attach...
JavaScript
/*global ActiveXObject, analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.msie = (function () { var activators = { onactive: { on: 'mousedown', ...
JavaScript
/*global analogue, window*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.detect = (function (window) { var a, div = document.createElement('div'), root = document.documentEl...
JavaScript
/*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ var analogue = (function () { var build = new Date('%%%BUILDDATE%%%'), versioning = [1, build.getFullYear().toString().slice(2), build.get...
JavaScript
// Analogue.MSIE 1.09.5, Copyright (c) Analogue Web Design LLC, all rights reserved. /*global ActiveXObject, analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.msie = (funct...
JavaScript
/*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ (function (window) { if (document.addEventListener) { document.addEventListener('DOMContentLoaded', document.ready, false); ...
JavaScript
/*global analogue*//*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/ analogue.methods = { addEvent: analogue.events.add, delegateEvent: function (type, listener, tag) { retur...
JavaScript
/*global analogue*/ /*jslint indent: 4*/ /*Analogue.Fx 1.11.12, Copyright (c) 2011 Analogue Web Design LLC, all rights reserved.*/ analogue.extend((function (window, $) { 'use strict'; var build = new Date(1323917866593), easings = { // BACK EASING: overshooting cubic easing ...
JavaScript
/*jslint indent: 4*/ /*Analogue 1.11.12, Copyright (c) 2011 Analogue Web Design LLC, all rights reserved.*/ var analogue = (function (document, push, root, slice, window) { 'use strict'; if (typeof Array.prototype.indexOf !== 'function') { Array.prototype.indexOf = function indexOf(item, i) { ...
JavaScript
/*global analogue*/ /*jslint indent: 4*/ /*Analogue.wysiwym 1.11.12, Copyright (c) 2011 Analogue Web Design LLC, all rights reserved.*/ analogue.extend((function (document, window, $) { 'use strict'; var build = new Date(1324004457014), Chunk = function (instance) { return this....
JavaScript
/*global analogue*/ /*jslint indent: 4*/ /*Analogue.Forms 1.11.12, Copyright (c) 2011 Analogue Web Design LLC, all rights reserved.*/ analogue.extend((function (document, window, $) { 'use strict'; var build = new Date(1323918453351), filter = function (tags) { var regex = new R...
JavaScript
/*global analogue*/ /*jslint indent: 4*/ /*Analogue.Ajax 1.11.12, Copyright (c) 2011 Analogue Web Design LLC, all rights reserved.*/ analogue.extend((function (document, push, window, $) { 'use strict'; var build = new Date(1323831486346), guid = 1E3, inject = function (json) { ...
JavaScript
/*global analogue*/ /*jslint indent: 4*/ /*Analogue.MSIE 1.11.12, Copyright (c) 2011 Analogue Web Design LLC, all rights reserved.*/ analogue.msie = (function (document, window, $) { 'use strict'; var activators = { onactive: { on: 'mousedown', off: 'mouse...
JavaScript
/** * NetteForms - simple form validation. * * This file is part of the Nette Framework. * Copyright (c) 2004, 2013 David Grudl (http://davidgrudl.com) */ var Nette = Nette || {}; /** * Attaches a handler to an event for the element. */ Nette.addEvent = function(element, on, callback) { var origi...
JavaScript
$(function(){ });
JavaScript
/** * NetteQ * * This file is part of the Nette Framework. * Copyright (c) 2004, 2013 David Grudl (http://davidgrudl.com) */ var Nette = Nette || {}; (function(){ // simple class builder Nette.Class = function(def) { var hasProp = Object.prototype.hasOwnProperty, nm, cl = hasProp.call(def, 'con...
JavaScript
/* * jQuery textarea suggest plugin * * Copyright (c) 2009-2010 Roman Imankulov * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Requires: * - jQuery (tested with 1.3.x and 1.4.x) * - jquery.a-...
JavaScript
/*! * a-tools 1.5.2 * * Copyright (c) 2009 Andrey Kramarev(andrey.kramarev[at]ampparit.com), Ampparit Inc. (www.ampparit.com) * Licensed under the MIT license. * http://www.ampparit.fi/a-tools/license.txt * * Basic usage: <textarea></textarea> <input type="text" /> // Get current select...
JavaScript
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */ var swfobject = function() { var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.Shoc...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.attachEvent...
JavaScript
/* Copyright 2010 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,...
JavaScript
/* Copyright 2010 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,...
JavaScript
(function () { var host = window.location.hostname; var port = window.location.port; var videoPlugin; var videoStream; var audioPlugin; var audioStream; var error; var volume; function stream(object,type,done) { var state = "idle"; return { restart:...
JavaScript
(function () { var translations = { en: { 1:"About", 2:"Return", 3:"Change quality settings", 4:"Flash/Vibrator", 5:"Click on the torch to enable or disable the flash", 6:"Play a prerecorded sound", 7:"Connect !!", 8:"...
JavaScript
document.createElement('header'); document.createElement('nav'); document.createElement('section'); document.createElement('article'); document.createElement('aside'); document.createElement('footer'); document.createElement('hgroup'); $(document).ready(function () { $('.section-content,#status-container').addClas...
JavaScript
// Copyright 2012 Google Inc. /** * @author Chris Broadfoot (Google) * @fileoverview * An info panel, which complements the map view of the Store Locator. * Provides a list of stores, location search, feature filter, and directions. */ /** * Licensed under the Apache License, Version 2.0 (the "License"); * you...
JavaScript
// Copyright 2012 Google Inc. /** * @name Store Locator for Google Maps API V3 * @version 0.1 * @author Chris Broadfoot (Google) * @fileoverview * This library makes it easy to create a fully-featured Store Locator for * your business's website. */ /** * @license * * Copyright 2012 Google Inc. * * License...
JavaScript
// Copyright 2012 Google Inc. /** * @author Chris Broadfoot (Google) * @fileoverview * Allows developers to specify a static set of stores to be used in the * storelocator. */ /** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
JavaScript
// Copyright 2012 Google Inc. /** * @author Chris Broadfoot (Google) * @fileoverview * Store model class for Store Locator library. */ /** * 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 ...
JavaScript
// Copyright 2012 Google Inc. /** * @author Chris Broadfoot (Google) * @fileoverview * FeatureSet class for Store Locator library. A mutable, ordered set of * storeLocator.Features. */ /** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with th...
JavaScript
// Copyright 2012 Google Inc. /** * @author Chris Broadfoot (Google) * @fileoverview * This library makes it easy to create a fully-featured Store Locator for * your business's website. */ /** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wit...
JavaScript
// Copyright 2012 Google Inc. /** * @author Chris Broadfoot (Google) * @fileoverview * Feature model class for Store Locator library. */ /** * 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 Licens...
JavaScript
// A simple demo showing how to grab places using the Maps API Places Library. // Useful extensions may include using "name" filtering or "keyword" search. google.maps.event.addDomListener(window, 'load', function() { var map = new google.maps.Map(document.getElementById('map-canvas'), { center: new google.maps....
JavaScript
google.maps.event.addDomListener(window, 'load', function() { var map = new google.maps.Map(document.getElementById('map-canvas'), { center: new google.maps.LatLng(-28, 135), zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }); var panelDiv = document.getElementById('panel'); var data = new Medic...
JavaScript
// Store locator with customisations // - custom marker // - custom info window (using Info Bubble) // - custom info window content (+ store hours) var ICON = new google.maps.MarkerImage('medicare.png', null, null, new google.maps.Point(14, 13)); var SHADOW = new google.maps.MarkerImage('medicare-shadow.png', nul...
JavaScript
/** * @extends storeLocator.StaticDataFeed * @constructor */ function MedicareDataSource() { $.extend(this, new storeLocator.StaticDataFeed); var that = this; $.get('medicare.csv', function(data) { that.setStores(that.parse_(data)); }); } /** * @const * @type {!storeLocator.FeatureSet} * @private *...
JavaScript
/** * @implements storeLocator.DataFeed * @constructor */ function MedicareDataSource() { } MedicareDataSource.prototype.getStores = function(bounds, features, callback) { var center = bounds.getCenter(); var that = this; var audioFeature = this.FEATURES_.getById('Audio-YES'); var wheelchairFeature = this.F...
JavaScript

JavaScript
var driver = new webdriver.Builder().build(); driver.get('http://www.google.com'); var element = driver.findElement(webdriver.By.name('q')); element.sendKeys('Cheese!'); element.submit(); driver.getTitle().then(function(title) { console.log('Page title is: ' + title); }); driver.wait(function() { return driver.g...
JavaScript
var preferenceFollower; $(document).ready(function() { //Hide the introductory text (which is useful in the pdf version) $(".toggled p").hide(); //Hide the code and insert a button before it with the value equals to the class of the code languages = {'java':false,'csharp':false,'python':false,'ruby':f...
JavaScript
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and deltaY * *...
JavaScript
function zeroPad(n) { if (n < 0) throw new Error('n is negative'); return (n < 10) ? '0' + n : n; } function convertToGDataDate(/*Date*/ date) { return date.getFullYear() + '-' + zeroPad(date.getMonth() + 1) + '-' + zeroPad(date.getDate()); } function getEvents(startDate, endDate, callBack, ...
JavaScript
function showVideo() { document.getElementById('introVideo').style.display = 'block'; return false; }
JavaScript
// Password strength meter v2.0 // Matthew R. Miller - 2007 // www.codeandcoffee.com // Based off of code from: // http://www.intelligent-web.co.uk // http://www.geekwisdom.com/dyn/passwdmeter /* Password Strength Algorithm: Password Length: 5 Points: Less than 4 characters 10 Points: 5 to 7 characters 25 ...
JavaScript
var ec2ui_ConfigureHealthCheck = { ec2ui_session : null, retVal : null, launch : function() { this.retVal.LoadBalancerName = document.getElementById("ec2ui.loadbalancer.LoadBalancerName").value.trim(); this.retVal.Target = document.getElementById("ec2ui.loadbalancer.target").value.trim(); t...
JavaScript
var ec2ui_LeaseOfferingsTreeView = { COLNAMES : ['offering.id', 'offering.instanceType', 'offering.azone', 'offering.duration', 'offering.fixedPrice', 'offering.usagePrice', 'offering.description'], imageIdRegex : ne...
JavaScript
// controller: slightly higher level of abstraction over the EC2 API var ec2ui_controller = { getNsResolver : function() { return ec2_httpclient.getNsResolver(); }, registerImageInRegion : function(manifestPath, region, callback) { region = region.toLowerCase(); // Determine the cu...
JavaScript
var ec2_SecurityGroupDetails = { init : function() { var group = window.arguments[0]; document.getElementById("ec2ui.secgroup.name").value = group.name; document.getElementById("ec2ui.secgroup.ownerid").value = group.ownerId; document.getElementById("ec2ui.secgroup.description").valu...
JavaScript
///////////////////////////////////////////////// ///////////////////////////////////////////////// // // Basic JavaScript File and Directory IO module // By: MonkeeSage, v0.1 // ///////////////////////////////////////////////// ///////////////////////////////////////////////// if (typeof(JSIO) != 'boolean') { var ...
JavaScript
function empty() { } ; var ec2_httpclient = { handler : null, ec2ui_session : null, uri : null, auxObj : null, serviceURL : null, regions : null, elbURL : null, accessCode : null, secretKey : null, timers : {}, // Change the name since Eucalyptus 1.6.2 has a problem with...
JavaScript
var ec2ui_BundleTasksTreeView = { COLNAMES: [ 'bun.id', 'bun.instanceId', 'bun.state', 'bun.startTime', 'bun.updateTime', 'bun.s3bucket', 'bun.s3prefix', 'bun.errorMsg' ], treeBox: null, selection: null, selectedBundleId: null, task...
JavaScript
var ec2_VolumeAttacher = { ec2ui_session : null, retVal : null, volumeId : null, attach : function() { if (!this.validateDevice()) return false; this.retVal.instanceId = document.getElementById("ec2ui.newattachment.instanceId").value.split(":")[0]; this.retVal.volumeId = this.volumeId; this.re...
JavaScript
// Copyright (c) 2005 Tom Wu // All Rights Reserved. // See "LICENSE" for details. // Basic JavaScript BN library - subset useful for RSA encryption. // Bits per digit var dbits; // JavaScript engine analysis var canary = 0xdeadbeefcafe; var j_lm = ((canary&0xffffff)==0xefcafe); // (public) Constructor function Bi...
JavaScript
var ec2_KeyPairDetails = { init : function() { var keypair = window.arguments[0]; document.getElementById("ec2ui.keypair.name").value = keypair.name; document.getElementById("ec2ui.keypair.fingerprint").value = keypair.fingerprint; } }
JavaScript
function generateCSVForObject(obj) { var pairs = new Array(); for (k in obj) { if (obj.hasOwnProperty(k)) { var v = obj[k]; if (v != null) { if (typeof v === 'object') { pairs.push(generateCSVForObject(v)); } else if (typeof v !...
JavaScript