sideshow 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. checksums.yaml +7 -0
  2. data/.bowerrc +3 -0
  3. data/.csslintrc +37 -0
  4. data/.editorconfig +27 -0
  5. data/.gitattributes +1 -0
  6. data/.gitignore +23 -0
  7. data/BUILDING.md +4 -0
  8. data/CHANGELOG.md +47 -0
  9. data/Gulpfile.js +404 -0
  10. data/LICENSE +191 -0
  11. data/README.md +342 -0
  12. data/VERSION +1 -0
  13. data/bower.json +61 -0
  14. data/distr/dependencies/jazz.min.js +8 -0
  15. data/distr/dependencies/jquery.min.js +5 -0
  16. data/distr/dependencies/pagedown.min.js +1 -0
  17. data/distr/fonts/open-sans-family/opensans-bold.eot +0 -0
  18. data/distr/fonts/open-sans-family/opensans-bold.svg +1825 -0
  19. data/distr/fonts/open-sans-family/opensans-bold.ttf +0 -0
  20. data/distr/fonts/open-sans-family/opensans-bold.woff +0 -0
  21. data/distr/fonts/open-sans-family/opensans-bolditalic.eot +0 -0
  22. data/distr/fonts/open-sans-family/opensans-bolditalic.svg +1825 -0
  23. data/distr/fonts/open-sans-family/opensans-bolditalic.ttf +0 -0
  24. data/distr/fonts/open-sans-family/opensans-bolditalic.woff +0 -0
  25. data/distr/fonts/open-sans-family/opensans-extrabold.eot +0 -0
  26. data/distr/fonts/open-sans-family/opensans-extrabold.svg +1825 -0
  27. data/distr/fonts/open-sans-family/opensans-extrabold.ttf +0 -0
  28. data/distr/fonts/open-sans-family/opensans-extrabold.woff +0 -0
  29. data/distr/fonts/open-sans-family/opensans-extrabolditalic.eot +0 -0
  30. data/distr/fonts/open-sans-family/opensans-extrabolditalic.svg +1825 -0
  31. data/distr/fonts/open-sans-family/opensans-extrabolditalic.ttf +0 -0
  32. data/distr/fonts/open-sans-family/opensans-extrabolditalic.woff +0 -0
  33. data/distr/fonts/open-sans-family/opensans-italic.eot +0 -0
  34. data/distr/fonts/open-sans-family/opensans-italic.svg +1825 -0
  35. data/distr/fonts/open-sans-family/opensans-italic.ttf +0 -0
  36. data/distr/fonts/open-sans-family/opensans-italic.woff +0 -0
  37. data/distr/fonts/open-sans-family/opensans-light.eot +0 -0
  38. data/distr/fonts/open-sans-family/opensans-light.svg +1825 -0
  39. data/distr/fonts/open-sans-family/opensans-light.ttf +0 -0
  40. data/distr/fonts/open-sans-family/opensans-light.woff +0 -0
  41. data/distr/fonts/open-sans-family/opensans-lightitalic.eot +0 -0
  42. data/distr/fonts/open-sans-family/opensans-lightitalic.svg +1825 -0
  43. data/distr/fonts/open-sans-family/opensans-lightitalic.ttf +0 -0
  44. data/distr/fonts/open-sans-family/opensans-lightitalic.woff +0 -0
  45. data/distr/fonts/open-sans-family/opensans-regular.eot +0 -0
  46. data/distr/fonts/open-sans-family/opensans-regular.svg +1825 -0
  47. data/distr/fonts/open-sans-family/opensans-regular.ttf +0 -0
  48. data/distr/fonts/open-sans-family/opensans-regular.woff +0 -0
  49. data/distr/fonts/open-sans-family/opensans-semibold.eot +0 -0
  50. data/distr/fonts/open-sans-family/opensans-semibold.svg +1825 -0
  51. data/distr/fonts/open-sans-family/opensans-semibold.ttf +0 -0
  52. data/distr/fonts/open-sans-family/opensans-semibold.woff +0 -0
  53. data/distr/fonts/open-sans-family/opensans-semibolditalic.eot +0 -0
  54. data/distr/fonts/open-sans-family/opensans-semibolditalic.svg +1825 -0
  55. data/distr/fonts/open-sans-family/opensans-semibolditalic.ttf +0 -0
  56. data/distr/fonts/open-sans-family/opensans-semibolditalic.woff +0 -0
  57. data/distr/fonts/sideshow-fontface.min.css +1 -0
  58. data/distr/fonts/sideshow-icons/sideshow-icons.eot +0 -0
  59. data/distr/fonts/sideshow-icons/sideshow-icons.svg +16 -0
  60. data/distr/fonts/sideshow-icons/sideshow-icons.ttf +0 -0
  61. data/distr/fonts/sideshow-icons/sideshow-icons.woff +0 -0
  62. data/distr/sideshow.js +2510 -0
  63. data/distr/sideshow.min.js +10 -0
  64. data/distr/stylesheets/sideshow.min.css +1 -0
  65. data/docs/api.js +29 -0
  66. data/docs/assets/css/external-small.png +0 -0
  67. data/docs/assets/css/logo.png +0 -0
  68. data/docs/assets/css/main.css +783 -0
  69. data/docs/assets/favicon.png +0 -0
  70. data/docs/assets/img/spinner.gif +0 -0
  71. data/docs/assets/index.html +10 -0
  72. data/docs/assets/js/api-filter.js +52 -0
  73. data/docs/assets/js/api-list.js +251 -0
  74. data/docs/assets/js/api-search.js +98 -0
  75. data/docs/assets/js/apidocs.js +370 -0
  76. data/docs/assets/js/yui-prettify.js +17 -0
  77. data/docs/assets/vendor/prettify/CHANGES.html +130 -0
  78. data/docs/assets/vendor/prettify/COPYING +202 -0
  79. data/docs/assets/vendor/prettify/README.html +203 -0
  80. data/docs/assets/vendor/prettify/prettify-min.css +1 -0
  81. data/docs/assets/vendor/prettify/prettify-min.js +1 -0
  82. data/docs/classes/Arrow.html +541 -0
  83. data/docs/classes/Arrows.html +805 -0
  84. data/docs/classes/ControlVariables.html +1005 -0
  85. data/docs/classes/DetailsPanel.html +672 -0
  86. data/docs/classes/FadableItem.html +613 -0
  87. data/docs/classes/HidableItem.html +495 -0
  88. data/docs/classes/Mask.CloseButton.html +706 -0
  89. data/docs/classes/Mask.CompositeMask.html +721 -0
  90. data/docs/classes/Mask.CornerPart.html +613 -0
  91. data/docs/classes/Mask.Part.html +395 -0
  92. data/docs/classes/Mask.Polling.html +809 -0
  93. data/docs/classes/Mask.Subject.html +199 -0
  94. data/docs/classes/Mask.SubjectMask.html +417 -0
  95. data/docs/classes/Mask.WizardMenu.html +1401 -0
  96. data/docs/classes/SS.html +267 -0
  97. data/docs/classes/SSException.html +203 -0
  98. data/docs/classes/Screen.html +363 -0
  99. data/docs/classes/StepDescription.html +1025 -0
  100. data/docs/classes/StepDescriptionNextButton.html +746 -0
  101. data/docs/classes/VisualItem.html +339 -0
  102. data/docs/classes/Wizard.html +967 -0
  103. data/docs/files/c +0 -0
  104. data/docs/index.html +162 -0
  105. data/example.html +81 -0
  106. data/examples/images/clemenza.jpg +0 -0
  107. data/examples/images/doc_brown.png +0 -0
  108. data/examples/images/forkme.png +0 -0
  109. data/examples/images/fortes-logo.png +0 -0
  110. data/examples/images/sideshow-logo.png +0 -0
  111. data/examples/images/sideshow-logo.svg +155 -0
  112. data/examples/scripts/sideshow.config.js +2 -0
  113. data/examples/scripts/tutorials/introducing_sideshow.js +259 -0
  114. data/examples/stylesheets/example.min.css +1 -0
  115. data/examples/stylesheets/styl/example.styl +272 -0
  116. data/gulp/config.js +0 -0
  117. data/gulp/extensions/gulp-html-extend.js +151 -0
  118. data/gulp/tasks/.gitkeep +0 -0
  119. data/icons/iconfont.zip +0 -0
  120. data/package.json +56 -0
  121. data/sideshow.gemspec +20 -0
  122. data/sideshow.nuspec +72 -0
  123. data/sideshow.sublime-project +22 -0
  124. data/src/copyright_info.js +8 -0
  125. data/src/general/config.js +42 -0
  126. data/src/general/dictionary.js +42 -0
  127. data/src/general/exception.js +15 -0
  128. data/src/general/global_object.js +287 -0
  129. data/src/general/polling.js +151 -0
  130. data/src/general/screen.js +39 -0
  131. data/src/general/utility_functions.js +88 -0
  132. data/src/general/variables.js +42 -0
  133. data/src/interface_itens/fadable_item.js +55 -0
  134. data/src/interface_itens/hidable_item.js +32 -0
  135. data/src/interface_itens/visual_item.js +42 -0
  136. data/src/main.js +52 -0
  137. data/src/mask/composite_mask.js +193 -0
  138. data/src/mask/composite_mask_corner_part.js +105 -0
  139. data/src/mask/composite_mask_part.js +51 -0
  140. data/src/mask/mask.js +6 -0
  141. data/src/mask/subject_mask.js +34 -0
  142. data/src/step/arrow.js +88 -0
  143. data/src/step/arrows.js +155 -0
  144. data/src/step/step_description.js +165 -0
  145. data/src/step/step_description_next_button.js +55 -0
  146. data/src/step/step_details_panel.js +87 -0
  147. data/src/step/subject.js +100 -0
  148. data/src/wizard/wizard.js +395 -0
  149. data/src/wizard/wizard_control_variables.js +95 -0
  150. data/src/wizard/wizard_menu.js +101 -0
  151. data/stylesheets/_animations.styl +87 -0
  152. data/stylesheets/_font-face.styl +135 -0
  153. data/stylesheets/_icons.styl +27 -0
  154. data/stylesheets/_layout.styl +362 -0
  155. data/stylesheets/_mixins.styl +52 -0
  156. data/stylesheets/_variables.styl +35 -0
  157. data/stylesheets/sideshow-fontface.styl +4 -0
  158. data/stylesheets/sideshow.styl +7 -0
  159. data/yuidoc.json +15 -0
  160. metadata +246 -0
data/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "sideshow",
3
+ "version": "0.4.1",
4
+ "description": "Sideshow is a powerful javascript library which aims to reduce your user's learning curve by providing a way to create step-by-step interactive helps.",
5
+ "main": " ",
6
+ "scripts": {
7
+ "test": " "
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "http://github.com/fortesinformatica/Sideshow.git"
12
+ },
13
+ "keywords": [
14
+ "interactive",
15
+ "help",
16
+ "tour",
17
+ "tutorial",
18
+ "library",
19
+ "step-by-step"
20
+ ],
21
+ "author": "Alcides Queiroz",
22
+ "license": "Apache 2",
23
+ "devDependencies": {
24
+ "bower-installer": "^1.0.0",
25
+ "del": "^0.1.2",
26
+ "ecstatic": "^0.5.4",
27
+ "gift": "^0.5.0",
28
+ "gulp": "^3.8.7",
29
+ "gulp-autoprefixer": "0.0.10",
30
+ "gulp-beautify": "^1.1.1",
31
+ "gulp-bower": "0.0.7",
32
+ "gulp-cache": "^0.2.2",
33
+ "gulp-concat": "^2.4.2",
34
+ "gulp-csslint": "^0.1.5",
35
+ "gulp-gzip": "0.0.8",
36
+ "gulp-include": "^1.1.0",
37
+ "gulp-jshint": "^1.8.4",
38
+ "gulp-livereload": "^2.1.1",
39
+ "gulp-minify-css": "^0.3.8",
40
+ "gulp-notify": "^1.5.1",
41
+ "gulp-prettify": "^0.3.0",
42
+ "gulp-prompt": "^0.1.1",
43
+ "gulp-rename": "^1.2.0",
44
+ "gulp-run": "^1.6.4",
45
+ "gulp-stylus": "^1.3.4",
46
+ "gulp-tar": "^1.3.1",
47
+ "gulp-uglify": "^1.0.1",
48
+ "gulp-util": "^3.0.1",
49
+ "gulp-yuidoc": "^0.1.2",
50
+ "gulp-zip": "^2.0.2",
51
+ "ini": "^1.2.1",
52
+ "install": "^0.1.7",
53
+ "npm": "^1.4.26",
54
+ "open": "0.0.5"
55
+ }
56
+ }
data/sideshow.gemspec ADDED
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+ $:.push File.expand_path('distr', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'sideshow'
6
+ s.version = '0.4.1'
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ['Alcides Queiroz']
9
+ s.email = ['alcidesqueiroz@gmail.com']
10
+ s.homepage = 'http://fortesinformatica.github.io/Sideshow'
11
+ s.summary = 'Sideshow is a powerful javascript library which aims to reduce your user''s learning curve by providing a way to create step-by-step interactive helps.'
12
+ s.license = 'Apache 2.0'
13
+ s.description = s.summary
14
+ s.files = `git ls-files`.split("\n")
15
+ s.require_paths = ['distr']
16
+
17
+ s.add_development_dependency('rake')
18
+ s.add_development_dependency('sass')
19
+ s.add_development_dependency('bundler')
20
+ end
data/sideshow.nuspec ADDED
@@ -0,0 +1,72 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3
+ <metadata>
4
+ <id>sideshow</id>
5
+ <version>0.4.1</version>
6
+ <title>Sideshow</title>
7
+ <authors>Alcides Queiroz</authors>
8
+ <owners>Fortes Informática</owners>
9
+ <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
10
+ <projectUrl>https://github.com/fortesinformatica/Sideshow</projectUrl>
11
+ <iconUrl>http://fortesinformatica.github.io/Sideshow/favicon.png</iconUrl>
12
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
13
+ <developmentDependency>true</developmentDependency>
14
+ <description>Sideshow is a powerful javascript library which aims to reduce your user's learning curve by providing a way to create step-by-step interactive helps.</description>
15
+ <summary>An incredible Javascript interactive help Library</summary>
16
+ <copyright>Copyright 2013-2015 Alcides Queiroz [alcidesqueiroz(at)gmail(dot)com]</copyright>
17
+ <tags>sideshow, interactive, tutorial, tour, help, wizard, step-by-step, library, script, javascript</tags>
18
+ </metadata>
19
+ <files>
20
+ <file src="distr\fonts\open-sans-family\opensans-bold.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-bold.eot" />
21
+ <file src="distr\fonts\open-sans-family\opensans-bold.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-bold.svg" />
22
+ <file src="distr\fonts\open-sans-family\opensans-bold.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-bold.ttf" />
23
+ <file src="distr\fonts\open-sans-family\opensans-bold.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-bold.woff" />
24
+ <file src="distr\fonts\open-sans-family\opensans-bolditalic.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-bolditalic.eot" />
25
+ <file src="distr\fonts\open-sans-family\opensans-bolditalic.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-bolditalic.svg" />
26
+ <file src="distr\fonts\open-sans-family\opensans-bolditalic.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-bolditalic.ttf" />
27
+ <file src="distr\fonts\open-sans-family\opensans-bolditalic.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-bolditalic.woff" />
28
+ <file src="distr\fonts\open-sans-family\opensans-extrabold.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabold.eot" />
29
+ <file src="distr\fonts\open-sans-family\opensans-extrabold.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabold.svg" />
30
+ <file src="distr\fonts\open-sans-family\opensans-extrabold.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabold.ttf" />
31
+ <file src="distr\fonts\open-sans-family\opensans-extrabold.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabold.woff" />
32
+ <file src="distr\fonts\open-sans-family\opensans-extrabolditalic.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabolditalic.eot" />
33
+ <file src="distr\fonts\open-sans-family\opensans-extrabolditalic.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabolditalic.svg" />
34
+ <file src="distr\fonts\open-sans-family\opensans-extrabolditalic.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabolditalic.ttf" />
35
+ <file src="distr\fonts\open-sans-family\opensans-extrabolditalic.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-extrabolditalic.woff" />
36
+ <file src="distr\fonts\open-sans-family\opensans-italic.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-italic.eot" />
37
+ <file src="distr\fonts\open-sans-family\opensans-italic.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-italic.svg" />
38
+ <file src="distr\fonts\open-sans-family\opensans-italic.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-italic.ttf" />
39
+ <file src="distr\fonts\open-sans-family\opensans-italic.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-italic.woff" />
40
+ <file src="distr\fonts\open-sans-family\opensans-light.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-light.eot" />
41
+ <file src="distr\fonts\open-sans-family\opensans-light.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-light.svg" />
42
+ <file src="distr\fonts\open-sans-family\opensans-light.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-light.ttf" />
43
+ <file src="distr\fonts\open-sans-family\opensans-light.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-light.woff" />
44
+ <file src="distr\fonts\open-sans-family\opensans-lightitalic.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-lightitalic.eot" />
45
+ <file src="distr\fonts\open-sans-family\opensans-lightitalic.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-lightitalic.svg" />
46
+ <file src="distr\fonts\open-sans-family\opensans-lightitalic.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-lightitalic.ttf" />
47
+ <file src="distr\fonts\open-sans-family\opensans-lightitalic.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-lightitalic.woff" />
48
+ <file src="distr\fonts\open-sans-family\opensans-regular.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-regular.eot" />
49
+ <file src="distr\fonts\open-sans-family\opensans-regular.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-regular.svg" />
50
+ <file src="distr\fonts\open-sans-family\opensans-regular.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-regular.ttf" />
51
+ <file src="distr\fonts\open-sans-family\opensans-regular.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-regular.woff" />
52
+ <file src="distr\fonts\open-sans-family\opensans-semibold.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibold.eot" />
53
+ <file src="distr\fonts\open-sans-family\opensans-semibold.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibold.svg" />
54
+ <file src="distr\fonts\open-sans-family\opensans-semibold.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibold.ttf" />
55
+ <file src="distr\fonts\open-sans-family\opensans-semibold.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibold.woff" />
56
+ <file src="distr\fonts\open-sans-family\opensans-semibolditalic.eot" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibolditalic.eot" />
57
+ <file src="distr\fonts\open-sans-family\opensans-semibolditalic.svg" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibolditalic.svg" />
58
+ <file src="distr\fonts\open-sans-family\opensans-semibolditalic.ttf" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibolditalic.ttf" />
59
+ <file src="distr\fonts\open-sans-family\opensans-semibolditalic.woff" target="content\Content\sideshow\fonts\open-sans-family\opensans-semibolditalic.woff" />
60
+ <file src="distr\fonts\sideshow-icons\sideshow-icons.eot" target="content\Content\sideshow\fonts\sideshow-icons\sideshow-icons.eot" />
61
+ <file src="distr\fonts\sideshow-icons\sideshow-icons.svg" target="content\Content\sideshow\fonts\sideshow-icons\sideshow-icons.svg" />
62
+ <file src="distr\fonts\sideshow-icons\sideshow-icons.ttf" target="content\Content\sideshow\fonts\sideshow-icons\sideshow-icons.ttf" />
63
+ <file src="distr\fonts\sideshow-icons\sideshow-icons.woff" target="content\Content\sideshow\fonts\sideshow-icons\sideshow-icons.woff" />
64
+ <file src="distr\fonts\sideshow-fontface.min.css" target="content\Content\sideshow\fonts\sideshow-fontface.min.css" />
65
+ <file src="distr\stylesheets\sideshow.min.css" target="content\Content\sideshow\sideshow.min.css" />
66
+ <file src="distr\dependencies\jazz.min.js" target="content\Scripts\dependencies\jazz.min.js" />
67
+ <file src="distr\dependencies\jquery.min.js" target="content\Scripts\dependencies\jquery.min.js" />
68
+ <file src="distr\dependencies\pagedown.min.js" target="content\Scripts\dependencies\pagedown.min.js" />
69
+ <file src="distr\sideshow.js" target="content\Scripts\sideshow.js" />
70
+ <file src="distr\sideshow.min.js" target="content\Scripts\sideshow.min.js" />
71
+ </files>
72
+ </package>
@@ -0,0 +1,22 @@
1
+ {
2
+ "folders":
3
+ [
4
+ {
5
+ "folder_exclude_patterns":
6
+ [
7
+ "node_modules",
8
+ "bower_components"
9
+ ],
10
+ "follow_symlinks": true,
11
+ "path": "."
12
+ }
13
+ ],
14
+ "build_systems":
15
+ [
16
+ {
17
+ "name": "Gulp",
18
+ "cmd": ["gulp"],
19
+ "shell": true
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ @license
3
+ Sideshow - An incredible Javascript interactive help Library
4
+ Version: 0.4.1
5
+ Date: 2014-11-27
6
+ Author: Alcides Queiroz [alcidesqueiroz(at)gmail(dot)com]
7
+ Available under Apache License 2.0 (https://raw2.github.com/fortesinformatica/sideshow/master/LICENSE)
8
+ **/
@@ -0,0 +1,42 @@
1
+ /**
2
+ Sideshow Settings
3
+
4
+ @@object config
5
+ **/
6
+ SS.config = {};
7
+
8
+ /**
9
+ Application route to persists user preferences
10
+
11
+ @@field userPreferencesRoute
12
+ @type String
13
+ @@unused
14
+ @@todo Implement persistence logic
15
+ **/
16
+ SS.config.userPreferencesRoute = null;
17
+
18
+ /**
19
+ Logged in user
20
+
21
+ @@field loggedInUser
22
+ @type String
23
+ @@unused
24
+ **/
25
+ SS.config.loggedInUser = null;
26
+
27
+ /**
28
+ Chosen language for sideshow interface
29
+
30
+ @@field language
31
+ @type String
32
+ **/
33
+ SS.config.language = "en";
34
+
35
+ /**
36
+ Defines if the intro screen (the tutorial list) will be skipped when there's just one
37
+ tutorial available. This way, when Sideshow is invoked, the first step is directly shown.
38
+
39
+ @@field autoSkipIntro
40
+ @type boolean
41
+ **/
42
+ SS.config.autoSkipIntro = false;
@@ -0,0 +1,42 @@
1
+ /**
2
+ Strings Dictionary
3
+
4
+ @@object strings
5
+ **/
6
+ var strings = {
7
+ availableWizards: {
8
+ "en": "Available Tutorials",
9
+ "pt-br": "Tutoriais Disponíveis",
10
+ "es": "Tutoriales Disponibles"
11
+ },
12
+ relatedWizards: {
13
+ "en": "Related Wizards",
14
+ "pt-br": "Tutoriais Relacionados",
15
+ "es": "Tutoriales Relacionados"
16
+ },
17
+ noAvailableWizards: {
18
+ "en": "There's no tutorials available.",
19
+ "pt-br": "Não há tutoriais disponíveis para esta tela.",
20
+ "es": "No hay tutoriales disponibles."
21
+ },
22
+ close: {
23
+ "en": "Close",
24
+ "pt-br": "Fechar",
25
+ "es": "Cerrar"
26
+ },
27
+ estimatedTime: {
28
+ "en": "Estimated Time",
29
+ "pt-br": "Tempo Estimado",
30
+ "es": "Tiempo Estimado"
31
+ },
32
+ next: {
33
+ "en": "Next",
34
+ "pt-br": "Continuar",
35
+ "es": "Continuar"
36
+ },
37
+ finishWizard: {
38
+ "en": "Finish Wizard",
39
+ "pt-br": "Concluir Tutorial",
40
+ "es": "Concluir Tutorial"
41
+ }
42
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ A custom exception class for Sideshow
3
+
4
+ @class SSException
5
+ @extends Error
6
+ @param {String} code The error code
7
+ @param {String} message The error message
8
+ **/
9
+ function SSException(code, message) {
10
+ this.name = "SSException";
11
+ this.message = "[SIDESHOW_E#" + ("00000000" + code).substr(-8) + "] " + message;
12
+ }
13
+
14
+ SSException.prototype = new Error();
15
+ SSException.prototype.constructor = SSException;
@@ -0,0 +1,287 @@
1
+ /**
2
+ Initializes Sideshow
3
+
4
+ @method init
5
+ @static
6
+ **/
7
+ SS.init = function() {
8
+ $window = $(global);
9
+ $document = $(global.document);
10
+ $body = $("body", global.document);
11
+ registerGlobalHotkeys();
12
+ Polling.start();
13
+ Mask.CompositeMask.singleInstance.init();
14
+ flags.lockMaskUpdate = true;
15
+ Mask.CompositeMask.singleInstance.render();
16
+ };
17
+
18
+ /**
19
+ Receives a function with just a multiline comment as body and converts to a here-document string
20
+
21
+ @method heredoc
22
+ @param {Function} A function without body but a multiline comment
23
+ @return {String} A multiline string
24
+ @static
25
+ **/
26
+ SS.heredoc = function(fn) {
27
+ return fn.toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1];
28
+ }
29
+
30
+ /**
31
+ Stops and Closes Sideshow
32
+
33
+ @method closes
34
+ @static
35
+ **/
36
+ SS.close = function() {
37
+ if (!currentWizard) WizardMenu.hide();
38
+
39
+ DetailsPanel.singleInstance.fadeOut();
40
+
41
+ this.CloseButton.singleInstance.fadeOut();
42
+ Arrows.fadeOut();
43
+
44
+ setTimeout(function() {
45
+ if (Mask.CompositeMask.singleInstance.status === AnimationStatus.VISIBLE ||
46
+ Mask.CompositeMask.singleInstance.status === AnimationStatus.FADING_IN)
47
+ Mask.CompositeMask.singleInstance.fadeOut();
48
+
49
+ Mask.SubjectMask.singleInstance.fadeOut();
50
+
51
+ }, longAnimationDuration);
52
+
53
+ removeDOMGarbage();
54
+ Polling.clear();
55
+ SS.ControlVariables.clear();
56
+ unregisterInnerHotkeys();
57
+ currentWizard = null;
58
+ flags.running = false;
59
+ };
60
+
61
+ SS.runWizard = function(name) {
62
+ var wiz = wizards.filter(function(w) {
63
+ return w.name === name
64
+ })[0];
65
+ currentWizard = wiz;
66
+ if (wiz) {
67
+ if (wiz.isEligible()) wiz.play();
68
+ else if (wiz.preparation) wiz.preparation(function() {
69
+ setTimeout(function() {
70
+ wiz.play();
71
+ }, 1000);
72
+ });
73
+ else throw new SSException("204", "This wizard hasn't preparation.");
74
+ } else throw new SSException("204", "There's no wizard with name " + name + ".");
75
+ };
76
+
77
+ SS.gotoStep = function() {
78
+ var firstArg = arguments[0],
79
+ steps = currentWizard._storyline.steps,
80
+ destination;
81
+
82
+ flags.skippingStep = true;
83
+
84
+ //First argument is the step position (1-based)
85
+ if (typeof firstArg == "number") {
86
+ if (firstArg <= steps.length)
87
+ destination = steps[firstArg - 1];
88
+ else
89
+ throw new SSException("401", "There's no step in the storyline with position " + firstArg + ".");
90
+ } //First argument is the step name
91
+ else if (typeof firstArg == "string") {
92
+ destination = steps.filter(function(i) {
93
+ return i.name === firstArg;
94
+ })[0];
95
+
96
+ if (!destination) throw new SSException("401", "There's no step in the storyline with name " + firstArg + ".");
97
+ }
98
+ setTimeout(function() {
99
+ currentWizard.next(null, destination);
100
+ }, 100);
101
+ };
102
+
103
+ /**
104
+ A trick to use the composite mask to simulate the behavior of a solid mask, setting an empty subject
105
+
106
+ @method setEmptySubject
107
+ @static
108
+ **/
109
+ SS.setEmptySubject = function() {
110
+ flags.lockMaskUpdate = true;
111
+ Subject.obj = null;
112
+ Subject.updateInfo({
113
+ dimension: {
114
+ width: 0,
115
+ height: 0
116
+ },
117
+ position: {
118
+ x: 0,
119
+ y: 0
120
+ },
121
+ borderRadius: {
122
+ leftTop: 0,
123
+ rightTop: 0,
124
+ leftBottom: 0,
125
+ rightBottom: 0
126
+ }
127
+ });
128
+ };
129
+
130
+ /**
131
+ Sets the current subject
132
+
133
+ @method setSubject
134
+ @param {Object} subj
135
+ @static
136
+ **/
137
+ SS.setSubject = function(subj, subjectChanged) {
138
+ if (subj.constructor === String) subj = $(subj);
139
+
140
+ if (subj instanceof $ && subj.length > 0) {
141
+ if (subj.length === 1) {
142
+ Subject.obj = subj;
143
+ Subject.updateInfo();
144
+ flags.lockMaskUpdate = false;
145
+ } else
146
+ throw new SSException("101", "A subject must have only one element. Multiple elements by step will be supported in future versions of Sideshow.");
147
+ }
148
+ else if (subjectChanged)
149
+ SS.setEmptySubject();
150
+ else
151
+ throw new SSException("100", "Invalid subject.");
152
+ };
153
+
154
+ /**
155
+ Registers a wizard
156
+
157
+ @method registerWizard
158
+ @param {Object} wizardConfig
159
+ @return {Object} The wizard instance
160
+ @static
161
+ **/
162
+ SS.registerWizard = function(wizardConfig) {
163
+ var wiz = Wizard.build(wizardConfig);
164
+ wizards.push(wiz);
165
+ return wiz;
166
+ };
167
+
168
+ /**
169
+ Registers a wizard
170
+
171
+ @method registerWizard
172
+ @param {boolean} onlyNew Checks only recently added wizards
173
+ @return {Array} The eligible wizards list
174
+ @static
175
+ **/
176
+ SS.getElegibleWizards = function(onlyNew) {
177
+ var eligibleWizards = [];
178
+ var somethingNew = false;
179
+ for (var w = 0; w < wizards.length; w++) {
180
+ var wiz = wizards[w];
181
+ if (wiz.isEligible()) {
182
+ if (!wiz.isAlreadyWatched()) somethingNew = true;
183
+ eligibleWizards.push(wiz);
184
+ }
185
+ }
186
+
187
+ return !onlyNew || somethingNew ? eligibleWizards : [];
188
+ };
189
+
190
+ /**
191
+ Checks if there are eligible wizards, if exists, shows the wizard menu
192
+
193
+ @method showWizardsList
194
+ @param {boolean} onlyNew Checks only recently added wizards
195
+ @return {boolean} Returns a boolean indicating whether there is some wizard available
196
+ @static
197
+ **/
198
+ SS.showWizardsList = function() {
199
+ var firstArg = arguments[0];
200
+ var title = arguments[1];
201
+ var onlyNew = typeof firstArg == "boolean" ? false : firstArg;
202
+ var wizards = firstArg instanceof Array ? firstArg : this.getElegibleWizards(onlyNew);
203
+
204
+ WizardMenu.show(wizards, title);
205
+
206
+ return wizards.length > 0;
207
+ };
208
+
209
+ /**
210
+ Shows a list with the related wizards
211
+
212
+ @method showRelatedWizardsList
213
+ @param {Object} completedWizard The recently completed wizard
214
+ @return {boolean} Returns a boolean indicating whether there is some related wizard available
215
+ @static
216
+ **/
217
+ SS.showRelatedWizardsList = function(completedWizard) {
218
+ var relatedWizardsNames = completedWizard.relatedWizards;
219
+ if (!relatedWizardsNames) return false;
220
+
221
+ //Gets only related tutorials which are eligible or have a preparation function
222
+ var relatedWizards = wizards.filter(function(w) {
223
+ return relatedWizardsNames.indexOf(w.name) > -1 && (w.isEligible() || w.preparation);
224
+ });
225
+ if (relatedWizards.length == 0) return false;
226
+
227
+ Polling.clear();
228
+ SS.ControlVariables.clear();
229
+ SS.showWizardsList(relatedWizards, getString(strings.relatedWizards));
230
+
231
+ return true;
232
+ };
233
+
234
+ /**
235
+ The close button for the wizard
236
+
237
+ @class CloseButton
238
+ @@singleton
239
+ @extends FadableItem
240
+ **/
241
+ SS.CloseButton = jazz.Class().extending(FadableItem).singleton;
242
+
243
+ /**
244
+ Renders the close button
245
+
246
+ @method render
247
+ **/
248
+ SS.CloseButton.method("render", function() {
249
+ this.$el = $("<button>")
250
+ .addClass("sideshow-close-button")
251
+ .text(getString(strings.close));
252
+ this.$el.click(function() {
253
+ SS.close();
254
+ });
255
+ this.callSuper("render");
256
+ });
257
+
258
+ /**
259
+ Starts Sideshow
260
+
261
+ @method start
262
+ @param {Object} config The config object for Sideshow
263
+ **/
264
+ SS.start = function(config) {
265
+ config = config || {};
266
+ if (!flags.running) {
267
+ var onlyNew = "onlyNew" in config && !! config.onlyNew;
268
+ var listAll = "listAll" in config && !! config.listAll;
269
+
270
+ if (listAll)
271
+ SS.showWizardsList(wizards.filter(function(w) {
272
+ return w.isEligible() || w.preparation;
273
+ }));
274
+ else
275
+ SS.showWizardsList(onlyNew);
276
+
277
+ this.CloseButton.singleInstance.render();
278
+ this.CloseButton.singleInstance.fadeIn();
279
+
280
+ registerInnerHotkeys();
281
+ flags.running = true;
282
+
283
+ Polling.enqueue("check_composite_mask_screen_changes", function() {
284
+ Mask.CompositeMask.singleInstance.pollForScreenChanges();
285
+ });
286
+ }
287
+ };