code
stringlengths
1
2.08M
language
stringclasses
1 value
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
/* * cyin 自己的FckEditor配置 */ /* *使用 office2003 皮肤 */ FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/' ; FCKConfig.SkinEditorCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ; FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ; /* * 不自动探测语言 默认英文 现在弄成中文 */ FC...
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * ...
JavaScript
String.prototype.substringPro = function(C, D) { var E = ""; D = D || "..."; if (this.getLen() <= C) { return this } for (var B = 0, A = 0; A < C - D.length;) { if (this.charCodeAt(B) >= 0 && this.charCodeAt(B) < 256) { E += this.charAt(B); ...
JavaScript
// Lee dialog 1.0 http://www.xij.cn/blog/?p=68 var dialogFirst=true; function dialog(title,content,width,height,cssName){ if(dialogFirst==true){ var temp_float=new String; temp_float="<div id=\"floatBoxBg\" style=\"height:"+$(document).height()+"px;filter:alpha(opacity=0);opacity:0;\"></div>"; temp_floa...
JavaScript
/*! Copyright 2011 Baidu Inc. All Rights Reserved. */ (function() { function l(a) { var b=f[a]; f[a]=void 0; return b } function D(a) { return(a=RegExp("(^| )"+a+"=([^; ]*)(; |$)").exec(e.cookie))&&a[2]?decodeURIComponent(a[2]):"" } function E(a) { a=a||e.domain; a.indexOf("www.")===0&&(a=a.subst...
JavaScript
var SiteTracker = function(s, p, r, u) { if (s != undefined && s != null) { this.site = s; } if (p != undefined && p != null) { this.page = p; } if (r != undefined && r != null) { this.referer = r; } if (u != undefined && u != null) { this.uid = u; } };...
JavaScript
String.prototype.substringPro=function(C,D) { var E=""; D=D||"..."; if(this.getLen()<=C) { return this } for(var B=0,A=0; A<C-D.length; ) { if(this.charCodeAt(B)>=0&&this.charCodeAt(B)<256) { E+=this.charAt(B); A++ } else { if((A+=3)<=C) { E+=this.charAt(B) } }B++}E+=D; return E}; String...
JavaScript
var ___baseNamespaceName="CproNamespace"; (function() { var c=___baseNamespaceName; var g=window,a=0,f=false,b=false; while((g!=window.top||g!=g.parent)&&a<10) { f=true; try { g.parent.location.toString() } catch(e) { b=true; break } a++; g=g.parent}if(a>=10) { b=true } var ...
JavaScript
/*�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.MetaData.js 16 2010-03-26 11:20:56Z diego.alto $ * */ /** * Sets the type of metadata to use. ...
JavaScript
/* ### jQuery Multiple File Upload Plugin v1.47 - 2010-03-26 ### * Home: http://www.fyneworks.com/jquery/multiple-file-upload/ * Code: http://code.google.com/p/jquery-multifile-plugin/ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.g...
JavaScript
/* * jQuery blockUI plugin * Version 2.16 (20-MAR-2009) * @requires jQuery v1.2.3 or later * * Examples at: http://malsup.com/jquery/block/ * Copyright (c) 2007-2008 M. Alsup * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licen...
JavaScript
/* * jQuery Form Plugin * version: 2.18 (06-JAN-2009) * @requires jQuery v1.2.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 * ...
JavaScript
var imgwidth=300; var imgheight=400; function preLoad() { if (!this.support.loading) { alert("You need the Flash Player to use SWFUpload."); return false; } else if (!this.support.imageResize) { alert("You need Flash Player 10 to upload resized images."); return false; } } function loadFailed() {...
JavaScript
var JSON_URL = '../../php/file_manager_json.php'; var KE = parent.KindEditor; location.href.match(/\?id=([\w-]+)/i); var id = RegExp.$1; var fileManagerJson = (typeof KE.g[id].fileManagerJson == 'undefined') ? JSON_URL : KE.g[id].fileManagerJson; var lang = KE.lang.plugins.file_manager; KE.event.ready(function(...
JavaScript
function bytes(str){ var len=0; for(var i=0;i<str.length;i++){ if(str.charCodeAt(i)>127){ len++; } len++; } return len; } String.prototype.replaceAll = function(s1,s2) { return this.replace(new RegExp(s1,"igm"),s2); } function updatecode() { var img = g_site_url+"index.php?use...
JavaScript
/*! * MultiUpload for xheditor * @requires xhEditor * * @author Yanis.Wang<yanis.wang@gmail.com> * @site http://xheditor.com/ * @licence LGPL(http://www.opensource.org/licenses/lgpl-license.php) * * @Version: 0.9.2 (build 100505) */ var swfu,selQueue=[],selectID,arrMsg=[],allSize=0,uploadSize=0; f...
JavaScript
/*! * jQuery.dialog 0.71 * * Copyright (c) 2008 Hudong.com * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * author: panxuepeng * blog: http://dushii.blog.163.com * $Date: 2008-08-31 $ * $Last: 2010-03-12 $ */ /* run: Firefox 2+, IE6+, Chrome2+, Safari...
JavaScript
var userAgent = navigator.userAgent.toLowerCase(); var is_opera = userAgent.indexOf('opera') != -1 && opera.version(); var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3); var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf...
JavaScript
var controlid = null; var currdate = null; var startdate = null; var enddate = null; var yy = null; var mm = null; var hh = null; var ii = null; var currday = null; var addtime = false; var today = new Date(); var lastcheckedyear = false; var lastcheckedmonth = false; function loadcalendar() { s = '';...
JavaScript
function getShangQuan() { var quyu =document.getElementById("quyu").value; if(quyu){ $.ajax( { type: "GET", url: "getShangQuan.php", data: "id="+quyu, success: function(msg) { $("#quyu2_div").html(msg); } } ); } } function getShangQuan2() { var quyu =document.getElementBy...
JavaScript
$(function(){ //jquery cookie jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expir...
JavaScript
$(function(){ //注册信息验证 var check_uname_email=$("#check_post_action").val(); //邮箱地址验证 $("#mlsEmail").focus(function(){ if($(this).val()=='电子邮箱'){ $(this).val(""); } }) $("#mlsEmail").blur(function(){ if($(this).val()==''){ $(this).val("电子邮箱"); } var email=$.trim($(this).val()); if(e...
JavaScript
$(function(){ //登录 $(".loginBtn").click(function(){ var verify_post_action=$("#checkcode").attr("verify_post_action"); var loginBtn_post_action=$(this).attr("loginBtn_post_action"); var loginBtn_post_location=$(this).attr("loginBtn_post_location"); var uname=$.trim($("#mlsUser").val()); var pwd=$.tri...
JavaScript
$(document).ready(function(){ /** *瀑布流 */ //获取图片高度 $.each($(".pic"),function(){ var imgl = new Image(); imgl.src = $(this).find(".item_img").attr('src'); var heightl; heightl = (200/imgl.width)*imgl.height; $(this).css('height',heightl); $(this).find('.item_img').attr('height',height...
JavaScript
$(function(){ //鼠标放上显示喜欢和收藏,鼠标移开不显示 $(".pic").hover( function(){ $(this).find(".op").show(); }, function(){ $(this).find(".op").hide(); } ); $(".list_tuijian li").hover(function(){$(this).find("p a").show()},function(){$(this).find("p a").hide()}); //jquery cookie jQuery.cookie = func...
JavaScript
$(function(){ //jquery cookie jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expir...
JavaScript
$(document).ready(function(){ /** *瀑布流 */ //容器 var $container = $('.content'); //获取图片高度 $.each($(".pic"),function(){ var imgl = new Image(); imgl.src = $(this).find(".item_img").attr('src'); var heightl; heightl = (225/imgl.width)*imgl.height; $(this).css('height',heightl); $(thi...
JavaScript
$(document).ready(function(){ //分类节点 $('.expandable').toggle( function(){ $('.sub_'+$(this).attr('id')).hide(); $(this).attr('src','./PUBLIC/statics/images/tv-expandable.gif'); }, function(){ $('.sub_'+$(this).attr('id')).show(); $(this).attr('src','./PUBLIC/statics/images/tv-collapsabl...
JavaScript
/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo * The DHTML Calendar, version 1.0 "It is happening again" * Details and latest version at: * www.dynarch.com/projects/calendar * This script is developed by Dynarch.com. Visit us at www.dynarch.com. * This script is distributed under the GNU Lesse...
JavaScript
var JSON_URL = '../../php/file_manager_json.php'; var KE = parent.KindEditor; location.href.match(/\?id=([\w-]+)/i); var id = RegExp.$1; var fileManagerJson = (typeof KE.g[id].fileManagerJson == 'undefined') ? JSON_URL : KE.g[id].fileManagerJson; var lang = KE.lang.plugins.file_manager; KE.event.ready(function(...
JavaScript
(function($){ $.fn.preview = function(){ var w = $(window).width(); var h = $(window).height(); $(this).each(function(){ $(this).hover(function(e){ if(/.png$|.gif$|.jpg$|.bmp$/.test($(this).attr("bimg"))){ $("body").append("<div id='preview'><div><img src='"+$(this).attr('bimg')+"' /><p>"...
JavaScript
// +----------------------------------------------------------------------+ // | ThinkPHP | // +----------------------------------------------------------------------+ // | Copyright (c) 2006 liu21st.com All rights reserved. | // +--------...
JavaScript
$.TE.plugin("bold",{ title:"标题", cmd:"bold", click:function(){ this.editor.pasteHTML("sdfdf"); }, bold:function(){ alert('sdfsdf'); }, noRight:function(e){ if(e.type=="click"){ alert('noright'); } }, init:function(){ }, ...
JavaScript
function te_upload_interface() { //初始化参数 var _args = arguments, _fn = _args.callee, _data = ''; if( _args[0] == 'reg' ) { //注册回调 _data = _args[1]; _fn.curr = _data['callid']; _fn.data = _data; jQuery('#temaxsize').val(_data['maxsize']); } el...
JavaScript
// 系统自带插件 ( function ( $ ) { //全屏 $.TE.plugin( "fullscreen", { fullscreen:function(e){ var $btn = this.$btn, opt = this.editor.opt; if($btn.is("."+opt.cssname.fulled)){ //取消全屏 this.editor.$main.removeAttr("style"); this.editor.$bottom.find("div").show(); this.editor.resize(opt.width,...
JavaScript
(function ($) { var ie = $.browser.msie, iOS = /iphone|ipad|ipod/i.test(navigator.userAgent); $.TE = { version:'1.0', // 版本号 debug: 1, //调试开关 timeOut: 3000, //加载单个文件超时时间,单位为毫秒。 defaults: { //默认参数controls,noRigths,plugins,定义加载插件 controls: "source,|...
JavaScript
; (function() { // basePanel goes here. // @private var actions = { close : { text : '关闭', iconCls : 'icon16-quit', handler : function(btn) { Ext.Msg.confirm(document.title, '是否关闭页面?', function(text) { if (text == 'yes') { this.ownerCt.remove(this); this.removeAll(t...
JavaScript
Ext.ns('Edk.attachment.action', 'Edk.attachment.uploadWin'); Edk.attachment.action = { // 上传的动作。每执行一次upload action,创建一次uploadWin的对话框。 // 换句话说,每个formPanel可以对应多个上传对话框为formPanel服务。 // this = formPanel upload: { text : '上传图片' ,iconCls : 'icon16-attachment' ,handler : function(btn){ // btn是按钮对象 ...
JavaScript
/** * 利用最快出错即最快响应站点的做法,实现多线路、多镜像下选择最快的速度。 * 参数 sites 形如: var sites = []; autourl[1] = "http://www.cidianwang.com" autourl[2] = "http://www.aspxhome.com" autourl[3] = "http://www.llkyx.com" autourl[4] = "http://tool.aspxhome.com" autourl[5] = "http://baike.aspxhome.com" autourl[6] = "http://yohoo.com/i...
JavaScript
;(function(){ // @private function toggleButtons(smObj){ if(smObj.hasSelection()){ $$.every(this, function(action){ action.enable(); }); }else{ $$.every(this, function(action){ action.disable(); }); ...
JavaScript
// 禁止选择,形成可复制的选区 document.onselectstart = function(){ var el = event.srcElement; if (!((el.tagName == "INPUT" && el.type.toLowerCase() == "text") || el.tagName == "TEXTAREA"|| el.tagName == "SELECT")){ return false; } } // for FF if(window.Event){ Ext.onReady(function(){ document.getElementsByTagName(...
JavaScript
;(function(){ $$.catalogTreeNode = Ext.extend(Ext.tree.AsyncTreeNode, { constructor: function(config, ItemTable){ var storeObj = ItemTable.getStore(); ItemTable.catalogTreeNode = this; this.loader = new Ext.tree.TreeLoader({ directFn : blogService.getCatalog ...
JavaScript
$$.form = (function(){ var select = /select-(one|multiple)/i ,btns = /file|undefined|reset|button/i ,radio = /radio|checkbox/i ,submit = /submit/i; /** * 修改按钮的样式。 */ function addClassToBtn(cmp){ var btns = cmp.el.select('button'); btns.addCls('btnUp'); } /** * 设置焦点在用户输入框。...
JavaScript
/** * id生成器。 * @return {String} */ $$.genId = function(){ var thisFn = arguments.callee; if(!thisFn.seed){ thisFn.seed = 0; }; return 'edk_id_' + (thisFn.seed++); } Edk.base ={ browser : (function(){ var ua = navigator.userAgent.toLowerCase(); $$.apply($$, { ...
JavaScript
/* ************************************************************************** _____ _____ _ _ | ____| | _ \ | | / / | |__ | | | | | |/ / | __| | | | | | |\ \ | |___ | |_| | | | \ \ |_____| |_____/ |_| \_\ Version: 0.1.2 Author: Frank Cheung Email: frank@ajaxjs.c...
JavaScript
/** * @class $$.sql.reader.Querist bar = { select : [news.id, news.title, newsclass.title, newsclass.id, user.id, user.title] } */ $$.sql.Parser = function(){ var data = this.data; if(!data) { data = this.data = {}; } data.mainTable = ''; data.top = {}; data.top.value = 0; data.t...
JavaScript
$$.sql = new function(){ // 数据库连接对象,只设置一次,无须重复创建,多次创建则浪费。 var connectObj; function connectDB(cfg){ var dbType // 链接数据库的类型,是 Access 呢?MySQL 呢?还是 SQLServer? ,dbPath // 数据库文件的路径,如果通过磁盘访问的话。 ,connectStr // 链接数据库的字符串。 // 数据库对象,同前面的 var connectObj; 的对象 ,connectObj = new ActiveXObject("...
JavaScript
/** * @class SQL搜索器。 */ $$.sql.Searcher = { /** * 简易分词生成器 * @cfg {Array} targetField 选择要搜索的字段(最多两个) * @cfg {Boolean} isPreSearch 可选的 默认false 返回找到的记录集SQL语句 * @cfg {String} tablename 选择的表名 * @return {String} SQL字符串 */ searchParser: function (config){ var keyword = config.keyword; if (!key...
JavaScript
$$.sql.Pagination = function(){ /** * 每页显示记录笔数,或者说读取多少笔的记录。如不指定则为pageSize。 * @type {Number} pageSize */ this.pageSize = Number(Request.QueryString('start')()) || 8; /** * 如不指定则为零,表示从第一笔记录开始。 * @type {Number} startNum */ this.startNum = Number(Request.QueryString('start')()) || 0; /** ...
JavaScript
$$.Server.protect = function(){ /// 获取客户端IP /// @return {String} IP this.getIp = function(){ var proxy = $("HTTP_X_FORWARDED_FOR", "serv"); ip = proxy && proxy.indexOf("unknown") != -1 ? proxy.split(/,;/g)[0] : $("REMOTE_ADDR", "serv"); ip = ip.trim().substring(0, 15); return "::1" === ip ? "...
JavaScript
/** * DeepCMS中,一个路由是一个HTTP方法与URL匹配范式的配对。每个路由都与一个代码块关联: get '/' do .. 显示一些事物 .. end post '/' do .. 创建一些事物 .. end put '/' do .. 更新一些事物 .. end delete '/' do .. 消灭一些事物 .. end 路由按照它们被定义的顺序进行匹配。第一个与请求匹配的路由会被调用。 * oute根据请求的url等信息去获取获取controller和action的信息, * 如果获取到,则通过动态调用调用action方法,如果没有匹配的...
JavaScript
/** --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 用法: <%@language=jscript codepage=65001%> <script src="/edk/common/edk.js" language="JavaScript" runat="server"></script> <script src="/edk/common...
JavaScript
$$.Server.request = function(){ /** * 是否POST提交数据。 * @return {Boolean} */ this.isPOST = function(){ return Request.ServerVariables('HTTP_METHOD')() == "POST"; } /** * 返回是否Raw 的POST。这个方法在某种场合必须使用,例如Ext.Direct。 * 约定:凡application/json的提交均视作Raw POST。 * @return {Boolean} */ this.isR...
JavaScript
var $$ = $$ || {}; /** * @class * @singleton * 兼容浏览器与服务端的XML加载器。 */ $$.XML = new (function(){ /** * 把 XML 格式转换为 JSON 输出。MS ONLY 暂时。 * @param {IXMLDOMNode} n * @return {Object} JSON */ this.xml2json = function (node){ var obj = {}; var element = node.firstChild; while (element) { ...
JavaScript
/** * 网页模板是把动态的数据和静态的表现组装到一起的工具,使得内容与表现方式可以分离,是Web开发中的重要技术手段。 * 早期的Web开发很简单,没有“模板 ”的概念。 * 只需把数据提取出来,放在HTML里面显示就达到程序的目的。 * HTML代码混合于逻辑代码之中,HTML就是直接显示的内容,内嵌在HMTL 中<% ... %>表示为后台(服务端)执行代码, * 但很多情况<% ... %>中又有HTML的片段,至于怎么拼凑出HTML片段的方式方法各式各样、与多种的后台语言掺杂一起(ASP、PHP、JSP)各显神通。 */ $$.tpl = (function(){ // 匹配闭合tag的正则...
JavaScript
;(function(){ // fso不存在 rename(),只有通过 move() 来完成。 function renName(){} })(); /** * 打开文件,读取其内容,返回文本的格式。 * @static * @param {String} path 文件路径 * @param {Boolean} isMapPath 是否送入相对路径。True 的话把虚拟路径还原为真实的磁盘路径。 * @return {String} 文本内容 */ $$.fs.File.read = function(path){ with(new ActiveXObjec...
JavaScript
// 日期功能 by Liu Shuan Core.lib.date = function() { // 格式化日期 this.formatDate = function(date, style) { style = style || "yyyy-MM-ddThh:mm:ss"; return style.replace(/y+|M+|d+|h+|m+|s+|w+|q+|S/g, function($0) { var temp = 0; switch ($0.charAt(0)) { case "y" : return String(date.getFullYear())...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ /** * @class Ext.ux.ProgressBarPager * @extends Object * Plugin (ptype = 'tabclosemenu') for displaying a progressbar inside of a paging toolbar instead of plain text * * @ptype progressbarpage...
JavaScript
Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var loginfield = new Ext.form.FormPanel({ labelAlign: 'top', standardSubmit: true, hideLabels:true, labelWidth: 0, width:300, bodyStyle:'padding:145px 10px 24px', baseCls...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.ns('Ext.ux.form'); Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, { initComponent : function(){ Ext.ux.form.SearchField.superclass.initComponent.call(this); ...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.ux.SlidingPager = Ext.extend(Object, { init : function(pbar){ Ext.each(pbar.items.getRange(2,6), function(c){ c.hide(); }); var slider = new Ext.S...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.onReady(function(){ new Ext.Slider({ renderTo: 'basic-slider', width: 214, minValue: 0, maxValue: 100 }); new Ext.Slider({ rend...
JavaScript
Ext.onReady(function(){ var store = new Ext.data.Store({ proxy: new Ext.ux.data.PagingMemoryProxy(data), reader: new Ext.data.ArrayReader({ record: 'list', id: 'Id', totalRecords: '@total' }, [{ name: 'Id' }, { name: 'name' }, { name: 'price', type: 'float' }, { name:...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ /* Fix for Opera, which does not seem to include the map function on Array's */ if (!Array.prototype.map) { Array.prototype.map = function(fun){ var len = this.length; if (ty...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.ux.PanelResizer = Ext.extend(Ext.util.Observable, { minHeight: 0, maxHeight:10000000, constructor: function(config){ Ext.apply(this, config); this.events = ...
JavaScript
/*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ /** * @class Ext.ux.SliderTip * @extends Ext.Tip * Simple plugin for using an Ext.Tip with a slider to show the slider value */ Ext.ux.SliderTip = Ext.extend(Ext.Tip, { minWidth: 10...
JavaScript
Ext.onReady(function(){ //搜索栏 Ext.ns('Ext.ux.form'); Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, { initComponent : function(){ Ext.ux.form.SearchField.superclass.initComponent.call(this); this.on('specialkey', function(f, e){ if(e.getKey() == e.ENTER){ ...
JavaScript
/* * 全局注册事件 */ $(function(){ /** * 绑定电影输入框事件 */ var filmNameInput = $("input[name='filmname']"); filmNameInput.bind("blur", function(event) { if (event.type == 'blur') { var value = filmNameInput.val(); if (value == null || value == '') return; // 失焦时...
JavaScript
/* Create By WangJun(wangjunneil@gmail.com) On 2013/01/03 */ /* 根据len截断字符串content */ function cutoutStr(content, len) { var newContent = ""; if (content.length > len) newContent = content.substring(0, len) + '......(' + content.length + '字)'; else newContent = content; return newContent; } /* 用指定字符chr...
JavaScript
/* * 系统全局事件注册 creator by wangjun on 2012.8.23 */ /* * 首页加入收藏 */ function addFavorites(location, title) { try { window.external.addFavorite(location,title); } catch (e) { try { window.sidebar.addPanel(title, location, ''); } catch (e) { alert('不支持的浏览器,加入收藏失败,请使用Ctrl+D手动收藏!')}; } } /* * 首页...
JavaScript
/** * Created with IntelliJ IDEA. * User: wangjunneil@gmail.com * Date: 13-12-25 * Time: 15:16 * To change this template use File | Settings | File Templates. */ function createForm(url) { var form = document.createElement("form"); form.method = 'POST'; form.action = url; return form; } function ...
JavaScript
/** * Created with IntelliJ IDEA. * User: wangjunneil@gmail.com * Date: 13-12-24 * Time: 14:16 * To change this template use File | Settings | File Templates. */ function dynamicFilmTypeSubmit(page, filmTypeId) { var form = createForm('/page/filmListByCondition.html'); createInput("page", page, form); ...
JavaScript
// jQuery Dialogs Plugin // Version 1.1 // Cory S.N. LaViska (http://abeautifulsite.net/) // Edit by LinPanxing (http://www.91aspx.com/) // Download by http://sc.xueit.com (function($) { $.popup = { ID: null, title: "", top: 0, left: 0, width: 0, height: ...
JavaScript
function submittextarea(textareaValue){ var Letters = "1234567890??"; //可以自己增加可输入值 var textareaType = textareaValue.split(",");//值用逗号隔开 var i; var c; for(i = 0; i< textareaType.length; i++){ c = textareaType[i].charAt(i); if(textareaValue==""){ alert("对不起.离散号码不能为空.") return false; ...
JavaScript
function scroll(n) { temp=n; var News = document.getElementById("pic_img"); News.scrollTop=News.scrollTop+temp; if (temp==0) return;setTimeout("scroll(temp)",1); }
JavaScript
// 突出显示obj function showColor(obj){ var sY = "BACKGROUND-IMAGE:URL(../IMAGES/BUTT_CEN.jpg);"; //注意此项必须大写 var oTd = document.getElementsByTagName("td"); // 清除页面上的添加的菜单样式 for (var i=0 ;i<oTd.length ;i++){ var tt = oTd[i].style.cssText; if (tt.indexOf("BACKGROUND-IMAGE") >=...
JavaScript
function scroll(n) { temp=n; var News = document.getElementById("pic_img"); News.scrollLeft=News.scrollLeft+temp; if (temp==0) return;setTimeout("scroll(temp)",1); }
JavaScript
/* * 全局事件注册 creator by wangjun on 2012.8.23 */ $(function(){ tabs.init(); }); tabs = { init : function(){ $('.noticead').each(function(){ $(this).find('.tab-content').hide(); $($(this).find('ul.nav .selected a').attr('href')).fadeIn(300); $(this).find('ul.nav a').c...
JavaScript
(function ($) { $.fn.slides=function (option) { option=$.extend({ },$.fn.slides.option,option); return this.each(function () { $('.'+option.container,$(this)).children().wrapAll('<div class="slides_control"/>'); var elem=$(this),control=$('.slides_control',elem),total=control.children().size(),width=...
JavaScript
(function ($) { $.fn.slides=function (option) { option=$.extend({ },$.fn.slides.option,option); return this.each(function () { $('.'+option.container,$(this)).children().wrapAll('<div class="slides_control"/>'); var elem=$(this),control=$('.slides_control',elem),total=control.children().size(),width=...
JavaScript
/* * 全局事件注册 creator by wangjun on 2012.8.23 */ $(function(){ }); /* 显示/隐藏更多电影介绍 */ var shortDetail; function toggleDetail(filmIntroduce) { if (shortDetail == null) shortDetail = $(".detail_vbot").html(); var content = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + filmIntroduce + '<a href="javascri...
JavaScript
(function () { var host = window.location.hostname; var port = window.location.port; var videoPlugin; var videoStream; var audioPlugin; var audioStream; var error; var volume; function stream(object,type,done) { var state = "idle"; return { restart:...
JavaScript
(function () { var translations = { en: { 1:"About", 2:"Return", 3:"Change quality settings", 4:"Flash/Vibrator", 5:"Click on the torch to enable or disable the flash", 6:"Play a prerecorded sound", 7:"Connect !!", 8:"...
JavaScript
document.createElement('header'); document.createElement('nav'); document.createElement('section'); document.createElement('article'); document.createElement('aside'); document.createElement('footer'); document.createElement('hgroup'); $(document).ready(function () { $('.section-content,#status-container').addClas...
JavaScript
function Set_Cookie(name, value, expires, path, domain, secure) { var today = new Date(); today.setTime(today.getTime()); var expires_date = new Date(today.getTime() + (expires)); document.cookie = name + "=" + escape(value) + ((expires) ? ";expires=" + expires_date.toGMTString() : "") + ((path) ? ";pa...
JavaScript
function Set_Cookie(name, value, expires, path, domain, secure) { var today = new Date(); today.setTime(today.getTime()); var expires_date = new Date(today.getTime() + (expires)); document.cookie = name + "=" + escape(value) + ((expires) ? ";expires=" + expires_date.toGMTString() : "") + ((path) ? ";pa...
JavaScript
var sinhvienit=0; function SVIT_ADS_GetCookie(Name){ var re=new RegExp(Name+"=[^;]+", "i"); if (document.cookie.match(re)) return decodeURIComponent(document.cookie.match(re)[0].split("=")[1]); return "" } function SVIT_ADS_SetCookie(name, value, days){ if (typeof days!="undefined"){ ...
JavaScript
function SDMenu(id) { if (!document.getElementById || !document.getElementsByTagName) return false; this.menu = document.getElementById(id); this.submenus = this.menu.getElementsByTagName("div"); this.remember = true; this.speed = 5; this.markCurrent = true; this.oneSmOnly = true; } SDMenu.prototype....
JavaScript
/*全选*/ function checkall (s,k){ var a = document.getElementsByTagName('input'); var n = a.length; for (var i=0; i<n; i++){ if((a[i].type == "checkbox") && ( a[i].name.substr(0,k-1)==s )){ a[i].checked = true; } } } /*反选*/ function uncheck (s,k){ var a = docu...
JavaScript
// Singleton class TooltipWindow // This class works with special className. The tooltip content could be in your HTML page as an hidden element or // can be retreive by an AJAX call. // // To work, You just need to set two class name on elements that should show tooltips // - One to say to TooltipManager that this ele...
JavaScript
// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) // // 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 without restriction, including // without limitation the ...
JavaScript