code
stringlengths
1
2.08M
language
stringclasses
1 value
/** * jQuery Yii ListView plugin file. * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.yiiframework.com/ * @copyright Copyright &copy; 2008-2010 Yii Software LLC * @license http://www.yiiframework.com/license/ * @version $Id$ */ ;(function($) { /** * yiiListView set function. * @param optio...
JavaScript
/* * Treeview 1.4 - jQuery plugin to hide and show branches of a tree * * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ * http://docs.jquery.com/Plugins/Treeview * * Copyright (c) 2007 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-li...
JavaScript
/** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @examp...
JavaScript
/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (July 02 2010) * * @copyright * Copyright (C) 2004-2010 Alex Gorbatchev. * * @lic...
JavaScript
/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (July 02 2010) * * @copyright * Copyright (C) 2004-2010 Alex Gorbatchev. * * @lic...
JavaScript
var SearchRezLinks = $("div.searchResult div.name > a"); /*--- Link is like: <a href="/venue/6868983">Dumpling King</a> where 6868983 is venue ID. Want to add: <a href="/venue/venueid/edit">Manage venue</a> <a href="/edit_venue?vid=venueid">Edit venue</a> */ SearchRezLinks.each (function () { ...
JavaScript
// mar 15 var x=document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition,showError); } else{x.innerHTML="Geolocation is not supported by this browser.";} } function showPosition(position) { lat=position.coords....
JavaScript
/************* Map Related methods **************/ var map; var buzzPinsArray = []; var newsPinsArray = []; var mode=0; // StudentBuzz: 0, CampusNews: 1 // var overlay; var pieData = []; // total: 17 pieOverlay.prototype = new google.maps.OverlayView(); function initializeMap(){ // var myLatLng = new ...
JavaScript
var google_analytics_code = 'UA-29784128-1'; var _gaq = _gaq || []; _gaq.push(['_setAccount', google_analytics_code]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https...
JavaScript
function likes(postID){ var params = {'id': postID, 'v': 1 }; makeAPICall('POST', 'notes', 'likes', params, function(response){ var img = response.img; var likes = response.likes; var s = $('<img onClick="likes('+postID+')" src="'+img+'"/>...
JavaScript
$(function(){ $('.github-info').each(function(){ var $container = $(this); var repo = $container.data('repo'); $.ajax({ url: 'https://api.github.com/repos/' + repo, dataType: 'jsonp', success: function(results){ var repo = results.data; ...
JavaScript
$.easing.doubleSqrt = function(t, millisecondsSince, startValue, endValue, totalDuration) { var res = Math.sqrt(Math.sqrt(t)); return res; }; (function($) { $.tileBlockSlider = function(element, options) { // настройки по умолчанию var defaults = { // период смены к...
JavaScript
function initialize(){ var mapOptions = { center: new google.maps.LatLng(49.267185,-123.250508), zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: false }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);...
JavaScript
/* see http://cubiq.org/add-to-home-screen "Advanced Features" section for details on configuration */ var addToHomeConfig = { animationIn: 'drop', // drop || bubble || fade animationOut: 'fade', // drop || bubble || fade startDelay: 1500, // 2 seconds from page load before the balloon appears lifespan: 100...
JavaScript
/* see http://cubiq.org/add-to-home-screen "Advanced Features" section for details on configuration */ var addToHomeConfig = { animationIn: 'drop', // drop || bubble || fade animationOut: 'fade', // drop || bubble || fade startDelay: 1500, // 2 seconds from page load before the balloon appears lifespan: 100...
JavaScript
1
JavaScript
javascript:(function() { var d = document ,uris = [] ,i = 0 ,o ,home = (location + '').split('/').splice(0, 3).join('/') + '/'; function add(uri) { return (0 === uri.indexOf(home)) && (!/[\?&]/.test(uri)) && uris.push(escape(uri.substr(home.length))); ...
JavaScript
var MUB = { _uid : 0 ,_minRoot : '/min/?' ,checkRewrite : function () { var testUri = location.pathname.replace(/\/[^\/]*$/, '/rewriteTest.js').substr(1); function fail() { $('#minRewriteFailed')[0].className = 'topNote'; }; $.ajax({ url : '../f=' + te...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ // Initalize the ellipsis event han...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function runFederatedSearch(federate...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function loadModulePages(modulePanes...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ // Initialize the ellipsis event han...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function moduleInit() { setupSpl...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function moduleInit() { setupSpl...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function loadSection(select) { r...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function moduleInit() { setupSpl...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var map; var mapLoader; var browseGr...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function doUpdateContainerDimensions...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var map; var mapLoader; var browseGr...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function doUpdateContainerDimensions...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var loadedImages = {}; var centerZoo...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function loginFormSubmit() { doc...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function updateIntervalTab(interval)...
JavaScript
/* * Copyright © 2009 - 2010 Massachusetts Institute of Technology * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software withou...
JavaScript
/* * Copyright © 2009 - 2010 Massachusetts Institute of Technology * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software withou...
JavaScript
/* * Copyright © 2009 - 2010 Massachusetts Institute of Technology * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software withou...
JavaScript
/* * Copyright © 2009 - 2010 Massachusetts Institute of Technology * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software withou...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var localizedStrings = {} $(documen...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var adminType='module'; $(docume...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var adminType='site'; var KUROGO_LOC...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ // Initalize the ellipsis event hand...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function moduleInit() { setupSpl...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function moduleInit() { setupSpl...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function loadSection(select) { r...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ // Initialize the ellipsis event han...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ String.prototype.strip = function() ...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var oldSetContainerWrapperHeight = s...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ ///// various base maps function KG...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function scrollToTop() { scrollTo(0...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ var containerScroller = null; var na...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function scrollToTop() { scrollTo(0...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ function drawLineChart(strCanvasID,f...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ /* * Ellipsizer text block module ...
JavaScript
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * iScroll v4.0 Beta 4 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (c) 2010 Matteo Spinelli, http://cubiq.org/ * Released under MIT license * http://cubiq.org/dropbox/mit-license.txt * * Last updated: 2011.03.10 * * * ...
JavaScript
/** * * Find more about the scrolling function at * http://cubiq.org/iscroll * * Copyright (c) 2010 Matteo Spinelli, http://cubiq.org/ * Released under MIT license * http://cubiq.org/dropbox/mit-license.txt * * Version 3.7.1 - Last updated: 2010.10.08 * Changes added by Mark Edwards - Last updated: 2011.01....
JavaScript
/*! * iScroll v4.1.9 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org * Released under MIT license, http://cubiq.org/license */ (function(){ var m = Math, mround = function (r) { return r >> 0; }, vendor = (/webkit/i).test(navigator.appVersion) ? 'webkit' : (/firefox/i).test(navigator.userAgent) ? 'Moz' : ...
JavaScript
/* see http://cubiq.org/add-to-home-screen "Advanced Features" section for details on configuration */ var addToHomeConfig = { animationIn: 'drop', // drop || bubble || fade animationOut: 'fade', // drop || bubble || fade startDelay: 1500, // 2 seconds from page load before the balloon appears lifespan: 100...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ /* * paneStories text block module...
JavaScript
/** * @name InfoBox * @version 1.1.11 [January 9, 2012] * @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google) * @copyright Copyright 2010 Gary Little [gary at luxcentral.com] * @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class. * <p> * An I...
JavaScript
/*! * Add to Homescreen v1.0.8 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org * Released under MIT license, http://cubiq.org/license */ (function(){ var nav = navigator, isIDevice = (/iphone|ipod|ipad/gi).test(nav.platform), isIPad = (/ipad/gi).test(nav.platform), isRetina = 'devicePixelRatio' in window &...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader.addPlacemark( "___ID__...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader.addPlacemark( "___ID__...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader.addPlacemark( "___ID__...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader.addPlacemark( "___ID__...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader.addPlacemark( "___ID__...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader = new KGOEsriMapLoader({ ...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader = new KGOGoogleMapLoader({...
JavaScript
/* * Copyright © 2010 - 2012 Modo Labs Inc. All rights reserved. * * The license governing the contents of this file is located in the LICENSE * file located at the root directory of this distribution. If the LICENSE file * is missing, please contact sales@modolabs.com. * */ mapLoader.addPlacemark( "___ID__...
JavaScript
var self; var checkHandlers = []; var visibleButtons = []; var nonVisibleButtons = []; var direction; function create(that, options) { self = that; direction = options.direction || Qt.Horizontal; self.childrenChanged.connect(rebuild); // self.widthChanged.connect(resizeChildren); build(); } functio...
JavaScript
function delActivity(id){/*删除活动*/ ajax.send('apps.php?q=activity&a=delactivity&action=delactivity&ajax=1&id='+id,'',function(){ var rText = ajax.request.responseText.split('\t'); if (rText[0] == 'success') { var element = document.getElementById('activity_'+id); if (element) { element.parentNode.re...
JavaScript
function quickRateRequest(objId,typeId,option){ var url = "hack.php?H_name=rate&action=ajax&job=hot&objectid="+objId+"&typeid="+typeId+"&optionid="+option; read.guide(); ajax.send(url,'',function(){ if (ajax.request.responseText == null) { ajax.request.responseText = "尚未开启快速评价功能!"; } ajax.guide(); ...
JavaScript
var getElementPos = Class({},{ Create : function (elementId) { if (typeof(elementId)=='string') { this.element = getObj(elementId); } else { this.element = elementId; } this.x = 0; this.y = 0; this._init(); }, getX : function () { return this.x; }, getY : function () { return ...
JavaScript
var drag = Class({},{ Create : function (container,item,head,edit,close,content,pack,closeAble) { this.containerClass = container; this.itemClass = item; this.headClass = head; this.editClass = edit; this.closeClass = close; this.contentClass = content; this.closeAbleClass = closeAble; this.pa...
JavaScript
var changeStyle = Class({},{ Create : function (container, styleSaveId) { this._init(container); this.styleInput = objCheck(styleSaveId); }, _init : function (container) { container = objCheck(container); var elems = container.getElementsByTagName("li"); var self = this; this.items = Array(); ...
JavaScript
Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift(); return function(){ return fn.apply(object, args.concat(Array.prototype.slice.call(arguments))); }; }; var Topbar = function(ele) { //获取实际的位置值。 this.bar = ele;...
JavaScript
var selectStyle = Class({},{ Create : function (container,style) { this.styleInput = objCheck(style); this._init(container); }, _init : function (container) { container = objCheck(container); var elems = container.getElementsByTagName("li"); var self = this; this.items = Array(); for (var i=0...
JavaScript
function changSpanDisplay(id){ id = objCheck(id); var spans = id.getElementsByTagName('span'); for (var i=0;i<spans.length;i++) { if (spans[i].style.display == 'none') { spans[i].style.display = ''; } else { spans[i].style.display = 'none'; } } } function showEidt(dtid,u){ var li = getObj('...
JavaScript
var collection = { appUrl : 'apps.php?q=collection', $ : function(id){ return document.getElementById(id); }, post : function(form) { var link = form.link.value; var preg = /^http\:\/\/.{4,255}$/; if (!preg.test(link)) { this._showMessage('error','链接地址出错,链接地址必须以:http://开头'); return false...
JavaScript
var weibo_post = function(json) { this.init(json); } weibo_post.prototype = { init : function (j) { this.form = j.form; this.content = j.content; this.smile = j.smile; this.url = j.url; this.photo = j.photo; this.wordLimit = 255; this.postUrl = 'apps.php?q=weibo&do=post&ajax=1'; ...
JavaScript
var defaultface='default'; var fc_shownum='9'; var facedb={}; facedb['default'] = '默认表情'; var face=new Array(); face[2]=['default/1.gif','']; face[3]=['default/2.gif','']; face[4]=['default/3.gif','']; face[5]=['default/4.gif','']; face[6]=['default/5.gif','']; face[7]=['default/6.gif','']; face[8]=['default/7.gif','...
JavaScript
function cms_submit(id,column_id){ var sendUrl = 'mode.php?m=cms&q=list&action=del&ids=' + id + '&column_id='+column_id; showDialog('confirm','确定要删除该文章?',0,function(){ ajax.send(sendUrl,'',function(){ var rText = ajax.request.responseText; if (rText=='success') { showDialog('success','文章删除成功!',2); ...
JavaScript
/** *js公有验证操作 *@author suqian *@date 2010/9/22 *@package validate **/ Array.prototype = { in_array:function (value){ for (var i =0;i<this.length;i++){ if(this[i] == value) return true; } return false; } } String.prototype = { trim:function(){ return this.replace(/(^s*)|(s*$)/g...
JavaScript
/*************************** * 新版上传文件 * @author yuyang * $Id$ */ var uploader = { startId:0, mode:0, /** * 初始化 */ init:function(){ this.flash = swfobject.getObjectById('mutiupload'); }, /** * 列出待上传的文件 */ list:function(queue) { var qlist = document.getElementById('qlist'); w...
JavaScript
function $() { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') element = document.getElementById(element); if (arguments.length == 1) return element; elements.push(element); } return eleme...
JavaScript
/*-----卡盘------*/ var pw_tab = function(id,ev,dtime){ var tab = jQuery("#"+id); if(!tab[0])return; var ev = ev ? ev : "mouseover"; var dtime = dtime-100>0 ? dtime : 100; var li = tab.find("ul.tab-holder li"); var div = tab.find(".tab-panel"); var timer; li.each(function(i){ jQuery(this).attr("in...
JavaScript
function changePoints(){ var startPoint = $('driveLine_startname'); var endPoint = $('driveLine_endname'); var tempValue = startPoint.value; startPoint.value = endPoint.value; endPoint.value = tempValue; } /*驾车*/ function DriveSearch(){ this.driveSType="rs"; this.route_way = "0"; this.point_id ="";...
JavaScript
var $ = function(id){ return document.getElementById(id); } function changeDIV(id){ if(id == "1"){ $('title01').className = "maintitletd1"; $('title02').className = "maintitletda font01"; $('title03').className = "maintitletdb font01"; $('title04').className = "maintitletda font01"; $('title05'...
JavaScript
//全局变量 var clickPointIds = new Array(); //初始化地图 var mapObj=null; function mapInit(mapPointObj) { var mapoption = new MMapOptions(); mapoption.zoom = mapPointObj.mapZoom; //设置地图zoom级别 mapoption.center=new MLngLat(mapPointObj.point_x,mapPointObj.point_y); mapoption.toolbar=ROUND; //设置工具条 map...
JavaScript
/** * Extend Product Center javascript package */ var house = { /* global selector */ baseUrl : 'index.php', modeName : '', control : '', action : '', init : function(name,control,action){ this.modeName = name; this.control = control; this.action = action; this.baseUrl += '?m='+name+'&...
JavaScript
function addRecord(s,t) { var l = getObj(t).lastChild; var n = getObj(s).cloneNode(true); n.style.display = ''; n.id = ''; getObj(t).insertBefore(n,l); } function delRecord(s,t,o) { getObj(t).removeChild(o.parentNode.parentNode); if (getObj(t).getElementsByTagName('TR').length<=2)addRecord(s,t); } fun...
JavaScript
function getUrlParams(url) { var params = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(1); strs = str.split("&"); for(var i = 0; i < strs.length; i ++) { params[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]); } } return params; } function...
JavaScript
//搜索相关 function mapSearcher () { this.keyword = '银行'; this.centerKeyword = ''; this.citycode = ''; this.cityname = '杭州'; this.resultPane = 'search_result_content'; this.searchType = 'keyword'; //keyword and centerKeyword /*搜索结果相关*/ this.searchResultShowInner = false; this.searchResultInner = ''; ...
JavaScript
function checkCompany(e) { return verify('isempty',e,function(){ if(arguments[0]){ message('companyTip','',''); }else{ message('companyTip','所属公司不能为空','tip tip-error'); } }); } function checkAddress(e) { return verify('isempty',e,function(){ if(arguments[0]){ message('addressTip','','...
JavaScript
document.write("<select name='localSearchCitycodeSelect' id='localSearchCitycodeSelect' onchange='setCitycenter();' style='width:95px;'>"); document.write("<option value='010' selected >銆
JavaScript
~function(){ var Timer = null; var CurScreen = MaxScreen = 1; var pics=document.getElementById('pwSlidePlayer').getElementsByTagName("DIV"); pics[0].style.display=""; var MaxScreen=pics.length-1; window.pwSlidePlayer=function (action,index) { clearTimeout(Timer); switch (action) { case 'pause' : ...
JavaScript
cityArray = new Array(); cityArray[0] = new Array("请选择","请选择"); cityArray[1] = new Array("北京市","北京"); cityArray[2] = new Array("上海市","上海"); cityArray[3] = new Array("天津市","天津"); cityArray[4] = new Array("重庆市","重庆"); cityArray[5] = new Array("河北省","石家庄|邯郸|邢台|保定|张家口|承德|廊坊|唐山|秦皇岛|沧州|衡水"); cityArray[6] = new A...
JavaScript
function CheckAll(form,obj){ var checkBox = form.houses; if(checkBox.value){ obj.checked ? checkBox.checked = true : checkBox.checked = false; }else{ for (var i = 0; i < checkBox.length; i++) { obj.checked ? checkBox[i].checked = true : checkBox[i].checked = false; } } } function deleteHouses(...
JavaScript
function ddSliderPlayers(elementId,handleId, pauseTime, currentClassName) { try { if (typeof ddSliderPlayer == 'undefined') ddSliderPlayer = {}; } catch (e) { ddSliderPlayer = {}; } var elementObj = document.getElementById(elementId); var handler = document.getElementById(handleId); ddSliderPlayer...
JavaScript
var imageType = Class({},{ /*input,upload,select*/ Create : function (ul) { this.list = []; var list = getObj(ul).getElementsByTagName('span'); for (var i=0;i<list.length;i++) { this.list[i] = list[i]; if (list[i].id == 'imagetype_select') this.select = getObj('imagetype_select_div'); } ...
JavaScript
function tmpdisplay(){ this.close = 1 ; this.tout = null; this.tmpdiv = null; this.tmpdiv = document.createElement('div'); this.tmpdiv.style.position='absolute'; this.tmpdiv.style.left='100px'; this.tmpdiv.style.top='100px'; this.tmpdiv.style.width="100px"; this.tmpdiv.style.height="100px"; this.tm...
JavaScript