code
stringlengths
1
2.08M
language
stringclasses
1 value
/** * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ // This file contains style definitions that can be used by CKEditor plugins. // // The most common use for it is the "stylescombo" plugin, which shows a comb...
JavaScript
/* SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */ ;var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="...
JavaScript
$(document).ready(function() { if($('div.form.login').length) { // in login page $('input#LoginForm_password').focus(); } $('table.preview input[name="checkAll"]').click(function() { $('table.preview .confirm input').prop('checked', this.checked); }); $('table.preview td.confirm input').click(function() { ...
JavaScript
/** * jQuery Yii ListView plugin file. * * @author Qiang Xue <[email protected]> * @link http://www.yiiframework.com/ * @copyright Copyright &copy; 2008-2010 Yii Software LLC * @license http://www.yiiframework.com/license/ */ ;(function($) { /** * yiiListView set function. * @param options map settings f...
JavaScript
/** * jQuery Yii GridView plugin file. * * @author Qiang Xue <[email protected]> * @link http://www.yiiframework.com/ * @copyright Copyright &copy; 2008-2010 Yii Software LLC * @license http://www.yiiframework.com/license/ */ (function ($) { var selectCheckedRows, methods, gridSettings = []; /** * 1. Se...
JavaScript
/** * jQuery Yii plugin file. * * @author Qiang Xue <[email protected]> * @link http://www.yiiframework.com/ * @copyright Copyright &copy; 2008-2010 Yii Software LLC * @license http://www.yiiframework.com/license/ */ ;(function($) { $.yii = { version : '1.0', submitForm : function (element, url, params) {...
JavaScript
/* ### jQuery Star Rating Plugin v3.14 - 2012-01-26 ### * Home: http://www.fyneworks.com/jquery/star-rating/ * Code: http://code.google.com/p/jquery-star-rating-plugin/ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/...
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
/* * jQuery Autocomplete plugin 1.1 * * Modified for Yii Framework: * - Renamed "autocomplete" to "legacyautocomplete". * - Fixed IE8 problems (mario.ffranco). * * Copyright (c) 2009 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * ht...
JavaScript
/*! * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 * http://benalman.com/projects/jquery-bbq-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ // Script: jQuery BBQ: Back Button & Query Library // // *Version...
JavaScript
/* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�ö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: j...
JavaScript
/** * jQuery yiiactiveform plugin file. * * @author Qiang Xue <[email protected]> * @link http://www.yiiframework.com/ * @copyright Copyright &copy; 2008-2010 Yii Software LLC * @license http://www.yiiframework.com/license/ * @since 1.1.1 */ (function ($) { /* * returns the value of the CActiveForm input ...
JavaScript
/* * Treeview 1.5pre - 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-...
JavaScript
(function($) { var CLASSES = $.treeview.classes; var proxied = $.fn.treeview; $.fn.treeview = function(settings) { settings = $.extend({}, settings); if (settings.add) { return this.trigger("add", [settings.add]); } if (settings.remove) { return this.trigger("remove", [settings.remove]); } return p...
JavaScript
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Version 2.1.2 */ (function($){ $.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) { s = $.extend({ top : 'auto', // auto == .currentStyle.borderTo...
JavaScript
/* * Async Treeview 0.1 - Lazy-loading extension for Treeview * * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ * * Copyright (c) 2007 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/...
JavaScript
/** * jQuery Yii plugin file. * * @author Qiang Xue <[email protected]> * @link http://www.yiiframework.com/ * @copyright Copyright &copy; 2008-2010 Yii Software LLC * @license http://www.yiiframework.com/license/ */ ;(function($) { $.extend($.fn, { yiitab: function() { function activate(id) { var...
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
/* Masked Input plugin for jQuery Copyright (c) 2007-2011 Josh Bush (digitalbush.com) Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) Version: 1.3 */ (function($) { var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; var iPhone = (window.orientation ...
JavaScript
/*! http://mths.be/punycode by @mathias */ ;(function(root) { /** * The `punycode` object. * @name punycode * @type Object */ var punycode, /** Detect free variables `define`, `exports`, `module` and `require` */ freeDefine = typeof define == 'function' && typeof define.amd == 'object' && define.amd && ...
JavaScript
window.addEventListener("keydown", moveSomething, false); function moveSomething(e) { switch(e.keyCode) { case 37: // left key pressed window.location.href = "/game/?dir=3"; break; case 38: // up key pressed window.location.href = "/game/?dir=1"; ...
JavaScript
statistikk.prototype.hentXMLHTTP = function() { var xmlHttp; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); // For Old Microsoft // Browsers } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); // For // Microsoft // IE 6.0+ } catch (e2) { xmlHttp = false; ...
JavaScript
function Medlem() { this.medlemId; this.fornavn; this.etternavn; this.adresse; this.tlf; } function Medlemslisteobjekt() { this.medlemsliste = new Array(); this.loggId = -1; //this.t; } function RegelmessigObjekt(){ this.t=null; } RegelmessigObjekt.prototype.startRegelmessigAjax = functi...
JavaScript
function OS_Scene(host,id) { this.$super=OS_Interface; if (this.$super(host,id)===false) return; delete this.$super; this.illustration=null; this.gradual=null; this.filter={r:0,g:0,b:0,a:0}; var effects= { below:[], above:[] }; var paused=false; this.isPaused=function() { ...
JavaScript
//条件集合 function OS_Condition_Group(host,active,node) { this.$super=OS_Condition; this.$super(host,active,node); delete this.$super; var conditionList=[]; var type="and"; if (!!node.getAttribute("type")) type=node.getAttribute("type"); for (var i=0;i<node.childNodes.length;i++) { if (node.chil...
JavaScript
function OS_Window(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; var source=null; this.load=function(handler) { source=OS_Resource.resource.get(this.resourceNode.getElementsByTagName("source")[0].childNodes[0].nodeValue); this.loaded=true; ...
JavaScript
function OS_Variable() { var data = null; this.variableTrigger = Array(); this.set = function(o) { this.variableTrigger.forEach(function(it){ if (it.check(o)) { it.action(); } }); data=o; } this.get = function() { return data; } }
JavaScript
function OS_Sprite(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; }
JavaScript
function OS_Menu(host,id) { this.$super = OS_Interface; if (this.$super(host,id)===false) return; delete this.$super; var selectList=[]; var pointer=0; host.status.reset(); var bgm=null; var backgroundImage="#fff"; var imageList=[]; this.load=function(handler) { for (var i=0;i<this.re...
JavaScript
function OS_BattleEffect(host,id) { this.$super=OS_Effect; if (this.$super(host,id)===false) return; delete this.$super; this.load=function(handler) { this.loadTimestamps(); this.offset={ x:Number(this.resourceNode.getElementsByTagName("offset")[0].getElementsByTagName("x")[0].childNodes[0].nod...
JavaScript
function OS_Covering(host,id) { this.$super=OS_Bitmap; if (this.$super(host,id)===false) return; delete this.$super; this.integrate=false; this.passable=true; this.load=function(handler) { this.loadBitmap(); if (this.resourceNode.getElementsByTagName("integrate").length>0) { this.integ...
JavaScript
/** * @fileOverview Castle游戏实例的debug单元类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.1 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Debug */ var _Class = /** * @class Castle游戏实例的debug单元类。它主要负责记录调试信息。 * @param {Name.Sivory.Castle.Core.Game} game 一个游戏实例,参...
JavaScript
function OS_SelectDialog(game,scene,winres,params) { this.$super=OS_Dialog; this.$super(game,scene,winres,params); delete this.$super; var text=params.text; var lines=null; var linePointer=0; var duration=1000; var lineOffset=0; if (!!text) lineOffset=1; var lineS=0; var lineE=Math.floor((t...
JavaScript
function OS_Bitmap(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; this.width=0; this.height=0; this.offsetx=0; this.offsety=0; this.source=null; this.loadBitmap=function() { var imageid=this.resourceNode.getElementsByTagName("source")[0].c...
JavaScript
/** * @fileOverview 游戏手柄类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.0 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Controller */ var _Class = /** * @class 游戏手柄类,将负责监听窗口键盘事件并触发游戏中的操作事件。 * @param {Name.Sivory.Castle.Core.Game} game 游戏实例对象,...
JavaScript
function OS_Terrain(host,id) { this.$super=OS_Bitmap; if (this.$super(host,id)===false) return; delete this.$super; this.integrate=false; this.passable=true; this.load=function(handler) { this.loadBitmap(); if (this.resourceNode.getElementsByTagName("integrate").length>0) { this.integr...
JavaScript
function OS_Ornament(host,id) { this.$super=OS_Bitmap; if (this.$super(host,id)===false) return; delete this.$super; this.cover=false; this.passable=true; this.load=function(handler) { this.loadBitmap(); if (this.resourceNode.getElementsByTagName("cover").length>0) { this.cover=true; ...
JavaScript
/** * @fileOverview 散列表类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.1 */ (function() { /** @exports _Class as Name.Sivory.Castle.Util.HashTable */ var _Class = /** * @class 散别表类 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0....
JavaScript
function OS_Map(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; this.rowCount=0; this.colCount=0; this.mapdata=[]; this.load=function(handler) { this.rowCount=Number(this.resourceNode.getElementsByTagName("size")[0].getElementsByTagName("rowCou...
JavaScript
function OS_BattleActor(host,id) { this.$super=OS_Actor; if (this.$super(host,id)===false) return; delete this.$super; this.load=function(handler) { this.loadActions(); this.loaded=true; handler(this); } } OS_Resource.Builder.put("battleActor",OS_BattleActor);
JavaScript
function OS_Actor(host, id) { this.$super = OS_Sprite; if(this.$super(host, id) === false) return; delete this.$super; this.actions = {}; this.loadActions = function() { var actionlist = this.resourceNode.getElementsByTagName("actions")[0].getElementsByTagName("action"); for(var i = 0; i < actionlis...
JavaScript
var OS_Common={ is : function(obj, type) { return (type === "Null" && obj === null) || (type === "Undefined" && obj === void 0) || (type === "Number" && isFinite(obj)) || Object.prototype.toString.call(obj).slice(8, -1) === type } , eval : function(str) { if (!window.$starttime) window.$starttime=(new D...
JavaScript
function OS_TalkDialog(game,scene,winres,params) { this.$super=OS_Dialog; this.$super(game,scene,winres,params); delete this.$super; var charDelay=50; var textTime=null; var lines=null; var wordPointer=0; var linePointer=0; var waitConfirm=false; var instance=this; var initLines=function...
JavaScript
/** * @fileOverview Active逻辑活动类源文件 * @author <a href="http://sivory.my.phpcloud.com">sivory</a> * @version 0 */ /** * @class Active逻辑活动类。 * @param {Name.Sivory.Opensea.Game} host 当前逻辑活动类所从属的游戏实例 * */ Name.Sivory.Opensea.Active = function(host, id) { this.$super = OS_Resource; if(this.$super(host...
JavaScript
//脚本集合:actuatorGroup var dowithActuatorGroup=function(host,active,node,actuators) { for (var i=0;i<node.childNodes.length;i++) { if (node.childNodes[i].nodeType!=1) { continue; } var actuatorNode=node.childNodes[i]; var actuatorLoader=OS_Actuator.getInstance(actuatorNode.nodeName); if (!!act...
JavaScript
function OS_Dialog(game,interface,winres,params) { var activeKey=null; var width=500; if (!!params.width) width=params.width; var height=120; if (!!params.height) height=params.height; var currentHeight=0; var bottom=20; var top=null; if (params.position=="top") {bottom=null;top=20;} else ...
JavaScript
/** * @fileOverview Castle命名空间配置文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ (function() { if(!Name) /** * @namespace Name根域名命名空间 */ Name = {}; if(!Name.Sivory) /** * @namespace Sivory的命名空间 */ Name.Sivory = {}; if(!Name.Sivory.Castle) /** ...
JavaScript
function OS_Effect(host,id) { this.$super=OS_Sprite; if (this.$super(host,id)===false) return; delete this.$super; this.timeLine={}; this.length=0; this.loadTimestamps=function() { var timestamps=this.resourceNode.getElementsByTagName("timeline")[0].getElementsByTagName("timestamp"); this.len...
JavaScript
/** * @fileOverview Castle游戏事件类 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.1 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Event */ var _Class = /** * @class 游戏的事件类,托管游戏中事件的注册、触发等操作。 * @param {Name.Sivory.Castle.Core.Game} 游戏实例对象,参见{@link Nam...
JavaScript
function OS_Image(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; var image=new Image(); this.load=function(handler) { var src=this.resourceNode.getElementsByTagName("link")[0].childNodes[0].nodeValue; var instance=this; image.onload=function...
JavaScript
/** * @fileOverview Castle游戏实例中的钩子类Hook源代码 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.1 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Debug */ var _Class = /** * @class Castle游戏实例中的钩子类。它本质上是一个函数队列,不过此队列中的函数仅会被执行一遍,执行一遍后队列将被清空。 * @author <a href="http://si...
JavaScript
//代表脚本语句 function OS_Actuator(func) { this.init=function(host,active,actuatorNode,actuators) { func(host,active,actuatorNode,actuators); } } OS_Actuator.list=new OS_HashTable(); //取得一类语句 OS_Actuator.getInstance=function(tagname) { if (!OS_Actuator.list.containsKey(tagname)) return null; var func...
JavaScript
function OS_Music(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; var audio=new Audio(); audio.loop=false; audio.preload=true; audio.audoplay=false; this.load=function(handler) { var instance=this; audio.addEventListener("canplay",function...
JavaScript
/** * @fileOverview Castle游戏状态机类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.0 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Status */ var _Class = /** * @class Castle游戏实例类Game。它托管着一个游戏集成环境,保证游戏各部件的协同工作。游戏的主循环在此类中托管,另外,Game还负责游戏不同界面间的切换。 * ...
JavaScript
function OS_BattlerState(){ var name=null; //状态名称 var num=1; //作用回合次数 this.test=function(term) { if(term==name) return true; else return false; } this.setName=function(varName) { name=varName; } this.setNum=function(varNum) ...
JavaScript
/** * @fileOverview 游戏实例资源管理器的源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ /** * @class 游戏资源管理器类。对游戏中的资源进行整合管理,并负责向游戏内核提供资源。 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ Name.Sivory.Opensea.Resource=function() { var instance = this; ...
JavaScript
function OS_Interface(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; this.show = function() { host.status.activeInterface = this; } this.refresh = function() { host.error("错误:执行了一个应该被重载的函数"); } }
JavaScript
/** * @fileOverview 游戏源类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ /** * @class 游戏源类。对一个游戏实例中的数据与逻辑的托管单元,主要功能为向内核提供游戏执行时所需的数据与脚本。 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ Name.Sivory.Opensea.Source=function() { var instance=this; /...
JavaScript
/** * @fileOverview Castle游戏实例类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.1 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Game */ var _Class = /** * @class Castle游戏实例类Game。它托管着一个游戏集成环境,保证游戏各部件的协同工作。游戏的主循环在此类中托管,另外,Game还负责游戏不同界面间的切换。 * @pa...
JavaScript
function OS_Frame(host,id) { this.$super=OS_Bitmap; if (this.$super(host,id)===false) return; delete this.$super; this.load=function(handler) { this.loadBitmap(); this.loaded=true; handler(this); } } OS_Resource.Builder.put("frame",OS_Frame);
JavaScript
/** * @fileOverview 游戏资源基类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ /** * @class 游戏资源基类,它是所有可被加载的游戏资源的祖先类 * @param {Name.Sivory.Opensea.Game} host 游戏实例 * @id {String} 资源索引 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0 */ Name.Sivory.Opense...
JavaScript
function OS_SceneActor(host,id) { this.$super=OS_Actor; if (this.$super(host,id)===false) return; delete this.$super; this.load=function(handler) { this.loadActions(); this.loaded=true; handler(this); } } OS_Resource.Builder.put("sceneActor",OS_SceneActor);
JavaScript
function OS_Battler(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; this.normalAttackSkill=null; this.specialSkills=[]; this.load=function(handler) { var children=this.resourceNode.childNodes; for (var i=0;i<children.length;i++) { if (c...
JavaScript
function OS_Studio() { var musicVolume = 100; var soundVolume = 100; var musicList=null; var isRandom=false; var currentIndex=0; var musicCurrent=null; var musicNext=null; var len=0; var os=this; var changeTime=1000; var stop=false; this.setChangeTime=functi...
JavaScript
function OS_Team(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; this.members=[]; this.activeMemberIndex=0; this.load=function(handler) { var children=this.resourceNode.childNodes; for (var i=0;i<children.length;i++) { if (children[i].n...
JavaScript
/** * @fileOverview Castle游戏运行配置参数类源文件 * @author <a href="http://sivory.my.phpcloud.com">Sivory</a> * @version 0.0.1 */ (function() { /** @exports _Class as Name.Sivory.Castle.Core.Config */ var _Class = /** * @class Castle游戏运行配置参数类。主要功能是向游戏内核提供基本配置参数。由用户建立后传入Game类的构造函数,Game类构造函数可接受匿名创建的Config实例...
JavaScript
function OS_Skill(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; this.actions=[]; this.load=function(handler) { var children=this.resourceNode.childNodes; for (var i=0;i<children.length;i++) { if (children[i].nodeType!=1) continue; v...
JavaScript
function OS_Stage(game) { var canvas=null; var container=null; var context=null; var viewCenter={}; var initCanvas=function() { container=document.getElementById(game.config.gameContainer); container.innerHtml=""; canvas=document.createElement("canvas"); canvas.width=game.config.width; ca...
JavaScript
function OS_SceneEffect(host,id) { this.$super=OS_Effect; if (this.$super(host,id)===false) return; delete this.$super; this.load=function(handler) { this.loadTimestamps(); this.offset={ x:Number(this.resourceNode.getElementsByTagName("offset")[0].getElementsByTagName("x")[0].childNodes[0].node...
JavaScript
function OS_Sound(host,id) { this.$super=OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; var audio=new Audio(); audio.loop=false; audio.preload=true; audio.audoplay=false; this.load=function(handler) { var instance=this; audio.addEventListener("canplaythrough",f...
JavaScript
function OS_KeyConfig(host,id) { this.$super = OS_Resource; if (this.$super(host,id)===false) return; delete this.$super; var keymap={}; this.load = function(handler) { var keys=this.resourceNode.getElementsByTagName("key"); for (var i=0;i<keys.length;i++) { var key=keys[i]; var valu...
JavaScript
function OS_Battle(host,id) { this.$super=OS_Interface; if (this.$super(host,id)===false) return; delete this.$super; var parent=null; var background=null; this.bgm=null; var activeSkill=null; var activeBattler=null; var activeTarget=null; var enemys=[]; var partners=[]; var step=null; ...
JavaScript
function OS_Loader(game) { var angles=[ 0, Math.PI*0.1, Math.PI*0.2, Math.PI*0.3, Math.PI*-0.1, Math.PI*-0.2, Math.PI*-0.3, ]; var intervalID=null; var total=1; var loaded=0; var getProcessWidth=function() { return 420*loaded/total; } var drawPoint=function(context,r,ang...
JavaScript
function OS_Condition(host,active,node) { this.check=function() { host.error("未被重载的抽象函数"); } } OS_Condition.list=new OS_HashTable(); //取得一类效验器 OS_Condition.getInstance=function(host,active,node) { var tagname=node.nodeName; if (!OS_Condition.list.containsKey(tagname)) return null; var condition=O...
JavaScript
/** * @fileOverview Contains standard code in the namespace 'wbos' and code specifically written for Codeview in the namespace 'codeview' * @author Wouter Bos (www.thebrightlines.com) * @since 1.0 - 2010-09-10 * @version 1.0 - 2010-09-10 */ if (typeof(wbos) == "undefined") { /** * @namespace Standard code...
JavaScript
/** Called automatically by JsDoc Toolkit. */ function publish(symbolSet) { publish.conf = { // trailing slash expected for dirs ext: ".html", outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", symbolsDir: "symbols/", srcDir: "symbo...
JavaScript
/** * @fileOverview Contains standard code in the namespace 'wbos' and code specifically written for Codeview in the namespace 'codeview' * @author Wouter Bos (www.thebrightlines.com) * @since 1.0 - 2010-09-10 * @version 1.0 - 2010-09-10 */ if (typeof(wbos) == "undefined") { /** * @namespace Standard code...
JavaScript
/** Called automatically by JsDoc Toolkit. */ function publish(symbolSet) { publish.conf = { // trailing slash expected for dirs ext: ".html", outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", staticDir: "static/", symbolsDir: "symbol...
JavaScript
/** This is the main container for the FOODOC handler. @namespace */ FOODOC = { }; /** The current version string of this application. */ FOODOC.VERSION = "1.0"; FOODOC.handle = function(srcFile, src) { LOG.inform("Handling file '" + srcFile + "'"); return [ new JSDOC.Symbol( "foo", [], "VIRTUAL"...
JavaScript
/** * This is the main container for the XMLDOC handler. * @namespace * @author Brett Fattori ([email protected]) * @version $Revision: 498 $ */ XMLDOC = { }; /** The current version string of this application. */ XMLDOC.VERSION = "1.0"; /** Include the library necessary to handle XML files */ IO.includeDir("ha...
JavaScript
LOG.inform("XMLDOC.DomReader loaded"); XMLDOC.DomReader = function(root) { this.dom = root; /** * The current node the reader is on */ this.node = root; /** * Get the current node the reader is on * @type XMLDOC.Parser.node */ XMLDOC.DomReader.prototype.getNode = function() { ...
JavaScript
LOG.inform("XMLDOC.Parser loaded"); /** * XML Parser object. Returns an {@link #XMLDOC.Parser.node} which is * the root element of the parsed document. * <p/> * By default, this parser will only handle well formed XML. To * allow the parser to handle HTML, set the <tt>XMLDOC.Parser.strictMode</tt> * variable t...
JavaScript
LOG.inform("XMLDOC.symbolize loaded"); /** * Convert the source file to a set of symbols */ XMLDOC.symbolize = function(srcFile, src) { LOG.inform("Symbolizing file '" + srcFile + "'"); // XML files already have a defined structure, so we don't need to // do anything but parse them. The DOM reader can cr...
JavaScript
var TestDoc = { fails: 0, plans: 0, passes: 0, results: [] }; TestDoc.record = function(result) { TestDoc.results.push(result); if (typeof result.verdict == "boolean") { if (result.verdict === false) TestDoc.fails++; if (result.verdict === true) TestDoc.passes++; } } TestDoc.prove = function(filePath) { i...
JavaScript
// try: java -jar ../../jsrun.jar runner.js load("TestDoc.js"); TestDoc.prove("../frame/Opt.js"); TestDoc.prove("../lib/JSDOC.js"); TestDoc.prove("../frame/String.js"); TestDoc.prove("../lib/JSDOC/DocTag.js"); TestDoc.prove("../lib/JSDOC/DocComment.js"); TestDoc.prove("../lib/JSDOC/TokenReader.js"); TestDoc.prove(".....
JavaScript
load("app/frame/Dumper.js"); function symbolize(opt) { symbols = null; JSDOC.JsDoc(opt); symbols = JSDOC.JsDoc.symbolSet; } var testCases = [ function() { symbolize({a:true, p:true, _: [SYS.pwd+"test/overview.js"]}); //print(Dumper.dump(symbols)); is('symbols.getSymbolByName("My Cool Library").name', 'My Co...
JavaScript
/** * @fileOverview * A bootstrap script that creates some basic required objects * for loading other scripts. * @author Michael Mathews, [email protected] * @version $Id: run.js 756 2009-01-07 21:32:58Z micmath $ */ /** * @namespace Keep track of any messages from the running script. */ LOG = { warn: functio...
JavaScript
/** * @version $Id: main.js 818 2009-11-08 14:51:41Z micmath $ */ function main() { IO.include("lib/JSDOC.js"); IO.includeDir("plugins/"); // process the options // the -c option: options are defined in a configuration file if (JSDOC.opt.c) { eval("JSDOC.conf = " + IO.readFile(JSDOC.opt.c)); LOG.info...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.publishSrcHilite", { onPublishSrc: function(src) { if (src.path in JsHilite.cache) { return; // already generated src code } else JsHilite.cache[src.path] = true; try { var sourceCode = IO.readFile(src.path); } catch(e) { print(e.message); ...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.commentSrcJson", { onDocCommentSrc: function(comment) { var json; if (/^\s*@json\b/.test(comment)) { comment.src = new String(comment.src).replace("@json", ""); eval("json = "+comment.src); var tagged = ""; for (var i in json) { var tag = json[i...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.tagParamConfig", { onDocCommentTags: function(comment) { var currentParam = null; var tags = comment.tags; for (var i = 0, l = tags.length; i < l; i++) { if (tags[i].title == "param") { if (tags[i].name.indexOf(".") == -1) { currentParam = i; ...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.symbolLink", { onSymbolLink: function(link) { // modify link.linkPath (the href part of the link) // or link.linkText (the text displayed) // or link.linkInner (the #name part of the link) } } );
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.functionCall", { onFunctionCall: function(functionCall) { if (functionCall.name == "dojo.define" && functionCall.arg1) { functionCall.doc = "/** @lends "+eval(functionCall.arg1)+".prototype */"; } } } );
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.frameworkPrototype", { onPrototypeClassCreate: function(classCreator) { var desc = ""; if (classCreator.comment) { desc = classCreator.comment; } var insert = desc+"/** @name "+classCreator.name+"\n@constructor\n@scope "+classCreator.name+".prototype */" ...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.tagSynonyms", { onDocCommentSrc: function(comment) { comment.src = comment.src.replace(/@methodOf\b/i, "@function\n@memberOf"); comment.src = comment.src.replace(/@fieldOf\b/i, "@field\n@memberOf"); }, onDocCommentTags: function(comment) { for (var i = 0, l...
JavaScript
/** Handle the creation of HTML links to documented symbols. @constructor */ function Link() { this.alias = ""; this.src = ""; this.file = ""; this.text = ""; this.innerName = ""; this.classLink = false; this.targetName = ""; this.target = function(targetName) { if (defined(targetName)) this.targetName = t...
JavaScript
/** @namespace */ Opt = { /** * Get commandline option values. * @param {Array} args Commandline arguments. Like ["-a=xml", "-b", "--class=new", "--debug"] * @param {object} optNames Map short names to long names. Like {a:"accept", b:"backtrace", c:"class", d:"debug"}. * @return {object} Short names and values...
JavaScript
/** * @fileOverview * @name JsTestrun * @author Michael Mathews [email protected] * @url $HeadURL: https://jsdoc-toolkit.googlecode.com/svn/tags/jsdoc_toolkit-2.4.0/jsdoc-toolkit/app/frame/Testrun.js $ * @revision $Id: Testrun.js 418 2008-01-15 21:40:33Z micmath $ * @license <a href="http://en.wikipedia.org/wiki/...
JavaScript
/** @constructor @example var _index = new Hash(); _index.set("a", "apple"); _index.set("b", "blue"); _index.set("c", "coffee"); for (var p = _index.first(); p; p = _index.next()) { print(p.key+" is for "+p.value); } */ var Hash = function() { this._map = {}; this._keys = []; this._vals = []; this.res...
JavaScript
_global_ = this; function Namespace(name, f) { var n = name.split("."); for (var o = _global_, i = 0, l = n.length; i < l; i++) { o = o[n[i]] = o[n[i]] || {}; } if (f) f(); }
JavaScript