code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/**
* Catalan translation
* @author Sergio Jovani <lesergi@gmail.com>
* @version 2011-11-13
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.ca = {
translator : 'Sergio Jovani <lesergi@gmail.com>',
language : 'Català',
direction : 'ltr',
... | JavaScript |
/**
* Polish translation
* @author Marcin Mikołajczyk <marcin@pjwstk.edu.pl>
* @version 2012-01-28
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.pl = {
translator : 'Marcin Mikołajczyk <marcin@pjwstk.edu.pl>',
language : 'Polski',
direct... | JavaScript |
/**
* Brazilian Portuguese translation
* @author Leandro Carvalho <contato@leandrowebdev.net>
* @version 2011-07-09
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.pt_BR = {
translator : 'Leandro Carvalho <contato@leandrowebdev.net>',
language... | JavaScript |
/**
* Czech translation
* @author <gridley.jay@gmail.com>
* @version 2011-07-27
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.cs = {
translator : '<gridley.jay@gmail.com>',
language : 'český',
direction : 'ltr',
messages : {
/***... | JavaScript |
/**
* Hungarian translation
* @author Gáspár Lajos <info@glsys.eu>
* @version 2011-09-10
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.hu = {
translator : 'Gáspár Lajos <info@glsys.eu>',
language : 'magyar',
direction : 'ltr',
message... | JavaScript |
/**
* Arabic translation (Syrian Localization, it may differ if you aren't from Syria or any Country in Middle East)
* @author Tawfek Daghistani <tawfekov@gmail.com>
* @version 2011-07-09
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.ar = {
translat... | JavaScript |
/**
* Bulgarian translation
* @author Stamo Petkov <stamo.petkov@gmail.com>
* @version 2012-02-18
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.bg = {
translator : 'Stamo Petkov <stamo.petkov@gmail.com>',
language : 'Български',
directio... | JavaScript |
/**
* German translation
* @author JPG & Mace <dev@flying-datacenter.de>
* @version 2011-07-26
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.de = {
translator : 'JPG & Mace <dev@flying-datacenter.de>',
language : 'Deutsch',
direction : ... | JavaScript |
/**
* French translation
* @author Régis Guyomarch <regisg@gmail.com>
* @version 2011-07-11
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.fr = {
translator : 'Régis Guyomarch <regisg@gmail.com>',
language : 'française',
direction : 'ltr... | JavaScript |
/**
* Norwegian translation
* @author Stian Jacobsen <stian@promonorge.no>
* @version 2012-07-03
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.no = {
translator : 'Stian Jacobsen <stian@promonorge.no>',
language : 'Norwegian Bokmål',
dir... | JavaScript |
/**
* elFinder translation template
* use this file to create new translation
* submit new translation via https://github.com/Studio-42/elFinder/issues
* or make a pull request
*/
/**
* XXXXX translation
* @author Translator Name <translator@email.tld>
* @version 201x-xx-xx
*/
if (elFinder && elFinder.protot... | JavaScript |
/**
* Japanese translation
* @author Tomoaki Yoshida <info@yoshida-studio.jp>
* @version 2012-02-25
*/
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
elFinder.prototype.i18.jp = {
translator : 'Tomoaki Yoshida <info@yoshida-studio.jp>',
language : 'Japanese',
dire... | JavaScript |
/**
* Provides requestAnimationFrame in a cross browser way.
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
... | JavaScript |
/**
* @author alteredq / http://alteredqualia.com/
* @author mr.doob / http://mrdoob.com/
*/
Detector = {
canvas : !! window.CanvasRenderingContext2D,
webgl : ( function () { try { return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); } catch( e ) {... | JavaScript |
/**
* dat.globe Javascript WebGL Globe Toolkit
* http://dataarts.github.com/dat.globe
*
* Copyright 2011 Data Arts Team, Google Creative Lab
*
* 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 Licen... | JavaScript |
/**
* Provides requestAnimationFrame in a cross browser way.
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame || // commen... | JavaScript |
var Shaders = {
'earth' : {
uniforms: {
"texture": { type: "t", value: 0, texture: null }
},
vertexShader: [
"varying vec3 vNormal;",
"varying vec2 vUv;",
"void main() {",
"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
"vNormal = normalize( normalMatrix ... | JavaScript |
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
| JavaScript |
function validate_required(field,alerttxt) {
with (field) {
if (value==null||value=="") {
alert(alerttxt);return false;
} else {
return true;
}
}
}
function verifypeople(thisform) {
with (thisform) {
if(surname.value == "Last Name") {
alert("Please enter a surname. It is... | JavaScript |
$(function () {
$.validator.addMethod('confirm', function(value, element) {
var re = /(.*)confirm/i;
var otherName = re.exec(element.name, '$1')[1];
var other = element.form.elements[otherName];
return element.value === other.value;
});
$('#register').validate({
... | JavaScript |
$(function() {
var $el = $('#headquote');
$el.data('quotes', {
quotes: [
{quote: 'A memory is what is left when something happens and does not completely unhappen', source: 'Edward de Bono'},
{quote: 'Cherish all your happy moments: they fine a fine cushion for old age', source: 'Tarkington Booth'},
... | JavaScript |
$(function() {
quotes = [
{quote: 'A memory is what is left when something happens and does not completely unhappen', source: 'Edward de Bono'},
{quote: 'Cherish all your happy moments: they form a fine cushion for old age', source: 'Tarkington Booth'},
{quote: 'Every goodbye is the ... | JavaScript |
/*
* jQuery UI 1.7.2
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
;jQuery.ui || (function($) {
var _remove = $.fn.remove,
isFF2 = $.browser.mozilla && (parseFloa... | JavaScript |
/**
* jQuery.query - Query String Modification and Creation for jQuery
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
* Date: 2009/06/14
*
* @author Blair Mitchelmore
* @version 2.1.5
*
**/
new function(setting... | JavaScript |
$(function () {
$('#rightbar li:first').accordion({
header: 'h2',
collapsible: true,
active: false
});
});
| JavaScript |
$(function () {
$('table').tablesorter();
$('#centerbar input[name="firstname"]').focus();
$('#centerbar input[name^="delete"]').click(function () {
return confirm('This is a paid alert. Once deleted it cannot be reactivated without another payment. Is it OK to delete this?');
});
});
| JavaScript |
//-------------------------------------------------------------------------------------------------------
// ClearTypeFadeTo / ClearTypeFadeIn / ClearTypeFadeOut
//
// Custom fade in and fade out functions for jQuery that will work around
// IE's bug with bold text in elements that have opacity filters set when
//... | JavaScript |
$(function () {
function updateFlower(number) {
var image = new Image();
$(image).load(function () {
$(this)
.attr('width', this.width)
.attr('height', this.height);
}).attr('src', 'images/refreshflowers/' + number + '.jpg');
var co... | JavaScript |
$(function() {
$('#orderNotice input[name="publication[]"]:last')
.parents('p')
.after('<p id="totalPurchase" class="checkbox">Total: <span class="price">$0.00</span></p>');
$('#orderNotice input[name="publication[]"]')
.click(function () {
var total = 0;
... | JavaScript |
/*
* jQuery UI Accordion 1.7.2
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Accordion
*
* Depends:
* ui.core.js
*/
(function($) {
$.widget("ui.accordion", {
... | JavaScript |
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
... | 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 |
/*
http://www.JSON.org/json2.js
2011-02-23
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE... | JavaScript |
/* Copyright 2012 Google Inc. All Rights Reserved.
*
* @fileoverview This file first retrieves a list of all of the domain users
* using an ajax call to the server. It also retrieves the user details for a
* particular user again using an ajax call to the server.
*
* @author gunjansharma@google.com (Gunjan Sharma... | JavaScript |
// Copyright 2011, 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 |
if(!window.console){
Module('console')({
log: function(m){
document.write(m+'<br/>');
},
time: function(name){
window[name] = (new Date()).getTime();
},
timeEnd: function(name){
if(window[name]){
console.log(name+': '+((new Date()).getTime()-window[name]));
}
else{
console.log(name + '... | JavaScript |
var $$$={
keywords:{ // change these to suit your style
_class: 'Class',
_extends: 'Extends',
_static: 'Static',
_module: 'Module',
_require: 'Require'
},
version: '1.0'
}
window[$$$.keywords._class] = function(name){
return function(def){
if(/\./.test(name)){
var x = name.split('.'), c = x.po... | JavaScript |
var Class=function(n){return function(d){if(/\./.test(n)){
var x=n.split('.'),c=x.pop();return Module(x.join('.'))(function(){Class(c)(d)})}
var c,i,j,k,l,r,w=window,s=w._s||w,e=d.Extends,E=s[e]||w[e],f=function(f,p){if(s!=w){
f=Function('s','with(s) return ('+f+')')(s)}if(!E||!(/\bthis\.Super\b/).test(String(f))){
ret... | JavaScript |
function Test()
{
this.i = 22222;
this.j = "Some Text which is important";
this.k = true;
this.l = 1234.123;
}
var AMEF = {
/*The 4GB string type*/
STRING_TYPE : 's',
/*The max 256 length string type*/
STRING_256_TYPE : 't',
/*The max 65536 length string type*/
STRING_65536_TYPE : 'h',
... | JavaScript |
//
// MongoDB API for Prudence
//
// Copyright 2010-2012 Three Crickets LLC.
//
// The contents of this file are subject to the terms of one of the following
// open source licenses. You can select the license that you prefer but you may
// not use this file except in compliance with one of these licenses.
//
// The LG... | JavaScript |
// $Id: filefield.js,v 1.28 2010/12/08 21:08:25 quicksketch Exp $
/**
* Auto-attach standard client side file input validation.
*/
Drupal.behaviors.filefieldValidateAutoAttach = function(context) {
$("input[type=file]", context).bind('change', Drupal.filefield.validateExtensions);
};
/**
* Prevent FileField upl... | JavaScript |
// $Id: tabs.js,v 1.4.2.1 2010/03/10 20:08:58 merlinofchaos Exp $
/**
* @file tabs.js
* jQuery UI Tabs (Tabs 3)
*
* This is nothing more than the pure jquery UI tabs implementation.
* It has been implemented under the Drupal.Views.Tabs namespace to
* avoid conflicts with alternatve versions of jquery, jquery UI.... | JavaScript |
// $Id: dependent.js,v 1.9.2.1 2009/11/18 02:43:47 merlinofchaos Exp $
/**
* @file dependent.js
*
* Written by dmitrig01 (Dmitri Gaskin) for Views; this provides dependent
* visibility for form items in Views' ajax forms.
*
* To your $form item definition add:
* - '#process' => array('views_process_dependency'),... | JavaScript |
// $Id: ajax_view.js,v 1.19.2.5 2010/03/25 18:25:28 merlinofchaos Exp $
/**
* @file ajaxView.js
*
* Handles AJAX fetching of views, including filter submission and response.
*/
Drupal.Views.Ajax = Drupal.Views.Ajax || {};
/**
* An ajax responder that accepts a packet of JSON data and acts appropriately.
*
* T... | JavaScript |
// $Id: base.js,v 1.11.2.1 2010/03/10 20:08:58 merlinofchaos Exp $
/**
* @file base.js
*
* Some basic behaviors and utility functions for Views.
*/
Drupal.Views = {};
/**
* jQuery UI tabs, Views integration component
*/
Drupal.behaviors.viewsTabs = function (context) {
$('#views-tabset:not(.views-processed)')... | JavaScript |
// $Id: ajax.js,v 1.26.2.8 2010/04/08 21:29:59 merlinofchaos Exp $
/**
* @file ajax_admin.js
*
* Handles AJAX submission and response in Views UI.
*/
Drupal.Views.Ajax = Drupal.Views.Ajax || {};
/**
* Handles the simple process of setting the ajax form area with new data.
*/
Drupal.Views.Ajax.setForm = function... | JavaScript |
// $Id: tabs.js,v 1.12 2010/01/18 08:11:21 nedjo Exp $
Drupal.tabs = Drupal.tabs || {};
Drupal.behaviors.tabs = function (context) {
// Set the active class to the first tab with an form error.
$('.drupal-tabs').children('ul > li').each( function() {
if ($($(this).find('a').attr('href')).find('div.form-item .... | JavaScript |
/*
* jQuery UI 1.6
*
* Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
;(function($) {
var _remove = $.fn.remove,
isFF2 = $.browser.mozilla && (parseFloat($.browser.ve... | JavaScript |
/*
* jQuery UI Tabs 1.6
*
* Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Tabs
*
* Depends:
* ui.core.js
*/
(function($) {
$.widget("ui.tabs", {
_init: function... | JavaScript |
// $Id: formatted_number.js,v 1.1.2.4 2009/09/20 11:35:40 markuspetrux Exp $
(function ($) {
/**
* Formatted number behavior.
*
* Formatted number fields are processed during the following events:
* - on page load : All number fields are formatted with site/user defined options.
* - on element focus : Thousa... | JavaScript |
/*!
* jCarousel - Riding carousels with jQuery
* http://sorgalla.com/jcarousel/
*
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Built on top... | JavaScript |
/**
* @file
* Add jCarousel behaviors to the page and provide Views-support.
*/
(function($) {
Drupal.behaviors.jcarousel = function(context, settings) {
var settings = settings || Drupal.settings;
for (var key in settings.jcarousel.carousels) {
var options = settings.jcarousel.carousels[key];
// Call... | JavaScript |
// $Id: format_number.js,v 1.1.2.7 2009/11/30 23:14:56 markuspetrux Exp $
(function ($) {
/**
* Create our own namespace in the global Drupal object.
*/
Drupal.numericElement = Drupal.numericElement || {};
/**
* Attach Drupal behavior to numeric input elements.
*/
Drupal.behaviors.numericElement = function(conte... | JavaScript |
// $Id: webform-admin.js,v 1.1.2.8 2010/12/30 02:57:20 quicksketch Exp $
/**
* Webform node form interface enhancments.
*/
Drupal.behaviors.webformAdmin = function(context) {
// Apply special behaviors to fields with default values.
Drupal.webform.defaultValues(context);
// On click or change, make a parent r... | JavaScript |
// $Id: webform.js,v 1.1.2.5 2010/08/30 16:58:02 quicksketch Exp $
/**
* JavaScript behaviors for the front-end display of webforms.
*/
(function ($) {
Drupal.behaviors.webform = function(context) {
// Calendar datepicker behavior.
Drupal.webform.datepicker(context);
};
Drupal.webform = Drupal.webform || {};
... | JavaScript |
// $Id: select-admin.js,v 1.1.2.1 2010/04/10 22:02:08 quicksketch Exp $
/**
* @file
* Enhancements for select list configuration options.
*/
(function ($) {
Drupal.behaviors.webformSelectLoadOptions = function(context) {
settings = Drupal.settings;
$('#edit-extra-options-source', context).change(function() {... | JavaScript |
// $Id: token.js,v 1.3.2.2 2010/03/26 00:03:19 davereid Exp $
(function ($) {
Drupal.behaviors.tokenTree = function() {
$('table.token-tree').each(function() {
$(this).treeTable();
});
};
Drupal.behaviors.tokenInsert = function() {
// Keep track of which textfield was last selected/focused.
$('textarea, ... | JavaScript |
// $Id: jquery.treeTable.js,v 1.1.2.2 2010/03/26 00:03:19 davereid Exp $
/*
* jQuery treeTable Plugin 2.3.0
* http://ludo.cubicphuse.nl/jquery-plugins/treeTable/
*
* Copyright 2010, Ludo van den Boom
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
(function($) {
// Helps to make options available t... | JavaScript |
// $Id: content.js,v 1.1.2.3 2008/10/06 14:30:01 karens Exp $
Drupal.behaviors.cckManageFields = function(context) {
attachUpdateSelects(context);
};
function attachUpdateSelects(context) {
var widgetTypes = Drupal.settings.contentWidgetTypes;
var fields = Drupal.settings.contentFields;
// Store the default ... | JavaScript |
Drupal.behaviors.i18ntaxonomy = function (context) {
if (Drupal.settings && Drupal.settings.i18ntaxonomy_vocabulary_form) {
$('form#taxonomy-form-vocabulary input.form-radio', context).filter('[name=i18nmode]').click(function () {
var languageSelect = $('form#taxonomy-form-vocabulary select#edit-language', ... | JavaScript |
// $Id: i18n.js,v 1.1.2.3 2009/01/20 20:35:55 nedjo Exp $
/**
* Rewrite autocomplete inputs to pass the language of the node currently being
* edited in the path.
*
* This functionality ensures node autocompletes get suggestions for the node's
* language rather than the current interface language.
*/
Drupal.beha... | JavaScript |
/**
* @file
* Handle JavaScript timers in a friendly jQuery interface.
*
* @ingroup uc_auction
*/
/**
* This code is jQuery Timers, by Blair Mitchelmore. (The original code lacked
* identification information for the author, as does the site for the code, so
* I had to do a bit of internet detectivism.) The s... | JavaScript |
/*global Drupal, jQuery, alert, $ */
/**
* @file
* The main JavaScript file for Ubercart Auction.
*
* @ingroup uc_auction
*/
/**
* Start the auction countdown timer and dictate what should happen on each
* "tick."
*/
Drupal.behaviors.ucAuction = function(context) {
if (!$('body').hasClass('ucAuction-process... | JavaScript |
// $Id: ca.js,v 1.1.2.3 2009/07/21 14:37:19 islandusurper Exp $
/**
* @file
* Adds some helper JS to the conditional actions forms.
*/
/**
* Add confirmation prompts to remove buttons.
*/
Drupal.behaviors.caRemoveConfirm = function(context) {
$('.ca-remove-confirm:not(.caRemoveConfirm-processed)', context).a... | JavaScript |
// $Id: uc_file.js,v 1.2.2.2 2009/07/21 14:37:18 islandusurper Exp $
/**
* @file
* Modifies the file selection and download access expiration interfaces.
*/
var uc_file_list = {};
/**
* Disable duration amount when its type is "never".
*/
function _uc_file_expiration_disable_check(granularity, quantity) {
// ... | JavaScript |
// $Id: uc_cart.js,v 1.8.2.6 2009/07/21 14:37:20 islandusurper Exp $
/**
* @file
* Adds effects and behaviors to elements on the checkout page.
*/
var copy_box_checked = false;
var uc_ce_submit_disable = false;
/**
* Scan the DOM and displays the cancel and continue buttons.
*/
Drupal.behaviors.ucShowOnLoad = f... | JavaScript |
// $Id: uc_cart_block.js,v 1.8.2.5 2009/09/21 14:34:47 islandusurper Exp $
/**
* @file
* Adds effects and behaviors to the cart block.
*/
/**
* Set the behavior to (un)collapse the cart block on a click
*/
Drupal.behaviors.ucCollapseBlock = function(context) {
$('.cart-block-title-bar:not(.ucCollapseBlock-proc... | JavaScript |
// $Id: uc_roles.js,v 1.1.2.4 2009/07/21 14:37:19 islandusurper Exp $
/**
* @file
* Enable and disable expiration fields to prevent invalid configurations.
*/
/**
* Disable duration amount when its type is "never".
*/
function _uc_role_expiration_disable_check(granularity, quantity) {
// 'never' means there's ... | JavaScript |
// $Id: uc_order.js,v 1.9.2.9 2009/09/21 14:34:46 islandusurper Exp $
/**
* @file
* Handles asynchronous requests for order editing forms.
*/
var customer_select = '';
var add_product_browser = '';
var order_save_holds = 0;
/**
* Add the double click behavior to the order table at admin/store/orders.
*/
Drupal.... | JavaScript |
// $Id: uc_payment.js,v 1.5.2.8 2010/07/12 01:57:44 tr Exp $
/**
* Calculate the number of bytes of a Unicode string.
*
* Gratefully stolen from http://dt.in.th/2008-09-16.string-length-in-bytes.html.
* Javascript String.length returns the number of characters, but PHP strlen()
* returns the number of bytes. When... | JavaScript |
// $Id: uc_credit.js,v 1.3.4.2 2008/11/07 21:13:23 islandusurper Exp $
if (Drupal.jsEnabled) {
$(document).ready(
function () {
$('#cc_details_title').show(0);
$('#cc_details').hide(0);
}
);
}
/**
* Toggle credit card details on the order view screen.
*/
function toggle_card_details() {
$(... | JavaScript |
// $Id: uc_taxes.js,v 1.10.2.11 2009/09/21 14:34:50 islandusurper Exp $
/**
* @file
* Handle asynchronous requests to calculate taxes.
*/
var pane = '';
if ($("input[name*=delivery_]").length) {
pane = 'delivery'
}
else if ($("input[name*=billing_]").length) {
pane = 'billing'
}
$(document).ready(function() {... | JavaScript |
// $Id: uc_shipping.js,v 1.5.2.2 2009/07/21 14:37:18 islandusurper Exp $
/**
* @file
* Add autofill address functionality to shipment forms.
*/
/**
* Autofill shipment address form from user selection.
*
* @param type
* Field prefix used to identify the address.
* @param json_address
* JSON object of add... | JavaScript |
// $Id: uc_quote.js,v 1.5.2.9 2009/10/20 20:58:07 islandusurper Exp $
/**
* @file
* Handle asynchronous calls on checkout page to retrieve shipping quotes.
*/
var page;
var details;
var methods;
/**
* Set event handlers on address fields.
*/
function setQuoteCallbacks(products, context) {
triggerQuoteCallback... | JavaScript |
// $Id: uc_store.js,v 1.9.2.2 2009/07/21 14:37:21 islandusurper Exp $
/**
* @file
* Add click events to the orders table and administration dashboard.
*/
/**
* Add the "show links" click behavior on the store admin display.
*/
Drupal.behaviors.ucStoreMoreLinks = function(context) {
$('.uc-store-admin-panel:not... | JavaScript |
// $Id: uc_country_select.js,v 1.6.2.3 2009/08/17 21:27:54 islandusurper Exp $
/**
* @file
* Switches the zones list when a country is chosen for an address.
*/
/**
* Set the select box change behavior for the country selector
*/
Drupal.behaviors.ucCountrySelect = function(context) {
$('select[id$=-country]:no... | JavaScript |
// $Id: summaries.js,v 1.1.2.6 2010/07/12 22:51:30 tr Exp $
/**
* @file
* Adds some helper JS to summaries.
*/
/**
* Modify the summary overviews to have onclick functionality.
*/
Drupal.behaviors.summaryOnclick = function(context) {
$('.summary-overview:not(.summaryOnclick-processed)', context).prepend('<im... | JavaScript |
// $Id: nice_menus.js,v 1.21 2010/06/18 06:14:12 vordude Exp $
// This uses Superfish 1.4.8
// (http://users.tpg.com.au/j_birch/plugins/superfish)
// Add Superfish to all Nice menus with some basic options.
(function ($) {
$(document).ready(function() {
$('ul.nice-menu').superfish({
// Apply a generic hov... | JavaScript |
/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
;(functi... | JavaScript |
(function ($) {
Drupal.behaviors.menu_block = function (context) {
// This behavior attaches by ID, so is only valid once on a page.
if ($('#menu-block-settings.menu-block-processed').size()) {
return;
}
$('#menu-block-settings', context).addClass('menu-block-processed');
// Process the form if its in a... | JavaScript |
// $Id: hierarchical_select_cache.js,v 1.8 2008/11/30 01:56:35 wimleers Exp $
/**
* @file
* Cache system for Hierarchical Select.
* This cache system takes advantage of the HTML 5 client-side database
* storage specification to reduce the number of queries to the server. A lazy
* loading strategy is used.
*/
/... | JavaScript |
/*
* jQuery UI Effects Drop
*
* Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Effects/Drop
*
* Depends:
* effects.core.js
*
*/
(function($) {
$.effects.drop = func... | JavaScript |
/*
* jQuery UI Effects 1.5
*
* Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Effects/
*
*/
;(function($) {
$.effects = $.effects || {}; //Add the 'effects' scope
$.ex... | JavaScript |
// $Id: hierarchical_select_formtoarray.js,v 1.3 2008/06/26 21:55:05 wimleers Exp $
/**
* @file
* Contains the formToArray method and the method it depends on. Taken from
* jQuery Form Plugin 2.12. (http://www.malsup.com/jquery/form/)
*/
(function ($) {
/**
* formToArray() gathers form element data into an arra... | JavaScript |
// $Id: hierarchical_select.js,v 1.100 2009/10/31 00:56:06 wimleers Exp $
(function($) {
Drupal.behaviors.HierarchicalSelect = function (context) {
$('.hierarchical-select-wrapper:not(.hierarchical-select-wrapper-processed)', context)
.addClass('hierarchical-select-wrapper-processed').each(function() {
var hs... | JavaScript |
// $Id: common_config_form.js,v 1.12 2008/12/03 00:04:20 wimleers Exp $
Drupal.HierarchicalSelectConfigForm = {};
(function ($, cfg) {
cfg.context = function(configId) {
if (configId === undefined) {
return $('.hierarchical-select-config-form > *').not('.live-preview');
}
else {
return $('#hierarchical... | JavaScript |
// $Id: views.js,v 1.8 2009/08/15 10:45:00 wimleers Exp $
/**
* @file
* Make Hierarchical Select work in Views' exposed filters form.
*
* Views' exposed filters form is a GET form, but since Hierarchical Select
* really is a combination of various form items, this will result in a very
* ugly and unnecessarily ... | JavaScript |
$(document).ready(function() {
// link demos
$(".demoflow div.wrapper").click(function() {
var demo = $(this).children('img').attr('_demo');
if (demo) {
location.href = '/repository/real-world/' + demo;
}else {
//alert('Under construction!');
}
});
if ($("div.demoflow").size()) {... | JavaScript |
/*
JS Beautifier
---------------
$Date: 2008-04-21 16:13:36 +0300 (Mon, 21 Apr 2008) $
$Revision: 53 $
Written by Einars "elfz" Lielmanis, <elfz@laacz.lv>
http://elfz.laacz.lv/beautify/
Originally converted to javascript by Vital, <vital76@gmail.com>
http://my.opera.com/Vital/blog... | JavaScript |
var uid = 0;
/**
* Render a demo template page
* @author Eduardo Lundgren (braeker)
* @param {Object} model
*/
var uiRenderDemo = function(model) {
var title = model.title, renderAt = $(model.renderAt);
function nl2br( str ) {
return str.replace(/([^>])\n/g, '$1<br />\n');
}
var js2html =... | JavaScript |
$(document).ready(function() {
$('.component-links a').history(function() {
loadDemo( $(this).attr('href').replace(/^#/, "") );
});
var instructions = $("#containerDemo").html();
$.ajaxHistory.initialize(function() {
$("#containerDemo").html(instructions);
});
}); | JavaScript |
/**
* History/Remote - jQuery plugin for enabling history support and bookmarking
* @requires jQuery v1.0.3
*
* http://stilbuero.de/jquery/history/
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* h... | JavaScript |
/*
* jQuery blockUI plugin
* Version 1.33 (09/14/2007)
* @requires jQuery v1.1.1
*
* $Id: jquery.blockUI.js 3291 2007-09-14 23:56:25Z malsup $
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/l... | JavaScript |
/* Copyright (c) 2007 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: @VERSION
* Requires jQuery 1.1.3+
* Docs: http://... | JavaScript |
/*
* The very first increment of Droppables&Draggables demo. The code is going to
* be more concise (remove unnecessary code repetitions etc.). And imho the
* photo management is a good candidate for demonstration of more jQuery UI
* components (sortables, selectables...). More to come...
*
*/
$(window).... | JavaScript |
$(document).ready(function() {
$("div.effect")
.hover(function() {
$(this).addClass("hover");
}, function() {
$(this).removeClass("hover");
})
;
var effect = function(el, n, o) {
$.extend(o, {
easing: "easeOutQuint"
});
$(el).bind("click", function() {
$(this).addCla... | JavaScript |
var getSizeImg = function(src) {
var timg = $('<img>').attr('src', src).css({ position: 'absolute', top: '-1000px', left: '-1000px' }).appendTo('body');
var size = {width: timg.get(0).offsetWidth, height: timg.get(0).offsetHeight };
try { document.body.removeChild(timg[0]); }
... | JavaScript |
/*
* tabs unit tests
*/
(function($) {
//
// Tabs Test Helper Functions
//
var defaults = {
ajaxOptions: null,
cache: false,
cookie: null,
deselectable: false,
deselectableClass: 'ui-tabs-deselectable',
disabled: [],
disabledClass: 'ui-tabs-disabled',
event: 'click',
fx: null,
hideClass: ... | JavaScript |
/*
* selectable unit tests
*/
(function($) {
//
// Selectable Test Helper Functions
//
var defaults = {
autoRefresh: true,
disabled: false,
filter: '*'
};
var el;
var drag = function(dx, dy) {
var off = el.offset(), pos = { clientX: off.left, clientY: off.top };
el.simulate("mousedown", pos)... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.