rbbt-views 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rbbt/workflow/rest.rb +365 -95
- data/lib/rbbt/workflow/rest/client.rb +2 -0
- data/lib/rbbt/workflow/rest/entity.rb +82 -76
- data/lib/rbbt/workflow/rest/finder.rb +78 -0
- data/lib/rbbt/workflow/rest/helpers.rb +288 -47
- data/lib/rbbt/workflow/rest/notes.rb +125 -0
- data/lib/rbbt/workflow/rest/render.rb +280 -240
- data/lib/rbbt/workflow/rest/util.rb +47 -31
- data/share/views/compass/_base.sass +0 -8
- data/share/views/compass/colors.sass +10 -0
- data/share/views/compass/colors/ventana_azul.sass +5 -0
- data/share/views/compass/compass.config +2 -1
- data/share/views/compass/details.sass +50 -0
- data/share/views/compass/dom.sass +64 -0
- data/share/views/compass/embedded.sass +111 -0
- data/share/views/compass/entities.sass +8 -0
- data/share/views/compass/error.sass +13 -0
- data/share/views/compass/finder.sass +42 -0
- data/share/views/compass/fonts.sass +8 -0
- data/share/views/compass/form.sass +49 -1
- data/share/views/compass/header.sass +68 -0
- data/share/views/compass/{main.sass → helpers.sass} +53 -21
- data/share/views/compass/layout.sass +31 -199
- data/share/views/compass/lists.sass +128 -0
- data/share/views/compass/menu.sass +35 -0
- data/share/views/compass/notes.sass +52 -0
- data/share/views/compass/sizes.sass +8 -0
- data/share/views/compass/tables.sass +22 -0
- data/share/views/compass/wait.sass +9 -0
- data/share/views/edit_list.haml +41 -30
- data/share/views/entity/GOTerm.haml +4 -3
- data/share/views/entity/Gene.haml +8 -1
- data/share/views/entity/GenomicMutation.haml +4 -1
- data/share/views/entity/KeggPathway.haml +1 -1
- data/share/views/entity/MutatedIsoform.haml +68 -11
- data/share/views/entity/NCIBioCartaPathway.haml +2 -3
- data/share/views/entity/NCINaturePathway.haml +3 -3
- data/share/views/entity/NCIReactomePathway.haml +2 -3
- data/share/views/entity/PfamDomain.haml +2 -0
- data/share/views/entity/Transcript.haml +10 -0
- data/share/views/entity_list/Default.haml +4 -0
- data/share/views/entity_list/Default/compare_to_other_lists.haml +41 -0
- data/share/views/entity_list/Default/entity_links.haml +6 -0
- data/share/views/entity_list/Default/find_in_other_lists.haml +36 -0
- data/share/views/error.haml +6 -1
- data/share/views/find.haml +10 -0
- data/share/views/form.haml +1 -1
- data/share/views/info.haml +1 -1
- data/share/views/js/_action_setup.js +250 -0
- data/share/views/js/_basic.js +269 -0
- data/share/views/js/_cytoscape.js +44 -0
- data/share/views/js/_details.js +239 -0
- data/share/views/js/_dom_updates.js +384 -0
- data/share/views/js/_embedded.js +95 -0
- data/share/views/js/_images.js +20 -0
- data/share/views/js/_layout.js +21 -0
- data/share/views/js/_lists.js +224 -0
- data/share/views/js/_table.js +36 -0
- data/share/views/js/_workflow.js +42 -0
- data/share/views/js/app.js +0 -570
- data/share/views/js/fix_tablesorter_scientific.js +25 -0
- data/share/views/js/json2.js +487 -0
- data/share/views/layout.haml +8 -98
- data/share/views/notes.haml +15 -0
- data/share/views/partials/_form.haml +22 -7
- data/share/views/partials/_job_control.haml +8 -8
- data/share/views/partials/_list_control.haml +32 -0
- data/share/views/partials/_list_header.haml +6 -0
- data/share/views/partials/_note_list.haml +64 -0
- data/share/views/partials/_result_table.haml +12 -7
- data/share/views/partials/_result_table_controls.haml +11 -5
- data/share/views/partials/_table.haml +24 -6
- data/share/views/partials/layout/_coda.haml +10 -0
- data/share/views/partials/layout/_details.haml +25 -0
- data/share/views/partials/layout/_head.haml +22 -0
- data/share/views/partials/layout/_header.haml +29 -0
- data/share/views/partials/layout/_menu.haml +20 -0
- data/share/views/partials/layout/_resources.haml +41 -0
- data/share/views/public/background.png +0 -0
- data/share/views/public/plugins/cytoscape-web/LICENSE.txt +504 -0
- data/share/views/public/plugins/cytoscape-web/README.txt +213 -0
- data/share/views/public/plugins/cytoscape-web/js/AC_OETags.js +1 -0
- data/share/views/public/plugins/cytoscape-web/js/cytoscapeweb.js +1 -0
- data/share/views/public/plugins/cytoscape-web/js/json2.js +1 -0
- data/share/views/public/plugins/cytoscape-web/swf/CytoscapeWeb.swf +0 -0
- data/share/views/public/plugins/cytoscape-web/swf/playerProductInstall.swf +0 -0
- data/share/views/public/plugins/fancybox/CHANGELOG.md +68 -0
- data/share/views/public/plugins/fancybox/README.md +220 -0
- data/share/views/public/plugins/fancybox/css/blank.gif +0 -0
- data/share/views/public/plugins/fancybox/css/fancybox_loading.gif +0 -0
- data/share/views/public/plugins/fancybox/css/fancybox_sprite.png +0 -0
- data/share/views/public/plugins/fancybox/css/jquery.fancybox.css +234 -0
- data/share/views/public/plugins/fancybox/helpers/fancybox_buttons.png +0 -0
- data/share/views/public/plugins/fancybox/helpers/jquery.fancybox-buttons.css +85 -0
- data/share/views/public/plugins/fancybox/helpers/jquery.fancybox-buttons.js +115 -0
- data/share/views/public/plugins/fancybox/helpers/jquery.fancybox-media.js +85 -0
- data/share/views/public/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +54 -0
- data/share/views/public/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +157 -0
- data/share/views/public/plugins/fancybox/js/jquery.fancybox.js +1463 -0
- data/share/views/public/plugins/fancybox/js/jquery.mousewheel-3.0.6.pack.js +13 -0
- data/share/views/public/plugins/fancybox/lib/jquery-1.7.2.min.js +4 -0
- data/share/views/public/plugins/featuredimagezoomer/css/featuredimagezoomer.css +8 -0
- data/share/views/public/plugins/featuredimagezoomer/images/spinningred.gif +0 -0
- data/share/views/public/plugins/featuredimagezoomer/js/featuredimagezoomer.js +245 -0
- data/share/views/public/plugins/jquery-ui.hitarea.js +173 -0
- data/share/views/public/plugins/jquery/js/jquery-1.8.0.min.js +2 -0
- data/share/views/public/plugins/tablesorter/addons/pager/jquery.tablesorter.pager.css +25 -0
- data/share/views/public/plugins/tablesorter/addons/pager/jquery.tablesorter.pager.js +184 -0
- data/share/views/public/plugins/tablesorter/build.xml +26 -0
- data/share/views/public/plugins/tablesorter/build/ParseMaster.js +106 -0
- data/share/views/public/plugins/tablesorter/build/js.jar +0 -0
- data/share/views/public/plugins/tablesorter/build/jsmin.js +316 -0
- data/share/views/public/plugins/tablesorter/build/min.js +5 -0
- data/share/views/public/plugins/tablesorter/build/pack.js +5 -0
- data/share/views/public/plugins/tablesorter/build/packer.js +316 -0
- data/share/views/public/plugins/tablesorter/build/writeFile.js +19 -0
- data/share/views/public/plugins/tablesorter/changelog +41 -0
- data/share/views/public/plugins/tablesorter/docs/assets/ajax-content.html +43 -0
- data/share/views/public/plugins/tablesorter/docs/css/jq.css +29 -0
- data/share/views/public/plugins/tablesorter/docs/example-ajax.html +119 -0
- data/share/views/public/plugins/tablesorter/docs/example-empty-table.html +75 -0
- data/share/views/public/plugins/tablesorter/docs/example-extending-defaults.html +109 -0
- data/share/views/public/plugins/tablesorter/docs/example-meta-headers.html +108 -0
- data/share/views/public/plugins/tablesorter/docs/example-meta-parsers.html +105 -0
- data/share/views/public/plugins/tablesorter/docs/example-meta-sort-list.html +107 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-debug.html +116 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-digits.html +106 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-sort-force.html +107 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-sort-key.html +108 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-sort-list.html +108 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-sort-order.html +108 -0
- data/share/views/public/plugins/tablesorter/docs/example-option-text-extraction.html +85 -0
- data/share/views/public/plugins/tablesorter/docs/example-options-headers.html +118 -0
- data/share/views/public/plugins/tablesorter/docs/example-pager.html +329 -0
- data/share/views/public/plugins/tablesorter/docs/example-parsers.html +112 -0
- data/share/views/public/plugins/tablesorter/docs/example-trigger-sort.html +113 -0
- data/share/views/public/plugins/tablesorter/docs/example-triggers.html +336 -0
- data/share/views/public/plugins/tablesorter/docs/example-update-cell.html +118 -0
- data/share/views/public/plugins/tablesorter/docs/example-widgets.html +383 -0
- data/share/views/public/plugins/tablesorter/docs/img/external.png +0 -0
- data/share/views/public/plugins/tablesorter/docs/index.html +576 -0
- data/share/views/public/plugins/tablesorter/docs/js/docs.js +23 -0
- data/share/views/public/plugins/tablesorter/docs/js/examples.js +29 -0
- data/share/views/public/plugins/tablesorter/jquery-latest.js +154 -0
- data/share/views/public/plugins/tablesorter/jquery.metadata.js +122 -0
- data/share/views/public/plugins/tablesorter/jquery.tablesorter.js +1031 -0
- data/share/views/public/plugins/tablesorter/jquery.tablesorter.min.js +4 -0
- data/share/views/public/plugins/tablesorter/tests/assets/ajax-content.html +28 -0
- data/share/views/public/plugins/tablesorter/tests/cell.metadata.html +112 -0
- data/share/views/public/plugins/tablesorter/tests/checkbox.html +117 -0
- data/share/views/public/plugins/tablesorter/tests/colspan.html +149 -0
- data/share/views/public/plugins/tablesorter/tests/demo.html +353 -0
- data/share/views/public/plugins/tablesorter/tests/index.html +22 -0
- data/share/views/public/plugins/tablesorter/tests/large.html +30 -0
- data/share/views/public/plugins/tablesorter/tests/lockedOrder.html +355 -0
- data/share/views/public/plugins/tablesorter/tests/metadata.html +320 -0
- data/share/views/public/plugins/tablesorter/tests/multiple-headers.html +67 -0
- data/share/views/public/plugins/tablesorter/tests/pager.html +553 -0
- data/share/views/public/plugins/tablesorter/themes/blue/asc.gif +0 -0
- data/share/views/public/plugins/tablesorter/themes/blue/bg.gif +0 -0
- data/share/views/public/plugins/tablesorter/themes/blue/blue.zip +0 -0
- data/share/views/public/plugins/tablesorter/themes/blue/desc.gif +0 -0
- data/share/views/public/plugins/tablesorter/themes/blue/style.css +39 -0
- data/share/views/public/plugins/tablesorter/themes/green/asc.png +0 -0
- data/share/views/public/plugins/tablesorter/themes/green/bg.png +0 -0
- data/share/views/public/plugins/tablesorter/themes/green/desc.png +0 -0
- data/share/views/public/plugins/tablesorter/themes/green/green.zip +0 -0
- data/share/views/public/plugins/tablesorter/themes/green/style.css +39 -0
- data/share/views/public/plugins/wz_jsgraphics.js +1108 -0
- data/share/views/public/tmp/foo +0 -0
- data/share/views/result.haml +6 -1
- data/share/views/step_error.haml +5 -0
- data/share/views/user_lists.haml +8 -7
- data/share/views/wait.haml +40 -2
- metadata +302 -106
- data/share/views/compass/screen.sass +0 -8
- data/share/views/public/plugins/jquery/js/jquery-1.6.2.min.js +0 -18
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,234 @@
|
|
1
|
+
/*! fancyBox v2.0.6 fancyapps.com | fancyapps.com/fancybox/#license */
|
2
|
+
.fancybox-tmp iframe, .fancybox-tmp object {
|
3
|
+
vertical-align: top;
|
4
|
+
padding: 0;
|
5
|
+
margin: 0;
|
6
|
+
}
|
7
|
+
|
8
|
+
.fancybox-wrap {
|
9
|
+
position: absolute;
|
10
|
+
top: 0;
|
11
|
+
left: 0;
|
12
|
+
z-index: 8020;
|
13
|
+
}
|
14
|
+
|
15
|
+
.fancybox-skin {
|
16
|
+
position: relative;
|
17
|
+
padding: 0;
|
18
|
+
margin: 0;
|
19
|
+
background: #f9f9f9;
|
20
|
+
color: #444;
|
21
|
+
text-shadow: none;
|
22
|
+
-webkit-border-radius: 4px;
|
23
|
+
-moz-border-radius: 4px;
|
24
|
+
border-radius: 4px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.fancybox-opened {
|
28
|
+
z-index: 8030;
|
29
|
+
}
|
30
|
+
|
31
|
+
.fancybox-opened .fancybox-skin {
|
32
|
+
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
33
|
+
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
34
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
35
|
+
}
|
36
|
+
|
37
|
+
.fancybox-outer, .fancybox-inner {
|
38
|
+
padding: 0;
|
39
|
+
margin: 0;
|
40
|
+
position: relative;
|
41
|
+
outline: none;
|
42
|
+
}
|
43
|
+
|
44
|
+
.fancybox-inner {
|
45
|
+
overflow: hidden;
|
46
|
+
}
|
47
|
+
|
48
|
+
.fancybox-type-iframe .fancybox-inner {
|
49
|
+
-webkit-overflow-scrolling: touch;
|
50
|
+
}
|
51
|
+
|
52
|
+
.fancybox-error {
|
53
|
+
color: #444;
|
54
|
+
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
55
|
+
margin: 0;
|
56
|
+
padding: 10px;
|
57
|
+
}
|
58
|
+
|
59
|
+
.fancybox-image, .fancybox-iframe {
|
60
|
+
display: block;
|
61
|
+
width: 100%;
|
62
|
+
height: 100%;
|
63
|
+
border: 0;
|
64
|
+
padding: 0;
|
65
|
+
margin: 0;
|
66
|
+
vertical-align: top;
|
67
|
+
}
|
68
|
+
|
69
|
+
.fancybox-image {
|
70
|
+
max-width: 100%;
|
71
|
+
max-height: 100%;
|
72
|
+
}
|
73
|
+
|
74
|
+
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
75
|
+
background-image: url('fancybox_sprite.png');
|
76
|
+
}
|
77
|
+
|
78
|
+
#fancybox-loading {
|
79
|
+
position: fixed;
|
80
|
+
top: 50%;
|
81
|
+
left: 50%;
|
82
|
+
margin-top: -22px;
|
83
|
+
margin-left: -22px;
|
84
|
+
background-position: 0 -108px;
|
85
|
+
opacity: 0.8;
|
86
|
+
cursor: pointer;
|
87
|
+
z-index: 8020;
|
88
|
+
}
|
89
|
+
|
90
|
+
#fancybox-loading div {
|
91
|
+
width: 44px;
|
92
|
+
height: 44px;
|
93
|
+
background: url('fancybox_loading.gif') center center no-repeat;
|
94
|
+
}
|
95
|
+
|
96
|
+
.fancybox-close {
|
97
|
+
position: absolute;
|
98
|
+
top: -18px;
|
99
|
+
right: -18px;
|
100
|
+
width: 36px;
|
101
|
+
height: 36px;
|
102
|
+
cursor: pointer;
|
103
|
+
z-index: 8040;
|
104
|
+
}
|
105
|
+
|
106
|
+
.fancybox-nav {
|
107
|
+
position: absolute;
|
108
|
+
top: 0;
|
109
|
+
width: 40%;
|
110
|
+
height: 100%;
|
111
|
+
cursor: pointer;
|
112
|
+
background: transparent url('blank.gif'); /* helps IE */
|
113
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
114
|
+
z-index: 8040;
|
115
|
+
}
|
116
|
+
|
117
|
+
.fancybox-prev {
|
118
|
+
left: 0;
|
119
|
+
}
|
120
|
+
|
121
|
+
.fancybox-next {
|
122
|
+
right: 0;
|
123
|
+
}
|
124
|
+
|
125
|
+
.fancybox-nav span {
|
126
|
+
position: absolute;
|
127
|
+
top: 50%;
|
128
|
+
width: 36px;
|
129
|
+
height: 34px;
|
130
|
+
margin-top: -18px;
|
131
|
+
cursor: pointer;
|
132
|
+
z-index: 8040;
|
133
|
+
visibility: hidden;
|
134
|
+
}
|
135
|
+
|
136
|
+
.fancybox-prev span {
|
137
|
+
left: 20px;
|
138
|
+
background-position: 0 -36px;
|
139
|
+
}
|
140
|
+
|
141
|
+
.fancybox-next span {
|
142
|
+
right: 20px;
|
143
|
+
background-position: 0 -72px;
|
144
|
+
}
|
145
|
+
|
146
|
+
.fancybox-nav:hover span {
|
147
|
+
visibility: visible;
|
148
|
+
}
|
149
|
+
|
150
|
+
.fancybox-tmp {
|
151
|
+
position: absolute;
|
152
|
+
top: -9999px;
|
153
|
+
left: -9999px;
|
154
|
+
padding: 0;
|
155
|
+
overflow: visible;
|
156
|
+
visibility: hidden;
|
157
|
+
}
|
158
|
+
|
159
|
+
/* Overlay helper */
|
160
|
+
|
161
|
+
#fancybox-overlay {
|
162
|
+
position: absolute;
|
163
|
+
top: 0;
|
164
|
+
left: 0;
|
165
|
+
overflow: hidden;
|
166
|
+
display: none;
|
167
|
+
z-index: 8010;
|
168
|
+
background: #000;
|
169
|
+
}
|
170
|
+
|
171
|
+
#fancybox-overlay.overlay-fixed {
|
172
|
+
position: fixed;
|
173
|
+
bottom: 0;
|
174
|
+
right: 0;
|
175
|
+
}
|
176
|
+
|
177
|
+
/* Title helper */
|
178
|
+
|
179
|
+
.fancybox-title {
|
180
|
+
visibility: hidden;
|
181
|
+
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
182
|
+
position: relative;
|
183
|
+
text-shadow: none;
|
184
|
+
z-index: 8050;
|
185
|
+
}
|
186
|
+
|
187
|
+
.fancybox-opened .fancybox-title {
|
188
|
+
visibility: visible;
|
189
|
+
}
|
190
|
+
|
191
|
+
.fancybox-title-float-wrap {
|
192
|
+
position: absolute;
|
193
|
+
bottom: 0;
|
194
|
+
right: 50%;
|
195
|
+
margin-bottom: -35px;
|
196
|
+
z-index: 8030;
|
197
|
+
text-align: center;
|
198
|
+
}
|
199
|
+
|
200
|
+
.fancybox-title-float-wrap .child {
|
201
|
+
display: inline-block;
|
202
|
+
margin-right: -100%;
|
203
|
+
padding: 2px 20px;
|
204
|
+
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
205
|
+
background: rgba(0, 0, 0, 0.8);
|
206
|
+
-webkit-border-radius: 15px;
|
207
|
+
-moz-border-radius: 15px;
|
208
|
+
border-radius: 15px;
|
209
|
+
text-shadow: 0 1px 2px #222;
|
210
|
+
color: #FFF;
|
211
|
+
font-weight: bold;
|
212
|
+
line-height: 24px;
|
213
|
+
white-space: nowrap;
|
214
|
+
}
|
215
|
+
|
216
|
+
.fancybox-title-outside-wrap {
|
217
|
+
position: relative;
|
218
|
+
margin-top: 10px;
|
219
|
+
color: #fff;
|
220
|
+
}
|
221
|
+
|
222
|
+
.fancybox-title-inside-wrap {
|
223
|
+
margin-top: 10px;
|
224
|
+
}
|
225
|
+
|
226
|
+
.fancybox-title-over-wrap {
|
227
|
+
position: absolute;
|
228
|
+
bottom: 0;
|
229
|
+
left: 0;
|
230
|
+
color: #fff;
|
231
|
+
padding: 10px;
|
232
|
+
background: #000;
|
233
|
+
background: rgba(0, 0, 0, .8);
|
234
|
+
}
|
Binary file
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#fancybox-buttons {
|
2
|
+
position: fixed;
|
3
|
+
left: 0;
|
4
|
+
width: 100%;
|
5
|
+
z-index: 8050;
|
6
|
+
}
|
7
|
+
|
8
|
+
#fancybox-buttons.top {
|
9
|
+
top: 10px;
|
10
|
+
}
|
11
|
+
|
12
|
+
#fancybox-buttons.bottom {
|
13
|
+
bottom: 10px;
|
14
|
+
}
|
15
|
+
|
16
|
+
#fancybox-buttons ul {
|
17
|
+
display: block;
|
18
|
+
width: 170px;
|
19
|
+
height: 30px;
|
20
|
+
margin: 0 auto;
|
21
|
+
padding: 0;
|
22
|
+
list-style: none;
|
23
|
+
background: #111;
|
24
|
+
-webkit-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
|
25
|
+
-moz-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
|
26
|
+
background: #111 -webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.15)),color-stop(.5,rgba(255,255,255,.1)),to(rgba(255,255,255,.15)));
|
27
|
+
background: #111 -moz-linear-gradient(top,rgba(255,255,255,.2) 0%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.15) 100%);
|
28
|
+
border-radius: 3px;
|
29
|
+
}
|
30
|
+
|
31
|
+
#fancybox-buttons ul li {
|
32
|
+
float: left;
|
33
|
+
margin: 0;
|
34
|
+
padding: 0;
|
35
|
+
}
|
36
|
+
|
37
|
+
#fancybox-buttons a {
|
38
|
+
display: block;
|
39
|
+
width: 30px;
|
40
|
+
height: 30px;
|
41
|
+
text-indent: -9999px;
|
42
|
+
background-image: url('fancybox_buttons.png');
|
43
|
+
background-repeat: no-repeat;
|
44
|
+
outline: none;
|
45
|
+
}
|
46
|
+
|
47
|
+
#fancybox-buttons a.btnPrev {
|
48
|
+
width: 32px;
|
49
|
+
background-position: 6px 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
#fancybox-buttons a.btnNext {
|
53
|
+
background-position: -33px 0;
|
54
|
+
border-right: 1px solid #3e3e3e;
|
55
|
+
}
|
56
|
+
|
57
|
+
#fancybox-buttons a.btnPlay {
|
58
|
+
background-position: 0 -30px;
|
59
|
+
}
|
60
|
+
|
61
|
+
#fancybox-buttons a.btnPlayOn {
|
62
|
+
background-position: -30px -30px;
|
63
|
+
}
|
64
|
+
|
65
|
+
#fancybox-buttons a.btnToggle {
|
66
|
+
background-position: 3px -60px;
|
67
|
+
border-left: 1px solid #111;
|
68
|
+
border-right: 1px solid #3e3e3e;
|
69
|
+
width: 35px
|
70
|
+
}
|
71
|
+
|
72
|
+
#fancybox-buttons a.btnToggleOn {
|
73
|
+
background-position: -27px -60px;
|
74
|
+
}
|
75
|
+
|
76
|
+
#fancybox-buttons a.btnClose {
|
77
|
+
border-left: 1px solid #111;
|
78
|
+
width: 38px;
|
79
|
+
background-position: -57px 0px;
|
80
|
+
}
|
81
|
+
|
82
|
+
#fancybox-buttons a.btnDisabled {
|
83
|
+
opacity : 0.5;
|
84
|
+
cursor: default;
|
85
|
+
}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
/*!
|
2
|
+
* Buttons helper for fancyBox
|
3
|
+
* version: 1.0.2
|
4
|
+
* @requires fancyBox v2.0 or later
|
5
|
+
*
|
6
|
+
* Usage:
|
7
|
+
* $(".fancybox").fancybox({
|
8
|
+
* buttons: {
|
9
|
+
* position : 'top'
|
10
|
+
* }
|
11
|
+
* });
|
12
|
+
*
|
13
|
+
* Options:
|
14
|
+
* tpl - HTML template
|
15
|
+
* position - 'top' or 'bottom'
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
(function ($) {
|
19
|
+
//Shortcut for fancyBox object
|
20
|
+
var F = $.fancybox;
|
21
|
+
|
22
|
+
//Add helper object
|
23
|
+
F.helpers.buttons = {
|
24
|
+
tpl: '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>',
|
25
|
+
list: null,
|
26
|
+
buttons: {},
|
27
|
+
|
28
|
+
update: function () {
|
29
|
+
var toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
|
30
|
+
|
31
|
+
//Size toggle button
|
32
|
+
if (F.current.canShrink) {
|
33
|
+
toggle.addClass('btnToggleOn');
|
34
|
+
|
35
|
+
} else if (!F.current.canExpand) {
|
36
|
+
toggle.addClass('btnDisabled');
|
37
|
+
}
|
38
|
+
},
|
39
|
+
|
40
|
+
beforeLoad: function (opts) {
|
41
|
+
//Remove self if gallery do not have at least two items
|
42
|
+
if (F.group.length < 2) {
|
43
|
+
F.coming.helpers.buttons = false;
|
44
|
+
F.coming.closeBtn = true;
|
45
|
+
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
|
49
|
+
//Increase top margin to give space for buttons
|
50
|
+
F.coming.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
|
51
|
+
},
|
52
|
+
|
53
|
+
onPlayStart: function () {
|
54
|
+
if (this.list) {
|
55
|
+
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
|
56
|
+
}
|
57
|
+
},
|
58
|
+
|
59
|
+
onPlayEnd: function () {
|
60
|
+
if (this.list) {
|
61
|
+
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
|
62
|
+
}
|
63
|
+
},
|
64
|
+
|
65
|
+
afterShow: function (opts) {
|
66
|
+
var buttons;
|
67
|
+
|
68
|
+
if (!this.list) {
|
69
|
+
this.list = $(opts.tpl || this.tpl).addClass(opts.position || 'top').appendTo('body');
|
70
|
+
|
71
|
+
this.buttons = {
|
72
|
+
prev : this.list.find('.btnPrev').click( F.prev ),
|
73
|
+
next : this.list.find('.btnNext').click( F.next ),
|
74
|
+
play : this.list.find('.btnPlay').click( F.play ),
|
75
|
+
toggle : this.list.find('.btnToggle').click( F.toggle )
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
buttons = this.buttons;
|
80
|
+
|
81
|
+
//Prev
|
82
|
+
if (F.current.index > 0 || F.current.loop) {
|
83
|
+
buttons.prev.removeClass('btnDisabled');
|
84
|
+
} else {
|
85
|
+
buttons.prev.addClass('btnDisabled');
|
86
|
+
}
|
87
|
+
|
88
|
+
//Next / Play
|
89
|
+
if (F.current.loop || F.current.index < F.group.length - 1) {
|
90
|
+
buttons.next.removeClass('btnDisabled');
|
91
|
+
buttons.play.removeClass('btnDisabled');
|
92
|
+
|
93
|
+
} else {
|
94
|
+
buttons.next.addClass('btnDisabled');
|
95
|
+
buttons.play.addClass('btnDisabled');
|
96
|
+
}
|
97
|
+
|
98
|
+
this.update();
|
99
|
+
},
|
100
|
+
|
101
|
+
onUpdate: function () {
|
102
|
+
this.update();
|
103
|
+
},
|
104
|
+
|
105
|
+
beforeClose: function () {
|
106
|
+
if (this.list) {
|
107
|
+
this.list.remove();
|
108
|
+
}
|
109
|
+
|
110
|
+
this.list = null;
|
111
|
+
this.buttons = {};
|
112
|
+
}
|
113
|
+
};
|
114
|
+
|
115
|
+
}(jQuery));
|
@@ -0,0 +1,85 @@
|
|
1
|
+
/*!
|
2
|
+
* Media helper for fancyBox
|
3
|
+
* version: 1.0.0
|
4
|
+
* @requires fancyBox v2.0 or later
|
5
|
+
*
|
6
|
+
* Usage:
|
7
|
+
* $(".fancybox").fancybox({
|
8
|
+
* media: {}
|
9
|
+
* });
|
10
|
+
*
|
11
|
+
* Supports:
|
12
|
+
* Youtube
|
13
|
+
* http://www.youtube.com/watch?v=opj24KnzrWo
|
14
|
+
* http://youtu.be/opj24KnzrWo
|
15
|
+
* Vimeo
|
16
|
+
* http://vimeo.com/25634903
|
17
|
+
* Metacafe
|
18
|
+
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
|
19
|
+
* http://www.metacafe.com/watch/7635964/
|
20
|
+
* Dailymotion
|
21
|
+
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
|
22
|
+
* Twitvid
|
23
|
+
* http://twitvid.com/QY7MD
|
24
|
+
* Twitpic
|
25
|
+
* http://twitpic.com/7p93st
|
26
|
+
* Instagram
|
27
|
+
* http://instagr.am/p/IejkuUGxQn/
|
28
|
+
* http://instagram.com/p/IejkuUGxQn/
|
29
|
+
* Google maps
|
30
|
+
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
|
31
|
+
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
|
32
|
+
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
|
33
|
+
*/
|
34
|
+
(function ($) {
|
35
|
+
//Shortcut for fancyBox object
|
36
|
+
var F = $.fancybox;
|
37
|
+
|
38
|
+
//Add helper object
|
39
|
+
F.helpers.media = {
|
40
|
+
beforeLoad : function(opts, obj) {
|
41
|
+
var href = obj.href || '',
|
42
|
+
type = false,
|
43
|
+
rez;
|
44
|
+
|
45
|
+
if ((rez = href.match(/(youtube\.com|youtu\.be)\/(v\/|u\/|embed\/|watch\?v=)?([^#\&\?]*).*/i))) {
|
46
|
+
href = '//www.youtube.com/embed/' + rez[3] + '?autoplay=1&autohide=1&fs=1&rel=0&enablejsapi=1';
|
47
|
+
type = 'iframe';
|
48
|
+
|
49
|
+
} else if ((rez = href.match(/vimeo.com\/(\d+)\/?(.*)/))) {
|
50
|
+
href = '//player.vimeo.com/video/' + rez[1] + '?hd=1&autoplay=1&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1';
|
51
|
+
type = 'iframe';
|
52
|
+
|
53
|
+
} else if ((rez = href.match(/metacafe.com\/watch\/(\d+)\/?(.*)/))) {
|
54
|
+
href = '//www.metacafe.com/fplayer/' + rez[1] + '/.swf?playerVars=autoPlay=yes';
|
55
|
+
type = 'swf';
|
56
|
+
|
57
|
+
} else if ((rez = href.match(/dailymotion.com\/video\/(.*)\/?(.*)/))) {
|
58
|
+
href = '//www.dailymotion.com/swf/video/' + rez[1] + '?additionalInfos=0&autoStart=1';
|
59
|
+
type = 'swf';
|
60
|
+
|
61
|
+
} else if ((rez = href.match(/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i))) {
|
62
|
+
href = '//www.twitvid.com/embed.php?autoplay=0&guid=' + rez[1];
|
63
|
+
type = 'iframe';
|
64
|
+
|
65
|
+
} else if ((rez = href.match(/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i))) {
|
66
|
+
href = '//twitpic.com/show/full/' + rez[1];
|
67
|
+
type = 'image';
|
68
|
+
|
69
|
+
} else if ((rez = href.match(/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i))) {
|
70
|
+
href = '//' + rez[1] + '/p/' + rez[2] + '/media/?size=l';
|
71
|
+
type = 'image';
|
72
|
+
|
73
|
+
} else if ((rez = href.match(/maps\.google\.com\/(\?ll=|maps\/?\?q=)(.*)/i))) {
|
74
|
+
href = '//maps.google.com/' + rez[1] + '' + rez[2] + '&output=' + (rez[2].indexOf('layer=c') ? 'svembed' : 'embed');
|
75
|
+
type = 'iframe';
|
76
|
+
}
|
77
|
+
|
78
|
+
if (type) {
|
79
|
+
obj.href = href;
|
80
|
+
obj.type = type;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
}(jQuery));
|