diff --git a/Rakefile b/Rakefile
index 63f24345b4ebf429cfb9e9802aa9e869d6d19d4b..7cbe8c2b3208224287fbb6439a524b1eb1c38efd 100644
--- a/Rakefile
+++ b/Rakefile
@@ -220,7 +220,6 @@ task :ext4 => :sass do
runner = JsDuckRunner.new
runner.add_ext4
runner.add_debug
- runner.add_options("--tests")
runner.run
system("cp -r #{EXT_BUILD} #{OUT_DIR}/extjs-build")
@@ -239,8 +238,7 @@ task :sdk => :sass do
"--import", "Ext JS 4.0.7:compare/ext407",
"--import", "Ext JS 4.1.0:compare/ext410",
"--import", "Ext JS 4.1.1",
- "--seo",
- "--tests"
+ "--seo"
)
runner.add_debug
runner.add_comments('ext-js', '4')
@@ -256,8 +254,7 @@ task :touch2 => :sass do
"--output", OUT_DIR,
"--config", "#{SDK_DIR}/touch/docs/config.json",
"--examples-base-url", "touch-build/examples/production/",
- "--seo",
- "--tests"
+ "--seo"
)
runner.add_debug
diff --git a/js-classes/String.js b/js-classes/String.js
index 302b86dc2db5fa20ab555738461ff08504fb74c4..8b8479d649f8a191139063fc9315eb2a96a428d0 100644
--- a/js-classes/String.js
+++ b/js-classes/String.js
@@ -949,7 +949,7 @@
*
* The following example displays the string "sencha":
*
- * var upperText="sencha";
+ * var upperText="SENCHA";
* document.write(upperText.toLocaleLowerCase());
*
* @return {String} Returns value of the string in lowercase.
diff --git a/lib/jsduck/aggregator.rb b/lib/jsduck/aggregator.rb
index 4ab6656f2abe83d08fcbb40586280a5baece4ec4..0e98f22d9bddda1179089b4a999342846818b99c 100644
--- a/lib/jsduck/aggregator.rb
+++ b/lib/jsduck/aggregator.rb
@@ -206,10 +206,7 @@ module JsDuck
end
# Appends Ext4 options parameter to each event parameter list.
- # But only when we are dealing with Ext4 codebase.
def append_ext4_event_options
- return unless ext4?
-
options = {
:tagname => :param,
:name => "eOpts",
diff --git a/lib/jsduck/app.rb b/lib/jsduck/app.rb
index b8bd3b6c51fc12feea050a6d38b5a10c20c7169f..f9b14129924912a8c784aa5820f76177336c5a40 100644
--- a/lib/jsduck/app.rb
+++ b/lib/jsduck/app.rb
@@ -126,7 +126,9 @@ module JsDuck
agr.create_global_class
agr.remove_ignored_classes
agr.create_accessors
- agr.append_ext4_event_options
+ if @opts.ext4_events == true || (@opts.ext4_events == nil && agr.ext4?)
+ agr.append_ext4_event_options
+ end
agr.process_enums
agr.result
end
diff --git a/lib/jsduck/options.rb b/lib/jsduck/options.rb
index 6966a4a05c4ca60cdb2a22945556640a4ce008e1..9ca6f99efdfab54d34e37115dd26c6fb7269ab7d 100644
--- a/lib/jsduck/options.rb
+++ b/lib/jsduck/options.rb
@@ -12,6 +12,7 @@ module JsDuck
attr_accessor :output_dir
attr_accessor :ignore_global
attr_accessor :external_classes
+ attr_accessor :ext4_events
# Customizing output
attr_accessor :title
@@ -74,6 +75,7 @@ module JsDuck
# Special anything-goes type
"Mixed",
]
+ @ext4_events = nil
@meta_tag_paths = []
@version = "4.0.beta2"
@@ -159,6 +161,14 @@ module JsDuck
@external_classes += classes
end
+ opts.on('--[no-]ext4-events',
+ "Appends extra options parameter that all Ext events have.",
+ "The default is to auto-detect if we're using Ext JS 4",
+ "based on whether the code uses Ext.define.",
+ "Use this option to override the auto-detection.", " ") do |e|
+ @ext4_events = e
+ end
+
opts.on('--builtin-classes',
"Includes docs for JavaScript builtin classes.", " ") do
read_filenames(@root_dir + "/js-classes")
diff --git a/lib/jsduck/tag/chainable.rb b/lib/jsduck/tag/chainable.rb
new file mode 100644
index 0000000000000000000000000000000000000000..453babb9efa35c6d76484f3c5e1413066394c683
--- /dev/null
+++ b/lib/jsduck/tag/chainable.rb
@@ -0,0 +1,14 @@
+require "jsduck/meta_tag"
+
+module JsDuck::Tag
+ # Implementation of @chainable tag
+ class Chainable < JsDuck::MetaTag
+ def initialize
+ @name = "chainable"
+ @key = :chainable
+ @signature = {:long => "chainable", :short => ">"} # show small right-arrow
+ @boolean = true
+ end
+ end
+end
+
diff --git a/template/index.php b/template/index.php
index d7166bf52463f26d94fa9322c3915190550dcc4b..77c2e412cd9fd2bd4f241a015a64c36e28e62473 100644
--- a/template/index.php
+++ b/template/index.php
@@ -9,7 +9,7 @@ function print_page($subtitle, $body, $fragment) {
$uri = 'http://' . $_SERVER["HTTP_HOST"] . preg_replace('/\?.*$/', '', $_SERVER["REQUEST_URI"]);
$canonical = $uri."#!".$fragment;
$html = file_get_contents('print-template.html');
- echo preg_replace(array('/\{subtitle}/', '/\{body}/', '/\{canonical}/'), array($subtitle, $body, $canonical), $html);
+ echo preg_replace(array('/\{subtitle}/', '/\{body}/', '/\{canonical}/'), array($subtitle, fix_links($body), $canonical), $html);
}
function print_index_page() {
@@ -31,6 +31,24 @@ function decode_file($filename) {
}
}
+// Turns #! links into ?print= links when in print mode.
+//
+// -->
+// -->
+//
+function fix_links($html) {
+ if (isset($_GET["print"])) {
+ $patterns = array(
+ '/ ' '
-
+
+