promethee 1.6.33 → 1.6.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/promethee.js +2 -0
  3. data/app/assets/javascripts/promethee/fancybox.js +3 -0
  4. data/app/assets/stylesheets/promethee.sass +2 -0
  5. data/app/views/promethee/components/collection_item/_show.html.erb +3 -2
  6. data/app/views/promethee/components/image/_show.html.erb +1 -1
  7. data/app/views/promethee/components/slider/_localize.html.erb +0 -16
  8. data/app/views/promethee/components/slider_item/_show.html.erb +3 -2
  9. data/app/views/promethee/show/_image.srcset.html.erb +13 -10
  10. data/lib/promethee/rails/version.rb +1 -1
  11. data/node_modules/fancybox/CHANGELOG.md +125 -0
  12. data/node_modules/fancybox/README.md +249 -0
  13. data/node_modules/fancybox/bower.json +24 -0
  14. data/node_modules/fancybox/demo/1_b.jpg +0 -0
  15. data/node_modules/fancybox/demo/1_s.jpg +0 -0
  16. data/node_modules/fancybox/demo/2_b.jpg +0 -0
  17. data/node_modules/fancybox/demo/2_s.jpg +0 -0
  18. data/node_modules/fancybox/demo/3_b.jpg +0 -0
  19. data/node_modules/fancybox/demo/3_s.jpg +0 -0
  20. data/node_modules/fancybox/demo/4_b.jpg +0 -0
  21. data/node_modules/fancybox/demo/4_s.jpg +0 -0
  22. data/node_modules/fancybox/demo/5_b.jpg +0 -0
  23. data/node_modules/fancybox/demo/5_s.jpg +0 -0
  24. data/node_modules/fancybox/demo/ajax.txt +15 -0
  25. data/node_modules/fancybox/demo/iframe.html +26 -0
  26. data/node_modules/fancybox/demo/index.html +312 -0
  27. data/node_modules/fancybox/dist/css/jquery.fancybox.css +222 -0
  28. data/node_modules/fancybox/dist/helpers/css/jquery.fancybox-buttons.css +82 -0
  29. data/node_modules/fancybox/dist/helpers/css/jquery.fancybox-thumbs.css +46 -0
  30. data/node_modules/fancybox/dist/helpers/img/fancybox_buttons.png +0 -0
  31. data/node_modules/fancybox/dist/helpers/js/jquery.fancybox-buttons.cjs.js +121 -0
  32. data/node_modules/fancybox/dist/helpers/js/jquery.fancybox-buttons.js +122 -0
  33. data/node_modules/fancybox/dist/helpers/js/jquery.fancybox-media.cjs.js +199 -0
  34. data/node_modules/fancybox/dist/helpers/js/jquery.fancybox-media.js +199 -0
  35. data/node_modules/fancybox/dist/helpers/js/jquery.fancybox-thumbs.cjs.js +164 -0
  36. data/node_modules/fancybox/dist/helpers/js/jquery.fancybox-thumbs.js +165 -0
  37. data/node_modules/fancybox/dist/helpers/scss/jquery.fancybox-buttons.scss +100 -0
  38. data/node_modules/fancybox/dist/helpers/scss/jquery.fancybox-thumbs.scss +55 -0
  39. data/node_modules/fancybox/dist/img/blank.gif +0 -0
  40. data/node_modules/fancybox/dist/img/fancybox_loading.gif +0 -0
  41. data/node_modules/fancybox/dist/img/fancybox_loading@2x.gif +0 -0
  42. data/node_modules/fancybox/dist/img/fancybox_overlay.png +0 -0
  43. data/node_modules/fancybox/dist/img/fancybox_sprite.png +0 -0
  44. data/node_modules/fancybox/dist/img/fancybox_sprite@2x.png +0 -0
  45. data/node_modules/fancybox/dist/js/jquery.fancybox.cjs.js +2027 -0
  46. data/node_modules/fancybox/dist/js/jquery.fancybox.js +2018 -0
  47. data/node_modules/fancybox/dist/js/jquery.fancybox.pack.js +46 -0
  48. data/node_modules/fancybox/dist/scss/jquery.fancybox.scss +276 -0
  49. data/node_modules/fancybox/fancybox.jquery.json +31 -0
  50. data/node_modules/fancybox/lib/jquery-1.10.2.min.js +6 -0
  51. data/node_modules/fancybox/lib/jquery.mousewheel.pack.js +14 -0
  52. data/node_modules/fancybox/package.json +61 -0
  53. data/node_modules/fancybox/sprite.psd +0 -0
  54. data/node_modules/fancybox/test.js +10 -0
  55. metadata +47 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4477d1e9b6847139e7f97b6ade12f935e68766db
4
- data.tar.gz: 5ba091543c580e90381b24fc376ee1307fd7bf41
3
+ metadata.gz: 6677b79bdc6728f864d8158b4f8e2401c941ae86
4
+ data.tar.gz: 633189433f5978110c405563d8bbb89ff0d45f2d
5
5
  SHA512:
6
- metadata.gz: 0aa8b6faa11bca1a6be4590ff154adb9bfc8da42f39b138a9210c7f902be2a7dcbf845ab12cf234e7e5d77fe05532e8ce97f87465a20c0c05ad8a5d3b44ed6a6
7
- data.tar.gz: 173a9f3eb00a0b30aaa0800541acde24b3ded27efb3a1eed757ad2a4d5629d438c6ccf96f1ea28ca3bdaf5efdb6dc657f95e81a31fe6c6ee8d2d23bd01d14dd3
6
+ metadata.gz: c5161cc7bc9c045e23e71bc0221c7e734386e87e469cf5cd753e338f8820a7abcf0ddc69489703249542aa0ce400a3f7f897a5237595b25ccb7b1bbc019e177d
7
+ data.tar.gz: dad1d243cda3b3ea5a208dad974d6e6aefda731d6aa54549d53fb7b2ba6a89b804b2ae67da93974224c812afd3ef7bef0807a3ad2dff1366d21aeae01838481b
@@ -2,3 +2,5 @@
2
2
  //= require angular-ui-sortable/dist/sortable
3
3
  //= require ng-file-upload/dist/ng-file-upload
4
4
  //= require angular-bootstrap-colorpicker/js/bootstrap-colorpicker-module
5
+ //= require fancybox/dist/js/jquery.fancybox
6
+ //= require promethee/fancybox
@@ -0,0 +1,3 @@
1
+ $(document).ready(function() {
2
+ $("a.fancybox").fancybox();
3
+ });
@@ -1,3 +1,5 @@
1
+ @import fancybox/dist/css/jquery.fancybox
2
+
1
3
  .promethee
2
4
  &__component
3
5
  &__cover
@@ -1,4 +1,5 @@
1
1
  <%
2
+ searchable_caption = component[:attributes][:searchable_caption]
2
3
  media_type = component[:attributes][:media_type]
3
4
  case media_type
4
5
  when 'image'
@@ -26,7 +27,7 @@ end
26
27
  <iframe frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" src="<%= iframe_src %>"></iframe>
27
28
  </div>
28
29
  <% elsif image_blob.present? %>
29
- <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '' %>
30
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: searchable_caption %>
30
31
  <% end %>
31
- <%= component[:attributes][:searchable_caption].to_s.html_safe %>
32
+ <%= searchable_caption.to_s.html_safe %>
32
33
  </div>
@@ -8,7 +8,7 @@ searchable_alt = component[:attributes][:searchable_alt].to_s
8
8
  searchable_caption = component[:attributes][:searchable_caption].to_s
9
9
  %>
10
10
  <figure class="<%= promethee_class_for component %>">
11
- <%= render 'promethee/show/image.srcset', blob: blob, alt: searchable_alt if blob %>
11
+ <%= render 'promethee/show/image.srcset', blob: blob, alt: searchable_alt, caption: searchable_caption if blob %>
12
12
  <% unless searchable_caption.blank? %>
13
13
  <figcaption>
14
14
  <%= searchable_caption %>
@@ -1,18 +1,2 @@
1
1
  <script type="text/ng-template" id="promethee/components/slider/localize">
2
- <div ng-show="(component.master.attributes.contents | json) !== '{}'">
3
- <hr>
4
-
5
- <div ng-repeat="(key, content) in component.master.attributes.contents">
6
- <div class="row">
7
- <div class="col-md-6">
8
- <b>Item {{$index + 1}} Text</b>
9
- <div class="promethee-edit__wrapper" ng-bind-html="component.master.attributes.contents[key] | htmlSafe"></div>
10
- </div>
11
- <div class="col-md-6">
12
- <label class="label-control">Item {{$index + 1}} Text</label>
13
- <summernote config="summernoteConfig" ng-model="component.attributes.contents[key]"></summernote>
14
- </div>
15
- </div>
16
- </div>
17
- </div>
18
2
  </script>
@@ -1,5 +1,6 @@
1
1
  <%
2
2
  media_type = component[:attributes][:media_type]
3
+ searchable_caption = component[:attributes][:searchable_caption]
3
4
  case media_type
4
5
  when 'image'
5
6
  image_data = component[:attributes][:image]
@@ -26,7 +27,7 @@ end
26
27
  <iframe frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" src="<%= iframe_src %>"></iframe>
27
28
  </div>
28
29
  <% elsif image_blob.present? %>
29
- <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '' %>
30
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: searchable_caption %>
30
31
  <% end %>
31
- <%= component[:attributes][:searchable_caption].to_s.html_safe %>
32
+ <%= searchable_caption.to_s.html_safe %>
32
33
  </div>
@@ -1,10 +1,13 @@
1
- <img src="<%= url_for(blob.variant(resize: '1920')) %>"
2
- srcset="
3
- <% [1920, 1600, 1440, 1366, 1280, 1024, 800, 768, 640, 360, 200].each do |size| %>
4
- <%= url_for(blob.variant(resize: size, quality: 95)) %> <%= size%>w,
5
- <% end %>
6
- "
7
- sizes="100vw"
8
- alt="<%= alt.html_safe %>"
9
- class="img-responsive"
10
- >
1
+ <% fullsize_url = url_for(blob.variant(resize: '1920')) %>
2
+ <a class="fancybox" title="<%= strip_tags(caption) %>" href="<%= fullsize_url %>">
3
+ <img src="<%= fullsize_url %>"
4
+ srcset="
5
+ <% [1920, 1600, 1440, 1366, 1280, 1024, 800, 768, 640, 360, 200].each do |size| %>
6
+ <%= url_for(blob.variant(resize: size, quality: 95)) %> <%= size%>w,
7
+ <% end %>
8
+ "
9
+ sizes="100vw"
10
+ alt="<%= alt.html_safe %>"
11
+ class="img-responsive"
12
+ >
13
+ </a>
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.6.33'
3
+ VERSION = '1.6.34'
4
4
  end
5
5
  end
@@ -0,0 +1,125 @@
1
+ fancyBox - Changelog
2
+ =========
3
+
4
+ ### Version 2.1.5 - June 14, 2013
5
+ * Fixed #493 - Broken slideshow
6
+ * Fixed #556 - Parent option
7
+ * Retina graphics (#564) and retina display support (#420)
8
+ * Improved "lock" feature
9
+
10
+ ### Version 2.1.4 - January 10, 2013
11
+ * Update to be compatible with jQuery v1.9
12
+ * Small changes that should fix usability issues for certain users
13
+
14
+ ### Version 2.1.3 - October 23, 2012
15
+
16
+ * Fixed #426 - Broken IE7
17
+ * Fixed #423 - Background flickering on iOS
18
+ * Fixed #418 - Automatically Grow/Shrink and Center
19
+ * Updated the script to work with jQuery 1.6
20
+ * Media helper supports YouTube video series
21
+
22
+ ### Version 2.1.2 - October 15, 2012
23
+
24
+ * Fixed #414 - Don't allow nextClick if there is only one item
25
+ * Fixed #397 - Button helper 'Menu' not visible in IE7
26
+ * Overlay can be opened/closed manually:
27
+ * $.fancybox.helpers.overlay.open();
28
+ * $.fancybox.helpers.overlay.open({closeClick : false});
29
+ * $.fancybox.helpers.overlay.close();
30
+ * Optimized for Internet Explorer 10 (Windows 8)
31
+
32
+ ### Version 2.1.1 - October 01, 2012
33
+
34
+ * Fixed #357 - Converting values like 'auto' in getScalar()
35
+ * Fixed #358 - Updated overlay background image
36
+ * New "fancybox-href" and "fancybox-title" HTML5 data-attributes (#317)
37
+ * Improved helpers:
38
+ * - now they can have a property 'defaults' that contains default settings
39
+ * - updated vimeo and youtube parsers for media helper
40
+ * Content locking now can be turned off
41
+
42
+ ### Version 2.1.0 - August 20, 2012
43
+
44
+ * Fixed #103 - DOM element re-injection after closing
45
+ * Fixed #188 - navigation keys inside editable content
46
+ * New animation directions (see https://github.com/fancyapps/fancyBox/issues/233#issuecomment-5512453)
47
+ * New option "iframe" - it is now possible to separate scrolling for iframe and wrapping element; choose to preload
48
+ * New option "swf" - brings back functionality from fancyBox v1
49
+ * Improved media helper - better support for vimeo and youtube; links are now configurable
50
+ * Rewritten overlay helper:
51
+ * - new option "showEarly" - toggles if should be open before of after content is loaded
52
+ * - Facebook-style (https://github.com/fancyapps/fancyBox/issues/24) and therefore uses image for background
53
+ * Option "padding" accepts array (e.g., padding: [15, 50, 10, 5])
54
+ * One of dimensions (width or height) can now be set to "auto" (option "autoSize" needs to be "false")
55
+ * Updated callbacks:
56
+ * - "beforeClose" is now called only once
57
+ * - "afterLoad" receives current and previous object as arguments
58
+ * Method "$.fancybox.update();" recalculates content width/height
59
+ * Updated to work with jQuery v1.8
60
+
61
+ ### Version 2.0.6 - April 16, 2012
62
+
63
+ * Fixed #188 - keystrokes in contenteditable
64
+ * Fixed #171 - non-images should not be preloaded
65
+ * Fixed #158 - 'closeClick: true' breaks gallery navigation
66
+ * New "media" helper - detects and displays various media types
67
+ * New option "groupAttr" - name of group selector attribute, default is "data-fancybox-group"
68
+ * New feature - selector expressions in URLs, see #170
69
+ * Improved 'overlay' helper to use "position: fixed"
70
+ * Improved autoSize, fixed wrong height in some cases
71
+ * Improved centering and iframe scrolling for iOS
72
+ * Updated markup, new element '.fancybox-skin' is now used for styling
73
+
74
+ ### Version 2.0.5 - February 21, 2012
75
+
76
+ * Fixed #155 - easing for prev/next animations
77
+ * Fixed #153 - overriding "keys" options
78
+ * Fixed #147 - IE7 problem with #hash links
79
+ * Fixed #130 - changing dynamically data-fancybox-group
80
+ * Fixed #126 - obey minWidth/minHeight
81
+ * Fixed #118 - placement of loading icon and navigation arrows
82
+ * Fixed #101 - "index" option not working
83
+ * Fixed #94 - "orig" option not working
84
+ * Fixed #80 - does not work on IE6
85
+ * Fixed #72 - can't set overlay opacity to 0
86
+ * Fixed #63 - properly set gallery index
87
+ * New option "autoCenter" - toggles centering on window resize or scroll, disabled for mobile devices by default
88
+ * New option "autoResize" - toggles responsivity, disabled for mobile devices by default
89
+ * New option "preload" - number of images to preload
90
+ * New feature to target mobile/desktop browsers using CSS, see #108
91
+ * Changed ajax option defaults to "{ dataType: 'html', headers: { 'X-fancyBox': true } }", see #150 and #128
92
+ * Updated loading icon for IE7, IE8
93
+ * Calculates height of the iframe if 'autoSize' is set to 'true' and the iframe is on the same domain as the main page
94
+
95
+ ### Version 2.0.4 - December 12, 2011
96
+
97
+ * Fixed #47 - fix overriding properties
98
+ * New option "position" to thumbnail and button helpers
99
+
100
+
101
+ ### Version 2.0.3 - November 29, 2011
102
+
103
+ * Fixed #29 - broken elastic transitions
104
+
105
+
106
+ ### Version 2.0.2 - November 28, 2011
107
+
108
+ * Fixed slideshow
109
+ * Fixed scrollbars issue when displayed a very tall image
110
+ * New option "nextClick" - navigate to next gallery item when user clicks the content
111
+ * New option "modal" - to disable navigation and closing
112
+ * Add 'metadata' plugin support
113
+ * Add ability to create groups using 'data-fancybox-group' attribute
114
+ * Updated manual usage to match earlier releases
115
+
116
+
117
+ ### Version 2.0.1 - November 23, 2011
118
+
119
+ * Fixed keyboard events inside form elements
120
+ * Fixed manual usage
121
+
122
+
123
+ ### Version 2.0.0 - November 21, 2011
124
+
125
+ First release - completely rewritten, many new features and updated graphics.
@@ -0,0 +1,249 @@
1
+ fancyBox (deprecated)
2
+ ========
3
+
4
+ **WARNING: This fork is deprecated. Please head over to https://www.npmjs.com/package/@fancyapps/fancybox for the official version**
5
+
6
+ fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.
7
+
8
+ More information and examples: http://www.fancyapps.com/fancybox/
9
+
10
+ License: http://www.fancyapps.com/fancybox/#license
11
+
12
+ Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com
13
+
14
+ ##Npm specific
15
+ \*\* NOTE: I didn't realize npm's limitations on versioning. They only allow three numbers. At first I was aiming to keep the versioning equal to fancybox's, but this is no longer possible without deleting the repo and starting over. You can find the fancybox version this repo uses in either package.json's "original-version" property, or in a browser console by running: $.fancybox.version.
16
+
17
+ Install
18
+ ```
19
+ npm install fancybox --save-dev
20
+ ```
21
+
22
+ Example usage
23
+ ```
24
+ // home.html
25
+ <div class="fancybox-me"><h2>Ain't this a fancy box?</h2></div>
26
+
27
+ // main.js (1)
28
+ var $ = require('jquery');
29
+ require('fancybox')($); <------- (2)
30
+
31
+ $(document).ready(function() {
32
+ $.fancybox.open($('.fancybox-me'));
33
+ });
34
+ ```
35
+ (1) Make sure your html file is referencing the browserified version of your javascript.
36
+ (2) This is where fancybox attaches itself to the jquery object.
37
+
38
+ Please visit [the official site](http://fancyapps.com/fancybox/) for more info. Their official github repository [can also be found here](https://github.com/fancyapps/fancyBox).
39
+
40
+ ###New structure of asset files (css/img/scss)
41
+ When turning this into an npm module I decided to standardize the structure a bit. Before fancybox relied on all asset files residing in the same directory. Now if you were to reference the css directly, it expects the images to be relatively located at the '../img' directory. For those unfamiliar, this structure makes more sense because css files _should_ be all concatenated and minified while images won't be. This means typically you'll want your css in a separate folder. However, if this doesn't work with your existing structure then you'll have to change the paths manually. If you opt to reference the scss instead of the css file, then you have the option of modifying the sass variable '$fancybox-image-url' to match your image folder path. By default this path will be set to '../img'. (Note the lack of a trailing slash)
42
+
43
+ #Note: Below is the previous documentation as seen on their official github repository
44
+
45
+ How to use
46
+ ----------
47
+
48
+ To get started, download the plugin, unzip it and copy files to your website/application directory.
49
+ Load files in the <head> section of your HTML document. Make sure you also add the jQuery library.
50
+
51
+ <head>
52
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
53
+ <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css" media="screen" />
54
+ <script type="text/javascript" src="/fancybox/jquery.fancybox.pack.js"></script>
55
+ </head>
56
+
57
+ Create your links with a `title` if you want a title to be shown, and add a class:
58
+
59
+ <a href="large_image.jpg" class="fancybox" title="Sample title"><img src="small_image.jpg" /></a>
60
+
61
+ If you have a set of related items that you would like to group,
62
+ additionally include a group name in the `rel` (or `data-fancybox-group`) attribute:
63
+
64
+ <a href="large_1.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_1.jpg" /></a>
65
+ <a href="large_2.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_2.jpg" /></a>
66
+
67
+ Initialise the script like this:
68
+
69
+ <script>
70
+ $(document).ready(function() {
71
+ $('.fancybox').fancybox();
72
+ });
73
+ </script>
74
+
75
+ May also be passed an optional options object which will extend the default values. Example:
76
+
77
+ <script>
78
+ $(document).ready(function() {
79
+ $('.fancybox').fancybox({
80
+ padding : 0,
81
+ openEffect : 'elastic'
82
+ });
83
+ });
84
+ </script>
85
+
86
+ Tip: Automatically group and apply fancyBox to all images:
87
+
88
+ $("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox();
89
+
90
+ Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display.
91
+ You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute:
92
+
93
+ //Ajax:
94
+ <a href="/example.html" class="fancybox fancybox.ajax">Example</a>
95
+ //or
96
+ <a href="/example.html" class="fancybox" data-fancybox-type="ajax">Example</a>
97
+
98
+ //Iframe:
99
+ <a href="example.html" class="fancybox fancybox.iframe">Example</a>
100
+
101
+ //Inline (will display an element with `id="example"`)
102
+ <a href="#example" class="fancybox">Example</a>
103
+
104
+ //SWF:
105
+ <a href="example.swf" class="fancybox">Example</a>
106
+
107
+ //Image:
108
+ <a href="example.jpg" class="fancybox">Example</a>
109
+
110
+ Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy).
111
+ If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed.
112
+ (this is different from previsous versions where 'ajax' was used as default type or an error message was displayed).
113
+
114
+ Advanced
115
+ --------
116
+
117
+ ### Helpers
118
+
119
+ Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'.
120
+ You can disable them, set custom options or enable other helpers. Examples:
121
+
122
+ //Disable title helper
123
+ $(".fancybox").fancybox({
124
+ helpers: {
125
+ title: null
126
+ }
127
+ });
128
+
129
+ //Disable overlay helper
130
+ $(".fancybox").fancybox({
131
+ helpers: {
132
+ overlay : null
133
+ }
134
+ });
135
+
136
+ //Change title position and overlay color
137
+ $(".fancybox").fancybox({
138
+ helpers: {
139
+ title : {
140
+ type : 'inside'
141
+ },
142
+ overlay : {
143
+ css : {
144
+ 'background' : 'rgba(255,255,255,0.5)'
145
+ }
146
+ }
147
+ }
148
+ });
149
+
150
+ //Enable thumbnail helper and set custom options
151
+ $(".fancybox").fancybox({
152
+ helpers: {
153
+ thumbs : {
154
+ width: 50,
155
+ height: 50
156
+ }
157
+ }
158
+ });
159
+
160
+
161
+ ### API
162
+
163
+ Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title:
164
+
165
+ $(".fancybox").fancybox({
166
+ beforeLoad : function() {
167
+ this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
168
+
169
+ /*
170
+ "this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title:
171
+ this.title = $(this.element).find('img').attr('alt');
172
+ */
173
+ }
174
+ });
175
+
176
+ It`s possible to open fancyBox programmatically in various ways:
177
+
178
+ //HTML content:
179
+ $.fancybox( '<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
180
+ title : 'Custom Title'
181
+ });
182
+
183
+ //DOM element:
184
+ $.fancybox( $("#inline"), {
185
+ title : 'Custom Title'
186
+ });
187
+
188
+ //Custom object:
189
+ $.fancybox({
190
+ href: 'example.jpg',
191
+ title : 'Custom Title'
192
+ });
193
+
194
+ //Array of objects:
195
+ $.fancybox([
196
+ {
197
+ href: 'example1.jpg',
198
+ title : 'Custom Title 1'
199
+ },
200
+ {
201
+ href: 'example2.jpg',
202
+ title : 'Custom Title 2'
203
+ }
204
+ ], {
205
+ padding: 0
206
+ });
207
+
208
+ There are several methods that allow you to interact with and manipulate fancyBox, example:
209
+
210
+ //Close fancybox:
211
+ $.fancybox.close();
212
+
213
+ There is a simply way to access wrapping elements using JS:
214
+
215
+ $.fancybox.wrap
216
+ $.fancybox.skin
217
+ $.fancybox.outer
218
+ $.fancybox.inner
219
+
220
+ You can override CSS to customize the look. For example, make navigation arrows always visible,
221
+ change width and move them outside of area (use this snippet after including fancybox.css):
222
+
223
+ .fancybox-nav span {
224
+ visibility: visible;
225
+ }
226
+
227
+ .fancybox-nav {
228
+ width: 80px;
229
+ }
230
+
231
+ .fancybox-prev {
232
+ left: -80px;
233
+ }
234
+
235
+ .fancybox-next {
236
+ right: -80px;
237
+ }
238
+
239
+ In that case, you might want to increase space around box:
240
+
241
+ $(".fancybox").fancybox({
242
+ margin : [20, 60, 20, 60]
243
+ });
244
+
245
+
246
+ Bug tracker
247
+ -----------
248
+
249
+ Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues