refinerycms-photo-gallery 0.0.1.dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/Gemfile +26 -0
  2. data/LICENSE.md +8 -0
  3. data/README.md +224 -0
  4. data/app/assets/images/refinery/photo_gallery/admin/chosen-sprite.png +0 -0
  5. data/app/assets/images/refinery/photo_gallery/admin/icons/album.png +0 -0
  6. data/app/assets/images/refinery/photo_gallery/admin/icons/album_add.png +0 -0
  7. data/app/assets/images/refinery/photo_gallery/admin/icons/album_edit.png +0 -0
  8. data/app/assets/images/refinery/photo_gallery/admin/icons/cog.png +0 -0
  9. data/app/assets/images/refinery/photo_gallery/admin/icons/down.gif +0 -0
  10. data/app/assets/images/refinery/photo_gallery/admin/icons/folder.png +0 -0
  11. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_add.png +0 -0
  12. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_edit.png +0 -0
  13. data/app/assets/images/refinery/photo_gallery/admin/icons/loading.gif +0 -0
  14. data/app/assets/images/refinery/photo_gallery/admin/icons/page_copy.png +0 -0
  15. data/app/assets/images/refinery/photo_gallery/admin/icons/photo.png +0 -0
  16. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_add.png +0 -0
  17. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_edit.png +0 -0
  18. data/app/assets/images/refinery/photo_gallery/admin/icons/up.gif +0 -0
  19. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/backgrounds.gif +0 -0
  20. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons-disabled.png +0 -0
  21. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons.png +0 -0
  22. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/delete.gif +0 -0
  23. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/done.gif +0 -0
  24. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/error.gif +0 -0
  25. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/throbber.gif +0 -0
  26. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/transp50.png +0 -0
  27. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload-bw.png +0 -0
  28. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload.png +0 -0
  29. data/app/assets/images/refinery/photo_gallery/admin/rss-feed.png +0 -0
  30. data/app/assets/images/refinery/photo_gallery/fancybox/blank.gif +0 -0
  31. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_loading.gif +0 -0
  32. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_sprite.png +0 -0
  33. data/app/assets/images/refinery/photo_gallery/fancybox/helpers/fancybox_buttons.png +0 -0
  34. data/app/assets/javascripts/refinery/photo_gallery/admin/jquery.chosen.min.js +10 -0
  35. data/app/assets/javascripts/refinery/photo_gallery/admin/photo_gallery.js +28 -0
  36. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/changelog.txt +218 -0
  37. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/cs.js +14 -0
  38. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/da.js +12 -0
  39. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/de.js +24 -0
  40. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/el.js +14 -0
  41. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/es.js +25 -0
  42. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/et.js +33 -0
  43. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fa.js +37 -0
  44. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fi.js +33 -0
  45. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr-ca.js +35 -0
  46. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr.js +25 -0
  47. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hr.js +25 -0
  48. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hu.js +33 -0
  49. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/it.js +24 -0
  50. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ja.js +37 -0
  51. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ko.js +36 -0
  52. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/lv.js +33 -0
  53. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/nl.js +21 -0
  54. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pl.js +24 -0
  55. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt-br.js +35 -0
  56. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ro.js +24 -0
  57. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ru.js +21 -0
  58. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sk.js +37 -0
  59. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sr.js +14 -0
  60. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sv.js +12 -0
  61. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.js +195 -0
  62. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.js +383 -0
  63. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/license.txt +339 -0
  64. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.browserplus.js +1 -0
  65. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.js +226 -0
  66. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.swf +0 -0
  67. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js +2525 -0
  68. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js.default +2525 -0
  69. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.gears.js +1 -0
  70. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html4.js +1 -0
  71. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js +765 -0
  72. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js.default +765 -0
  73. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.js +618 -0
  74. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.js +1 -0
  75. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.xap +0 -0
  76. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/readme.md +46 -0
  77. data/app/assets/javascripts/refinery/photo_gallery/fancybox/CHANGELOG.md +68 -0
  78. data/app/assets/javascripts/refinery/photo_gallery/fancybox/README.md +212 -0
  79. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.js +115 -0
  80. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-media.js +85 -0
  81. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.js +157 -0
  82. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.js +1463 -0
  83. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.pack.js +35 -0
  84. data/app/assets/javascripts/refinery/photo_gallery/fancybox/lib/jquery.mousewheel-3.0.6.pack.js +13 -0
  85. data/app/assets/stylesheets/refinery/photo_gallery/admin/chosen.css.scss +396 -0
  86. data/app/assets/stylesheets/refinery/photo_gallery/admin/photo_gallery.css.scss +109 -0
  87. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.css.scss +177 -0
  88. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.css.scss +147 -0
  89. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.css.scss +85 -0
  90. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.css +54 -0
  91. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/jquery.fancybox.css.scss +234 -0
  92. data/app/controllers/refinery/photo_gallery/admin/albums_controller.rb +23 -0
  93. data/app/controllers/refinery/photo_gallery/admin/collections_controller.rb +10 -0
  94. data/app/controllers/refinery/photo_gallery/admin/photos_controller.rb +67 -0
  95. data/app/controllers/refinery/photo_gallery/albums_controller.rb +21 -0
  96. data/app/controllers/refinery/photo_gallery/collections_controller.rb +28 -0
  97. data/app/helpers/refinery/photo_gallery/admin/photos_helper.rb +10 -0
  98. data/app/helpers/refinery/photo_gallery/albums_helper.rb +11 -0
  99. data/app/helpers/refinery/photo_gallery/photo_gallery_helper.rb +58 -0
  100. data/app/middleware/refinery/photo_gallery/admin/flash_session_cookie_middleware.rb +27 -0
  101. data/app/models/refinery/photo_gallery/album.rb +60 -0
  102. data/app/models/refinery/photo_gallery/collection.rb +29 -0
  103. data/app/models/refinery/photo_gallery/collection_album.rb +8 -0
  104. data/app/models/refinery/photo_gallery/photo.rb +54 -0
  105. data/app/uploaders/refinery/photo_gallery/admin/file_uploader.rb +121 -0
  106. data/app/views/refinery/photo_gallery/admin/_submenu.html.erb +44 -0
  107. data/app/views/refinery/photo_gallery/admin/albums/_album.html.erb +31 -0
  108. data/app/views/refinery/photo_gallery/admin/albums/_form.html.erb +78 -0
  109. data/app/views/refinery/photo_gallery/admin/albums/_sortable_list.html.erb +7 -0
  110. data/app/views/refinery/photo_gallery/admin/albums/edit.html.erb +2 -0
  111. data/app/views/refinery/photo_gallery/admin/albums/index.html.erb +28 -0
  112. data/app/views/refinery/photo_gallery/admin/albums/new.html.erb +2 -0
  113. data/app/views/refinery/photo_gallery/admin/collections/_collection.html.erb +23 -0
  114. data/app/views/refinery/photo_gallery/admin/collections/_form.html.erb +32 -0
  115. data/app/views/refinery/photo_gallery/admin/collections/_sortable_list.html.erb +7 -0
  116. data/app/views/refinery/photo_gallery/admin/collections/edit.html.erb +2 -0
  117. data/app/views/refinery/photo_gallery/admin/collections/index.html.erb +28 -0
  118. data/app/views/refinery/photo_gallery/admin/collections/new.html.erb +2 -0
  119. data/app/views/refinery/photo_gallery/admin/collections/test.html.erb +39 -0
  120. data/app/views/refinery/photo_gallery/admin/photos/_destroy.js.erb +15 -0
  121. data/app/views/refinery/photo_gallery/admin/photos/_form.html.erb +7 -0
  122. data/app/views/refinery/photo_gallery/admin/photos/_form_actions.html.erb +6 -0
  123. data/app/views/refinery/photo_gallery/admin/photos/_form_fields.html.erb +31 -0
  124. data/app/views/refinery/photo_gallery/admin/photos/_form_fields_actions.html.erb +15 -0
  125. data/app/views/refinery/photo_gallery/admin/photos/edit_multiple.html.erb +9 -0
  126. data/app/views/refinery/photo_gallery/admin/photos/upload.html.erb +87 -0
  127. data/app/views/refinery/photo_gallery/albums/show.html.erb +26 -0
  128. data/app/views/refinery/photo_gallery/collections/index.html.erb +9 -0
  129. data/app/views/refinery/photo_gallery/collections/show.html.erb +19 -0
  130. data/app/views/refinery/photo_gallery/shared/_layout.html.erb +22 -0
  131. data/app/views/refinery/photo_gallery/shared/_submenu.html.erb +4 -0
  132. data/config/initializers/carrierwave.rb +7 -0
  133. data/config/initializers/form_builder.rb +26 -0
  134. data/config/initializers/refinery/core.rb +10 -0
  135. data/config/initializers/s3.rb +13 -0
  136. data/config/initializers/session_store.rb +10 -0
  137. data/config/locales/en.yml +95 -0
  138. data/config/locales/sk.yml +94 -0
  139. data/config/routes.rb +37 -0
  140. data/db/migrate/20120804063842_create_albums.rb +18 -0
  141. data/db/migrate/20120805131321_create_collections.rb +14 -0
  142. data/db/migrate/20120805131547_create_collection_albums.rb +12 -0
  143. data/db/migrate/20120805165238_create_photos.rb +19 -0
  144. data/db/migrate/20120805222125_add_indexes.rb +24 -0
  145. data/db/seeds.rb +21 -0
  146. data/lib/generators/refinery/photo_gallery_generator.rb +25 -0
  147. data/lib/generators/refinery/templates/config/initializers/refinery/photo_gallery.rb.erb +40 -0
  148. data/lib/refinery/photo_gallery.rb +30 -0
  149. data/lib/refinery/photo_gallery/configuration.rb +33 -0
  150. data/lib/refinery/photo_gallery/engine.rb +33 -0
  151. data/lib/refinery/photo_gallery/version.rb +17 -0
  152. data/lib/refinerycms-photo-gallery.rb +1 -0
  153. data/refinerycms-balder-photo-gallery.gemspec +30 -0
  154. data/screenshots/01_collections#index.png +0 -0
  155. data/screenshots/02_albums#create.png +0 -0
  156. data/screenshots/03_photos#upload.png +0 -0
  157. data/screenshots/04_photos#upload- chooser.png +0 -0
  158. data/screenshots/05_photo#upoad-queue.png +0 -0
  159. data/screenshots/06_photos#upload-uploading.png +0 -0
  160. data/screenshots/07_photos#upload-uploading_2.png +0 -0
  161. data/screenshots/08_photos#edit_multiple.png +0 -0
  162. data/screenshots/09_albums#index.png +0 -0
  163. data/screenshots/10_albums_EXIF_reading.png +0 -0
  164. data/screenshots/11_frontend_show.png +0 -0
  165. data/screenshots/12_show_photo_using_fancybox.png +0 -0
  166. metadata +323 -0
@@ -0,0 +1 @@
1
+ (function(g,b,d,e){var a={},h={};function c(o){var n,m=typeof o,j,l,k;if(o===e||o===null){return"null"}if(m==="string"){n="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(q,p){var i=n.indexOf(p);if(i+1){return"\\"+n.charAt(i+1)}q=p.charCodeAt().toString(16);return"\\u"+"0000".substring(q.length)+q})+'"'}if(m=="object"){j=o.length!==e;n="";if(j){for(l=0;l<o.length;l++){if(n){n+=","}n+=c(o[l])}n="["+n+"]"}else{for(k in o){if(o.hasOwnProperty(k)){if(n){n+=","}n+=c(k)+":"+c(o[k])}}n="{"+n+"}"}return n}return""+o}function f(r){var u=false,i=null,n=null,j,k,l,t,m,p=0;try{try{n=new ActiveXObject("AgControl.AgControl");if(n.IsVersionSupported(r)){u=true}n=null}catch(q){var o=navigator.plugins["Silverlight Plug-In"];if(o){j=o.description;if(j==="1.0.30226.2"){j="2.0.30226.2"}k=j.split(".");while(k.length>3){k.pop()}while(k.length<4){k.push(0)}l=r.split(".");while(l.length>4){l.pop()}do{t=parseInt(l[p],10);m=parseInt(k[p],10);p++}while(p<l.length&&t===m);if(t<=m&&!isNaN(t)){u=true}}}}catch(s){u=false}return u}d.silverlight={trigger:function(n,k){var m=a[n],l,j;if(m){j=d.toArray(arguments).slice(1);j[0]="Silverlight:"+k;setTimeout(function(){m.trigger.apply(m,j)},0)}}};d.runtimes.Silverlight=d.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(p,q){var o,m="",n=p.settings.filters,l,k=b.body;if(!f("2.0.31005.0")||(g.opera&&g.opera.buildNumber)){q({success:false});return}h[p.id]=false;a[p.id]=p;o=b.createElement("div");o.id=p.id+"_silverlight_container";d.extend(o.style,{position:"absolute",top:"0px",background:p.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:p.settings.shim_bgcolor||b.documentMode>8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l<n.length;l++){m+=(m!=""?"|":"")+n[l].title+" | *."+n[l].extensions.replace(/,/g,";*.")}o.innerHTML='<object id="'+p.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+p.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="id='+p.id+",filter="+m+",multiselect="+p.settings.multi_selection+'"/></object>';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var i,r={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(s){i=[]});p.bind("Silverlight:SelectFile",function(s,v,t,u){var w;w=d.guid();r[w]=v;r[v]=w;i.push(new d.File(w,t,u))});p.bind("Silverlight:SelectSuccessful",function(){if(i.length){p.trigger("FilesAdded",i)}});p.bind("Silverlight:UploadChunkError",function(s,v,t,w,u){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:u,file:s.getFile(r[v])})});p.bind("Silverlight:UploadFileProgress",function(s,w,t,v){var u=s.getFile(r[w]);if(u.status!=d.FAILED){u.size=v;u.loaded=t;s.trigger("UploadProgress",u)}});p.bind("Refresh",function(s){var t,u,v;t=b.getElementById(s.settings.browse_button);if(t){u=d.getPos(t,b.getElementById(s.settings.container));v=d.getSize(t);d.extend(b.getElementById(s.id+"_silverlight_container").style,{top:u.y+"px",left:u.x+"px",width:v.w+"px",height:v.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(s,v,t,y,x){var w,u=s.getFile(r[v]);w={chunk:t,chunks:y,response:x};s.trigger("ChunkUploaded",u,w);if(u.status!=d.FAILED&&s.state!==d.STOPPED){j().UploadNextChunk()}if(t==y-1){u.status=d.DONE;s.trigger("FileUploaded",u,{response:x})}});p.bind("Silverlight:UploadSuccessful",function(s,v,t){var u=s.getFile(r[v]);u.status=d.DONE;s.trigger("FileUploaded",u,{response:t})});p.bind("FilesRemoved",function(s,u){var t;for(t=0;t<u.length;t++){j().RemoveFile(r[u[t].id])}});p.bind("UploadFile",function(s,u){var v=s.settings,t=v.resize||{};j().UploadFile(r[u.id],s.settings.url,c({name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,image_width:t.width,image_height:t.height,image_quality:t.quality||90,multipart:!!v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,headers:v.headers}))});p.bind("CancelUpload",function(){j().CancelUpload()});p.bind("Silverlight:MouseEnter",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_hover;if(t&&u){d.addClass(t,u)}});p.bind("Silverlight:MouseLeave",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_hover;if(t&&u){d.removeClass(t,u)}});p.bind("Silverlight:MouseLeftButtonDown",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_active;if(t&&u){d.addClass(t,u);d.addEvent(b.body,"mouseup",function(){d.removeClass(t,u)})}});p.bind("Sliverlight:StartSelectFiles",function(s){var t,u;t=b.getElementById(p.settings.browse_button);u=s.settings.browse_button_active;if(t&&u){d.removeClass(t,u)}});p.bind("DisableBrowse",function(s,t){j().DisableBrowse(t)});p.bind("Destroy",function(s){var t;d.removeAllEvents(b.body,s.id);delete h[s.id];delete a[s.id];t=b.getElementById(s.id+"_silverlight_container");if(t){k.removeChild(t)}});q({success:true})})}})})(window,document,plupload);
@@ -0,0 +1,46 @@
1
+ Plupload - Cross browser and platform uploader API
2
+ ===================================================
3
+
4
+ What is Plupload
5
+ -----------------
6
+ Plupload is a JavaScript API for dealing with file uploads it supports features like multiple file selection, file type filtering,
7
+ request chunking, client side image scaling and it uses different runtimes to achieve this such as HTML 5, Silverlight, Flash, Gears and BrowserPlus.
8
+
9
+ What you need to build Plupload
10
+ -------------------------------
11
+ * Install the Java JDK or JRE packages you can find it at: [http://java.sun.com/javase/downloads/index.jsp](http://java.sun.com/javase/downloads/index.jsp)
12
+ * Install Apache Ant you can find it at: [http://ant.apache.org/](http://ant.apache.org/)
13
+ * Add Apache Ant to your systems path environment variable, this is not required but makes it easier to issue commands to Ant without having to type the full path for it.
14
+
15
+ How to build Plupload
16
+ ----------------------
17
+
18
+ In the root directory of Plupload where the build.xml file is you can run ant against different targets.
19
+
20
+ `ant`
21
+
22
+ Will combine, preprocess and minify the Plupload classes into the js directory. It will not build the Silverlight and Flash .xap and .swf files.
23
+
24
+ `ant moxiedoc`
25
+
26
+ Will generate API Documentation for the project using the Moxiedoc tool. The docs will be generated to the docs/api directory.
27
+
28
+ `ant release`
29
+
30
+ Will produce release packages. The release packages will be placed in the tmp directory.
31
+
32
+ How to build Flash runtime
33
+ ---------------------------
34
+ The Flash runtime uses a .swf file that can be built using the Flex SDK. This SDK can be downloaded from Adobe. [http://www.adobe.com/products/flex/flexdownloads/](http://www.adobe.com/products/flex/flexdownloads/)
35
+
36
+ How to build Silverlight runtime
37
+ ---------------------------------
38
+ The Silverlight runtime uses a .xap file that can be built using the Silverlight SDK or Visual Studio. [http://silverlight.net/getstarted/](http://silverlight.net/getstarted/)
39
+
40
+ Running the development version
41
+ --------------------------------
42
+ The unminified development version of the javascript files can be executed by opening the examples/queue_widget_dev.html file running on a Web Server.
43
+
44
+ Contributing to the Plupload project
45
+ -------------------------------------
46
+ You can read more about how to contribute to this project at [http://www.plupload.com/contributing](http://www.plupload.com/contributing)
@@ -0,0 +1,68 @@
1
+ fancyBox - Changelog
2
+ =========
3
+
4
+ ### Version 2.0.6 - April 16, 2012
5
+
6
+ * Fixed #188 - keystrokes in contenteditable
7
+ * Fixed #171 - non-images should not be preloaded
8
+ * Fixed #158 - 'closeClick: true' breaks gallery navigation
9
+ * New "media" helper - detects and displays various media types
10
+ * New option "groupAttr" - name of group selector attribute, default is "data-fancybox-group"
11
+ * New feature - selector expressions in URLs, see #170
12
+ * Improved 'overlay' helper to use "position: fixed"
13
+ * Improved autoSize, fixed wrong height in some cases
14
+ * Improved centering and iframe scrolling for iOS
15
+ * Updated markup, new element '.fancybox-skin' is now used for styling
16
+
17
+ ### Version 2.0.5 - February 21, 2012
18
+
19
+ * Fixed #155 - easing for prev/next animations
20
+ * Fixed #153 - overriding "keys" options
21
+ * Fixed #147 - IE7 problem with #hash links
22
+ * Fixed #130 - changing dynamically data-fancybox-group
23
+ * Fixed #126 - obey minWidth/minHeight
24
+ * Fixed #118 - placement of loading icon and navigation arrows
25
+ * Fixed #101 - "index" option not working
26
+ * Fixed #94 - "orig" option not working
27
+ * Fixed #80 - does not work on IE6
28
+ * Fixed #72 - can't set overlay opacity to 0
29
+ * Fixed #63 - properly set gallery index
30
+ * New option "autoCenter" - toggles centering on window resize or scroll, disabled for mobile devices by default
31
+ * New option "autoResize" - toggles responsivity, disabled for mobile devices by default
32
+ * New option "preload" - number of images to preload
33
+ * New feature to target mobile/desktop browsers using CSS, see #108
34
+ * Changed ajax option defaults to "{ dataType: 'html', headers: { 'X-fancyBox': true } }", see #150 and #128
35
+ * Updated loading icon for IE7, IE8
36
+ * Calculates height of the iframe if 'autoSize' is set to 'true' and the iframe is on the same domain as the main page
37
+
38
+ ### Version 2.0.4 - December 12, 2011
39
+
40
+ * Fixed #47 - fix overriding properties
41
+ * New option "position" to thumbnail and button helpers
42
+
43
+
44
+ ### Version 2.0.3 - November 29, 2011
45
+
46
+ * Fixed #29 - broken elastic transitions
47
+
48
+
49
+ ### Version 2.0.2 - November 28, 2011
50
+
51
+ * Fixed slidshow
52
+ * Fixed scrollbar issue when displayed a very tall image
53
+ * New option "nextClick" - navigate to next gallery item when user clicks the content
54
+ * New option "modal" - to disable navigation and closing
55
+ * Add 'metadata' plugin support
56
+ * Add ability to create groups using 'data-fancybox-group' attribute
57
+ * Updated manual usage to match earlier releases
58
+
59
+
60
+ ### Version 2.0.1 - November 23, 2011
61
+
62
+ * Fixed keyboard events inside form elements
63
+ * Fixed manual usage
64
+
65
+
66
+ ### Version 2.0.0 - November 21, 2011
67
+
68
+ First release - completely rewritten, many new features and updated graphics.
@@ -0,0 +1,212 @@
1
+ fancyBox
2
+ ========
3
+
4
+ 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.
5
+
6
+ More information and examples: http://www.fancyapps.com/fancybox/
7
+
8
+ License: http://www.fancyapps.com/fancybox/#license
9
+
10
+ Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com
11
+
12
+
13
+ How to use
14
+ ----------
15
+
16
+ To get started, download the plugin, unzip it and copy files to your website/application directory.
17
+ Load files in the <head> section of your HTML document. Make sure you also add the jQuery library.
18
+
19
+ <head>
20
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
21
+ <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css" media="screen" />
22
+ <script type="text/javascript" src="/fancybox/jquery.fancybox.pack.js"></script>
23
+ </head>
24
+
25
+ Create your links with a `title` if you want a title to be shown, and add a class:
26
+
27
+ <a href="large_image.jpg" class="fancybox" title="Sample title"><img src="small_image.jpg" /></a>
28
+
29
+ If you have a set of related items that you would like to group,
30
+ additionally include a group name in the `rel` (or `data-fancybox-group`) attribute:
31
+
32
+ <a href="large_1.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_1.jpg" /></a>
33
+ <a href="large_2.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_2.jpg" /></a>
34
+
35
+ Initialise the script like this:
36
+
37
+ <script>
38
+ $(document).ready(function() {
39
+ $('.fancybox').fancybox();
40
+ });
41
+ </script>
42
+
43
+ May also be passed an optional options object which will extend the default values. Example:
44
+
45
+ <script>
46
+ $(document).ready(function() {
47
+ $('.fancybox').fancybox({
48
+ padding : 0,
49
+ openEffect : 'elastic'
50
+ });
51
+ });
52
+ </script>
53
+
54
+ Tip: Automatically group and apply fancyBox to all images:
55
+
56
+ $("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox();
57
+
58
+ 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.
59
+ You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-group` attribute:
60
+
61
+ //Ajax:
62
+ <a href="/example.html" class="fancybox fancybox.ajax">Example</a>
63
+ //or
64
+ <a href="/example.html" class="fancybox" data-fancybox-type="ajax">Example</a>
65
+
66
+ //Iframe:
67
+ <a href="example.html" class="fancybox fancybox.iframe">Example</a>
68
+
69
+ //Inline (will display an element with `id="example"`)
70
+ <a href="#example" class="fancybox">Example</a>
71
+
72
+ //SWF:
73
+ <a href="example.swf" class="fancybox">Example</a>
74
+
75
+ //Image:
76
+ <a href="example.jpg" class="fancybox">Example</a>
77
+
78
+ Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy).
79
+ If fancyBox will not be able to get content type, error message will be displayed (this is different from previsous versions where 'ajax' was used as default type).
80
+
81
+ Advanced
82
+ --------
83
+
84
+ ### Helpers
85
+
86
+ Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'.
87
+ You can disable them, set custom options or enable other helpers. Examples:
88
+
89
+ //Disable title helper
90
+ $(".fancybox").fancybox({
91
+ helpers: {
92
+ title: null
93
+ }
94
+ });
95
+
96
+ //Disable overlay helper
97
+ $(".fancybox").fancybox({
98
+ helpers: {
99
+ overlay : null
100
+ }
101
+ });
102
+
103
+ //Change title position and overlay color
104
+ $(".fancybox").fancybox({
105
+ helpers: {
106
+ title : {
107
+ type : 'inside'
108
+ },
109
+ overlay : {
110
+ css : {
111
+ 'background-color' : '#fff'
112
+ }
113
+ }
114
+ }
115
+ });
116
+
117
+ //Enable thumbnail helper and set custom options
118
+ $(".fancybox").fancybox({
119
+ helpers: {
120
+ thumbs : {
121
+ width: 50,
122
+ height: 50
123
+ }
124
+ }
125
+ });
126
+
127
+
128
+ ### API
129
+
130
+ 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:
131
+
132
+ $(".fancybox").fancybox({
133
+ beforeLoad : function() {
134
+ this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
135
+
136
+ /*
137
+ "this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title:
138
+ this.title = $(this.element).find('img').attr('alt');
139
+ */
140
+ }
141
+ });
142
+
143
+ It`s possible to open fancyBox programmatically in various ways:
144
+
145
+ //HTML content:
146
+ $.fancybox( '<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
147
+ title : 'Custom Title'
148
+ });
149
+
150
+ //DOM element:
151
+ $.fancybox( $("#inline"), {
152
+ title : 'Custom Title'
153
+ });
154
+
155
+ //Custom object:
156
+ $.fancybox({
157
+ href: 'example.jpg',
158
+ title : 'Custom Title'
159
+ });
160
+
161
+ //Array of objects:
162
+ $.fancybox([
163
+ {
164
+ href: 'example1.jpg',
165
+ title : 'Custom Title 1'
166
+ },
167
+ {
168
+ href: 'example2.jpg',
169
+ title : 'Custom Title 2'
170
+ }
171
+ ], {
172
+ padding: 0
173
+ });
174
+
175
+ There are several methods that allow you to interact with and manipulate fancyBox, example:
176
+
177
+ //Close fancybox:
178
+ $.fancybox.close();
179
+
180
+ There is a simply way to access wrapping elements using JS:
181
+
182
+ $.fancybox.wrap
183
+ $.fancybox.skin
184
+ $.fancybox.outer
185
+ $.fancybox.inner
186
+
187
+ You can override CSS to customize the look. For example, make navigation arrows always visible
188
+ and move them outside of area (use this snippet after including fancybox.css):
189
+
190
+ .fancybox-nav span {
191
+ visibility: visible;
192
+ }
193
+
194
+ .fancybox-prev {
195
+ left: -80px;
196
+ }
197
+
198
+ .fancybox-next {
199
+ right: -80px;
200
+ }
201
+
202
+ In that case, you might want to increase space around box:
203
+
204
+ $(".fancybox").fancybox({
205
+ margin : [20, 60, 20, 60]
206
+ });
207
+
208
+
209
+ Bug tracker
210
+ -----------
211
+
212
+ Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues
@@ -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));