3 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tools/yuidoc/CHANGES:
--------------------------------------------------------------------------------
1 | ChangeLog
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 |
4 | Next
5 | * added multi-language support
6 | * improved international character support
7 | * added known issues and workarounds
8 |
9 | 1.0.0b1
10 | * Initial release
11 |
--------------------------------------------------------------------------------
/tests/ext/droid_sans_mono.css:
--------------------------------------------------------------------------------
1 | @media screen {
2 | @font-face {
3 | font-family: 'Droid Sans Mono';
4 | font-style: normal;
5 | font-weight: normal;
6 | src: local('Droid Sans Mono'), local('DroidSansMono'), url('http://themes.googleusercontent.com/font?kit=ns-m2xQYezAtqh7ai59hJYW_AySPyikQrZReizgrnuw') format('truetype');
7 | }
8 | }
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/classmap.tmpl:
--------------------------------------------------------------------------------
1 | YAHOO.env.classMap = ${pkgmap};
2 |
3 | YAHOO.env.resolveClass = function(className) {
4 | var a=className.split('.'), ns=YAHOO.env.classMap;
5 |
6 | for (var i=0; i
3 |
4 |
5 |
6 |
7 | Redirecting to ${cleansedmodulename} documentation
8 |
9 |
10 |
11 | ${cleansedmodulename} documentation
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # the distribution directory
2 | dist/
3 |
4 | # parts of the site directory that are built
5 | site/docs/
6 | site/src/
7 | site/tests/
8 |
9 | # pyc files built by python for document generation
10 | *.pyc
11 |
12 | # temp directories for document generation
13 | docparse/
14 |
15 | # generated documents
16 | docs
17 |
18 | # per_user.properties copied from sample
19 | per_user.properties
20 |
21 |
22 |
--------------------------------------------------------------------------------
/per_user.properties.sample:
--------------------------------------------------------------------------------
1 |
2 | #User specific properties
3 |
4 | #The root directory of the installation
5 | peruser.root=/home/set117/development/aframe
6 |
7 | #The location of the ant-contrib jar
8 | peruser.antcontrib.location=/usr/share/java/ant-contrib.jar
9 |
10 | #the location of the sass command, only needed if doing a build site
11 | peruser.sass.location=/var/lib/gems/1.8/gems/haml-3.0.25/bin/sass
12 |
--------------------------------------------------------------------------------
/site/stylesheets/main.scss:
--------------------------------------------------------------------------------
1 |
2 | #container {
3 | background-color: #fff;
4 | }
5 |
6 |
7 | #hd h1 {
8 | font-size: 2.3em;
9 | line-height: 100%;
10 | margin: 0.5em 0 0.5em 0;
11 | font-weight: normal;
12 | color: #888;
13 |
14 | a {
15 | color: #ff8200;
16 | font-weight: bold;
17 | }
18 | }
19 |
20 | #sub-hd > div {
21 | background-color: #eee;
22 | margin: 0 0 1.5em 0;
23 | padding: 0.5em;
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/includes.node.list:
--------------------------------------------------------------------------------
1 | includes.node.list=core.js,\
2 | aframe.js,\
3 | class.js,\
4 | observable.js,\
5 | observablesMixin.js,\
6 | enumerableMixin.js,\
7 | aobject.js,\
8 | dataContainer.js,\
9 | plugin.js,\
10 | arrayCommonFunctionsMixin.js,\
11 | collectionHash.js,\
12 | collectionArray.js,\
13 | collectionPluginPersistence.js,\
14 | collectionPluginModel.js,\
15 | schema.js,\
16 | dataValidation.js,\
17 | model.js,\
18 | event.js,\
19 | fieldValidityState.js
20 |
--------------------------------------------------------------------------------
/site/stylesheets/mobile.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-size: 1em;
3 | }
4 |
5 | .container {
6 | margin-top: 10px;
7 | padding: 5px;
8 | }
9 |
10 | .container_12 {
11 | width: auto;
12 | }
13 |
14 | .container_12 .grid_12, .container_12 .grid_3, .container_12 .grid_9 {
15 | width: 100%;
16 | margin: 10px 0;
17 | }
18 |
19 | section {
20 | margin: 0;
21 | font-size: 1em;
22 | }
23 |
24 | .syntaxhighlighter code {
25 | font-size: .8em !important;
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/tests/test_fieldValidityState.js:
--------------------------------------------------------------------------------
1 | testsToRun.push( {
2 |
3 | name: "TestCase AFrame.FieldValidityState",
4 |
5 | testDefaultValidity: function() {
6 | var validity = AFrame.FieldValidityState.create();
7 | Assert.isTrue( validity.valid, 'default validity is true' );
8 | },
9 |
10 | testOverriddenValidity: function() {
11 | var validity = AFrame.FieldValidityState.create( { valid: false } );
12 | Assert.isFalse( validity.valid, 'validity set to false' );
13 | }
14 | } );
15 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang/python/test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | '''
3 | /**
4 | * Test Python File
5 | * @module testpy
6 | */
7 | '''
8 | import os, sys, string, shutil, urllib2, urllib, pprint, simplejson, datetime
9 | from cStringIO import StringIO
10 | from subprocess import call, PIPE, Popen
11 |
12 | '''
13 | /**
14 | * This is a test class
15 | * @class TestPy
16 | * @namespace Python
17 | */
18 | '''
19 |
20 | '''
21 | /**
22 | * Test Method
23 | * @method test
24 | */
25 | '''
26 | def test():
27 | pass
28 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang/cs/test.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | /**
3 | * C# Module Description
4 | * @module lang.csharp
5 | */
6 |
7 | /**
8 | * C# Class Description
9 | * @class ReadAll
10 | * @namespace PlayingAround
11 | */
12 | namespace PlayingAround {
13 | class ReadAll {
14 | /**
15 | * Main Method
16 | * @method Main
17 | * @static
18 | */
19 | public static void Main(string[] args) {
20 | string contents = System.IO.File.ReadAllText(@"C:\t1");
21 | Console.Out.WriteLine("contents = " + contents);
22 | }
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/CHANGELOG.markdown:
--------------------------------------------------------------------------------
1 | ### 1.1 (01-09-2010)
2 |
3 | * Methods, constructors, events: if there are several parameters in the style
4 | `obj.property`, only a sole `obj` will be displayed as parameter in the
5 | tables' first columns.
6 | Before: `method( obj.param1, obj.param2, obj.param3 )`.
7 | Now: `method( obj )`.
8 |
9 | * Fixed freestanding comma issues in methods, constructors and events tables.
10 | Before: `method( param1 , param2 , param3 )`.
11 | Now: `method( param1, param2, param3 )`.
12 |
13 |
14 | ### 1.0.1 (31-08-2010)
15 |
16 | * FIX: Fixed link in footer.
17 | * ADD: Added note re IE8 to `README.markdown`.
18 |
--------------------------------------------------------------------------------
/includes.list:
--------------------------------------------------------------------------------
1 | includes.list=core.js,\
2 | aframe.js,\
3 | class.js,\
4 | observable.js,\
5 | observablesMixin.js,\
6 | enumerableMixin.js,\
7 | aobject.js,\
8 | dataContainer.js,\
9 | plugin.js,\
10 | arrayCommonFunctionsMixin.js,\
11 | collectionHash.js,\
12 | collectionArray.js,\
13 | display.js,\
14 | list.js,\
15 | listPluginBindToCollection.js,\
16 | collectionPluginPersistence.js,\
17 | collectionPluginREST.js,\
18 | collectionPluginModel.js,\
19 | form.js,\
20 | field.js,\
21 | fieldPluginValidation.js,\
22 | fieldValidityState.js,\
23 | fieldPlaceholderDecorator.js,\
24 | schema.js,\
25 | listPluginFormRow.js,\
26 | dataForm.js,\
27 | dataValidation.js,\
28 | model.js,\
29 | event.js
30 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang/perl/test.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | =begin
3 | /**
4 | * Test Perl File
5 | * @module lang.perltest
6 | */
7 | =cut
8 | use strict;
9 | =begin
10 | /**
11 | * Test Perl Class
12 | * @class PerlTest
13 | * @namespace Perl
14 | */
15 | =cut
16 |
17 | =begin
18 | /**
19 | * Arith Method
20 | * @method arith
21 | */
22 | =cut
23 | sub arith($);
24 |
25 | my %h = (
26 | 'add' => '+',
27 | 'sub' => '-',
28 | 'mul' => '*',
29 | 'div' => '/',
30 | );
31 |
32 | print arith(eval $ARGV[0]), "\n";
33 |
34 | sub arith($) {
35 | my $a = shift;
36 | ref $a ? eval join $h{$a->[0]}, map arith($_), @{$a}[1..$#$a] : $a;
37 | }
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang/java/test.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Test Java Module Description
3 | * @module lang.javatest
4 | */
5 | import java.util.*;
6 |
7 | /**
8 | * This is the class description for this Java Class
9 | * @class Test
10 | * @namespace Java
11 | * @constructor
12 | */
13 | public class Test {
14 | /**
15 | * x property
16 | * @property x
17 | * @type {Double}
18 | */
19 | private double x;
20 | /**
21 | * y property
22 | * @property y
23 | * @type {Double}
24 | */
25 | private double y;
26 |
27 | /**
28 | * Main Method
29 | * @method main
30 | */
31 | public static void main (String[] args) {
32 | System.out.println("Hello, World!!");
33 | }
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/css/main.css:
--------------------------------------------------------------------------------
1 | * {
2 | line-height: 130%;
3 | }
4 |
5 | body {
6 | background-color: #eee;
7 | }
8 |
9 | p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset {
10 | margin-bottom: 0.8em;
11 | }
12 |
13 |
14 | a {
15 | text-decoration: none;
16 | color: #55d;
17 | }
18 |
19 | code, code a[name] {
20 | color: #007000;
21 | font-family: "Droid Sans Mono";
22 | }
23 |
24 |
25 | #container {
26 | background-color: #fff;
27 | }
28 |
29 |
30 | #hd h1 {
31 | font-size: 2.3em;
32 | line-height: 100%;
33 | margin: 0.5em 0 0.5em 0;
34 | font-weight: normal;
35 | color: #888;
36 | }
37 |
38 | #hd h1 a {
39 | color: #ff8200;
40 | font-weight: bold;
41 | }
42 |
43 |
44 | #sub-hd > div {
45 | background-color: #eee;
46 | margin: 0 0 1.5em 0;
47 | padding: 0.5em;
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/js/jquery.cookie.min.js:
--------------------------------------------------------------------------------
1 | /*jslint browser: true */ /*global jQuery: true */
2 |
3 | /**
4 | * jQuery Cookie plugin
5 | *
6 | * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
7 | * Dual licensed under the MIT and GPL licenses:
8 | * http://www.opensource.org/licenses/mit-license.php
9 | * http://www.gnu.org/licenses/gpl.html
10 | *
11 | */
12 | jQuery.cookie=function(d,e,b){if(arguments.length>1&&(e===null||typeof e!=="object")){b=jQuery.extend({},b);if(e===null){b.expires=-1}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g)}return(document.cookie=[encodeURIComponent(d),"=",b.raw?String(e):encodeURIComponent(String(e)),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=e||{};var a,f=b.raw?function(h){return h}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null};
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang/php/test.php:
--------------------------------------------------------------------------------
1 |
54 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/intl.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=.
11 |
12 | parser_in="$src/intl"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version="localtest"
26 |
27 | ##############################################################################
28 |
29 | python $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/bin/yuidoclog.conf:
--------------------------------------------------------------------------------
1 | [formatters]
2 | keys: detailed,simple
3 |
4 | [handlers]
5 | keys: console,syslog
6 |
7 | [loggers]
8 | keys: root,parse,highlight,generate
9 |
10 | [formatter_simple]
11 | #format: %(name)s:%(levelname)s: %(message)s
12 | format: %(levelname)s: %(message)s
13 |
14 | [formatter_detailed]
15 | format: %(name)s:%(levelname)s %(module)s:%(lineno)d: %(message)s
16 |
17 | [handler_console]
18 | class: StreamHandler
19 | args: []
20 | formatter: simple
21 |
22 | [handler_syslog]
23 | class: handlers.SysLogHandler
24 | args: [('127.0.0.1', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER]
25 | formatter: detailed
26 |
27 | [logger_root]
28 | level: INFO
29 | handlers: syslog
30 |
31 | [logger_parse]
32 | level: INFO
33 | qualname: yuidoc.parse
34 | handlers: console
35 |
36 | [logger_highlight]
37 | level: INFO
38 | qualname: yuidoc.highlight
39 | handlers: console
40 |
41 | [logger_generate]
42 | level: INFO
43 | qualname: yuidoc.generate
44 | handlers: console
45 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/dd.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/dd/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version="localtest"
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/yui.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/yui/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version="localtest"
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/base.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/base/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version="localtest"
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/node.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/node/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version="localtest"
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/json.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/io/js $src/json/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version=test
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/queue.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/queue/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version=`cat version.txt`
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/event.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | src=~/src/yui3/src
11 |
12 | parser_in="$src/yui/js $src/event-custom/js $src/event/js $src/dump/js $src/substitute/js $src/anim/js $src/collection/js $src/base/js $src/attribute/js"
13 |
14 | # The location to output the parser data. This output is a file containing a
15 | # json string, and copies of the parsed files.
16 | parser_out=build_tmp/yuidoc_tmp
17 |
18 | # The directory to put the html file outputted by the generator
19 | generator_out=build_tmp/api
20 |
21 | # The location of the template files. Any subdirectories here will be copied
22 | # verbatim to the destination directory.
23 | template=$yuidoc_home/template
24 |
25 | version=test
26 |
27 | ##############################################################################
28 |
29 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -s $*
30 |
31 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang/ruby/test.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby -w
2 |
3 | =begin
4 | /**
5 | * Module Info for test Ruby File
6 | * @module lang.rubytest
7 | */
8 | =end
9 |
10 | require 'rubygems'
11 | require 'grit'
12 | require 'optparse'
13 | require 'logger'
14 | require 'fileutils'
15 |
16 |
17 | module RubyTest
18 | =begin
19 | /**
20 | * Class Information
21 | * @class test
22 | * @namespace Ruby
23 | */
24 | =end
25 | class Test
26 | =begin
27 | /**
28 | * Execute desc
29 | * @method execute
30 | */
31 | =end
32 |
33 | def self.execute
34 | #foo
35 | end
36 | =begin
37 | /**
38 | * Parse desc
39 | * @method parse
40 | */
41 | =end
42 |
43 | def self.parse(args)
44 | #foo
45 | end
46 | =begin
47 | /**
48 | * Initialize Method
49 | * @method initialize
50 | */
51 | =end
52 |
53 | def initialize(args)
54 | =begin
55 | /**
56 | * Args Property
57 | * @property args
58 | */
59 | =end
60 | @args = args.foo
61 | =begin
62 | /**
63 | * Bar Property
64 | * @property bar
65 | */
66 | =end
67 | @bar = 'Bar'
68 | end
69 |
70 | end
71 | end
72 |
73 |
74 |
--------------------------------------------------------------------------------
/yuidoc.properties:
--------------------------------------------------------------------------------
1 | yuidoc.home=${peruser.root}/tools/yuidoc
2 |
3 | # The location of the files to parse. Parses subdirectories, but will fail if
4 | # there are duplicate file names in these directories. You can specify multiple
5 | # source trees:
6 | # parser_in="%HOME/www/yui/src %HOME/www/event/src"
7 | yuidoc.parser_in=${peruser.root}/src
8 |
9 | # The location to output the parser data. This output is a file containing a
10 | # json string, and copies of the parsed files.
11 | yuidoc.parser_out=${peruser.root}/docparse
12 |
13 | # The directory to put the html file outputted by the generator
14 | yuidoc.generator_out=${peruser.root}/docs
15 |
16 | # The location of the template files. Any subdirectories here will be copied
17 | # verbatim to the destination directory.
18 | yuidoc.template=${yuidoc.home}/dana-theme
19 |
20 | # The version of YUI the project is using. This effects the output for
21 | # YUI configuration attributes. This should start with '2' or '3'.
22 | yuidoc.yuiversion=3
23 |
24 | yuidoc.projecturl="http://www.aframejs.com/"
25 | yuidoc.projectname="AFrameJS"
26 | yuidoc.copyrighttag="Shane Tomlinson"
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/LICENSE_MIT.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010 Carlo Zottmann, http://municode.de/
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/demos/add_friend/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AFrame Introduction
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/tools/yuidoc/bin/example.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | REM ##########################################################################
4 |
5 | REM The location of your yuidoc install
6 | SET yuidoc_home=c:\home\www\yuidoc\yuidoc
7 |
8 | REM The location of the files to parse. Parses subdirectories, but will fail if
9 | REM there are duplicate file names in these directories. You can specify multiple
10 | REM source trees:
11 | REM SET parser_in="c:\home\www\yahoo.dev\src\js c:\home\www\Event.dev\src"
12 | SET parser_in=c:\home\www\yahoo.dev\src\js
13 |
14 | REM The location to output the parser data. This output is a file containing a
15 | REM json string, and copies of the parsed files.
16 | SET parser_out=c:\home\www\docs\parser
17 |
18 | REM The directory to put the html file outputted by the generator
19 | SET generator_out=c:\home\www\docs\generator
20 |
21 | REM The location of the template files. Any subdirectories here will be copied
22 | REM verbatim to the destination directory.
23 | SET template=%yuidoc_home%\template
24 |
25 | REM The project version that will be displayed in the documentation.
26 | SET version="1.0.0"
27 |
28 | REM The version of YUI the project uses.
29 | SET yuiversion="2"
30 |
31 | "%yuidoc_home%\bin\yuidoc.py" "%parser_in%" -p "%parser_out%" -o "%generator_out%" -t "%template%" -v %version% -Y %yuiversion%
32 |
33 |
--------------------------------------------------------------------------------
/tools/yuidoc/bin/example.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # The location of your yuidoc install
3 | yuidoc_home=~/www/yuidoc/yuidoc
4 |
5 | # The location of the files to parse. Parses subdirectories, but will fail if
6 | # there are duplicate file names in these directories. You can specify multiple
7 | # source trees:
8 | # parser_in="%HOME/www/yui/src %HOME/www/event/src"
9 | parser_in="$HOME/src"
10 |
11 | # The location to output the parser data. This output is a file containing a
12 | # json string, and copies of the parsed files.
13 | parser_out=~/www/docs/parser
14 |
15 | # The directory to put the html file outputted by the generator
16 | generator_out=~/www/docs/generator
17 |
18 | # The location of the template files. Any subdirectories here will be copied
19 | # verbatim to the destination directory.
20 | template=$yuidoc_home/template
21 |
22 | # The version of your project to display within the documentation.
23 | version=1.0.0
24 |
25 | # The version of YUI the project is using. This effects the output for
26 | # YUI configuration attributes. This should start with '2' or '3'.
27 | yuiversion=2
28 |
29 | ##############################################################################
30 | # add -s to the end of the line to show items marked private
31 |
32 | $yuidoc_home/bin/yuidoc.py $parser_in -p $parser_out -o $generator_out -t $template -v $version -Y $yuiversion
33 |
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/css/navigation.css:
--------------------------------------------------------------------------------
1 | #navigation > div {
2 | border: 1px solid #eee;
3 | overflow: hidden;
4 | }
5 |
6 | #navigation h4 {
7 | background-color: #888;
8 | color: #fff;
9 | font-size: 1.0em;
10 | text-shadow: rgba(0, 0, 0, 0.5) 0 -1pt 0;
11 | margin-bottom: 0.5em;
12 | padding: 0.3em 0.3em 0.3em 1em;
13 | }
14 |
15 | #navigation ul {
16 | list-style: none;
17 | }
18 |
19 | #navigation li {
20 | margin-left: 1em;
21 | }
22 |
23 | #navigation li.selected {
24 | background-color: #eef;
25 | margin-left: 0;
26 | padding-left: 1em
27 | }
28 |
29 | #navigation li span.access-private {
30 | color: #a22;
31 | }
32 |
33 | #navigation li span.access-protected {
34 | color: #d88;
35 | }
36 |
37 | #navigation li span.deprecated {
38 | background-color: #d53;
39 | color: #fff;
40 | padding: 0 0.4em;
41 | }
42 |
43 | #navigation li span.access-private,
44 | #navigation li span.access-protected,
45 | #navigation li span.deprecated {
46 | font-size: 0.85em;
47 | }
48 |
49 |
50 | #show-toggles {
51 | float: right;
52 | font-size: 0.85em;
53 | background-color: #f8f8f8;
54 | color: #888;
55 | padding: 0.5em;
56 | }
57 |
58 | #show-toggles fieldset {
59 | margin: 0;
60 | }
61 |
62 |
63 | #search-form {
64 | float: right;
65 | margin-top: -0.25em;
66 | }
67 |
68 | #search-form label {
69 | color: #666;
70 | }
71 |
72 | #search-form #search {
73 | border: 1pt solid #ddd;
74 | width: 20em;
75 | }
76 |
77 |
--------------------------------------------------------------------------------
/site/stylesheets/navigation.scss:
--------------------------------------------------------------------------------
1 | #navigation > div {
2 | border: 1px solid #eee;
3 | overflow: hidden;
4 | margin-bottom: 4em;
5 | }
6 |
7 | #navigation h4 {
8 | background-color: #888;
9 | color: #fff;
10 | font-size: 1.0em;
11 | text-shadow: rgba(0, 0, 0, 0.5) 0 -1pt 0;
12 | margin-bottom: 0.5em;
13 | padding: 0.3em 0.3em 0.3em 1em;
14 | }
15 |
16 | #navigation ul {
17 | list-style: none;
18 | }
19 |
20 | #navigation li {
21 | margin-left: 1em;
22 | }
23 |
24 | #navigation li.selected {
25 | background-color: #eef;
26 | margin-left: 0;
27 | padding-left: 1em
28 | }
29 |
30 | #navigation li span.access-private {
31 | color: #a22;
32 | }
33 |
34 | #navigation li span.access-protected {
35 | color: #d88;
36 | }
37 |
38 | #navigation li span.deprecated {
39 | background-color: #d53;
40 | color: #fff;
41 | padding: 0 0.4em;
42 | }
43 |
44 | #navigation li span.access-private,
45 | #navigation li span.access-protected,
46 | #navigation li span.deprecated {
47 | font-size: 0.85em;
48 | }
49 |
50 |
51 | #show-toggles {
52 | float: right;
53 | font-size: 0.85em;
54 | background-color: #f8f8f8;
55 | color: #888;
56 | padding: 0.5em;
57 | }
58 |
59 | #show-toggles fieldset {
60 | margin: 0;
61 | }
62 |
63 |
64 | #search-form {
65 | float: right;
66 | margin-top: -0.25em;
67 | }
68 |
69 | #search-form label {
70 | color: #666;
71 | }
72 |
73 | #search-form #search {
74 | border: 1pt solid #ddd;
75 | width: 20em;
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/lang.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ##############################################################################
4 |
5 | # The location of your yuidoc install
6 | # yuidoc_home=yahoo/presentation/tools/yuidoc
7 | # yuidoc_home=~/www/yuidoc/yuidoc
8 | yuidoc_home=..
9 |
10 | # The location of the files to parse. Parses subdirectories, but will fail if
11 | # there are duplicate file names in these directories.
12 | # parser_in="$src/animation \
13 | # $src/attribute \
14 | # $src/base \
15 | # $src/dd \
16 | # $src/dom \
17 | # $src/json \
18 | # $src/json-parse \
19 | # $src/json-stringify \
20 | # $src/node \
21 | # $src/queue \
22 | # $src/yui"
23 |
24 | # parser_in="lang"
25 | parser_in="lang/java lang/python lang/perl lang/ruby"
26 |
27 | # The location to output the parser data. This output is a file containing a
28 | # json string, and copies of the parsed files.
29 | parser_out=build_tmp/yuidoc_tmp
30 |
31 | # The directory to put the html file outputted by the generator
32 | generator_out=build_tmp/api
33 |
34 | # The location of the template files. Any subdirectories here will be copied
35 | # verbatim to the destination directory.
36 | template=$yuidoc_home/template
37 |
38 | version=`test`
39 |
40 | ##############################################################################
41 |
42 | $yuidoc_home/bin/yuidoc.py $parser_in -e .py,.java,.rb,.pl -p $parser_out -o $generator_out -t $template -v $version -s $*
43 |
44 |
--------------------------------------------------------------------------------
/src/plugin.js:
--------------------------------------------------------------------------------
1 | /**
2 | * A basic plugin, used to extend functionality of an object without either subclassing or directly
3 | * extending that object. Plugins make it easy to create configurable objects by adding
4 | * small units of coherent functionality and plugging a base object. When creating an object,
5 | * if the functionality is needed, add the plugin, if not, leave it out. When the plugged
6 | * object is torn down, the plugin will automatically be torn down as well.
7 | * @class AFrame.Plugin
8 | * @extends AFrame.AObject
9 | * @constructor
10 | */
11 | AFrame.Plugin = ( function() {
12 | "use strict";
13 |
14 | var Plugin = AFrame.AObject.extend( {
15 | importconfig: [ 'plugged' ],
16 | events: {
17 | 'onTeardown plugged': 'teardown',
18 | 'onInit plugged': 'onPluggedInit'
19 | },
20 |
21 | /**
22 | * Get a reference to the plugged object.
23 | * @method getPlugged
24 | * @return {AFrame.AObject} the plugged object
25 | */
26 | getPlugged: function() {
27 | return this.plugged;
28 | },
29 |
30 | teardown: function() {
31 | AFrame.remove( this, 'plugged' );
32 | Plugin.sc.teardown.call( this );
33 | },
34 |
35 | /**
36 | * Override to do some specialized handling when a plugged object is initialized.
37 | * @method onPluggedInit
38 | */
39 | onPluggedInit: function() {
40 | // do nothing
41 | }
42 | } );
43 |
44 | return Plugin;
45 | }() );
46 |
--------------------------------------------------------------------------------
/tests/test_plugin.js:
--------------------------------------------------------------------------------
1 | testsToRun.push( {
2 |
3 | name: "TestCase AFrame.Plugin",
4 |
5 | setUp: function() {
6 |
7 | this.pluggedObject = AFrame.AObject.create();
8 | this.plugin = AFrame.Plugin.create( {
9 | plugged: this.pluggedObject
10 | } );
11 | },
12 |
13 | tearDown : function () {
14 | this.pluggedObject.teardown();
15 | this.pluggedObject = null;
16 | delete this.pluggedObject;
17 |
18 | this.plugin.teardown();
19 | this.plugin = null;
20 | delete this.plugin;
21 |
22 | },
23 |
24 | testPlugged: function() {
25 | var plugged = this.plugin.getPlugged();
26 |
27 | Assert.isObject( plugged, 'plugged is an object' );
28 | Assert.areSame( plugged, this.pluggedObject, 'plugged object correctly set' );
29 | },
30 |
31 | testTeardownOnPluggedTeardown: function() {
32 | var pluginTeardown = false;
33 | this.plugin.bindEvent( 'onTeardown', function() {
34 | pluginTeardown = true;
35 | } );
36 |
37 | this.pluggedObject.teardown();
38 |
39 | Assert.isTrue( pluginTeardown, 'plugin was torn down' );
40 | },
41 |
42 | testOnPluggedInit: function() {
43 | var onPluggedInitCalled = false;
44 | var Plugin = AFrame.Plugin.extend( {
45 | onPluggedInit: function() {
46 | onPluggedInitCalled = true;
47 | }
48 | } );
49 |
50 | var item = AFrame.AObject.create( {
51 | plugins: [ Plugin ]
52 | } );
53 |
54 | Assert.isTrue( onPluggedInitCalled, 'onPluggedInit automatically called' );
55 | }
56 | } );
57 |
--------------------------------------------------------------------------------
/tools/yuidoc/test/intl/intl.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The text module lets you format and parse text in many languages from around the world.
3 | *
This module uses the following identifiers:
4 | *
5 | *
Languages: RFC 4646 language tags, such as "en-GB" (English as used
6 | * in the United Kingdom), "zh-Hans-CN" (simpified Chinese as used in China).
7 | *
8 | *
Time zones: tz database identifiers, such as "Europe/Berlin"
9 | * (time zone of Germany), "America/Los_Angeles" (Pacific time zone in the United States),
10 | * "Asia/Kolkata" (time zone of India).
11 | *
12 | *
13 | *
14 | * @module text
15 | */
16 |
17 | /**
18 | * Provides functionality for formatting date and time information.
19 | * @class DateFormat
20 | * @constructor
21 | * @param {Style | Style[] | String} style Style constant or pattern string for the desired date format.
22 | * @param {String} language The RFC 4646 language tag for the language of the date format.
23 | * @param {String} timeZone future The tz database identifier for the time zone of the date format.
24 | * Optional - the browser time zone is used by default.
25 | */
26 |
27 | /**
28 | * future Calendar month format. Examples:
29 | *
30 | *
June 2009
31 | *
2009年6月
32 | *
33 | * @property CALENDAR_MONTH
34 | */
35 |
36 | /**
37 | * subclass method
38 | * @method subclassmethod
39 | */
40 |
41 | /**
42 | * DateFormat subclass
43 | * @class DateFormatSubclass
44 | * @extends DateFormat
45 | */
46 |
47 | /**
48 | * subclass method
49 | * @method subclassmethod
50 | */
51 |
--------------------------------------------------------------------------------
/tools/yuidoc/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010, Yahoo! Inc. All rights reserved.
2 | Code licensed under the BSD License:
3 |
4 | Redistribution and use of this software in source and binary forms, with or
5 | without modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright notice, this
9 | list of conditions and the following disclaimer.
10 |
11 | * Redistributions in binary form must reproduce the above copyright notice,
12 | this list of conditions and the following disclaimer in the documentation
13 | and/or other materials provided with the distribution.
14 |
15 | * Neither the name of Yahoo! Inc. nor the names of its contributors may be used
16 | to endorse or promote products derived from this software without specific
17 | prior written permission of Yahoo! Inc.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | http://developer.yahoo.net/yui/license.html
32 |
--------------------------------------------------------------------------------
/src/arrayCommonFunctionsMixin.js:
--------------------------------------------------------------------------------
1 | AFrame.ArrayCommonFuncsMixin = (function() {
2 | "use strict";
3 |
4 | /**
5 | * Common functions to all arrays
6 | * @class AFrame.ArrayCommonFuncsMixin
7 | * @static
8 | */
9 | var Mixin = {
10 | /**
11 | * Get the current count of items. Should be overridden.
12 | *
13 | * // list is an AFrame.List
14 | * var count = list.getCount();
15 | *
16 | * @method getCount
17 | * @return {number} current count
18 | * @throw 'operation not supported' if not overridden properly.
19 | */
20 | getCount: function() { /* Should be overridden */
21 | throw 'operation not supported';
22 | },
23 |
24 | /**
25 | * @private
26 | * Given an tentative index, get the index the item would be inserted at
27 | * @method getActualInsertIndex
28 | * @param {number} index - index to check for
29 | */
30 | getActualInsertIndex: function( index ) {
31 | var len = this.getCount();
32 |
33 | if( 'undefined' == typeof( index ) ) {
34 | index = len;
35 | }
36 | else if( index < 0 ) {
37 | index = len + ( index + 1 );
38 | }
39 |
40 | index = Math.max( 0, index );
41 | index = Math.min( len, index );
42 |
43 | return index;
44 | },
45 |
46 | /**
47 | * @private
48 | * Given an tentative index, get the item's real index.
49 | * @method getActualIndex
50 | * @param {number} index - index to check for
51 | */
52 | getActualIndex: function( index ) {
53 | var len = this.getCount();
54 |
55 | // check from end
56 | if( index < 0 ) {
57 | index = len + index;
58 | }
59 |
60 | // invalid indexes;
61 | if( index < 0 || len <= index ) {
62 | index = undefined;
63 | }
64 |
65 | return index;
66 | }
67 | };
68 |
69 | return Mixin;
70 | }());
71 |
--------------------------------------------------------------------------------
/demos/add_friend/scripts/demoapp.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | // Instead of creating a model, create a SchemaConfig.
3 | // A Model in AFrame is an instance of data combined
4 | // with a Schema. The schema config will be used when
5 | // creating the model.
6 | var friendSchemaConfig = {
7 | name: { type: 'text' }
8 | };
9 |
10 | // Our friends collection is an array. Instead of binding
11 | // directly to an event on the collection, when creating
12 | // the list, we bind the list to the collection.
13 | // The ListPluginBindToCollection will take care of
14 | // updating of the list.
15 | var friendsCollection = AFrame.CollectionArray.create( {
16 | plugins: [ [ AFrame.CollectionPluginModel, {
17 | schema: friendSchemaConfig
18 | } ] ]
19 | } );
20 |
21 | // This is the friends list. It is bound to the
22 | // friendsCollection, so any time a model is added or
23 | // removed from the friends collection, the list will update.
24 | var friendsList = AFrame.List.create( {
25 | target: '#friendList',
26 | listElementFactory: function( model, index ) {
27 | return AFrame.DOM.createElement( 'li',
28 | model.get( 'name' ) );
29 | },
30 | plugins: [ [ AFrame.ListPluginBindToCollection, {
31 | collection: friendsCollection
32 | } ] ]
33 | } );
34 |
35 | // we insert into the friendsCollection once we
36 | // have a name. The list will be updated automatically.
37 | $( '#add-friend' ).click( function( event ) {
38 | var friend_name = prompt("Who is your friend?");
39 | // A new model will be created when adding
40 | // to the friend collection.
41 | friendsCollection.insert( { name: friend_name } );
42 | } );
43 | });
44 |
--------------------------------------------------------------------------------
/site/scripts/shBrushJScript.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | ;(function()
18 | {
19 | // CommonJS
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21 |
22 | function Brush()
23 | {
24 | var keywords = 'break case catch continue ' +
25 | 'default delete do else false ' +
26 | 'for function if in instanceof ' +
27 | 'new null return super switch ' +
28 | 'this throw true try typeof var while with'
29 | ;
30 |
31 | var r = SyntaxHighlighter.regexLib;
32 |
33 | this.regexList = [
34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments
37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
40 | ];
41 |
42 | this.forHtmlScript(r.scriptScriptTags);
43 | };
44 |
45 | Brush.prototype = new SyntaxHighlighter.Highlighter();
46 | Brush.aliases = ['js', 'jscript', 'javascript'];
47 |
48 | SyntaxHighlighter.brushes.JScript = Brush;
49 |
50 | // CommonJS
51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52 | })();
53 |
--------------------------------------------------------------------------------
/tools/yuidoc/README:
--------------------------------------------------------------------------------
1 | yuidoc README
2 |
3 | yuidoc is a set of tools to generate the API documentation for the JavaScript
4 | in the YUI library. The docs are derived completely from JavaDoc style
5 | comment blocks; no attempt is made to understand the javascript itself.
6 |
7 | yuidoc requires Python 2.3+ with the following extensions:
8 | simplejson - for reading and writing json (required for Python versions below 2.6.0)
9 | cheetah - for generating the html docs
10 | pygments - for colorizing the source
11 |
12 | The code for yuidoc is provided under a BSD license:
13 | http://developer.yahoo.net/yui/license.html
14 |
15 | Project home page:
16 | http://developer.yahoo.com/yui/yuidoc/
17 |
18 | Source code:
19 | http://github.com/yui/yuidoc
20 |
21 | Issue tracker:
22 | http://yuilibrary.com/projects/yuidoc
23 |
24 |
25 | Files:
26 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 |
28 | README
29 | This file
30 |
31 | CHANGES
32 | The change log
33 |
34 | INSTALL
35 | Installation instructions
36 |
37 | KNOWN_ISSUES
38 | Known issues and workarounds.
39 |
40 | TAGS
41 | Supported tags
42 |
43 | license.txt
44 | Open source license details.
45 |
46 | bin/yuidoc_parse.py
47 | The comment block parser. Parses all javascript files in the the specified
48 | directories and outputs a single file containing a json structure of the
49 | parsed documentation.
50 |
51 | bin/yuidoc_highlight.py
52 | Colorizes the script source
53 |
54 | bin/yuidoc_generate.py
55 | Reads the json output from parser.py and generates HTML docs.
56 |
57 | bin/yuidoc.py
58 | Wrapper for yuidoc_parse, yuidoc_highlight, and yuidoc_generate
59 |
60 | bin/example.sh
61 | An example shell script to run both the parser and generator on a src tree
62 |
63 | bin/example.bat
64 | An example batch for for DOS/Windows
65 |
66 | ext
67 | External required packages, provided for convenience
68 |
69 |
70 |
--------------------------------------------------------------------------------
/tools/yuidoc/bin/const.py:
--------------------------------------------------------------------------------
1 | '''
2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 | Code licensed under the BSD License:
4 | http://developer.yahoo.net/yui/license.html
5 | version: 1.0.0b1
6 | '''
7 |
8 | ACCESS='access'
9 | ATTRIBUTE='attribute'
10 | BEFORE='before'
11 | BETA='beta'
12 | BUBBLES='bubbles'
13 | CANCELABLE='cancelable'
14 | CHAINABLE='chainable'
15 | CHANGEEVENT='Change'
16 | CLASS='class'
17 | CLASS_MAP='classmap'
18 | CLASS_LIST='classlist'
19 | CLASS_MODS='classmods'
20 | CONFIG='config'
21 | CONFIGS='configs'
22 | CONSTRUCTOR='constructor'
23 | CONSTRUCTORS='constructors'
24 | DEFAULT='default'
25 | DEPRECATED='deprecated'
26 | DESCRIPTION='description'
27 | EXPERIMENTAL='experimental'
28 | EVENT='event'
29 | EVENTS='events'
30 | EXTENDS='extends'
31 | FILE='file'
32 | FILE_LIST='filelist'
33 | FILE_MAP='filemap'
34 | FILE_MARKER='filemarker'
35 | FINAL='final'
36 | FOR='for'
37 | FUNCTION='function'
38 | GLOBAL='global'
39 | GUESSEDNAME='guessedname'
40 | GUESSEDTYPE='guessedtype'
41 | HASEVENTS='hasevents'
42 | HOST='host'
43 | IGNORE_PATTERNS = ('*.pyc','CVS','^.git','.svn')
44 | LONGNAME='longname'
45 | LOGCONFIG='yuidoclog.conf'
46 | METHOD='method'
47 | METHODS='methods'
48 | MAJOR_VERSION='majorversion'
49 | MODULE='module'
50 | MODULE_PREFIX='module_'
51 | MODULES='modules'
52 | NAME='name'
53 | NAMESPACE='namespace'
54 | NAMESPACES='namespaces'
55 | NBWS=' '
56 | OBJECT='object'
57 | OPTIONAL='optional'
58 | PARAM='param'
59 | PARAMS='params'
60 | PRIVATE='private'
61 | PREVENTABLE='preventable'
62 | PROPERTY='property'
63 | PROPERTIES='properties'
64 | PROTECTED='protected'
65 | READONLY='readonly' # readonly is static for config properties
66 | REQUIRES='requires'
67 | RETURN='return'
68 | SHORTNAME='shortname'
69 | SUBMODULE='submodule'
70 | SUBMODULES='submodules'
71 | SUBDATA='subdata'
72 | SUPERCLASS='superclass'
73 | SEE='see'
74 | STATIC='static'
75 | TITLE='title'
76 | TYPE='type'
77 | UNKNOWN='unknown'
78 | URL='url'
79 | USES='uses'
80 | VERSION='version'
81 | VOID='void'
82 | WRITEONCE='writeonce'
83 |
--------------------------------------------------------------------------------
/src/collectionPluginREST.js:
--------------------------------------------------------------------------------
1 | AFrame.CollectionPluginREST = (function() {
2 | var Plugin = AFrame.CollectionPluginPersistence.extend( {
3 | importconfig: [ 'url', 'net' ],
4 | loadCallback: function( options ) {
5 | var me=this;
6 | me.net.ajax( {
7 | url: me.url,
8 | success: options.onComplete
9 | } );
10 | },
11 |
12 | addCallback: function( item, options ) {
13 | var me=this;
14 | me.net.ajax( {
15 | url: me.url,
16 | data: getItemData( item ),
17 | type: 'POST',
18 | success: function( body, textStatus, xhr ) {
19 | var loc = xhr.getResponseHeader( 'Location' );
20 | loc = loc.replace( me.url + '/', '' );
21 | setItemData( item, 'id', loc );
22 | options.onComplete && options.onComplete();
23 | }
24 | } );
25 | },
26 |
27 | deleteCallback: function( item, options ) {
28 | var me=this;
29 | me.net.ajax( {
30 | url: me.url + '/' + getItemID( item ),
31 | type: 'DELETE',
32 | success: options.onComplete
33 | } );
34 | },
35 |
36 | saveCallback: function( item, options ) {
37 | var me=this;
38 | me.net.ajax( {
39 | url: me.url + '/' + getItemID( item ),
40 | data: getItemData( item ),
41 | type: 'PUT',
42 | success: options.onComplete
43 | } );
44 | }
45 | } );
46 |
47 | function getItemID( item ) {
48 | return item.get ? item.get( 'id' ) : item.id;
49 | }
50 |
51 | function getItemData( item ) {
52 | return item.toJSON ? item.toJSON() : item;
53 | }
54 |
55 | function setItemData( item, key, data ) {
56 | if( item.set ) {
57 | item.set( key, data );
58 | }
59 | else {
60 | item[ key ] = data;
61 | }
62 | }
63 |
64 | return Plugin;
65 | }());
66 |
--------------------------------------------------------------------------------
/tools/yuidoc/dana-theme/css/content.css:
--------------------------------------------------------------------------------
1 | #content h2 {
2 | font-weight: normal;
3 | }
4 |
5 | #content h2 span.extends {
6 | display: block;
7 | }
8 |
9 | #content h2 span.extends span.class {
10 | color: #fff;
11 | }
12 |
13 | #content pre, section pre, section .syntaxhighlighter {
14 | border: 1px solid #eee;
15 | padding: 0.5em;
16 | background-color: #f8f8f8;
17 | overflow: auto;
18 | }
19 |
20 | #content div.deprecated {
21 | background-color: #d53;
22 | color: #fff;
23 | padding: 0 1em;
24 | margin-bottom: 0.4em;
25 | display: inline-block;
26 | }
27 |
28 | #content div.section {
29 | margin-top: 3em;
30 | padding-top: 2em;
31 | border-top: 8pt solid #fcfcfc;
32 | }
33 |
34 | #content div.section h3 {
35 | background-color: #555;
36 | color: #fff;
37 | padding: 0.1em 0.5em;
38 | text-shadow: rgba(0, 0, 0, 0.5) 0 -1pt 0;
39 | }
40 |
41 | #content div.section h4 {
42 | color: #444;
43 | margin-top: 1.25em;
44 | }
45 |
46 | #content div.section table th,
47 | #content div.section table td {
48 | padding: 0.5em;
49 | vertical-align: top;
50 | text-align: left;
51 | }
52 |
53 | #content div.section table th {
54 | background-color: #eeeeff;
55 | border: 1px solid #ddd;
56 | }
57 |
58 | #content div.section table td {
59 | border: 1px solid #eee;
60 | }
61 |
62 | #content div.section table td.description {
63 | vertical-align: top;
64 | padding-right: 2em;
65 | }
66 |
67 | #content div.section table td.description a.top {
68 | margin-right: -1.5em;
69 | float: right;
70 | color: #ddd;
71 | }
72 |
73 | #content div.section table td.type code,
74 | #content div.section table td.returns code {
75 | display: block;
76 | }
77 |
78 | #content div.section table td.type span,
79 | #content div.section table td.returns span {
80 | font-size: 90%;
81 | color: #777;
82 | padding: 0 0.5em 0 0;
83 | }
84 |
85 | #content div.section table td.type span.access-private,
86 | #content div.section table td.returns span.access-private {
87 | color: #a22;
88 | }
89 |
90 | #content div.section table td.type span.access-protected,
91 | #content div.section table td.returns span.access-protected {
92 | color: #d88;
93 | }
94 |
95 |
--------------------------------------------------------------------------------
/site/scripts/apidocs.js:
--------------------------------------------------------------------------------
1 | $( function() {
2 | var openExample;
3 |
4 | var showExample = function( event ) {
5 | event.preventDefault();
6 | event.stopPropagation();
7 |
8 | openExample && openExample.fadeOut();
9 |
10 | openExample = $( event.currentTarget ).next( '.example' );
11 | openExample.fadeIn();
12 | };
13 |
14 | var hideOpenExample = function() {
15 | openExample && openExample.fadeOut();
16 | openExample = null;
17 | };
18 |
19 | var hideExample = function( event ) {
20 | event.preventDefault();
21 | hideOpenExample();
22 | };
23 |
24 | var stopEvent = function( event ) {
25 | event.preventDefault();
26 | event.stopPropagation();
27 | };
28 |
29 | $( 'body' ).bind( 'click', hideOpenExample ).bind( 'keyup', function( event ) {
30 | if( event.which == 27 && openExample ) {
31 | hideOpenExample();
32 | }
33 | } );
34 |
35 | var examples = $( 'td.description > pre' );
36 | examples.each( function( index, item ) {
37 | var example = $( item );
38 | var anchor = $( 'See Example' );
39 | anchor.insertBefore( example );
40 |
41 | var container = $( '