jax 0.0.0.9 → 0.0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/jax.gemspec +6 -2
- data/lib/jax/generators/app/templates/public/javascripts/jax.js +1 -1
- data/lib/jax/version.rb +1 -1
- metadata +3 -533
- data/guides/assets/images/book_icon.gif +0 -0
- data/guides/assets/images/bullet.gif +0 -0
- data/guides/assets/images/chapters_icon.gif +0 -0
- data/guides/assets/images/check_bullet.gif +0 -0
- data/guides/assets/images/credits_pic_blank.gif +0 -0
- data/guides/assets/images/edge_badge.png +0 -0
- data/guides/assets/images/feature_tile.gif +0 -0
- data/guides/assets/images/footer_tile.gif +0 -0
- data/guides/assets/images/getting_started/clean_passing_jasmine_suite.png +0 -0
- data/guides/assets/images/getting_started/dungeon-complete.png +0 -0
- data/guides/assets/images/getting_started/dungeon-normal-map.png +0 -0
- data/guides/assets/images/getting_started/dungeon-rainbow-textured.png +0 -0
- data/guides/assets/images/getting_started/dungeon-rainbow.png +0 -0
- data/guides/assets/images/getting_started/dungeon-textured-lighting.png +0 -0
- data/guides/assets/images/getting_started/dungeon-textured.png +0 -0
- data/guides/assets/images/getting_started/rock.png +0 -0
- data/guides/assets/images/getting_started/rock_normal.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-directional-point.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-directional.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-nolight.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-spot-point-directional.png +0 -0
- data/guides/assets/images/getting_started/teapot-white.png +0 -0
- data/guides/assets/images/getting_started/teapot-with-model.png +0 -0
- data/guides/assets/images/grey_bullet.gif +0 -0
- data/guides/assets/images/header_backdrop.png +0 -0
- data/guides/assets/images/header_tile.gif +0 -0
- data/guides/assets/images/icons/README +0 -5
- data/guides/assets/images/icons/callouts/1.png +0 -0
- data/guides/assets/images/icons/callouts/10.png +0 -0
- data/guides/assets/images/icons/callouts/11.png +0 -0
- data/guides/assets/images/icons/callouts/12.png +0 -0
- data/guides/assets/images/icons/callouts/13.png +0 -0
- data/guides/assets/images/icons/callouts/14.png +0 -0
- data/guides/assets/images/icons/callouts/15.png +0 -0
- data/guides/assets/images/icons/callouts/2.png +0 -0
- data/guides/assets/images/icons/callouts/3.png +0 -0
- data/guides/assets/images/icons/callouts/4.png +0 -0
- data/guides/assets/images/icons/callouts/5.png +0 -0
- data/guides/assets/images/icons/callouts/6.png +0 -0
- data/guides/assets/images/icons/callouts/7.png +0 -0
- data/guides/assets/images/icons/callouts/8.png +0 -0
- data/guides/assets/images/icons/callouts/9.png +0 -0
- data/guides/assets/images/icons/caution.png +0 -0
- data/guides/assets/images/icons/example.png +0 -0
- data/guides/assets/images/icons/home.png +0 -0
- data/guides/assets/images/icons/important.png +0 -0
- data/guides/assets/images/icons/next.png +0 -0
- data/guides/assets/images/icons/note.png +0 -0
- data/guides/assets/images/icons/prev.png +0 -0
- data/guides/assets/images/icons/tip.png +0 -0
- data/guides/assets/images/icons/up.png +0 -0
- data/guides/assets/images/icons/warning.png +0 -0
- data/guides/assets/images/nav_arrow.gif +0 -0
- data/guides/assets/images/tab_grey.gif +0 -0
- data/guides/assets/images/tab_info.gif +0 -0
- data/guides/assets/images/tab_note.gif +0 -0
- data/guides/assets/images/tab_red.gif +0 -0
- data/guides/assets/images/tab_yellow.gif +0 -0
- data/guides/assets/images/tab_yellow.png +0 -0
- data/guides/assets/javascripts/guides.js +0 -7
- data/guides/assets/javascripts/syntaxhighlighter/shBrushAS3.js +0 -59
- data/guides/assets/javascripts/syntaxhighlighter/shBrushAppleScript.js +0 -75
- data/guides/assets/javascripts/syntaxhighlighter/shBrushBash.js +0 -59
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCSharp.js +0 -65
- data/guides/assets/javascripts/syntaxhighlighter/shBrushColdFusion.js +0 -100
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCpp.js +0 -125
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCss.js +0 -91
- data/guides/assets/javascripts/syntaxhighlighter/shBrushDelphi.js +0 -55
- data/guides/assets/javascripts/syntaxhighlighter/shBrushDiff.js +0 -41
- data/guides/assets/javascripts/syntaxhighlighter/shBrushErlang.js +0 -52
- data/guides/assets/javascripts/syntaxhighlighter/shBrushGroovy.js +0 -67
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJScript.js +0 -52
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJava.js +0 -57
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJavaFX.js +0 -58
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPerl.js +0 -72
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPhp.js +0 -88
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPlain.js +0 -33
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPowerShell.js +0 -74
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPython.js +0 -64
- data/guides/assets/javascripts/syntaxhighlighter/shBrushRuby.js +0 -55
- data/guides/assets/javascripts/syntaxhighlighter/shBrushSass.js +0 -94
- data/guides/assets/javascripts/syntaxhighlighter/shBrushScala.js +0 -51
- data/guides/assets/javascripts/syntaxhighlighter/shBrushSql.js +0 -66
- data/guides/assets/javascripts/syntaxhighlighter/shBrushVb.js +0 -56
- data/guides/assets/javascripts/syntaxhighlighter/shBrushXml.js +0 -69
- data/guides/assets/javascripts/syntaxhighlighter/shCore.js +0 -17
- data/guides/assets/stylesheets/fixes.css +0 -16
- data/guides/assets/stylesheets/main.css +0 -445
- data/guides/assets/stylesheets/print.css +0 -52
- data/guides/assets/stylesheets/reset.css +0 -43
- data/guides/assets/stylesheets/style.css +0 -13
- data/guides/assets/stylesheets/syntaxhighlighter/shCore.css +0 -226
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreDefault.css +0 -328
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreDjango.css +0 -331
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreEclipse.css +0 -339
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreEmacs.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreMDUltra.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreMidnight.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreRDark.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeDefault.css +0 -117
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeDjango.css +0 -120
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeEclipse.css +0 -128
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeEmacs.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeJaxGuides.css +0 -116
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeMDUltra.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeMidnight.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeRDark.css +0 -113
- data/guides/jax_guides.rb +0 -41
- data/guides/jax_guides/common.rb +0 -7
- data/guides/jax_guides/generator.rb +0 -287
- data/guides/jax_guides/helpers.rb +0 -29
- data/guides/jax_guides/indexer.rb +0 -69
- data/guides/jax_guides/levenshtein.rb +0 -31
- data/guides/jax_guides/textile_extensions.rb +0 -61
- data/guides/partials/_top_nav.html.erb +0 -17
- data/guides/source/getting_started.textile +0 -1210
- data/guides/source/index.html.erb +0 -61
- data/guides/source/layout.html.erb +0 -147
- data/guides/source/lighting.textile +0 -5
- data/guides/source/materials.textile +0 -5
- data/guides/source/matrices.textile +0 -5
- data/guides/source/shaders.textile +0 -499
- data/guides/source/testing.textile +0 -5
- data/guides/w3c_validator.rb +0 -91
- data/public/images/brickwall.jpg +0 -0
- data/public/images/jacks.jpg +0 -0
- data/public/images/normal_map.jpg +0 -0
- data/public/images/rock.png +0 -0
- data/public/images/rockNormal.png +0 -0
- data/public/images/rss.png +0 -0
- data/public/webgl_not_supported.html +0 -26
- data/spec/example_app/Gemfile +0 -1
- data/spec/example_app/Rakefile +0 -15
- data/spec/example_app/app/controllers/application_controller.js +0 -5
- data/spec/example_app/app/controllers/courthouse_controller.js +0 -24
- data/spec/example_app/app/controllers/lighting_controller.js +0 -67
- data/spec/example_app/app/controllers/noise_controller.js +0 -50
- data/spec/example_app/app/controllers/picking_controller.js +0 -32
- data/spec/example_app/app/controllers/shadows_controller.js +0 -130
- data/spec/example_app/app/controllers/textures_controller.js +0 -52
- data/spec/example_app/app/helpers/application_helper.js +0 -3
- data/spec/example_app/app/helpers/noise_helper.js +0 -3
- data/spec/example_app/app/helpers/picking_helper.js +0 -3
- data/spec/example_app/app/helpers/textures_helper.js +0 -3
- data/spec/example_app/app/models/blob.js +0 -38
- data/spec/example_app/app/models/character.js +0 -23
- data/spec/example_app/app/models/door.js +0 -10
- data/spec/example_app/app/models/scene.js +0 -19
- data/spec/example_app/app/resources/blobs/default.yml +0 -2
- data/spec/example_app/app/resources/characters/judge.yml +0 -3
- data/spec/example_app/app/resources/doors/courthouse_door.yml +0 -5
- data/spec/example_app/app/resources/light_sources/directional_light.yml +0 -13
- data/spec/example_app/app/resources/light_sources/point_light.yml +0 -31
- data/spec/example_app/app/resources/light_sources/spot_light.yml +0 -15
- data/spec/example_app/app/resources/light_sources/sun.yml +0 -7
- data/spec/example_app/app/resources/light_sources/textures_point.yml +0 -34
- data/spec/example_app/app/resources/materials/blob.yml +0 -28
- data/spec/example_app/app/resources/materials/bricks.yml +0 -36
- data/spec/example_app/app/resources/materials/lighting_with_shadows.yml +0 -27
- data/spec/example_app/app/resources/scenes/courthouse.yml +0 -4
- data/spec/example_app/app/shaders/blob/common.ejs +0 -13
- data/spec/example_app/app/shaders/blob/fragment.ejs +0 -8
- data/spec/example_app/app/shaders/blob/manifest.yml +0 -15
- data/spec/example_app/app/shaders/blob/material.js +0 -51
- data/spec/example_app/app/shaders/blob/vertex.ejs +0 -40
- data/spec/example_app/app/views/courthouse/index.js +0 -4
- data/spec/example_app/app/views/lighting/index.js +0 -4
- data/spec/example_app/app/views/noise/index.js +0 -4
- data/spec/example_app/app/views/picking/index.js +0 -4
- data/spec/example_app/app/views/shadows/index.js +0 -6
- data/spec/example_app/app/views/textures/index.js +0 -4
- data/spec/example_app/config/application.rb +0 -6
- data/spec/example_app/config/boot.rb +0 -13
- data/spec/example_app/config/routes.rb +0 -8
- data/spec/example_app/public/images/185__normalmap.png +0 -0
- data/spec/example_app/public/images/face_norm.jpg +0 -0
- data/spec/example_app/public/images/rock.png +0 -0
- data/spec/example_app/public/images/rockNormal.png +0 -0
- data/spec/example_app/public/images/rss.png +0 -0
- data/spec/example_app/public/webgl_not_supported.html +0 -26
- data/spec/example_app/script/jax +0 -7
- data/spec/example_app/spec/javascripts/controllers/noise_controller_spec.js +0 -11
- data/spec/example_app/spec/javascripts/controllers/picking_controller_spec.js +0 -11
- data/spec/example_app/spec/javascripts/controllers/textures_controller_spec.js +0 -11
- data/spec/example_app/spec/javascripts/helpers/application_helper_spec.js +0 -12
- data/spec/example_app/spec/javascripts/helpers/noise_helper_spec.js +0 -12
- data/spec/example_app/spec/javascripts/helpers/picking_helper_spec.js +0 -12
- data/spec/example_app/spec/javascripts/models/blob_spec.js +0 -11
- data/spec/example_app/spec/javascripts/resources/directional_light_spec.js +0 -16
- data/spec/example_app/spec/javascripts/resources/point_light_spec.js +0 -17
- data/spec/example_app/spec/javascripts/resources/spot_light_spec.js +0 -18
- data/spec/example_app/spec/javascripts/shaders/blob_spec.js +0 -27
- data/spec/example_app/spec/javascripts/support/jasmine.yml +0 -89
- data/spec/example_app/spec/javascripts/support/jasmine_runner.rb +0 -32
- data/spec/example_app/spec/javascripts/support/spec_helpers/jax_spec_environment_helper.js +0 -33
- data/spec/example_app/spec/javascripts/support/spec_helpers/jax_spec_helper.js +0 -93
- data/spec/example_app/spec/javascripts/support/spec_layout.html.erb +0 -111
- data/spec/javascripts/helpers/jax_spec_environment_helper.js +0 -33
- data/spec/javascripts/helpers/jax_spec_helper.js +0 -216
- data/spec/javascripts/jax/builtin/meshes/cube_spec.js +0 -10
- data/spec/javascripts/jax/builtin/meshes/plane_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/quad_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/sphere_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/teapot_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/torus_spec.js +0 -8
- data/spec/javascripts/jax/compatibility_spec.js +0 -50
- data/spec/javascripts/jax/context_spec.js +0 -82
- data/spec/javascripts/jax/controller_spec.js +0 -145
- data/spec/javascripts/jax/core/delegation_spec.js +0 -48
- data/spec/javascripts/jax/core/events_spec.js +0 -17
- data/spec/javascripts/jax/core/matrix_stack_spec.js +0 -28
- data/spec/javascripts/jax/core/utils_spec.js +0 -275
- data/spec/javascripts/jax/helper_spec.js +0 -33
- data/spec/javascripts/jax/model_spec.js +0 -97
- data/spec/javascripts/jax/optimizations/material_limitations_spec.js +0 -87
- data/spec/javascripts/jax/optimizations/shaders/basic_spec.js +0 -68
- data/spec/javascripts/jax/prototype/extensions_spec.js +0 -34
- data/spec/javascripts/jax/route_set_spec.js +0 -67
- data/spec/javascripts/jax/view_manager_spec.js +0 -17
- data/spec/javascripts/jax/webgl/camera_spec.js +0 -159
- data/spec/javascripts/jax/webgl/framebuffer_spec.js +0 -46
- data/spec/javascripts/jax/webgl/lighting_spec.js +0 -61
- data/spec/javascripts/jax/webgl/material_spec.js +0 -118
- data/spec/javascripts/jax/webgl/mesh_spec.js +0 -86
- data/spec/javascripts/jax/webgl/shader/manifest_spec.js +0 -60
- data/spec/javascripts/jax/webgl/shader_chain_spec.js +0 -192
- data/spec/javascripts/jax/webgl/shader_spec.js +0 -276
- data/spec/javascripts/jax/webgl/tangent_space_spec.js +0 -142
- data/spec/javascripts/jax/webgl/texture_spec.js +0 -162
- data/spec/javascripts/jax/webgl_spec.js +0 -5
- data/spec/javascripts/jax/world_spec.js +0 -161
- data/spec/javascripts/jax_spec.js +0 -27
- data/spec/javascripts/shaders/core_materials_spec.js +0 -42
- data/spec/javascripts/shaders/fog_spec.js +0 -19
- data/spec/javascripts/shaders/lighting_spec.js +0 -19
- data/spec/javascripts/shaders/normal_map_spec.js +0 -19
- data/spec/javascripts/shaders/paraboloid_spec.js +0 -37
- data/spec/javascripts/shaders/preprocessor_spec.js +0 -50
- data/spec/javascripts/shaders/shadow_map_spec.js +0 -19
- data/spec/javascripts/shaders/texture_spec.js +0 -40
- data/src/constants.yml +0 -1
- data/src/constants.yml.erb +0 -1
- data/src/jax.js +0 -119
- data/src/jax/anim_frame.js +0 -51
- data/src/jax/builtin/all.js +0 -7
- data/src/jax/builtin/meshes/cube.js +0 -83
- data/src/jax/builtin/meshes/plane.js +0 -63
- data/src/jax/builtin/meshes/quad.js +0 -86
- data/src/jax/builtin/meshes/sphere.js +0 -65
- data/src/jax/builtin/meshes/teapot.js +0 -48
- data/src/jax/builtin/meshes/torus.js +0 -64
- data/src/jax/compatibility.js +0 -303
- data/src/jax/context.js +0 -420
- data/src/jax/core.js +0 -42
- data/src/jax/core/math.js +0 -55
- data/src/jax/core/matrix_stack.js +0 -311
- data/src/jax/core/util.js +0 -253
- data/src/jax/events.js +0 -234
- data/src/jax/geometry.js +0 -7
- data/src/jax/geometry/plane.js +0 -113
- data/src/jax/mvc/controller.js +0 -195
- data/src/jax/mvc/helper.js +0 -35
- data/src/jax/mvc/model.js +0 -302
- data/src/jax/mvc/route_set.js +0 -125
- data/src/jax/mvc/view.js +0 -43
- data/src/jax/mvc/view_manager.js +0 -47
- data/src/jax/noise.js +0 -206
- data/src/jax/prototype/class.js +0 -81
- data/src/jax/prototype/core.js +0 -112
- data/src/jax/prototype/extensions.js +0 -142
- data/src/jax/vendor/ejs.js +0 -4
- data/src/jax/vendor/glMatrix.js +0 -3
- data/src/jax/webgl.js +0 -98
- data/src/jax/webgl/camera.js +0 -526
- data/src/jax/webgl/core.js +0 -6
- data/src/jax/webgl/core/buffer.js +0 -161
- data/src/jax/webgl/core/edge.js +0 -6
- data/src/jax/webgl/core/events.js +0 -25
- data/src/jax/webgl/core/face.js +0 -8
- data/src/jax/webgl/core/framebuffer.js +0 -211
- data/src/jax/webgl/material.js +0 -392
- data/src/jax/webgl/mesh.js +0 -427
- data/src/jax/webgl/scene.js +0 -11
- data/src/jax/webgl/scene/frustum.js +0 -260
- data/src/jax/webgl/scene/light_manager.js +0 -136
- data/src/jax/webgl/scene/light_source.js +0 -294
- data/src/jax/webgl/shader.js +0 -296
- data/src/jax/webgl/shader/delegator.js +0 -13
- data/src/jax/webgl/shader/delegator/attribute.js +0 -53
- data/src/jax/webgl/shader/delegator/uniform.js +0 -71
- data/src/jax/webgl/shader/manifest.js +0 -64
- data/src/jax/webgl/shader/program.js +0 -140
- data/src/jax/webgl/shader_chain.js +0 -264
- data/src/jax/webgl/texture.js +0 -312
- data/src/jax/webgl/world.js +0 -240
- data/vendor/ejs/.svn/all-wcprops +0 -17
- data/vendor/ejs/.svn/entries +0 -114
- data/vendor/ejs/.svn/text-base/Eratta.txt.svn-base +0 -3
- data/vendor/ejs/.svn/text-base/license.txt.svn-base +0 -21
- data/vendor/ejs/Eratta.txt +0 -3
- data/vendor/ejs/example/.svn/all-wcprops +0 -29
- data/vendor/ejs/example/.svn/entries +0 -164
- data/vendor/ejs/example/.svn/prop-base/ejs.gif.svn-base +0 -5
- data/vendor/ejs/example/.svn/text-base/demo.html.svn-base +0 -54
- data/vendor/ejs/example/.svn/text-base/ejs.gif.svn-base +0 -0
- data/vendor/ejs/example/.svn/text-base/example.css.svn-base +0 -31
- data/vendor/ejs/example/.svn/text-base/example.js.svn-base +0 -88
- data/vendor/ejs/example/demo.html +0 -54
- data/vendor/ejs/example/ejs.gif +0 -0
- data/vendor/ejs/example/example.css +0 -31
- data/vendor/ejs/example/example.js +0 -88
- data/vendor/ejs/lib/.svn/all-wcprops +0 -11
- data/vendor/ejs/lib/.svn/entries +0 -62
- data/vendor/ejs/lib/.svn/text-base/ejs_fulljslint.js.svn-base +0 -3774
- data/vendor/ejs/lib/ejs_fulljslint.js +0 -3774
- data/vendor/ejs/license.txt +0 -21
- data/vendor/ejs/script/.svn/all-wcprops +0 -17
- data/vendor/ejs/script/.svn/entries +0 -96
- data/vendor/ejs/script/.svn/prop-base/yuicompressor-2.2.4.jar.svn-base +0 -5
- data/vendor/ejs/script/.svn/text-base/production.bat.svn-base +0 -4
- data/vendor/ejs/script/.svn/text-base/yuicompressor-2.2.4.jar.svn-base +0 -0
- data/vendor/ejs/script/production.bat +0 -4
- data/vendor/ejs/script/yuicompressor-2.2.4.jar +0 -0
- data/vendor/ejs/src/.svn/all-wcprops +0 -17
- data/vendor/ejs/src/.svn/entries +0 -96
- data/vendor/ejs/src/.svn/text-base/ejs.js.svn-base +0 -505
- data/vendor/ejs/src/.svn/text-base/view.js.svn-base +0 -200
- data/vendor/ejs/src/ejs.js +0 -505
- data/vendor/ejs/src/view.js +0 -200
- data/vendor/ejs/test/.svn/all-wcprops +0 -23
- data/vendor/ejs/test/.svn/entries +0 -139
- data/vendor/ejs/test/.svn/text-base/index.html.svn-base +0 -18
- data/vendor/ejs/test/.svn/text-base/setup_test.html.svn-base +0 -44
- data/vendor/ejs/test/.svn/text-base/sidebar.html.svn-base +0 -28
- data/vendor/ejs/test/included/.svn/all-wcprops +0 -23
- data/vendor/ejs/test/included/.svn/entries +0 -130
- data/vendor/ejs/test/included/.svn/text-base/prototype.js.svn-base +0 -4184
- data/vendor/ejs/test/included/.svn/text-base/test.css.svn-base +0 -44
- data/vendor/ejs/test/included/.svn/text-base/unittest.js.svn-base +0 -564
- data/vendor/ejs/test/included/prototype.js +0 -4184
- data/vendor/ejs/test/included/test.css +0 -44
- data/vendor/ejs/test/included/unittest.js +0 -564
- data/vendor/ejs/test/index.html +0 -18
- data/vendor/ejs/test/setup_test.html +0 -44
- data/vendor/ejs/test/sidebar.html +0 -28
- data/vendor/ejs/test/templates/.svn/all-wcprops +0 -11
- data/vendor/ejs/test/templates/.svn/entries +0 -62
- data/vendor/ejs/test/templates/.svn/text-base/test.ejs.svn-base +0 -3
- data/vendor/ejs/test/templates/test.ejs +0 -3
- data/vendor/ejs/test/tests/.svn/all-wcprops +0 -23
- data/vendor/ejs/test/tests/.svn/entries +0 -130
- data/vendor/ejs/test/tests/.svn/text-base/rendering.js.svn-base +0 -94
- data/vendor/ejs/test/tests/.svn/text-base/templating.js.svn-base +0 -43
- data/vendor/ejs/test/tests/.svn/text-base/views.js.svn-base +0 -100
- data/vendor/ejs/test/tests/rendering.js +0 -94
- data/vendor/ejs/test/tests/templating.js +0 -43
- data/vendor/ejs/test/tests/views.js +0 -100
- data/vendor/glmatrix/benchmark/js/CanvasMatrix.js +0 -722
- data/vendor/glmatrix/benchmark/js/EWGL_math.js +0 -742
- data/vendor/glmatrix/benchmark/js/mjs.js +0 -1230
- data/vendor/glmatrix/benchmark/matrix_benchmark.html +0 -419
- data/vendor/glmatrix/glMatrix-min.js +0 -32
- data/vendor/glmatrix/glMatrix.js +0 -1772
- data/vendor/glmatrix/unit tests/glMatrix-test.js +0 -74
- data/vendor/glmatrix/unit tests/qunit.css +0 -119
- data/vendor/glmatrix/unit tests/qunit.js +0 -1069
- data/vendor/glmatrix/unit tests/test_glMatrix.html +0 -21
- data/vendor/pdoc_template/html/assets/images/pdoc/alias.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class_deprecated.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class_method.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class_property.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/constant.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/constructor.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/deprecated.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/description.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/information.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/instance_method.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/instance_property.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/method.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/method_deprecated.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/mixin.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/namespace.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/property.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/related_to.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/search-background.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/section-background.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/section.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/selected-section-background.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/subclass.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/superclass.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/utility.png +0 -0
- data/vendor/pdoc_template/html/assets/javascripts/pdoc/application.js +0 -478
- data/vendor/pdoc_template/html/assets/javascripts/pdoc/prototype.js +0 -4874
- data/vendor/pdoc_template/html/assets/javascripts/pdoc/tabs.js +0 -506
- data/vendor/pdoc_template/html/assets/stylesheets/jax.css +0 -30
- data/vendor/pdoc_template/html/assets/stylesheets/pdoc/api.css +0 -681
- data/vendor/pdoc_template/html/assets/stylesheets/pdoc/pygments.css +0 -62
- data/vendor/pdoc_template/html/helpers.rb +0 -35
- data/vendor/pdoc_template/html/index.erb +0 -18
- data/vendor/pdoc_template/html/item_index.js.erb +0 -6
- data/vendor/pdoc_template/html/layout.erb +0 -67
- data/vendor/pdoc_template/html/leaf.erb +0 -22
- data/vendor/pdoc_template/html/node.erb +0 -30
- data/vendor/pdoc_template/html/partials/class_relationships.erb +0 -19
- data/vendor/pdoc_template/html/partials/classes.erb +0 -7
- data/vendor/pdoc_template/html/partials/constructor.erb +0 -5
- data/vendor/pdoc_template/html/partials/description.erb +0 -5
- data/vendor/pdoc_template/html/partials/link_list.erb +0 -1
- data/vendor/pdoc_template/html/partials/method_signatures.erb +0 -14
- data/vendor/pdoc_template/html/partials/methodized_note.erb +0 -9
- data/vendor/pdoc_template/html/partials/mixins.erb +0 -7
- data/vendor/pdoc_template/html/partials/namespaces.erb +0 -7
- data/vendor/pdoc_template/html/partials/related_utilities.erb +0 -5
- data/vendor/pdoc_template/html/partials/relationships.erb +0 -11
- data/vendor/pdoc_template/html/partials/short_description_list.erb +0 -7
- data/vendor/pdoc_template/html/partials/title.erb +0 -24
- data/vendor/pdoc_template/html/section.erb +0 -18
- data/vendor/yuicompressor-2.4.2.jar +0 -0
@@ -1,21 +0,0 @@
|
|
1
|
-
<head>
|
2
|
-
<link rel="stylesheet" href="qunit.css" type="text/css"/>
|
3
|
-
|
4
|
-
<!-- See http://docs.jquery.com/QUnit -->
|
5
|
-
|
6
|
-
<script src="http://code.jquery.com/jquery-latest.js"> </script>
|
7
|
-
<script type="text/javascript" src="qunit.js"></script>
|
8
|
-
|
9
|
-
<script type="text/javascript" src="../glMatrix.js"></script>
|
10
|
-
<script type="text/javascript" src="glMatrix-test.js"></script>
|
11
|
-
<script type="text/javascript">
|
12
|
-
$(document).ready(function() { glMatrix_runtests(); });
|
13
|
-
</script>
|
14
|
-
</head>
|
15
|
-
|
16
|
-
<body>
|
17
|
-
<h1 id="qunit-header">QUnit example</h1>
|
18
|
-
<h2 id="qunit-banner"></h2>
|
19
|
-
<h2 id="qunit-userAgent"></h2>
|
20
|
-
<ol id="qunit-tests">
|
21
|
-
</body>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,478 +0,0 @@
|
|
1
|
-
//= require <prototype>
|
2
|
-
|
3
|
-
if (!Prototype || Prototype.Version.indexOf('1.6') !== 0) {
|
4
|
-
throw "This script requires Prototype >= 1.6.";
|
5
|
-
}
|
6
|
-
|
7
|
-
Object.isDate = function(object) {
|
8
|
-
return object instanceof Date;
|
9
|
-
};
|
10
|
-
|
11
|
-
/**
|
12
|
-
* class Cookie
|
13
|
-
* Creates a cookie.
|
14
|
-
**/
|
15
|
-
var Cookie = Class.create({
|
16
|
-
/**
|
17
|
-
* new Cookie(name, value[, expires])
|
18
|
-
*
|
19
|
-
* - name (String): The name of the cookie.
|
20
|
-
* - value (String): The value of the cookie.
|
21
|
-
* - expires (Number | Date): Exact date (or number of days from now) that
|
22
|
-
* the cookie will expire.
|
23
|
-
**/
|
24
|
-
initialize: function(name, value, expires) {
|
25
|
-
expires = expires || "";
|
26
|
-
if (Object.isNumber(expires)) {
|
27
|
-
var days = expires;
|
28
|
-
expires = new Date();
|
29
|
-
expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000));
|
30
|
-
}
|
31
|
-
|
32
|
-
if (Object.isDate(expires))
|
33
|
-
expires = expires.toGMTString();
|
34
|
-
|
35
|
-
if (!Object.isUndefined(expires) && expires !== "")
|
36
|
-
expires = "; expires=" + expires;
|
37
|
-
|
38
|
-
this.name = name;
|
39
|
-
this.value = value;
|
40
|
-
this.expires = expires;
|
41
|
-
|
42
|
-
document.cookie = name + "=" + value + expires + "; path=/";
|
43
|
-
},
|
44
|
-
|
45
|
-
toString: function() {
|
46
|
-
return this.value;
|
47
|
-
},
|
48
|
-
|
49
|
-
inspect: function() {
|
50
|
-
return "#<Cookie #{name}:#{value}>".interpolate(this);
|
51
|
-
}
|
52
|
-
});
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Cookie
|
56
|
-
**/
|
57
|
-
Object.extend(Cookie, {
|
58
|
-
/**
|
59
|
-
* Cookie.set(name, value, expires)
|
60
|
-
*
|
61
|
-
* Alias of [[Cookie#initialize]].
|
62
|
-
**/
|
63
|
-
set: function(name, value, expires) {
|
64
|
-
return new Cookie(name, value, expires);
|
65
|
-
},
|
66
|
-
|
67
|
-
/**
|
68
|
-
* Cookie.get(name)
|
69
|
-
*
|
70
|
-
* Returns the value of the cookie with the given name.
|
71
|
-
* - name (String): The name of the cookie to retrieve.
|
72
|
-
**/
|
73
|
-
get: function(name) {
|
74
|
-
var c = document.cookie.split(';');
|
75
|
-
|
76
|
-
for (var i = 0, cookie; i < c.length; i++) {
|
77
|
-
cookie = c[i].split('=');
|
78
|
-
if (cookie[0].strip() === name)
|
79
|
-
return cookie[1].strip();
|
80
|
-
}
|
81
|
-
|
82
|
-
return null;
|
83
|
-
},
|
84
|
-
|
85
|
-
/**
|
86
|
-
* Cookie.unset(name)
|
87
|
-
*
|
88
|
-
* Deletes a cookie.
|
89
|
-
* - name (String): The name of the cookie to delete.
|
90
|
-
*
|
91
|
-
**/
|
92
|
-
unset: function(name) {
|
93
|
-
return Cookie.set(name, "", -1);
|
94
|
-
}
|
95
|
-
});
|
96
|
-
|
97
|
-
Cookie.erase = Cookie.unset;
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
if (typeof PDoc === 'undefined') {
|
102
|
-
window.PDoc = {
|
103
|
-
Sidebar: {}
|
104
|
-
};
|
105
|
-
}
|
106
|
-
|
107
|
-
// HISTORY MANAGER (sort of)
|
108
|
-
// Polls for changes to the hash.
|
109
|
-
|
110
|
-
(function() {
|
111
|
-
var PREVIOUS_HASH = null;
|
112
|
-
|
113
|
-
function poll() {
|
114
|
-
var hash = window.location.hash;
|
115
|
-
if (hash && hash !== PREVIOUS_HASH) {
|
116
|
-
document.fire('hash:changed', {
|
117
|
-
previous: PREVIOUS_HASH, current: hash
|
118
|
-
});
|
119
|
-
}
|
120
|
-
PREVIOUS_HASH = hash;
|
121
|
-
window.setTimeout(arguments.callee, 100);
|
122
|
-
}
|
123
|
-
|
124
|
-
Event.observe(window, 'load', poll);
|
125
|
-
})();
|
126
|
-
|
127
|
-
Object.extend(PDoc.Sidebar, {
|
128
|
-
getActiveTab: function() {
|
129
|
-
var activeTab = $('sidebar_tabs').down('.active');
|
130
|
-
if (!activeTab) return null;
|
131
|
-
|
132
|
-
var href = activeTab.readAttribute('href');
|
133
|
-
return href.endsWith('menu_pane') ? 'menu_pane' : 'search_pane';
|
134
|
-
},
|
135
|
-
|
136
|
-
// Remember the state of the sidebar so it can be restored on the next page.
|
137
|
-
serialize: function() {
|
138
|
-
var state = $H({
|
139
|
-
activeTab: PDoc.Sidebar.getActiveTab(),
|
140
|
-
menuScrollOffset: $('menu_pane').scrollTop,
|
141
|
-
searchScrollOffset: $('search_results').scrollTop,
|
142
|
-
searchValue: $('search').getValue()
|
143
|
-
});
|
144
|
-
|
145
|
-
return escape(state.toJSON());
|
146
|
-
},
|
147
|
-
|
148
|
-
// Restore the tree to a certain point based on a cookie.
|
149
|
-
restore: function(state) {
|
150
|
-
try {
|
151
|
-
state = unescape(state).evalJSON();
|
152
|
-
var filterer = $('search').retrieve('filterer');
|
153
|
-
filterer.setSearchValue(state.searchValue);
|
154
|
-
|
155
|
-
(function() {
|
156
|
-
$('menu_pane').scrollTop = state.menuScrollOffset;
|
157
|
-
$('search_results').scrollTop = state.searchScrollOffset;
|
158
|
-
}).defer();
|
159
|
-
} catch(error) {
|
160
|
-
console.log(error);
|
161
|
-
if (!(error instanceof SyntaxError)) throw error;
|
162
|
-
}
|
163
|
-
}
|
164
|
-
});
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
// Live API search.
|
169
|
-
PDoc.Sidebar.Filterer = Class.create({
|
170
|
-
initialize: function(element, options) {
|
171
|
-
this.element = $(element);
|
172
|
-
this.options = Object.extend(
|
173
|
-
Object.clone(PDoc.Sidebar.Filterer.DEFAULT_OPTIONS),
|
174
|
-
options || {}
|
175
|
-
);
|
176
|
-
|
177
|
-
// The browser's "helpful" auto-complete gets in the way.
|
178
|
-
this.element.writeAttribute("autocomplete", "off");
|
179
|
-
this.element.setValue('');
|
180
|
-
|
181
|
-
// Hitting "enter" should do nothing.
|
182
|
-
this.element.up('form').observe("submit", Event.stop);
|
183
|
-
|
184
|
-
this.menu = this.options.menu;
|
185
|
-
this.links = this.menu.select('a');
|
186
|
-
|
187
|
-
this.resultsElement = this.options.resultsElement;
|
188
|
-
|
189
|
-
this.observers = {
|
190
|
-
filter: this.filter.bind(this),
|
191
|
-
keydown: this.keydown.bind(this),
|
192
|
-
keyup: this.keyup.bind(this)
|
193
|
-
};
|
194
|
-
|
195
|
-
this.menu.setStyle({ opacity: 0.9 });
|
196
|
-
this.addObservers();
|
197
|
-
},
|
198
|
-
|
199
|
-
addObservers: function() {
|
200
|
-
this.element.observe('keyup', this.observers.filter);
|
201
|
-
},
|
202
|
-
|
203
|
-
// Called whenever the list of results needs to update as a result of a
|
204
|
-
// changed search key.
|
205
|
-
filter: function(event) {
|
206
|
-
// Clear the text box on ESC.
|
207
|
-
if (event.keyCode && event.keyCode === Event.KEY_ESC) {
|
208
|
-
this.element.setValue('');
|
209
|
-
}
|
210
|
-
|
211
|
-
if (PDoc.Sidebar.Filterer.INTERCEPT_KEYS.include(event.keyCode))
|
212
|
-
return;
|
213
|
-
|
214
|
-
// If there's nothing in the text box, clear the results list.
|
215
|
-
var value = $F(this.element).strip().toLowerCase();
|
216
|
-
if (value === '') {
|
217
|
-
this.emptyResults();
|
218
|
-
this.hideResults();
|
219
|
-
return;
|
220
|
-
}
|
221
|
-
|
222
|
-
var urls = this.findURLs(value);
|
223
|
-
this.buildResults(urls);
|
224
|
-
},
|
225
|
-
|
226
|
-
setSearchValue: function(value) {
|
227
|
-
this.element.setValue(value);
|
228
|
-
if (value.strip() === "") {
|
229
|
-
PDoc.Sidebar.Tabs.setActiveTab(0);
|
230
|
-
return;
|
231
|
-
}
|
232
|
-
this.buildResults(this.findURLs(value));
|
233
|
-
},
|
234
|
-
|
235
|
-
// Given a key, finds all the PDoc objects that match.
|
236
|
-
findURLs: function(str) {
|
237
|
-
var results = [];
|
238
|
-
for (var name in PDoc.elements) {
|
239
|
-
if (name.toLowerCase().include(str.toLowerCase()))
|
240
|
-
results.push(PDoc.elements[name]);
|
241
|
-
}
|
242
|
-
return results;
|
243
|
-
},
|
244
|
-
|
245
|
-
buildResults: function(results) {
|
246
|
-
this.emptyResults();
|
247
|
-
|
248
|
-
results.each( function(result) {
|
249
|
-
var li = this._buildResult(result);
|
250
|
-
this.resultsElement.appendChild(li);
|
251
|
-
}, this);
|
252
|
-
this.showResults();
|
253
|
-
},
|
254
|
-
|
255
|
-
_buildResult: function(obj) {
|
256
|
-
var li = new Element('li', { 'class': 'menu-item' });
|
257
|
-
var a = new Element('a', {
|
258
|
-
'class': obj.type.gsub(/\s/, '-'),
|
259
|
-
'href': PDoc.pathPrefix + obj.path
|
260
|
-
}).update(obj.name);
|
261
|
-
|
262
|
-
li.appendChild(a);
|
263
|
-
return li;
|
264
|
-
},
|
265
|
-
|
266
|
-
emptyResults: function() {
|
267
|
-
this.resultsElement.update();
|
268
|
-
},
|
269
|
-
|
270
|
-
hideResults: function() {
|
271
|
-
PDoc.Sidebar.Tabs.setActiveTab(0);
|
272
|
-
//this.resultsElement.hide();
|
273
|
-
document.stopObserving('keydown', this.observers.keydown);
|
274
|
-
document.stopObserving('keyup', this.observers.keyup);
|
275
|
-
},
|
276
|
-
|
277
|
-
showResults: function() {
|
278
|
-
PDoc.Sidebar.Tabs.setActiveTab(1);
|
279
|
-
//this.resultsElement.show();
|
280
|
-
document.stopObserving('keydown', this.observers.keydown);
|
281
|
-
this.element.stopObserving('keyup', this.observers.keyup);
|
282
|
-
this.element.observe('keydown', this.observers.keydown);
|
283
|
-
document.observe('keyup', this.observers.keyup);
|
284
|
-
},
|
285
|
-
|
286
|
-
keydown: function(event) {
|
287
|
-
if (!PDoc.Sidebar.Filterer.INTERCEPT_KEYS.include(event.keyCode))
|
288
|
-
return;
|
289
|
-
|
290
|
-
// Also ignore if any modifier keys are present.
|
291
|
-
if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey)
|
292
|
-
return;
|
293
|
-
|
294
|
-
event.stop();
|
295
|
-
|
296
|
-
if (event.keyCode === Event.KEY_RETURN) {
|
297
|
-
// Follow the highlighted item, unless there is none.
|
298
|
-
if (!this.highlighted) return;
|
299
|
-
var a = this.highlighted.down('a');
|
300
|
-
if (a) {
|
301
|
-
window.location.href = a.href;
|
302
|
-
}
|
303
|
-
} else if ([Event.KEY_UP, Event.KEY_DOWN].include(event.keyCode)) {
|
304
|
-
// Is an arrow key.
|
305
|
-
var direction = (Event.KEY_DOWN === event.keyCode) ? 1 : -1;
|
306
|
-
this.highlighted = this.moveHighlight(direction);
|
307
|
-
|
308
|
-
if (!Prototype.Browser.WebKit) {
|
309
|
-
// If up/down key is held down, list should keep scrolling.
|
310
|
-
// WebKit does this automatically because it fires the keydown
|
311
|
-
// event over and over.
|
312
|
-
this._scrollTimer = window.setTimeout(
|
313
|
-
this.scrollList.bind(this, direction), 1000);
|
314
|
-
}
|
315
|
-
}
|
316
|
-
},
|
317
|
-
|
318
|
-
keyup: function(event) {
|
319
|
-
if (this._scrollTimer) {
|
320
|
-
window.clearTimeout(this._scrollTimer);
|
321
|
-
}
|
322
|
-
},
|
323
|
-
|
324
|
-
moveHighlight: function(direction) {
|
325
|
-
if (!this.highlighted) {
|
326
|
-
// If there is none, highlight the first result.
|
327
|
-
this.highlighted =
|
328
|
-
this.resultsElement.down('li').addClassName('highlighted');
|
329
|
-
} else {
|
330
|
-
var method = (direction === 1) ? 'next' : 'previous';
|
331
|
-
this.highlighted.removeClassName('highlighted');
|
332
|
-
var adjacent = this.highlighted[method]('li');
|
333
|
-
// If there isn't an adjacent one, we're at the top or bottom
|
334
|
-
// of the list. Flip it.
|
335
|
-
if (!adjacent) {
|
336
|
-
adjacent = method == 'next' ? this.resultsElement.down('li') :
|
337
|
-
this.resultsElement.down('li:last-of-type');
|
338
|
-
}
|
339
|
-
adjacent.addClassName('highlighted');
|
340
|
-
this.highlighted = adjacent;
|
341
|
-
}
|
342
|
-
|
343
|
-
var h = this.highlighted, r = this.resultsElement;
|
344
|
-
|
345
|
-
var distanceToBottom = h.offsetTop + h.offsetHeight;
|
346
|
-
if (distanceToBottom > (r.offsetHeight + r.scrollTop)) {
|
347
|
-
// Item is below the visible frame.
|
348
|
-
r.scrollTop = distanceToBottom - r.offsetHeight;
|
349
|
-
} else if (h.offsetTop < r.scrollTop) {
|
350
|
-
// Item is above the visible frame.
|
351
|
-
r.scrollTop = h.offsetTop;
|
352
|
-
}
|
353
|
-
|
354
|
-
return this.highlighted;
|
355
|
-
},
|
356
|
-
|
357
|
-
scrollList: function(direction) {
|
358
|
-
this.moveHighlight(direction);
|
359
|
-
this._scrollTimer = window.setTimeout(
|
360
|
-
this.scrollList.bind(this, direction), 100);
|
361
|
-
}
|
362
|
-
});
|
363
|
-
|
364
|
-
Object.extend(PDoc.Sidebar.Filterer, {
|
365
|
-
INTERCEPT_KEYS: [Event.KEY_UP, Event.KEY_DOWN, Event.KEY_RETURN],
|
366
|
-
DEFAULT_OPTIONS: {
|
367
|
-
interval: 0.1,
|
368
|
-
resultsElement: '.search-results'
|
369
|
-
}
|
370
|
-
});
|
371
|
-
|
372
|
-
|
373
|
-
Form.GhostedField = Class.create({
|
374
|
-
initialize: function(element, title, options) {
|
375
|
-
options = options || {};
|
376
|
-
|
377
|
-
this.element = $(element);
|
378
|
-
this.title = title;
|
379
|
-
|
380
|
-
this.isGhosted = true;
|
381
|
-
|
382
|
-
if (options.cloak) {
|
383
|
-
|
384
|
-
// Wrap the native getValue function so that it never returns the
|
385
|
-
// ghosted value. This is optional because it presumes the ghosted
|
386
|
-
// value isn't valid input for the field.
|
387
|
-
this.element.getValue = this.element.getValue.wrap(this.wrappedGetValue.bind(this));
|
388
|
-
}
|
389
|
-
|
390
|
-
this.addObservers();
|
391
|
-
|
392
|
-
this.onBlur();
|
393
|
-
},
|
394
|
-
|
395
|
-
wrappedGetValue: function($proceed) {
|
396
|
-
var value = $proceed();
|
397
|
-
return value === this.title ? "" : value;
|
398
|
-
},
|
399
|
-
|
400
|
-
addObservers: function() {
|
401
|
-
this.element.observe('focus', this.onFocus.bind(this));
|
402
|
-
this.element.observe('blur', this.onBlur.bind(this));
|
403
|
-
|
404
|
-
var form = this.element.up('form');
|
405
|
-
if (form) {
|
406
|
-
form.observe('submit', this.onSubmit.bind(this));
|
407
|
-
}
|
408
|
-
|
409
|
-
// Firefox's bfcache means that form fields need to be re-initialized
|
410
|
-
// when you hit the "back" button to return to the page.
|
411
|
-
if (Prototype.Browser.Gecko) {
|
412
|
-
window.addEventListener('pageshow', this.onBlur.bind(this), false);
|
413
|
-
}
|
414
|
-
},
|
415
|
-
|
416
|
-
onFocus: function() {
|
417
|
-
if (this.isGhosted) {
|
418
|
-
this.element.setValue('');
|
419
|
-
this.setGhosted(false);
|
420
|
-
}
|
421
|
-
},
|
422
|
-
|
423
|
-
onBlur: function() {
|
424
|
-
var value = this.element.getValue();
|
425
|
-
if (value.blank() || value == this.title) {
|
426
|
-
this.setGhosted(true);
|
427
|
-
} else {
|
428
|
-
this.setGhosted(false);
|
429
|
-
}
|
430
|
-
},
|
431
|
-
|
432
|
-
setGhosted: function(isGhosted) {
|
433
|
-
this.isGhosted = isGhosted;
|
434
|
-
this.element[isGhosted ? 'addClassName' : 'removeClassName']('ghosted');
|
435
|
-
if (isGhosted) {
|
436
|
-
this.element.setValue(this.title);
|
437
|
-
}
|
438
|
-
},
|
439
|
-
|
440
|
-
// Hook into the enclosing form's `onsubmit` event so that we clear any
|
441
|
-
// ghosted text before the form is sent.
|
442
|
-
onSubmit: function() {
|
443
|
-
if (this.isGhosted) {
|
444
|
-
this.element.setValue('');
|
445
|
-
}
|
446
|
-
}
|
447
|
-
});
|
448
|
-
|
449
|
-
document.observe('dom:loaded', function() {
|
450
|
-
PDoc.Sidebar.Tabs = new Control.Tabs($('sidebar_tabs'));
|
451
|
-
|
452
|
-
var searchField = $('search');
|
453
|
-
|
454
|
-
if (searchField) {
|
455
|
-
var filterer = new PDoc.Sidebar.Filterer(searchField, {
|
456
|
-
menu: $('api_menu'),
|
457
|
-
resultsElement: $('search_results')
|
458
|
-
});
|
459
|
-
searchField.store('filterer', filterer);
|
460
|
-
}
|
461
|
-
|
462
|
-
// Prevent horizontal scrolling in scrollable sidebar areas.
|
463
|
-
$$('.scrollable').invoke('observe', 'scroll', function() {
|
464
|
-
this.scrollLeft = 0;
|
465
|
-
});
|
466
|
-
|
467
|
-
var sidebarState = Cookie.get('sidebar_state');
|
468
|
-
if (sidebarState) {
|
469
|
-
PDoc.Sidebar.restore(sidebarState);
|
470
|
-
}
|
471
|
-
|
472
|
-
new Form.GhostedField(searchField, searchField.getAttribute('title'),
|
473
|
-
{ cloak: true });
|
474
|
-
});
|
475
|
-
|
476
|
-
Event.observe(window, 'unload', function() {
|
477
|
-
Cookie.set('sidebar_state', PDoc.Sidebar.serialize());
|
478
|
-
});
|