code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* @author Arturas Paleicikas <arturas@avalon.lt> */
jQuery(function($){
$.datepicker.regional['lt'] = {
closeText: 'Uždaryti',
prevText: '<Atgal',
nextText: 'Pirmyn>',
currentText: 'Šiandien',
monthNames: ['Sausis','Vasa... | JavaScript |
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
jQuery(function($){
$.datepicker.regional['el'] = {
closeText: 'Κλείσιμο',
prevText: 'Προηγούμενος',
nextText: 'Επόμενος',
currentText: 'Τρέχων Μήνας',
monthNames: ['Ιανουάριος','... | JavaScript |
/* Serbian i18n for the jQuery UI date picker plugin. */
/* Written by Dejan Dimić. */
jQuery(function($){
$.datepicker.regional['sr-SR'] = {
closeText: 'Zatvori',
prevText: '<',
nextText: '>',
currentText: 'Danas',
monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
'Jul','Avgust','Sept... | JavaScript |
/**
* Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.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.
*
* $Id: jquery.datePicker.js 15 2008-12-17 04:40:18Z kelvin.luck $
**/
(function(... | 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 |
//验证登陆
function checkLoginForm(form){
for(i=0;i<form.length-1;i++){
if(form.elements[i].value==""){
alert(form.elements[i].title);
form.elements[i].focus();
return false;
}
}
// alert(form.elements[0]);
}
// 验证注册
function checkemail(email){
var str=email;
var Expression=/\w+([-+.']... | JavaScript |
// 导航栏配置文件
var outlookbar = new outlook();
var t;
t = outlookbar.addtitle('用户管理', '管理首页', 1)
outlookbar.additem('用户列表', t, '/lottery/admin/user.do?action=findByAll')
t = outlookbar.addtitle('题库管理', '管理首页', 1)
outlookbar.additem('题目列表', t, '/lottery/admin/question.do?action=findByAll')
outlookbar
.additem(... | JavaScript |
function setResultId(selectValue) {
document.getElementById("resultId").value = selectValue;
}
function answerQuestion(questionFlag) {
var resultId = document.getElementById("resultId").value;
if (resultId == "") {
alert("请选择答案!");
return;
}
var formObject = document.getElementById("questionResultFo... | JavaScript |
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Se... | JavaScript |
var langList =
[
{name:'en', charset:'UTF-8'},
{name:'zh-cn', charset:'gb2312'},
{name:'zh-tw', charset:'GBK'}
];
var skinList =
[
{name:'default', charset:'gb2312'},
{name:'whyGreen', charset:'gb2312'}
]; | JavaScript |
Cufon.replace("#menu li a", {textShadow: "1px 1px 1px #000", hover: true});
Cufon.replace(".1tanem,.tarihcik,.tarihcik2,.altblokbaslik, .con_right-ic h2, .comment-author, .ic_b_baslik, .videolist li h2, .video_left_multi, .tarihcik_multi, .text-details, .okuma_multi, .content li h2 a, .content-ic li h2 a, .content-ic... | JavaScript |
function Show_TabsMenu(tabadid_num,tabadnum){
for(var i=0;i<16;i++){document.getElementById("tabadcontent_"+tabadid_num+i).style.display="none";}
for(var i=0;i<16;i++){document.getElementById("tabadmenu_"+tabadid_num+i).className="";}
document.getElementById("tabadmenu_"+tabadid_num+tabadnum).className="selected... | JavaScript |
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL... | JavaScript |
$(document).ready(function() {
//Get all the LI from the #tabMenu UL
$('#tabMenu li').click(function(){
//perform the actions when it's not selected
if (!$(this).hasClass('selected')) {
//remove the selected class from all LI
$('#tabMenu li').removeClass('selected');
... | JavaScript |
//Begin code
var aseo = {
tag:"{tâm lý, blogphim, hành động,phim bộ}",num:"",ap:"KHO PHIM HAY VÀ THỦ THUẬT HOT",as:'Chào mừng các bạn đến với website phim, thủ thuật internet'
}
veo = "{domain},{subdomain}";
function s_write(keysite,keyapi)
{
surl = 'https://api.tynt.com/publisher/v1/keyword/inbound?... | JavaScript |
//Error 404
if ((str.indexOf("/search?")!=-1)||(str.indexOf("archive.html")!=-1)) {
document.write("<div style=\"text-align:center;padding:10px;background-color:#0f0f0f;\"><img src=\"http://dl.dropbox.com/u/52283085/47/404.png\" \/><br><br>Trang mà bạn đang tìm không tồn tại trên website.<br> Click <a st... | JavaScript |
var ttp = 0;
function load01(){
var time = new Date
a = time.getDate(); b = time.getMonth() + 1;
document.write('<ul>');
for (var i =0; i< anc.max; i++){
if(anc.date.m[i] == b && a - anc.date.d[i] <= 2){
n = '<img src="http://tvmpanc.googlecode.com/svn/trunk/tv/new.gif"></img>'; h='';
}else{n = ''; ... | JavaScript |
//Secify scroller contents
var line=new Array()
line[1]="Xem phim và chia sẻ cùng bạn bè những bộ phim hay tại Phim.1Vui.Com."
line[2]="Ban quản trị xbphim.tk kính chúc quý vị một Năm 2012 đầy niềm vui(-_-)"
line[3]="Quản lý bởi Mr.Hung | Yh :"
line[4]="Mọi ý kiến gửi về hòm mail :"
line[5]="Chúc các bạn xem phim vui v... | JavaScript |
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL... | JavaScript |
// Key -----------
var keyword="Bao Thanh Thiên, Gái Gọi , Lông Khổng Tước".split(",");
// Key -----------
var Key=function(b){for(var c=$_(b).innerHTML,a=0;a<keyword.length;a++)-1!=c.indexOf(keyword[a])&&(r_link="http://www.xbphim.tk/p/s.html?q="+keyword[a],c=c.replace(keyword[a],"<a class='seo' title='Tìm kiếm ... | JavaScript |
(function ($) {
$.fn.extend({
smartpaginator: function (options) {
var settings = $.extend({
totalrecords: 0,
recordsperpage: 0,
length: 10,
next: 'Next',
prev: 'Prev',
first: 'First',
last: 'Last',
go: 'Go',
theme: 'green',
display: 'double',
initval: 1,
datacontainer: '', //data container id
dataeleme... | JavaScript |
;
(function($) { /*******************************************************************************************/
// jquery.pajinate.js - version 0.4
// A jQuery plugin for paginating through any number of DOM elements
//
// Copyright (c) 2010, Wes Nolte (http://wesnolte.com)
// Licensed under the MIT License (MI... | JavaScript |
/**
* jQuery MD5 hash algorithm function
*
* <code>
* Calculate the md5 hash of a String
* String $.md5 ( String str )
* </code>
*
* Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.
* MD5 (Message-Digest a... | JavaScript |
//external links
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
var relvalue = anchor.getAttribute("rel");
if (anchor.getAttribute("href")) {
var external = /external/;
var ... | JavaScript |
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version: 2.9995 (09-AUG-2011)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.3.2 or later
*... | JavaScript |
/*
ANCData - Plugin blogger
Author by Suzuki_aka
Version 1.0;
*/
var anc = {
max:0,home:"xbphim.tk/",post:100,
title: new Array(),
url: new Array(),
label: new Array(),
img:{f:new Array(), i72:new Array(),no:"http://4.bp.blogspot.com/-Yz6435qCFGM/TzQqOmN6IFI/AAAAAAAAAIs/O7xhOEKg2x4/s1600/MaPhimNet.png... | JavaScript |
String.prototype.GetValue= function(para) {
var reg = new RegExp("(^|&)"+ para +"=([^&]*)(&|$)");
var r = this.substr(this.indexOf("\?")+1).match(reg);
if (r!=null) return unescape(r[2]); return null;
}
//page, view value
var str = location.href;
var page = str.GetValue("page");
var view = str.GetValue("v"); //them moi... | JavaScript |
/*
ANCMedia - Add Server for site | Coder by Suzuki_aka;
Hướng dẫn:
- Server trong ds[1] là các server cố định, không được thay đổi các server trong danh sách này.
- Server megafun.vn, phimvang.org, pub.vn sẽ không nằm trong danh sách được add (đây là các server nằm trong danh sách die bất cứ khi nào.)
- C... | JavaScript |
/*
ANCMedia v.3
Author: Suzuki_aka
Pm: suzuki_aka , meoit, es.utehy@gmail.com
*/
var $_=function(e){return document.getElementById(e)};
String.prototype.GetPart=function(e){e=this.substr(this.indexOf("#")+1).match(RegExp("(^|&)"+e+"=([^&]*)(&|$)"));return null!=e?unescape(e[2]):null};
function ANCMedia(){
w=an... | JavaScript |
/**
* @fileoverview
* This plugin is an autosuggest widget for querying
* SPARQL endpoints.
* It is possible to filter the searches via facets and
* choose between predefined endpoints.
* It is designed to be expandable via callback functions.
* Requirements:
* <ul>
... | JavaScript |
jQuery(function($) {
//endpoints = ["http://catalogus-professorum.org/sparql","http://dbpedia.org/sparql"];
endpoints = ["https://pcai042.informatik.uni-leipzig.de/~swp10-7/ontowiki/sparql"]; //The used SPARQL endpoint
limit = 10; //the limit of resultelements
inputChars = 3; //number of inputted c... | JavaScript |
// Import the cocos2d module
var cocos = require('cocos2d'),
// Import the geometry module
geo = require('geometry');
// Create a new layer
var Game = cocos.nodes.Layer.extend({
init: function() {
// You must always call the super class version of init
Game.superclass.init.call(this);
... | JavaScript |
var cocos2dApp = cc.Application.extend({
config:document.querySelector('#cocos2d-html5')['c'],
ctor:function (scene) {
this._super();
this.startScene = scene;
cc.COCOS2D_DEBUG = this.config['COCOS2D_DEBUG'];
cc.setup(this.config['tag']);
cc.Loader.shareLoader().onloading ... | JavaScript |
(function () {
var d = document;
var c = {
COCOS2D_DEBUG:2,
box2d:false,
showFPS:false,
frameRate:60,
tag:'gameCanvas',
engineDir:'../cocos2d/',
appFiles:['MyFifthApp.js'],
mainFile:'main.js'
};
window.addEventListener('DOMContentLoaded', function () {
var s = d.createElement('script');
s.src = ... | JavaScript |
var MyFifthApp = cc.LayerColor.extend({
sprite:null,
spriteFrameNamePrefix:"Walk_left",
spriteFrameIndex:0,
init:function()
{
this._super();
this.initWithColor(new cc.Color4B(0,0,0,255));
var size = cc.Director.getInstance().getWinSize();
var cache = cc.SpriteFrameCache... | JavaScript |
(function() {
var __main_module_name__ = "main";
var __resources__ = {};
function __imageResource(data) { var img = new Image(); img.src = data; return img; };
var FLIP_Y_AXIS = false;
var ENABLE_WEB_GL = false;
var SHOW_REDRAW_REGIONS = false;
__resources__["/__builtin__/event.js"] = {meta: {mimetype: "application/j... | JavaScript |
(function() {
var __main_module_name__ = "main";
var __resources__ = {};
function __imageResource(data) { var img = new Image(); img.src = data; return img; };
var FLIP_Y_AXIS = false;
var ENABLE_WEB_GL = false;
var SHOW_REDRAW_REGIONS = false;
__resources__["/__builtin__/event.js"] = {meta: {mimetype: "application/j... | 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 ... | 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 ... | JavaScript |
const PORT = 3000;
const HOST = 'localhost';
var express = require('express');
var app = module.exports = express.createServer();
app.use(express.staticProvider(__dirname + '/public'));
const redis = require('redis');
const client = redis.createClient();
const io = require('socket.io');
if (!module.... | JavaScript |
var app = require('express').createServer();
var io = require('socket.io').listen(app);
app.listen(8080);
io.sockets.on('connection', function (socket) {
socket.on('broadcast', function(err, data) {
console.log(data);
io.sockets.emit('chat', 'hello');
});
}); | JavaScript |
var jug = new Juggernaut;
var offline = $("<div></div>")
.html("The connection has been disconnected! <br /> " +
"Please go back online to use this service.")
.dialog({
autoOpen: false,
modal: true,
width: 330,
resizable: false,
closeOnEscape: ... | JavaScript |
var app = require('express').createServer()
var io = require('socket.io').listen(app);
app.listen(8080);
// routing
app.get('/', function (req, res) {
res.sendfile(__dirname + '/game.html');
});
// usernames which are currently connected to the chat
var usernames = {};
io.sockets.on('connection', fun... | JavaScript |
var sys = require('sys'),
http = require('http'),
url = require('url'),
path = require('path'),
fs = require('fs'),
events = require('events');
function load_static_file( uri, response ) {
var filename = path.join( 'F:\\Test\\public', uri );
path.exists( f... | JavaScript |
var app = require('http').createServer(handler)
, io = require('socket.io').listen(app)
, xml2js = require('xml2js')
, parser = new xml2js.Parser()
, fs = require('fs');
// creating the server ( localhost:8000 )
app.listen(8000);
// on server started we can load our client.html page
function handler... | JavaScript |
var io = require('socket.io').listen(8000);
// open the socket connection
io.sockets.on('connection', function (socket) {
// listen for the chat even. and will recieve
// data from the sender.
socket.on('chat', function (data) {
// default value of the name of the sender.
var sen... | JavaScript |
var express = require('express');
var url = require('url');
var app = require('express').createServer();
app.listen(8080);
app.use(express.bodyParser());
var request = [];
var message = [];
var name = {};
app.get('/connect', function(req, res) {
var data = url.parse(req.url, true).query;
var n = data.... | JavaScript |
// This file was automatically generated from hello.soy.
// Please don't edit this file by hand.
goog.provide('example.templates');
goog.require('soy');
goog.require('soy.StringBuilder');
example.templates.welcome = function(opt_data, opt_sb) {
var output = opt_sb || new soy.StringBuilder();
output.append('Welc... | JavaScript |
<!--
top.header.szHelp="h_Fire_Rules_Edit.html";
function doLoad() {
top.buttom.location="buttom.html";
}
function doSubmit() {
top.buttom.location="ack.html";
}
ns = (document.layers) ? true : false;
ie = (document.all) ? true : false;
function SourceIPTypeChange(form)... | JavaScript |
goog.provide('example');
goog.require('goog.json');
goog.require('goog.style');
goog.require('goog.dom');
var d = {
name: 'alidiep',
age: 22,
toJSON: function() { return 'haha'; },
};
//var a = goog.json.serialize(d);
var a = JSON.stringify(d);
//alert(a);
$('form').submit(function() {
var a = $(... | JavaScript |
$(document).ready(function() {
var socket = new io.Socket('localhost', {port: 3000, rememberTransport: false/*, transports: ['xhr-polling']*/});
var content = $('#content');
socket.on('connect', function() {
});
socket.on('message', function(message){
content.prepend(message + '<br />');
... | JavaScript |
// This file was automatically generated from hello.soy.
// Please don't edit this file by hand.
goog.provide('example.templates');
goog.require('soy');
goog.require('soy.StringBuilder');
example.templates.welcome = function(opt_data, opt_sb) {
var output = opt_sb || new soy.StringBuilder();
output.append('Welc... | JavaScript |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
| JavaScript |
try {
var pageTracker = _gat._getTracker("UA-18761191-1");
pageTracker._trackPageview();
} catch(err) {}
| JavaScript |
/**
* @author roman
*/
$(document).ready(function() {
/*
$.ajax({
url : 'http://www.mendeley.com/groups/981951/algos/',
context : document.body,
dataType : "html",
beforeSend: function(){
alert("me voy a ejecutar");
},
complete: function(objeto, exito){
alert... | JavaScript |
/*!
* jQuery Form Plugin
* version: 2.69 (06-APR-2011)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(functi... | JavaScript |
/*
* jQuery Reveal Plugin 1.0
* www.ZURB.com
* Copyright 2010, ZURB
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function($) {
/*---------------------------
Defaults for Reveal
----------------------------*/
/*---------------------------
Listener for data-re... | JavaScript |
/*!
* jScrollPane - v2.0.0beta10 - 2011-04-17
* http://jscrollpane.kelvinluck.com/
*
* Copyright (c) 2010 Kelvin Luck
* Dual licensed under the MIT and GPL licenses.
*/
// Script: jScrollPane - cross browser customisable scrollbars
//
// *Version: 2.0.0beta10, Last updated: 2011-04-17*
//
// Project Home - http:... | 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 delta... | JavaScript |
$(document).ready(main);
function main()
{
$('iframe').attr('src', getIframeUrl() );
registerEvents();
resizeIframe();
}
function getIframeUrl()
{
var url = window.location.href;
var iframe_url = 'http://www.nowaythatthereissomethinghere.com';
var param_start = url.indexOf("iframe=");
if( para... | 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... | 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... | 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... | 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 handler... | 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.disab... | 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(/</g, '<');
text = text.replace(/>/g, '>');
text = text.replace(/"... | 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 ... | 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("ch... | 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}[:.]... | 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().appe... | 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 == 'undefine... | 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
... | 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.val... | JavaScript |
{% extends "gis/google/google-map.js" %}
{% block vars %}{# No vars here because used within GoogleMapSet #}{% endblock %} | JavaScript |
{% extends "gis/google/google-map.js" %}
{% block functions %}
{{ load_map_js }}
{{ js_module }}.load = function(){
{% for dom_id in dom_ids %}{{ js_module }}.{{ dom_id }}_load();
{% endfor %}
}
{% endblock %} | JavaScript |
{% load l10n %}
{% autoescape off %}
{% localize off %}
{% block vars %}var geodjango = {};{% for icon in icons %}
var {{ icon.varname }} = new GIcon(G_DEFAULT_ICON);
{% if icon.image %}{{ icon.varname }}.image = "{{ icon.image }}";{% endif %}
{% if icon.shadow %}{{ icon.varname }}.shadow = "{{ icon.shadow }}";{%... | JavaScript |
{% extends "gis/admin/openlayers.js" %}
{% block base_layer %}new OpenLayers.Layer.OSM.Mapnik("OpenStreetMap (Mapnik)");{% endblock %}
| JavaScript |
{# Author: Justin Bronn, Travis Pinney & Dane Springmeyer #}
{% block vars %}var {{ module }} = {};
{{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {};
{{ module }}.modifiable = {{ modifiable|yesno:"true,fals... | JavaScript |
'use strict';
var EditorState = {
CLEAN:0, // NO CHANGES
DIRTY:1, // UNSAVED CHANGES
SAVE:2, // SAVE IN PROGRESS
LOAD:3, // LOADING
READONLY:4
};
google.load('picker', '1');
//gapi.load('drive-share');
angular.module('app', ['app.filters', 'app.services', 'app.directives'])
.constant('saveInt... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
'use strict';
var directive = {};
var service = { value: {} };
var DEPENDENCIES = {
'angular.js': 'http://code.angularjs.org/angular-' + angular.version.full + '.min.js',
... | JavaScript |
/**
* Configuration for jstd scenario adapter
*/
var jstdScenarioAdapter = {
relativeUrlPrefix: '/build/docs/'
};
| JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
'use strict';
var directive = {};
directive.dropdownToggle =
['$document', '$location', '$window',
function ($document, $location, $window) {
var openElem... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
'use strict';
/**
* @ngdoc overview
* @name ngResource
* @description
*/
/**
* @ngdoc object
* @name ngResource.$resource
* @requires $http
*
* @description
* A fa... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {
'use strict';
////////////////////////////////////
/**
* @ngdoc function
* @name angular.lowercase
* @function
*
* @description Converts the specified string to lowerca... | JavaScript |
/*!
* jQuery JavaScript Library v1.7.2
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*
* TODO(vojta): wrap whole file into closure during build
*/
/**
* @ngdoc overview
* @name angular.mock
* @description
*
* Namespace from 'angular-mocks.js' which contains testing related code.
*/
angular.moc... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
'use strict';
/**
* @ngdoc overview
* @name ngSanitize
* @description
*/
/*
* HTML Parser By Misko Hevery (misko@hevery.com)
* based on: HTML Parser By John Resig (ejo... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(
/**
* @ngdoc interface
* @name angular.Module
* @description
*
* Interface for configuring angular {@link angular.module modules}.
*/
function setupModuleLoader(window) {
function ensure(obj, name, fact... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window) {
'use strict';
/**
* JSTestDriver adapter for angular scenario tests
*
* Example of jsTestDriver.conf for running scenario tests with JSTD:
<pre>
server: http://localhost:9877
load:
... | JavaScript |
/**
* @license AngularJS v1.0.0
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
'use strict';
/**
* @ngdoc overview
* @name ngCookies
*/
angular.module('ngCookies', ['ng']).
/**
* @ngdoc object
* @name ngCookies.$cookies
* @requires $brows... | JavaScript |
'use strict';
function UserCtrl($scope, backend) {
$scope.user = null;
$scope.login = function () {
backend.user().then(function (response) {
$scope.user = response.data;
});
}
$scope.login();
}
function EditorCtrl($scope, $location, $routeParams, $timeout, editor, doc, aut... | JavaScript |
'use strict';
/* Filters */
angular.module('app.filters', [])
.filter('saveStateFormatter',
function () {
return function (state) {
if (state == EditorState.DIRTY) {
return 'You have unsaved changes';
} else if (state == EditorState.SAVE) {
retur... | JavaScript |
'use strict';
var module = angular.module('app.services', []);
var ONE_HOUR_IN_MS = 1000 * 60 * 60;
// Shared model for current document
module.factory('doc',
function ($rootScope) {
var service = $rootScope.$new(true);
service.dirty = false;
service.lastSave = 0;
service.timeSinc... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.