code
stringlengths
1
2.08M
language
stringclasses
1 value
/* SelectFilter2 - Turns a multiple-select box into a filter interface. Different than SelectFilter because this is coupled to the admin framework. Requires core.js, SelectBox.js and addevent.js. */ function findForm(node) { // returns the node of the form containing the given node if (node.tagName.toLowerCa...
JavaScript
/** * Django admin inlines * * Based on jQuery Formset 1.1 * @author Stanislaus Madueke (stan DOT madueke AT gmail DOT com) * @requires jQuery 1.2.6 or later * * Copyright (c) 2009, Stanislaus Madueke * All rights reserved. * * Spiced up with Code from Zain Memon's GSoC project 2009 * and modified for Django...
JavaScript
/* calendar.js - Calendar functions by Adrian Holovaty */ function removeChildren(a) { // "a" is reference to an object while (a.hasChildNodes()) a.removeChild(a.lastChild); } // quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]); function quickElement() { var obj = doc...
JavaScript
// Puts the included jQuery into our own namespace var django = { "jQuery": jQuery.noConflict(true) };
JavaScript
// Core javascript helper functions // basic browser identification & version var isOpera = (navigator.userAgent.indexOf("Opera")>=0) && parseFloat(navigator.appVersion); var isIE = ((document.all) && (!isOpera)) && parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]); // Cross-browser event handlers. fun...
JavaScript
addEvent(window, 'load', reorder_init); var lis; var top = 0; var left = 0; var height = 30; function reorder_init() { lis = document.getElementsBySelector('ul#orderthese li'); var input = document.getElementsBySelector('input[name=order_]')[0]; setOrder(input.value.split(',')); input.disabled = true;...
JavaScript
// Handles related-objects functionality: lookup link for raw_id_fields // and Add Another links. function html_unescape(text) { // Unescape a string that was escaped using django.utils.html.escape. text = text.replace(/&lt;/g, '<'); text = text.replace(/&gt;/g, '>'); text = text.replace(/&quot;/g, '"'...
JavaScript
// Inserts shortcut buttons after all of the following: // <input type="text" class="vDateField"> // <input type="text" class="vTimeField"> var DateTimeShortcuts = { calendars: [], calendarInputs: [], clockInputs: [], calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled ...
JavaScript
(function($) { $.fn.actions = function(opts) { var options = $.extend({}, $.fn.actions.defaults, opts); var actionCheckboxes = $(this); var list_editable_changed = false; checker = function(checked) { if (checked) { showQuestion(); } else { reset(); } $(actionCheckboxes).attr("checked", che...
JavaScript
var timeParsePatterns = [ // 9 { re: /^\d{1,2}$/i, handler: function(bits) { if (bits[0].length == 1) { return '0' + bits[0] + ':00'; } else { return bits[0] + ':00'; } } }, // 13:00 { re: /^\d{2}[:.]\d{2}$/i, ...
JavaScript
(function($) { $(document).ready(function() { // Add anchor tag for Show/Hide link $("fieldset.collapse").each(function(i, elem) { // Don't hide if fields in this fieldset have errors if ( $(elem).find("div.errors").length == 0 ) { $(elem).addClass("collapsed"); $(elem).find("h2").first().append(' (<...
JavaScript
/* 'Magic' date parsing, by Simon Willison (6th October 2003) http://simon.incutio.com/archive/2003/10/06/betterDateInput Adapted for 6newslawrence.com, 28th January 2004 */ /* Finds the index of the first occurence of item in the array, or -1 if not found */ if (typeof Array.prototype.indexOf == 'undefined') { ...
JavaScript
/* document.getElementsBySelector(selector) - returns an array of element objects from the current document matching the CSS selector. Selectors can contain element names, class names and ids and can be nested. For example: elements = document.getElementsBySelect('div#main p a.external') ...
JavaScript
(function($) { $.fn.prepopulate = function(dependencies, maxLength) { /* Depends on urlify.js Populates a selected field with the values of the dependent fields, URLifies and shortens the string. dependencies - array of dependent fields id's maxL...
JavaScript
var SelectBox = { cache: new Object(), init: function(id) { var box = document.getElementById(id); var node; SelectBox.cache[id] = new Array(); var cache = SelectBox.cache[id]; for (var i = 0; (node = box.options[i]); i++) { cache.push({value: node.value, text...
JavaScript
var LATIN_MAP = { 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': ...
JavaScript
/* SelectFilter2 - Turns a multiple-select box into a filter interface. Different than SelectFilter because this is coupled to the admin framework. Requires core.js, SelectBox.js and addevent.js. */ function findForm(node) { // returns the node of the form containing the given node if (node.tagName.toLowerCa...
JavaScript
/* calendar.js - Calendar functions by Adrian Holovaty */ function removeChildren(a) { // "a" is reference to an object while (a.hasChildNodes()) a.removeChild(a.lastChild); } // quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]); function quickElement() { var obj = doc...
JavaScript
// Core javascript helper functions // basic browser identification & version var isOpera = (navigator.userAgent.indexOf("Opera")>=0) && parseFloat(navigator.appVersion); var isIE = ((document.all) && (!isOpera)) && parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]); // Cross-browser event handlers. fun...
JavaScript
addEvent(window, 'load', reorder_init); var lis; var top = 0; var left = 0; var height = 30; function reorder_init() { lis = document.getElementsBySelector('ul#orderthese li'); var input = document.getElementsBySelector('input[name=order_]')[0]; setOrder(input.value.split(',')); input.disabled = true;...
JavaScript
// Handles related-objects functionality: lookup link for raw_id_fields // and Add Another links. function html_unescape(text) { // Unescape a string that was escaped using django.utils.html.escape. text = text.replace(/&lt;/g, '<'); text = text.replace(/&gt;/g, '>'); text = text.replace(/&quot;/g, '"'...
JavaScript
// Finds all fieldsets with class="collapse", collapses them, and gives each // one a "Show" link that uncollapses it. The "Show" link becomes a "Hide" // link when the fieldset is visible. function findForm(node) { // returns the node of the form containing the given node if (node.tagName.toLowerCase() != 'fo...
JavaScript
// Inserts shortcut buttons after all of the following: // <input type="text" class="vDateField"> // <input type="text" class="vTimeField"> var DateTimeShortcuts = { calendars: [], calendarInputs: [], clockInputs: [], calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled ...
JavaScript
var Actions = { init: function() { var selectAll = document.getElementById('action-toggle'); if (selectAll) { selectAll.style.display = 'inline'; addEvent(selectAll, 'click', function() { Actions.checker(selectAll.checked); }); } va...
JavaScript
var timeParsePatterns = [ // 9 { re: /^\d{1,2}$/i, handler: function(bits) { if (bits[0].length == 1) { return '0' + bits[0] + ':00'; } else { return bits[0] + ':00'; } } }, // 13:00 { re: /^\d{2}[:.]\d{2}$/i, ...
JavaScript
/* 'Magic' date parsing, by Simon Willison (6th October 2003) http://simon.incutio.com/archive/2003/10/06/betterDateInput Adapted for 6newslawrence.com, 28th January 2004 */ /* Finds the index of the first occurence of item in the array, or -1 if not found */ if (typeof Array.prototype.indexOf == 'undefined') { ...
JavaScript
/* document.getElementsBySelector(selector) - returns an array of element objects from the current document matching the CSS selector. Selectors can contain element names, class names and ids and can be nested. For example: elements = document.getElementsBySelect('div#main p a.external') ...
JavaScript
var SelectBox = { cache: new Object(), init: function(id) { var box = document.getElementById(id); var node; SelectBox.cache[id] = new Array(); var cache = SelectBox.cache[id]; for (var i = 0; (node = box.options[i]); i++) { cache.push({value: node.value, text...
JavaScript
var LATIN_MAP = { 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': ...
JavaScript
/* SelectFilter2 - Turns a multiple-select box into a filter interface. Different than SelectFilter because this is coupled to the admin framework. Requires core.js, SelectBox.js and addevent.js. */ function findForm(node) { // returns the node of the form containing the given node if (node.tagName.toLowerCa...
JavaScript
/** * Django admin inlines * * Based on jQuery Formset 1.1 * @author Stanislaus Madueke (stan DOT madueke AT gmail DOT com) * @requires jQuery 1.2.6 or later * * Copyright (c) 2009, Stanislaus Madueke * All rights reserved. * * Spiced up with Code from Zain Memon's GSoC project 2009 * and modified for Django...
JavaScript
/* calendar.js - Calendar functions by Adrian Holovaty */ function removeChildren(a) { // "a" is reference to an object while (a.hasChildNodes()) a.removeChild(a.lastChild); } // quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]); function quickElement() { var obj = doc...
JavaScript
// Puts the included jQuery into our own namespace var django = { "jQuery": jQuery.noConflict(true) };
JavaScript
// Core javascript helper functions // basic browser identification & version var isOpera = (navigator.userAgent.indexOf("Opera")>=0) && parseFloat(navigator.appVersion); var isIE = ((document.all) && (!isOpera)) && parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]); // Cross-browser event handlers. fun...
JavaScript
addEvent(window, 'load', reorder_init); var lis; var top = 0; var left = 0; var height = 30; function reorder_init() { lis = document.getElementsBySelector('ul#orderthese li'); var input = document.getElementsBySelector('input[name=order_]')[0]; setOrder(input.value.split(',')); input.disabled = true;...
JavaScript
// Handles related-objects functionality: lookup link for raw_id_fields // and Add Another links. function html_unescape(text) { // Unescape a string that was escaped using django.utils.html.escape. text = text.replace(/&lt;/g, '<'); text = text.replace(/&gt;/g, '>'); text = text.replace(/&quot;/g, '"'...
JavaScript
// Inserts shortcut buttons after all of the following: // <input type="text" class="vDateField"> // <input type="text" class="vTimeField"> var DateTimeShortcuts = { calendars: [], calendarInputs: [], clockInputs: [], calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled ...
JavaScript
(function($) { $.fn.actions = function(opts) { var options = $.extend({}, $.fn.actions.defaults, opts); var actionCheckboxes = $(this); var list_editable_changed = false; checker = function(checked) { if (checked) { showQuestion(); } else { reset(); } $(actionCheckboxes).attr("checked", che...
JavaScript
var timeParsePatterns = [ // 9 { re: /^\d{1,2}$/i, handler: function(bits) { if (bits[0].length == 1) { return '0' + bits[0] + ':00'; } else { return bits[0] + ':00'; } } }, // 13:00 { re: /^\d{2}[:.]\d{2}$/i, ...
JavaScript
(function($) { $(document).ready(function() { // Add anchor tag for Show/Hide link $("fieldset.collapse").each(function(i, elem) { // Don't hide if fields in this fieldset have errors if ( $(elem).find("div.errors").length == 0 ) { $(elem).addClass("collapsed"); $(elem).find("h2").first().append(' (<...
JavaScript
/* 'Magic' date parsing, by Simon Willison (6th October 2003) http://simon.incutio.com/archive/2003/10/06/betterDateInput Adapted for 6newslawrence.com, 28th January 2004 */ /* Finds the index of the first occurence of item in the array, or -1 if not found */ if (typeof Array.prototype.indexOf == 'undefined') { ...
JavaScript
/* document.getElementsBySelector(selector) - returns an array of element objects from the current document matching the CSS selector. Selectors can contain element names, class names and ids and can be nested. For example: elements = document.getElementsBySelect('div#main p a.external') ...
JavaScript
(function($) { $.fn.prepopulate = function(dependencies, maxLength) { /* Depends on urlify.js Populates a selected field with the values of the dependent fields, URLifies and shortens the string. dependencies - array of dependent fields id's maxL...
JavaScript
var SelectBox = { cache: new Object(), init: function(id) { var box = document.getElementById(id); var node; SelectBox.cache[id] = new Array(); var cache = SelectBox.cache[id]; for (var i = 0; (node = box.options[i]); i++) { cache.push({value: node.value, text...
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
/* * Copyright (C) 2008, 2009, 2010 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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) an...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 vers...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 vers...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009, 2010 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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) an...
JavaScript
{ // $Date: 2009-11-16 18:13:48 +0200 $ "errorInitBufferCanvas": "Error: adding the new buffer canvas element failed.", "errorInitContext": "Error while initializing the canvas context.", "errorElementNotFound": "Error: the following element was not found: {id}.", "noComputedStyle": "Error: window.getCompute...
JavaScript
{ // $Date: 2009-11-08 19:54:46 +0200 $ // TODO: try jsdoc-toolkit on this json (!) /** * The list of available languages. This associated language IDs to their * language titles. * * @type Object */ "languages": { // Besides the language title, you may also tell the file name. The 'file' ...
JavaScript
/* * Copyright (C) 2008, 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
/* * Copyright (C) 2008, 2009, 2010 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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) an...
JavaScript
/* http://www.JSON.org/json2.js 2009-04-16 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html This file creates a global JSON object containing two methods: stringify and parse. JSON.stringify(value, replacer, space) ...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-11 23:12:24 +0300 $ */ var PaintWebInstance = new (function () { var _self = this; this.layer = {canvas: null, context: null}; this.tool = null; this.doc = document; this.win = window; function init () { profiler.start('init');...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-11 23:34:52 +0300 $ */ var PaintWebInstance = new (function () { var _self = this; this.layer = {canvas: null, context: null}; this.tool = null; this.doc = document; this.win = window; function init () { profiler.start('init');...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-12 15:35:12 +0300 $ */ var PaintWebInstance = new (function () { var _self = this; this.layer = {canvas: null, context: null}; this.tool = null; this.doc = document; this.win = window; function init () { profiler.start('init');...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-17 22:58:52 +0300 $ */ /** * @author <a lang="ro" href="http://www.robodesign.ro/mihai">Mihai Şucan</a> * @fileOverview Minimal code used for aiding debugging PaintWeb. */ // Opera compatibility if (!window.console) { /** * @namespace ...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-11 20:20:59 +0300 $ */ var PaintWebInstance = new (function () { var _self = this; this.layer = {canvas: null, context: null}; this.tool = null; this.doc = document; this.win = window; function init () { profiler.start('init');...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-13 13:46:51 +0300 $ */ function tool_pencil (app) { profiler.start('pencil.constructor'); var _self = this, context = app.layer.context, mouse = app.mouse, width = app.image.width, height = app.image.height; this...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-13 13:47:25 +0300 $ */ function tool_pencil (app) { profiler.start('pencil.constructor'); var _self = this, context = app.layer.context, mouse = app.mouse, width = app.image.width, height = app.image.height; this...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-12 20:18:25 +0300 $ */ var PaintWebInstance = new (function () { var _self = this; this.layer = {canvas: null, context: null}; this.tool = null; this.doc = document; this.win = window; function init () { profiler.start('init');...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-13 14:32:21 +0300 $ */ function tool_pencil (app) { profiler.start('pencil.constructor'); var _self = this, context = app.layer.context, mouse = app.mouse, width = app.image.width, height = app.image.height; this...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-25 21:48:09 +0300 $ */ function tool_pencil (app) { profiler.start('pencil.constructor'); var _self = this, context = app.layer.context, mouse = app.mouse, width = app.image.width, height = app.image.height, t...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-12 16:14:01 +0300 $ */ var PaintWebInstance = new (function () { var _self = this; this.layer = {canvas: null, context: null}; this.tool = null; this.doc = document; this.win = window; function init () { profiler.start('init');...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-12 18:23:21 +0300 $ */ function tool_pencil (app) { profiler.start('pencil.constructor'); var _self = this, context = app.layer.context, mouse = app.mouse, width = app.image.width, height = app.image.height; this...
JavaScript
/* * © 2009 ROBO Design * http://www.robodesign.ro * * $Date: 2009-05-13 19:22:36 +0300 $ */ function tool_pencil (app) { profiler.start('pencil.constructor'); var _self = this, context = app.layer.context, mouse = app.mouse, width = app.image.width, height = app.image.height, t...
JavaScript
{ // $Date: 2009-11-08 20:39:21 +0200 $ /** * The list of available languages. This associated language IDs to their * language titles. * * @type Object */ "languages": { // Besides the language title, you may also tell the file name. The 'file' // property needs to be relative to the Pa...
JavaScript
/* * Copyright (C) 2009 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 vers...
JavaScript
/* * Copyright (C) 2009, 2010 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 late...
JavaScript
tinyMCE.addI18n('en.paintweb_dlg',{ dlg_title: 'Create a new image', widthLabel: 'Width: ', heightLabel: 'Height: ', bgrColorLabel: 'Background color: ', imgTitleLabel: 'Title: ', altTextLabel: 'Alternate text: ', altTextTitle: 'This text is displayed when the image cannot render.', });
JavaScript
tinyMCE.addI18n('en.paintweb',{ toolbarButton: 'Edit the selected image in PaintWeb. If no image is selected, then you can create a new drawing.', overlayButton: 'Edit', contextMenuEdit: 'Edit the image in PaintWeb', overlayLoading: 'PaintWeb is loading...', statusImageEditing: 'You are editing an image fr...
JavaScript
#! /usr/bin/env node /* * Copyright (C) 2011 Mihai Şucan * * This file is part of PaintWeb. * * PaintWeb 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 o...
JavaScript
function loadHash() { // This method looks for anchor tags, or hashes, in the URL and sets up the tabs appropriately // var hash = location.hash; // // // if we have a hash value from the URL // if(hash != "") { // // We need to strip off the "#!" which is included in the hash value // ...
JavaScript
function select(obj) { var items = document.getElementsByClassName('nav_item'); for(var i = 0; i < items.length; i++) { items[i].style.fontWeight = "normal"; } obj.style.fontWeight = "bold"; }
JavaScript
function resetLabels() { document.getElementById('usernameLabel').innerText = '*'; document.getElementById('emailLabel').innerText = '*'; document.getElementById('passwordLabel').innerText = '*'; document.getElementById('confirmedPasswordLabel').innerText = '*'; document.getElementById('firstnameLabel').inn...
JavaScript
function drag(user, event) { event.dataTransfer.setData("User", user.id); } function allowDrop(event) { event.preventDefault(); } function drop(target, event) { event.preventDefault(); event.dataTransfer.effectAllowed = 'all'; var data=event.dataTransfer.getData("User"); document.getElementByI...
JavaScript
function confirmFields(field1, field2) { var text1 = document.getElementById(field1).innerHTML; var text2 = document.getElementById(field2).innerHTML; if (text1 == text2)) return true; return false; }
JavaScript
var xhr; var cacheable = new Array("home:index","users:index", "chat:index"); self.onmessage = function m (e) { for (var i = 0;i < cacheable.length; i++) { //Check if page_action is already in ajax_cache xhr = new XMLHttpRequest(); var split = cacheable[i].split(':'); var url = "...
JavaScript
#pragma strict var target : GameObject; function Start() { //Colocar o jogador como alvo para ser perseguido if(target == null) { target = GameObject.FindGameObjectWithTag("Player"); print ("Player capturado pela camera com sucesso!"); } else { print ("Jogador nao encontrado"); } } function Update() ...
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
$().ready(function() { albumView.galeryInit(); }); function albumView(){}; /** * Метод вызывается при загрузке страницы, чтобы инициировать галерею */ albumView.galeryInit = function(){ //Создаем панель $('#photosPreviewIn').jScrollPane({scrollbarWidth:10, showArrows:true, scrollbarMargin:0, arrowSize:...
JavaScript
function md5 (str) { // http://kevin.vanzonneveld.net // + original by: Webtoolkit.info (http://www.webtoolkit.info/) // + namespaced by: Michael White (http://getsprink.com) // + tweaked by: Jack // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + input ...
JavaScript
var App = $.extend(App,{}); var tmpl = {template:{}}; //АУТЕНТИФИКАЦИЯ auth = function(){}; auth.loggedIn = false; // По умолчанию пользователь не зарегистрирован (function(){ App.getTemplates = function() { if(arguments.length == 0) return false; $.each(arguments, function(i, el){ $.get(W_TMPL + ...
JavaScript
$('.faqHeader').live('click', function() { $(this).parents('.oneFaq').find('.text').slideToggle("slow"); $(this).parents('.header').toggleClass('active'); return false; });
JavaScript