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/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+
179
+ Copyright 2013-2015 Alcides Queiroz [alcidesqueiroz(at)gmail(dot)com]
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,342 @@
1
+ #Sideshow
2
+
3
+ ![Sideshow Logo](http://fortesinformatica.github.io/Sideshow/examples/images/sideshow-logo.png)
4
+ ========
5
+ ![Google Analytics Beacon](https://ga-beacon.appspot.com/UA-34593010-2/Sideshow/README)
6
+ [![Gem Version](https://badge.fury.io/rb/sideshow.svg)](http://badge.fury.io/rb/sideshow)
7
+ [![NuGet version](https://badge.fury.io/nu/sideshow.svg)](http://badge.fury.io/nu/sideshow)
8
+ [![Bower version](https://badge.fury.io/bo/sideshow.svg)](http://badge.fury.io/bo/sideshow)
9
+
10
+ [Documentation and Live example](http://fortesinformatica.github.io/Sideshow)
11
+
12
+ 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.
13
+
14
+ * Explain the features of your application
15
+ * Control your end-user's interaction with your UI
16
+ * Use Markdown to create formatted step descriptions
17
+ * Emphasize what you're explaining in each step (a button, grid, dropdown, form, the whole screen, and so forth) by surrounding it with a fully adaptable mask.
18
+
19
+ **Just think! The sky is the limit!**
20
+
21
+ ##Usage
22
+ All the files needed to use Sideshow are located under the `distr` folder.
23
+
24
+ 1) In your HTML, include Sideshow script, its dependencies (put the dependencies before the Sideshow script) and the stylesheet.
25
+
26
+ **Note**: The stylesheet must be in the `head` and all the scripts (including your own Tutorial scripts) in the bottom of your `body` tag.
27
+
28
+ **Note 2**: See the `example.html` file in the project root folder for a real example.
29
+
30
+ 2) Copy the Sideshow fonts folder in the directory located above the folder where you copied Sideshow stylesheet.
31
+
32
+ 3) Create (and also add a reference in your HTML) a `sideshow.config.js` file with this content:
33
+
34
+ ```Javascript
35
+ Sideshow.config.language = "en";
36
+ Sideshow.init();
37
+ ```
38
+
39
+ **Note**: For now, Sideshow only supports `en` (american english), `pt-br` (brazilian portuguese) and `es` (spanish, translated by Luis Alfaro de la Fuente, thanks!)
40
+
41
+ 4) Create your tutorials and import each one in your HTML after the Sideshow script
42
+
43
+ ###Creating a Tutorial
44
+
45
+ ```Javascript
46
+ Sideshow.registerWizard({
47
+ name: "introducing_sideshow",
48
+ title: "Introducing Sideshow",
49
+ description: "Introducing the main features and concepts of Sideshow. ",
50
+ estimatedTime: "10 Minutes",
51
+ affects: [
52
+ { hash: "#messages" }, //This tutorial would be eligible for URLs like this "http://www.foo.com/bar#messages"
53
+ { route: "/adm/orders", caseSensitive: true }, //This tutorial would be eligible for URLs like this "http://www.foo.com/adm/orders"
54
+ function(){
55
+ //Here we could do any checking to infer if this tutorial is eligible the current screen/context.
56
+ //After this checking, just return a boolean indicating if this tutorial will be available.
57
+ return $(".grid").length > 0;
58
+ }
59
+ ]
60
+ });
61
+ ```
62
+
63
+ ###Defining a Storyline
64
+ A storyline is the sequence of steps of some tutorial.
65
+
66
+ ```Javascript
67
+ Sideshow.registerWizard({
68
+ //...
69
+ }).storyLine({
70
+ showStepPosition: true,
71
+ steps: [
72
+ {
73
+ title: "Hello Sideshow.",
74
+ text: "This is an oversimplified example."
75
+ },
76
+ {
77
+ title: "The end",
78
+ text: "What a pity =(."
79
+ }
80
+ ]
81
+ });
82
+ ```
83
+
84
+ ###Step: A complete example
85
+
86
+ ```Javascript
87
+ Sideshow.registerWizard({
88
+ //...
89
+ }).storyLine({
90
+ showStepPosition: true,
91
+ steps: [
92
+ {
93
+ title: "The log out button.",
94
+ text: "Click this button if you want to log out of the system.",
95
+ subject: "#user_details_panel",
96
+ targets: "#user_details_panel > .logout"
97
+ }
98
+ ]
99
+ });
100
+ ```
101
+
102
+ ###Using Markdown
103
+
104
+ ```Javascript
105
+ Sideshow.registerWizard({
106
+ //...
107
+ }).storyLine({
108
+ showStepPosition: true,
109
+ steps: [
110
+ {
111
+ title: "Markdown is pretty cool!",
112
+ text: "This step uses [Markdown](http://en.wikipedia.org/wiki/Markdown) for **text formatting**.",
113
+ format: "markdown"
114
+ }
115
+ ]
116
+ });
117
+ ```
118
+
119
+ ###Completing Conditions
120
+ Completing conditions are just (as the name suggests) conditions to be satisfied in order to proceed to the next step.
121
+
122
+ ```Javascript
123
+ Sideshow.registerWizard({
124
+ //...
125
+ }).storyLine({
126
+ showStepPosition: true,
127
+ steps: [
128
+ {
129
+ title: "Choose a name for your project",
130
+ text: "Enter a name for your project.",
131
+ completingConditions: [
132
+ function(){
133
+ return $("#project_name").val().length > 5;
134
+ }
135
+ ]
136
+ },
137
+ //...
138
+ ]
139
+ });
140
+ ```
141
+
142
+ ###Auto continue
143
+ By setting the autoContinue flag to true, Sideshow proceeds automaticaly when the completing conditions are satisfied.
144
+
145
+ ```Javascript
146
+ Sideshow.registerWizard({
147
+ //...
148
+ }).storyLine({
149
+ showStepPosition: true,
150
+ steps: [
151
+ {
152
+ title: "Choose a name for your project",
153
+ text: "Enter a name for your project.",
154
+ completingConditions: [
155
+ function(){
156
+ return $("#project_name").val().length > 5;
157
+ }
158
+ ],
159
+ autoContinue: true
160
+ },
161
+ //...
162
+ ]
163
+ });
164
+ ```
165
+
166
+ ###Events
167
+ You can perform some action or do some preparation for the next step, or anything you want which can be done programatically.
168
+
169
+ ```Javascript
170
+ Sideshow.registerWizard({
171
+ //...
172
+ listeners: {
173
+ beforeWizardStarts: function(){
174
+ //What goes here will be executed before the first step of this tutorial
175
+ },
176
+ afterWizardEnds: function(){
177
+ //What goes here will be executed after the last step of this tutorial
178
+ }
179
+ }
180
+ }).storyLine({
181
+ showStepPosition: true,
182
+ steps: [
183
+ {
184
+ title: "Foo bar",
185
+ text: "An example of step just to illustrate how to use step events.",
186
+ listeners: {
187
+ beforeStep: function(){
188
+ //What goes here will be executed before this step
189
+ },
190
+ afterStep: function(){
191
+ //What goes here will be executed after this step
192
+ }
193
+ }
194
+ },
195
+ //...
196
+ ]
197
+ });
198
+ ```
199
+
200
+ ###Skipping a step
201
+ When entering some step you can do some verification to skip the step automaticaly.
202
+
203
+ ```Javascript
204
+ Sideshow.registerWizard({
205
+ //...
206
+ }).storyLine({
207
+ showStepPosition: true,
208
+ steps: [
209
+ {
210
+ //...
211
+ skipIf: function(){
212
+ return $("#groups").children().length > 0;
213
+ }
214
+ },
215
+ //...
216
+ ]
217
+ });
218
+ ```
219
+
220
+ ###Jumping to other step
221
+ You can jump to other step by its position (1-based) or its unique name.
222
+
223
+ ```Javascript
224
+ Sideshow.registerWizard({
225
+ //...
226
+ }).storyLine({
227
+ showStepPosition: true,
228
+ steps: [
229
+ {
230
+ //...
231
+ listeners: {
232
+ beforeStep: function(){
233
+ if($("#groups").children().length > 0)
234
+ Sideshow.gotoStep("the_end"); //we're jumping to the step named "the_end"
235
+ else if($("#people").children().length > 0)
236
+ Sideshow.gotoStep(7); //we're jumping to the seventh step in this Wizard storyline
237
+ }
238
+ }
239
+ },
240
+ //...
241
+ {
242
+ name: "the_end",
243
+ title: "The end",
244
+ //...
245
+ }
246
+ ]
247
+ });
248
+ ```
249
+
250
+ ###Tutorial Eligibility
251
+ When a user invokes Sideshow, a list with the tutorials available for the current screen/context is shown. Sideshow knows if a tutorial is eligible for some screen by testing the `affects` conditions of each registered tutorial. If one of the conditions are met, the tutorial is listed.
252
+
253
+
254
+ ```Javascript
255
+ Sideshow.registerWizard({
256
+ //...
257
+ affects: [
258
+ { hash: "#messages" }, //This tutorial would be eligible for URLs like this "http://www.foo.com/bar#messages"
259
+ { route: "/adm/orders", caseSensitive: true }, //This tutorial would be eligible for URLs like this "http://www.foo.com/adm/orders"
260
+ function(){
261
+ //Here we could do any checking to infer if this tutorial is eligible the current screen/context.
262
+ //After this checking, just return a boolean indicating if this tutorial will be available.
263
+ return $(".grid").length > 0;
264
+ }
265
+ ]
266
+ }).storyLine({
267
+ //...
268
+ });
269
+ ```
270
+
271
+ ###Tutorial Preparation Function
272
+ Even if a tutorial isn't eligible for some screen, by using a preparation function a user can access this tutorial from any point of your system/site (by pressing shift-F2).
273
+
274
+
275
+ ```Javascript
276
+ Sideshow.registerWizard({
277
+ //...
278
+ preparation: function(doneCallback){
279
+ //if your app is a SPA, you could do some sort of redirection and call the doneCallback function after the page is loaded
280
+ }
281
+ }).storyLine({
282
+ //...
283
+ });
284
+ ```
285
+
286
+ ###Related Tutorials
287
+ You can also define relationships between tutorials, this way, after finishing a tutorial, the user sees a list of others related to this.
288
+
289
+
290
+ ```Javascript
291
+ Sideshow.registerWizard({
292
+ //...
293
+ //after finishing the current wizard, the user will be guided to related tutorials
294
+ relatedWizards: [ "creating_user", "groups_and_permissions", "security_settings" ]
295
+ }).storyLine({
296
+ //...
297
+ });
298
+ ```
299
+
300
+ ###Skipping the Intro screen (the tutorial list) automatically if there's just one tutorial available for a given context
301
+ In the sideshow.config.js file, set the `autoSkipIntro` option to true:
302
+
303
+ ```Javascript
304
+ Sideshow.config.autoSkipIntro = true;
305
+ //...other configuration options
306
+ Sideshow.init();
307
+ ```
308
+
309
+
310
+ ##Invoking Sideshow##
311
+
312
+ * The user can access the tutorials available for the current screen by pressing `F2`, .
313
+ * The user can access the tutorials available for the current screen + tutorials for other screens with a preparation function by pressing `shift+F2`.
314
+
315
+ ##Fortes Informática
316
+
317
+ Sideshow was created at [Fortes Informática](http://www.fortesinformatica.com.br), a great technology company headquartered in Fortaleza, CE (Brazil). Fortes Informática has several offices across the country, and an impressive history of more than 20 years. Sideshow is making our software yet more easy to use and even more innovative.
318
+
319
+ ##Author
320
+
321
+ Alcides Queiroz Aguiar
322
+
323
+ - E-mail: alcidesqueiroz(at)gmail(dot)com
324
+ - Twitter: [@alcidesqueiroz](http://www.twitter.com/alcidesqueiroz)
325
+ - Stack Overflow: [http://is.gd/aqanso](http://stackoverflow.com/users/1295666/alcides-queiroz-aguiar)
326
+ - Github: [alcidesqueiroz](https://github.com/alcidesqueiroz)
327
+
328
+ ##License and Copyright
329
+
330
+ Copyright 2013-2015 Alcides Queiroz [alcidesqueiroz(at)gmail(dot)com]
331
+
332
+ Licensed under the Apache License, Version 2.0 (the "License");
333
+ you may not use this file except in compliance with the License.
334
+ You may obtain a copy of the License at
335
+
336
+ http://www.apache.org/licenses/LICENSE-2.0
337
+
338
+ Unless required by applicable law or agreed to in writing, software
339
+ distributed under the License is distributed on an "AS IS" BASIS,
340
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
341
+ See the License for the specific language governing permissions and
342
+ limitations under the License.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ v0.4.1-the-hobbit
data/bower.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "Sideshow",
3
+ "version": "0.4.1",
4
+ "homepage": "http://fortesinformatica.github.io/Sideshow",
5
+ "authors": [
6
+ "Alcides Queiroz <alcidesqueiroz@gmail.com>"
7
+ ],
8
+ "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.",
9
+ "main": "distr/sideshow.js",
10
+ "moduleType": [
11
+ "amd",
12
+ "globals"
13
+ ],
14
+ "keywords": [
15
+ "sideshow",
16
+ "interactive",
17
+ "tutorial",
18
+ "tour",
19
+ "help",
20
+ "wizard",
21
+ "step-by-step",
22
+ "library",
23
+ "script",
24
+ "javascript"
25
+ ],
26
+ "license": "Apache 2.0",
27
+ "ignore": [
28
+ "./docs/",
29
+ "./node_modules/",
30
+ "./gulp/",
31
+ "./bower_components/",
32
+ "./icons/",
33
+ "./src/",
34
+ "./stylesheets/",
35
+ "./tmp/",
36
+ "./.bower.json",
37
+ "./.bowerrc",
38
+ "./.csslint",
39
+ "./.editorconfig",
40
+ "./.gitattributes",
41
+ "./.gitignore",
42
+ "./bower.json",
43
+ "./BUILDING.md",
44
+ "./CHANGELOG.md",
45
+ "./Gulpfile.js",
46
+ "./LICENSE",
47
+ "./package.json",
48
+ "./README.md",
49
+ "./sideshow.gemspec",
50
+ "./sideshow.nuspec",
51
+ "./sideshow.sublime-project",
52
+ "./VERSION",
53
+ "./yuidoc.json",
54
+ "./*.gem",
55
+ "./*.nupkg"
56
+ ],
57
+ "dependencies": {
58
+ "jquery": "latest",
59
+ "pagedown": "http://pagedown.googlecode.com/archive/2a8c75ce3fb50b88165efae9d48a8bc87dc4fb2b.zip"
60
+ }
61
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ Jazz - A simple Crockford-like class implementation for Javascript
3
+ version: 0.1.1
4
+ Author: Alcides Queiroz (alcidesqueiroz@gmail.com)
5
+ Available via the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ Date: 2013-10-23
7
+ **/
8
+ (function(e,t){function r(e,t){this.name="JZException";this.message="[JAZZ_E#"+("00000000"+e).substr(-8)+"] "+t}function s(e){if(null==e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e){if(e.hasOwnProperty(n))t[n]=e[n]}return t}function o(e){Object.defineProperty(e,"static",{get: function(){return this}});Object.defineProperty(e,"abstract",{get: function(){this._abstract=true;return this}});Object.defineProperty(e,"singleton",{get:function(){if(!this._singleton){this._singleton=true;var e={};Object.defineProperty(this, "singleInstance",{get:function(){if(!e.obj)this.build(e);return e.obj}})}return this}})}function u(e,t){e.prototype=new t;var n={},r=e.prototype;e.prototype.constructor=t;e.prototype.callSuper=function(e){if(!(e in n)){n[e]=0}var i,s,o=n[e],u=t.prototype;if(o){while(o){u=u.constructor.prototype;o--}i=u[e]}else{i=r[e];if(i==this[e])i=u[e]}n[e]++;s=i.apply(this,Array.prototype.slice.apply(arguments,[1]));n[e]--;return s};return e}if(t===undefined)throw new r("1","jQuery is required for Sideshow to work.");var n="Jazz";r.prototype=new Error;r.prototype.constructor=r;var i=function(){};Object.defineProperty(i, "VERSION",{get:function(){return"0.1.1"}});i.Class=function(){var e=arguments[0];var t;var n=function(){};if(typeof e==="object"){n=e.constructor||n;if(e.initializer)t=e.initializer}else if(typeof e==="function"){t=e}u(n,i);n.extending=this.extending;n.method=this.method;n.field=this.field;n.build=this.build;n._fields={};n._initializers=t?[t]:[];o(n);return n};i.extending=function(e){this.baseClass=e;this._inheritedFields=[this._fields];var t=e;while(t!==undefined){if(t._fields!==undefined)this._inheritedFields.push(t._fields);this._initializers=t._initializers.concat(this._initializers);t=t.baseClass}return u(this,e)};i.method=function(e,t){this.prototype[e]=t;return this};i.build=function(){function e(e,t){for(var n in t){var r=t[n];if(!e[n])e[n]=s(r)}}if(this._abstract)throw new r("2","Abstract classes cannot be instantiated.");if(this._singleton&&arguments.length===0)return this.singleInstance;var t=new this;if(this._initializers)for(var n=0;n<this._initializers.length;n++)this._initializers[n].apply(t,arguments);if(this._inheritedFields)for(var i=this._inheritedFields.length-1;i>=0;i--){e(t,this._inheritedFields[i])}else e(t,this._fields);if(arguments.length===1)arguments[0].obj=t;return t};i.method("pick",function(e){for(var t=1;t<arguments.length;t+=1){var n=arguments[t];this.prototype[n]=e.prototype[n]}return this});i.field=function(e,t){if(this._fields[e]!==undefined)throw new r("3","Field '"+e+"' already exists.");this._fields[e]=t!==undefined?t:null;return this};i.Enum=function(){var e={};for(var t=0;t<arguments.length;t++){e[arguments[t]]=arguments[t]}if(Object.freeze)Object.freeze(e);return e};if(e[n]===undefined){e[n]=i}else throw new r("4",'The global object "'+n+'" is already being used.')})(window,jQuery);