orange-flickr 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +27 -0
  5. data/Rakefile +46 -0
  6. data/lib/orange-flickr.rb +4 -0
  7. data/lib/orange-flickr/assets/js/yoxview/data/flickr.js +270 -0
  8. data/lib/orange-flickr/assets/js/yoxview/data/flickr.min.js +19 -0
  9. data/lib/orange-flickr/assets/js/yoxview/images/empty.gif +0 -0
  10. data/lib/orange-flickr/assets/js/yoxview/images/help_panel.png +0 -0
  11. data/lib/orange-flickr/assets/js/yoxview/images/left.png +0 -0
  12. data/lib/orange-flickr/assets/js/yoxview/images/left_eng.png +0 -0
  13. data/lib/orange-flickr/assets/js/yoxview/images/left_prev.png +0 -0
  14. data/lib/orange-flickr/assets/js/yoxview/images/popup_ajax_loader.gif +0 -0
  15. data/lib/orange-flickr/assets/js/yoxview/images/right.png +0 -0
  16. data/lib/orange-flickr/assets/js/yoxview/images/right_eng.png +0 -0
  17. data/lib/orange-flickr/assets/js/yoxview/images/sprites.png +0 -0
  18. data/lib/orange-flickr/assets/js/yoxview/install.htm +116 -0
  19. data/lib/orange-flickr/assets/js/yoxview/jquery.jsonp-1.0.4.min.js +12 -0
  20. data/lib/orange-flickr/assets/js/yoxview/jquery.timers-1.2.min.js +11 -0
  21. data/lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.js +207 -0
  22. data/lib/orange-flickr/assets/js/yoxview/jquery.yoxthumbs.min.js +11 -0
  23. data/lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.js +1673 -0
  24. data/lib/orange-flickr/assets/js/yoxview/jquery.yoxview-1.98.min.js +38 -0
  25. data/lib/orange-flickr/assets/js/yoxview/lang/ar.js +21 -0
  26. data/lib/orange-flickr/assets/js/yoxview/lang/bg.js +21 -0
  27. data/lib/orange-flickr/assets/js/yoxview/lang/ca.js +21 -0
  28. data/lib/orange-flickr/assets/js/yoxview/lang/cs.js +21 -0
  29. data/lib/orange-flickr/assets/js/yoxview/lang/de.js +21 -0
  30. data/lib/orange-flickr/assets/js/yoxview/lang/en.js +21 -0
  31. data/lib/orange-flickr/assets/js/yoxview/lang/es.js +21 -0
  32. data/lib/orange-flickr/assets/js/yoxview/lang/fr.js +21 -0
  33. data/lib/orange-flickr/assets/js/yoxview/lang/gr.js +21 -0
  34. data/lib/orange-flickr/assets/js/yoxview/lang/he.js +21 -0
  35. data/lib/orange-flickr/assets/js/yoxview/lang/ie.js +21 -0
  36. data/lib/orange-flickr/assets/js/yoxview/lang/ir.js +21 -0
  37. data/lib/orange-flickr/assets/js/yoxview/lang/it.js +21 -0
  38. data/lib/orange-flickr/assets/js/yoxview/lang/ja.js +21 -0
  39. data/lib/orange-flickr/assets/js/yoxview/lang/mk.js +20 -0
  40. data/lib/orange-flickr/assets/js/yoxview/lang/nl.js +3 -0
  41. data/lib/orange-flickr/assets/js/yoxview/lang/pl.js +21 -0
  42. data/lib/orange-flickr/assets/js/yoxview/lang/pt-br.js +21 -0
  43. data/lib/orange-flickr/assets/js/yoxview/lang/pt.js +21 -0
  44. data/lib/orange-flickr/assets/js/yoxview/lang/ro.js +21 -0
  45. data/lib/orange-flickr/assets/js/yoxview/lang/ru.js +21 -0
  46. data/lib/orange-flickr/assets/js/yoxview/lang/sk.js +21 -0
  47. data/lib/orange-flickr/assets/js/yoxview/lang/sl.js +21 -0
  48. data/lib/orange-flickr/assets/js/yoxview/lang/sv.js +21 -0
  49. data/lib/orange-flickr/assets/js/yoxview/lang/tr.js +22 -0
  50. data/lib/orange-flickr/assets/js/yoxview/lang/ua.js +21 -0
  51. data/lib/orange-flickr/assets/js/yoxview/lang/zh-cn.js +21 -0
  52. data/lib/orange-flickr/assets/js/yoxview/lang/zh-tw.js +21 -0
  53. data/lib/orange-flickr/assets/js/yoxview/yox.js +179 -0
  54. data/lib/orange-flickr/assets/js/yoxview/yox.min.js +1 -0
  55. data/lib/orange-flickr/assets/js/yoxview/yoxview-init.js +47 -0
  56. data/lib/orange-flickr/assets/js/yoxview/yoxview-nojquery.js +5 -0
  57. data/lib/orange-flickr/assets/js/yoxview/yoxview.css +218 -0
  58. data/lib/orange-flickr/plugin.rb +14 -0
  59. data/lib/orange-flickr/resources/flickr_resource.rb +31 -0
  60. data/lib/orange-flickr/views/flickr/gallery.haml +4 -0
  61. data/lib/orange-flickr/views/flickr/photoset.haml +5 -0
  62. data/spec/orange-flickr_spec.rb +7 -0
  63. data/spec/spec.opts +1 -0
  64. data/spec/spec_helper.rb +9 -0
  65. metadata +164 -0
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "Inchide",
4
+ "Help" : "Ajutor",
5
+ "FirstImage" : "Prima imagine",
6
+ "LastImage" : "Ultima imagine",
7
+ "StartStopSlideShow" : "Ruleaza/Pauza diaporama",
8
+ "Pause" : "Pauza",
9
+ "Play" : "Porneste",
10
+ "Prev" : "Precedent",
11
+ "PinInfo" : "Fixeaza info",
12
+ "UnpinInfo" : "Ascunde info",
13
+ "Next" : "Urmator",
14
+ "PrevImage" : "Imaginea precedenta",
15
+ "NextImage" : "Imaginea urmatoare",
16
+ "Loading" : "Se incarca",
17
+ "CloseHelp" : "Inchide ajutorul",
18
+ "HelpText" : "Prin galerie se poate naviga folosind tastatura:<br/><br/>SAGETILE STANGA/DREAPTA: Precedenta/Urmatoare<br/>BARA DE SPATIU: Urmatoarea<br/>ENTER: Start/Stop diaporama<br/>ESCAPE: Inchide galeria<br/>HOME/END: Prima/Ultima imagine<br/>H - Acest panou de ajutor",
19
+ "Slideshow" : "Ruleaza",
20
+ "OriginalContext": "Vezi in contextul original"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "Закрыть",
4
+ "Help" : "Помощь",
5
+ "FirstImage" : "К первому изображению",
6
+ "LastImage" : "К последнему изображению",
7
+ "StartStopSlideShow" : "Начать/Приостановить слайдшоу",
8
+ "Pause" : "Приостановить",
9
+ "Play" : "Начать",
10
+ "Prev" : "Пред.",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "Следующая",
14
+ "PrevImage" : "Предыдущее изображение",
15
+ "NextImage" : "Следующее изображение",
16
+ "Loading" : "Загрузка",
17
+ "CloseHelp" : "Закрыть помощь",
18
+ "HelpText" : "Управлять галерей можно с помощью клавиатуры:<br/><br/>ЛЕВАЯ/ПРАВАЯ СТРЕЛОЧКИ: Пред./Следующее<br/>ПРОБЕЛ: Следующее<br/>ENTER: Старт/Стоп слайдшоу<br/>ESCAPE: Закрыть галерею<br/>HOME/END: Первое/Последнее изображение<br/>H - Открыть панель помощи",
19
+ "Slideshow" : "Начать",
20
+ "OriginalContext": "View in original context"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "Zavrieť",
4
+ "Help" : "Nápoveda",
5
+ "FirstImage" : "Na prvý obrázok",
6
+ "LastImage" : "Na posledný obrozek",
7
+ "StartStopSlideShow" : "Spustiť/Zastaviť prehrávanie",
8
+ "Pause" : "Zastaviť",
9
+ "Play" : "Spustiť",
10
+ "Prev" : "Predchádzajúci",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "Nasledujúci",
14
+ "PrevImage" : "Predchádzajúci obrázok",
15
+ "NextImage" : "Nasledujúci obrázok",
16
+ "Loading" : "Nahrávam",
17
+ "CloseHelp" : "Zavrieť nápovedu",
18
+ "HelpText" : "Galériu môžete prechádzať pomocou kláves:<br/><br/>ŠÍPKY VĽAVO/VPRAVO: Predchádzajúci/Nasledujúci obrázok<br/>MEDZERNÍK: Ďalší<br/>ENTER: Spustiť/zastaviť prehrávanie<br/>ESC: Zavrieť galériu<br/>HOME/END: Prvý/posledný obrázok<br/>H - Vyvolanie nápovedy",
19
+ "Slideshow" : "Prehrávanie",
20
+ "OriginalContext": "Zobraziť v pôvodnom kontexte"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "Zapri",
4
+ "Help" : "Pomo&#269;",
5
+ "FirstImage" : "Na prvo sliko",
6
+ "LastImage" : "Na zadnjo sliko",
7
+ "StartStopSlideShow" : "Po&#382;eni/Ustavi projekcijo",
8
+ "Pause" : "Ustavi",
9
+ "Play" : "Predvajaj",
10
+ "Prev" : "Nazaj",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "Naprej",
14
+ "PrevImage" : "Predhodna slika",
15
+ "NextImage" : "Naslednja slika",
16
+ "Loading" : "Nalagam",
17
+ "CloseHelp" : "Zapri pomo&#269;",
18
+ "HelpText" : "Med slikami se lahko pomikate z uporabo tipkovnice:<br/><br/>PU&#352;&#268;ICI LEVO/DESNO: Nazaj/Naprej<br/>PRESLEDNICA: Naprej<br/>VNOS: Po&#382;eni/Ustavi projekcijo<br/>ESC: Zapri galerijo<br/>HOME/END: Prva/Zadnja slika<br/>H - Pomo&#269;",
19
+ "Slideshow" : "Predvajaj",
20
+ "OriginalContext": "View in original context"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "Stäng",
4
+ "Help" : "Hjälp",
5
+ "FirstImage" : "Till första bilden",
6
+ "LastImage" : "Till sista bilden",
7
+ "StartStopSlideShow" : "Spela/Pausa bildspelet",
8
+ "Pause" : "Pausa",
9
+ "Play" : "Bildspel",
10
+ "Prev" : "Föregående",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "Nästa",
14
+ "PrevImage" : "Föregående bild",
15
+ "NextImage" : "Nästa bild",
16
+ "Loading" : "Laddar",
17
+ "CloseHelp" : "Stäng hjälp",
18
+ "HelpText" : "Detta galleri kan navigeras med hjälp av tangentbordet: <br/>VÄNSTER/HÖGER PIL: Tillbaka/Nästa<br/>MELLANSLAG: Nästa bild<br/>ENTER: Starta/pausa bildspelet<br/>ESCAPE: Stäng galleriet<br/>HOME/END: Första/Sista bilden<br/>H - Denna hjälppanel",
19
+ "Slideshow" : "Bildspel",
20
+ "OriginalContext": "View in original context"
21
+ }
@@ -0,0 +1,22 @@
1
+ // Translated by Ugur CELENK
2
+ {
3
+ "Direction" : "ltr",
4
+ "Close" : "Kapat",
5
+ "Help" : "Yardım",
6
+ "FirstImage" : "İlk resim",
7
+ "LastImage" : "Son resim",
8
+ "StartStopSlideShow" : "Başlat/Durdur slayt gösterisi",
9
+ "Pause" : "Durdur",
10
+ "Play" : "Başlat",
11
+ "Prev" : "Önceki",
12
+ "PinInfo" : "Pin info",
13
+ "UnpinInfo" : "Unpin info",
14
+ "Next" : "Sonraki",
15
+ "PrevImage" : "Önceki resim",
16
+ "NextImage" : "Sonraki resim",
17
+ "Loading" : "Yükleniyor",
18
+ "CloseHelp" : "Yardımı kapat",
19
+ "HelpText" : "Galeride klavye kullanarak geçiş yapabilirsiniz:<br/><br/>SOL/SAĞ YÖN TUŞLARI: Önceki/Sonraki<br/>BOŞLUK TUŞU: Sonraki<br/>ENTER: Slayt gösterisi Başlat/Durdur<br/>ESC: Galeriyi kapat<br />HOME/END: İlk/Son resim<br />H - Yardım paneli",
20
+ "Slideshow" : "Başlat",
21
+ "OriginalContext": "Orjinal içeriği göster"
22
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "Закрити",
4
+ "Help" : "Допомога",
5
+ "FirstImage" : "До першого зображення",
6
+ "LastImage" : "До останнього зображення",
7
+ "StartStopSlideShow" : "Почати/Призупинити слайдшоу",
8
+ "Pause" : "Призупинити",
9
+ "Play" : "Почати",
10
+ "Prev" : "Попереднє",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "Наступне",
14
+ "PrevImage" : "Попереднє зображення",
15
+ "NextImage" : "Наступне зображення",
16
+ "Loading" : "Завантаження",
17
+ "CloseHelp" : "Закрити допомогу",
18
+ "HelpText" : "Керувати галереєю можна за допомогою клавіатури:<br/><br/>ЛІВА/ПРАВА СТРІЛОЧКИ: Попереднє/Наступне<br/>ПРОБІЛ: Наступне<br/>ENTER: Старт/Стоп слайдшоу<br/>ESCAPE: Зачинити галерею<br/>HOME/END: Перше/Останнє зображення<br/>H - Відкрити панель допомоги",
19
+ "Slideshow" : "Почати",
20
+ "OriginalContext": "View in original context"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "关闭",
4
+ "Help" : "帮助",
5
+ "FirstImage" : "第一张",
6
+ "LastImage" : "最后一张",
7
+ "StartStopSlideShow" : "播放/暂停幻灯片",
8
+ "Pause" : "暂停",
9
+ "Play" : "播放",
10
+ "Prev" : "上一页",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "下一页",
14
+ "PrevImage" : "上一张",
15
+ "NextImage" : "下一张",
16
+ "Loading" : "载入中",
17
+ "CloseHelp" : "关闭帮助",
18
+ "HelpText" : "你可以使用键盘进行画廊导航:<br/><br/>左/右箭头: 上一张/下一张<br/>空格键: 下一张<br/>Enter键: 播放/暂停幻灯片<br/>Esc键: 关闭画廊<br/>HOME/END: 第一张/最后一张<br/>H - 帮助面板",
19
+ "Slideshow" : "播放",
20
+ "OriginalContext": "在原有范围内查看"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "Direction" : "ltr",
3
+ "Close" : "關閉",
4
+ "Help" : "求助",
5
+ "FirstImage" : "第一張",
6
+ "LastImage" : "最後一張",
7
+ "StartStopSlideShow" : "播放/暫停幻燈片",
8
+ "Pause" : "暫停",
9
+ "Play" : "播放",
10
+ "Prev" : "上一頁",
11
+ "PinInfo" : "Pin info",
12
+ "UnpinInfo" : "Unpin info",
13
+ "Next" : "下一頁",
14
+ "PrevImage" : "上一張",
15
+ "NextImage" : "下一張",
16
+ "Loading" : "載入中",
17
+ "CloseHelp" : "關閉求助",
18
+ "HelpText" : "你可以使用鍵盤進行畫廊導航:<br/><br/>左/右箭頭: 上一張/下一張<br/>空格鍵: 下一張<br/>Enter鍵: 播放/暫停幻燈片<br/>Esc鍵: 關閉畫廊<br/>HOME/END: 第一張/最後一張<br/>H - 求助面板",
19
+ "Slideshow" : "輪播",
20
+ "OriginalContext": "在原有範圍內查看"
21
+ }
@@ -0,0 +1,179 @@
1
+ Yox = {
2
+ compare: function(obj1, obj2)
3
+ {
4
+ // deep-compare objects:
5
+ function size(obj)
6
+ {
7
+ var size = 0;
8
+ for (var keyName in obj)
9
+ {
10
+ if (keyName != null)
11
+ size++;
12
+ }
13
+ return size;
14
+ }
15
+
16
+ if (size(obj1) != size(obj2))
17
+ return false;
18
+
19
+ for(var keyName in obj1)
20
+ {
21
+ var value1 = obj1[keyName];
22
+ var value2 = obj2[keyName];
23
+
24
+ if (typeof value1 != typeof value2)
25
+ return false;
26
+
27
+ if (value1 && value1.length && (value1[0] !== undefined && value1[0].tagName))
28
+ {
29
+ if(!value2 || value2.length != value1.length || !value2[0].tagName || value2[0].tagName != value1[0].tagName)
30
+ return false;
31
+ }
32
+ else if (typeof value1 == 'function' || typeof value1 == 'object') {
33
+ var equal = Yox.compare(value1, value2);
34
+ if (!equal)
35
+ return equal;
36
+ }
37
+ else if (value1 != value2)
38
+ return false;
39
+ }
40
+ return true;
41
+ },
42
+ dataRegex: {
43
+ picasa: /http:\/\/(www.)?picasaweb\.google\..*/,
44
+ flickr: /http:\/\/(www.)?flickr.com/,
45
+ smugmug: /http:\/\/.*\.smugmug.com/
46
+ },
47
+ dataSources: [],
48
+ fitImageSize: function(imageSize, targetSize, enlarge, isFill)
49
+ {
50
+ var resultSize = { width: imageSize.width, height: imageSize.height};
51
+ if ((!enlarge && imageSize.width > targetSize.width) ||
52
+ (enlarge && imageSize.width != targetSize.width) )
53
+ {
54
+ resultSize.height = Math.round((targetSize.width / imageSize.width) * imageSize.height);
55
+ resultSize.width = targetSize.width;
56
+ }
57
+
58
+ if (!isFill && resultSize.height > targetSize.height)
59
+ {
60
+ resultSize.width = Math.round((targetSize.height / resultSize.height) * resultSize.width);
61
+ resultSize.height = targetSize.height;
62
+ }
63
+ else if (isFill && (resultSize.height < targetSize.height))
64
+ {
65
+ resultSize.height = targetSize.height;
66
+ resultSize.width = Math.round((targetSize.height / imageSize.height) * imageSize.width);
67
+ }
68
+
69
+ return resultSize;
70
+ },
71
+ getDataSourceName: function(url)
72
+ {
73
+ for(dataSourceIndex in Yox.dataRegex)
74
+ {
75
+ if(url.match(Yox.dataRegex[dataSourceIndex]))
76
+ return dataSourceIndex;
77
+ }
78
+ return null;
79
+ },
80
+ getPath: function(pathRegex)
81
+ {
82
+ var scripts = document.getElementsByTagName("script");
83
+ for(var i=0; i<scripts.length; i++)
84
+ {
85
+ var currentScriptSrc = scripts[i].src;
86
+ var matchPath = currentScriptSrc.match(pathRegex);
87
+ if (matchPath)
88
+ return matchPath[1];
89
+ }
90
+
91
+ return null;
92
+ },
93
+ imageRegex: /.*\.(?:jpg|jpeg|gif|png)/i,
94
+ queryToJson: function(query)
95
+ {
96
+ var queryVars = query.split("&");
97
+ var json = {};
98
+ jQuery.each(queryVars, function(){
99
+ var keyValue = this.split("=");
100
+ json[keyValue[0]] = keyValue[1];
101
+ });
102
+ return json;
103
+ },
104
+ loadDataSource: function(options, callBack, target)
105
+ {
106
+ var self = this;
107
+ var dataSourceName;
108
+ if (options.dataUrl)
109
+ {
110
+ dataSourceName = Yox.getDataSourceName(options.dataUrl);
111
+ if (dataSourceName)
112
+ $.extend(options, { dataSource: dataSourceIndex });
113
+ }
114
+ if (options.dataSource && !Yox.dataSources[dataSourceName])
115
+ {
116
+ $.ajax({
117
+ url : options.dataFolder + options.dataSource + ".js",
118
+ async : false,
119
+ dataType : "script",
120
+ success: function(data){
121
+ eval(data);
122
+ eval ("Yox.dataSources['" + options.dataSource + "'] = new yox_" + options.dataSource + "();");
123
+ callBack(target);
124
+ },
125
+ error : function(XMLHttpRequest, textStatus, errorThrown)
126
+ {
127
+ console.log(XMLHttpRequest, textStatus, errorThrown);
128
+ }
129
+ });
130
+ }
131
+ else
132
+ callBack(target);
133
+ },
134
+ Sprites: function(sprites, spritesImage, srcImage)
135
+ {
136
+ var cacheImg = new Image();
137
+ cacheImg.src = spritesImage;
138
+ this.spritesImage = spritesImage;
139
+
140
+ var currentTop = 0;
141
+ jQuery.each(sprites, function(i, spriteGroup){
142
+ spriteGroup.top = currentTop;
143
+ currentTop += spriteGroup.height;
144
+ });
145
+
146
+ this.getSprite = function(spriteGroup, spriteName, title)
147
+ {
148
+ return jQuery("<img/>", {
149
+ src: srcImage,
150
+ alt: spriteName,
151
+ title: title,
152
+ css: {
153
+ width: sprites[spriteGroup].width,
154
+ height: sprites[spriteGroup].height,
155
+ "background-image": "url(" + spritesImage + ")",
156
+ "background-repeat": "no-repeat",
157
+ "background-position": this.getBackgroundPosition(spriteGroup, spriteName)
158
+ }
159
+ });
160
+ }
161
+ this.getBackgroundPosition = function(spriteGroup, spriteName)
162
+ {
163
+ var backgroundLeft = jQuery.inArray(spriteName, sprites[spriteGroup].sprites) * (sprites[spriteGroup].width || 0);
164
+ return "-" + backgroundLeft + "px -" + sprites[spriteGroup].top + "px";
165
+ }
166
+ },
167
+ videoRegex: {
168
+ youtube: /.*youtube.com\/watch.*(?:v=[^&]+).*/i,
169
+ vimeo: /vimeo.com\/\d+/i,
170
+ hulu: /hulu.com\/watch\//i,
171
+ viddler: /viddler.com\//i,
172
+ flickr: /.*flickr.com\/.*/i,
173
+ myspace: /.*vids.myspace.com\/.*/i,
174
+ qik: /qik.com/i,
175
+ revision3: /revision3.com/i,
176
+ dailymotion: /dailymotion.com/i,
177
+ "5min": /.*5min\.com\/Video/i
178
+ }
179
+ }
@@ -0,0 +1 @@
1
+ Yox={compare:function(b,c){function d(g){var h=0;for(var i in g)i!=null&&h++;return h}if(d(b)!=d(c))return false;for(var f in b){var a=b[f],e=c[f];if(typeof a!=typeof e)return false;if(a&&a.length&&a[0]!==undefined&&a[0].tagName){if(!e||e.length!=a.length||!e[0].tagName||e[0].tagName!=a[0].tagName)return false}else if(typeof a=="function"||typeof a=="object"){a=Yox.compare(a,e);if(!a)return a}else if(a!=e)return false}return true},dataRegex:{picasa:/http:\/\/(www.)?picasaweb\.google\..*/,flickr:/http:\/\/(www.)?flickr.com/, smugmug:/http:\/\/.*\.smugmug.com/},dataSources:[],fitImageSize:function(b,c,d,f){var a={width:b.width,height:b.height};if(!d&&b.width>c.width||d&&b.width!=c.width){a.height=Math.round(c.width/b.width*b.height);a.width=c.width}if(!f&&a.height>c.height){a.width=Math.round(c.height/a.height*a.width);a.height=c.height}else if(f&&a.height<c.height){a.height=c.height;a.width=Math.round(c.height/b.height*b.width)}return a},getDataSourceName:function(b){for(dataSourceIndex in Yox.dataRegex)if(b.match(Yox.dataRegex[dataSourceIndex]))return dataSourceIndex; return null},getPath:function(b){for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var f=c[d].src.match(b);if(f)return f[1]}return null},imageRegex:/.*\.(?:jpg|jpeg|gif|png)/i,queryToJson:function(b){b=b.split("&");var c={};jQuery.each(b,function(){var d=this.split("=");c[d[0]]=d[1]});return c},loadDataSource:function(b,c,d){var f;if(b.dataUrl)(f=Yox.getDataSourceName(b.dataUrl))&&$.extend(b,{dataSource:dataSourceIndex});b.dataSource&&!Yox.dataSources[f]?$.ajax({url:b.dataFolder+ b.dataSource+".js",async:false,dataType:"script",success:function(a){eval(a);eval("Yox.dataSources['"+b.dataSource+"'] = new yox_"+b.dataSource+"();");c(d)},error:function(a,e,g){console.log(a,e,g)}}):c(d)},Sprites:function(b,c,d){this.spritesImage=(new Image).src=c;var f=0;jQuery.each(b,function(a,e){e.top=f;f+=e.height});this.getSprite=function(a,e,g){return jQuery("<img/>",{src:d,alt:e,title:g,css:{width:b[a].width,height:b[a].height,"background-image":"url("+c+")","background-repeat":"no-repeat", "background-position":this.getBackgroundPosition(a,e)}})};this.getBackgroundPosition=function(a,e){return"-"+jQuery.inArray(e,b[a].sprites)*(b[a].width||0)+"px -"+b[a].top+"px"}},videoRegex:{youtube:/.*youtube.com\/watch.*(?:v=[^&]+).*/i,vimeo:/vimeo.com\/\d+/i,hulu:/hulu.com\/watch\//i,viddler:/viddler.com\//i,flickr:/.*flickr.com\/.*/i,myspace:/.*vids.myspace.com\/.*/i,qik:/qik.com/i,revision3:/revision3.com/i,dailymotion:/dailymotion.com/i,"5min":/.*5min\.com\/Video/i}};
@@ -0,0 +1,47 @@
1
+ var _yoxviewPath = getYoxviewPath();
2
+
3
+ var cssLink = parent.document.createElement("link");
4
+ cssLink.setAttribute("rel", "Stylesheet");
5
+ cssLink.setAttribute("type", "text/css");
6
+ cssLink.setAttribute("href", _yoxviewPath + "yoxview.css");
7
+ parent.document.getElementsByTagName("head")[0].appendChild(cssLink);
8
+
9
+ function LoadScript( url )
10
+ {
11
+ document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
12
+ }
13
+
14
+ var jQueryIsLoaded = typeof jQuery != "undefined";
15
+
16
+ if (!jQueryIsLoaded)
17
+ LoadScript("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
18
+
19
+ if (!jQueryIsLoaded || !jQuery().jsonp)
20
+ LoadScript(_yoxviewPath + "jquery.jsonp-1.0.4.min.js");
21
+
22
+ if (!jQueryIsLoaded || !jQuery().everyTime)
23
+ LoadScript(_yoxviewPath + "jquery.timers-1.2.min.js");
24
+
25
+ if (typeof Yox == "undefined")
26
+ LoadScript(_yoxviewPath + "yox.min.js");
27
+
28
+ if (!jQueryIsLoaded || !jQuery().yoxthumbs)
29
+ LoadScript(_yoxviewPath + "jquery.yoxthumbs.min.js");
30
+
31
+ LoadScript(_yoxviewPath + "jquery.yoxview-1.98.min.js");
32
+
33
+ function getYoxviewPath()
34
+ {
35
+ var scripts = document.getElementsByTagName("script");
36
+ var regex = /(.*\/)yoxview-init\.js/i;
37
+ for(var i=0; i<scripts.length; i++)
38
+ {
39
+ var currentScriptSrc = scripts[i].src;
40
+ if (currentScriptSrc.match(regex))
41
+ return currentScriptSrc.match(regex)[1];
42
+ }
43
+
44
+ return null;
45
+ }
46
+ // Remove the next line's comment to apply yoxview without knowing jQuery to all containers with class 'yoxview':
47
+ //LoadScript(_yoxviewPath + "yoxview-nojquery.js");
@@ -0,0 +1,5 @@
1
+ jQuery(document).ready(function($){
2
+ // Uncomment the following line if you use an additional Javascript library (likr Prototype, for example) in the same page as YoxView:
3
+ // jQuery.noConflict();
4
+ $(".yoxview").yoxview();
5
+ });
@@ -0,0 +1,218 @@
1
+ /* YoxView v1.92 CSS file */
2
+ #yoxview .yoxview_bottom{ bottom: 0; }
3
+ #yoxview .yoxview_right{ float: right; }
4
+ #yoxview .yoxview_left{ float: left; }
5
+
6
+ #yoxview
7
+ {
8
+ position: absolute;
9
+ font-family: Arial, Sans-Serif;
10
+ z-index: 999;
11
+ border: solid 1px #999;
12
+ overflow: hidden;
13
+ font-size: 10pt;
14
+ }
15
+ #yoxview a img{ border: none; }
16
+ #yoxview a:focus{ outline: none; }
17
+ #yoxview div.yoxview_imgPanel{ position: absolute; top: 0; left: 0; }
18
+ #yoxview div.yoxview_imgPanel div.yoxview_mediaPanel
19
+ {
20
+ position: absolute;
21
+ top: 0; left: 0;
22
+ background: #191919;
23
+ width: 100%;
24
+ height: 100%
25
+ }
26
+ #yoxview .yoxview_ctlBtn
27
+ {
28
+ position: absolute;
29
+ z-index: 3;
30
+ display: block;
31
+ text-decoration: none;
32
+ outline: none;
33
+ width: 50%;
34
+ height: 100%;
35
+ }
36
+ #yoxview .yoxview_ctlBtn img
37
+ {
38
+ position: absolute;
39
+ border: none;
40
+ top: 50%;
41
+ margin-top: -22px;
42
+ }
43
+ #yoxview a.yoxview_ctlBtn:focus, #yoxview a.yoxview_ctlBtn:active{ outline: none; outline: none;}
44
+ #yoxview .yoxview_notification
45
+ {
46
+ width: 59px;
47
+ height: 59px;
48
+ position: absolute;
49
+ top: 50%;
50
+ left: 50%;
51
+ margin-top: -30px;
52
+ margin-left: -30px;
53
+ z-index: 4;
54
+ opacity: 0.6;
55
+ filter: alpha(opacity=60);
56
+ }
57
+
58
+ #yoxview #yoxview_ajaxLoader img
59
+ {
60
+ padding: 13px;
61
+ }
62
+ #yoxview .yoxview_popupBarPanel
63
+ {
64
+ position: absolute;
65
+ z-index: 4;
66
+ min-height: 70px;
67
+ width: 100%;
68
+ right: 0;
69
+ }
70
+ #yoxview #yoxview_menuPanel
71
+ {
72
+ width: 150px;
73
+ height: 42px;
74
+ padding-top: 0px;
75
+ padding-right: 9px;
76
+ position: absolute;
77
+ right: 0;
78
+ background-image: url(images/sprites.png);
79
+ background-repeat: no-repeat;
80
+ top: -42px;
81
+ }
82
+
83
+ #yoxview #yoxview_menuPanel a
84
+ {
85
+ display: block;
86
+ width: 45px;
87
+ float: right;
88
+ text-align: center;
89
+ font-size: 0.8em;
90
+ position: relative;
91
+ margin-top: -5px;
92
+ padding-bottom: 13px;
93
+ text-decoration: none;
94
+ font-family: Arial, Sans-Serif;
95
+ }
96
+ #yoxview #yoxview_menuPanel a span{ color: White; display: block; margin-bottom: 3px; }
97
+ #yoxview #yoxview_menuPanel a.last{ margin-left: 0; }
98
+ #yoxview #yoxview_menuPanel a:focus{ outline: none; }
99
+ #yoxview #yoxview_infoPanel
100
+ {
101
+ position: absolute;
102
+ bottom: 0;
103
+ width: 100%;
104
+ height: 0;
105
+ }
106
+ #yoxview #yoxview_infoPanelBack
107
+ {
108
+ position: absolute;
109
+ width: 100%;
110
+ height: 100%;
111
+ z-index: 1;
112
+ left: 0;
113
+ top: 0;
114
+ }
115
+ #yoxview #yoxview_infoPanelContent
116
+ {
117
+ position: absolute;
118
+ width: 100%;
119
+ z-index: 2;
120
+ top: 0;
121
+ left: 0;
122
+ color: White;
123
+ }
124
+ #yoxview #yoxview_infoPanelContent span#yoxview_count
125
+ {
126
+ display: block;
127
+ width: 55px;
128
+ font-size: 0.8em;
129
+ float: left;
130
+ text-align: center;
131
+ padding-top: 8px;
132
+ color: #bbb;
133
+ }
134
+ #yoxview #yoxview_infoPanelContent #yoxview_infoText
135
+ {
136
+ margin: 0 55px;
137
+ font-size: 12pt;
138
+ padding: 5px 0;
139
+ }
140
+ #yoxview #yoxview_infoPanelContent #yoxview_infoText #yoxview_infoTextDescription
141
+ {
142
+ margin-top: 1em;
143
+ font-size: 10pt;
144
+ padding-bottom: 0.5em;
145
+ max-height: 200px;
146
+ overflow: auto;
147
+ padding-right: 10px;
148
+ }
149
+ #yoxview #yoxview_infoPanelContent #yoxview_infoText a{ color: #a7d557; text-decoration: none; outline: none; }
150
+ #yoxview #yoxview_infoPanelContent #yoxview_infoText a:hover{ color: #d5eeaa }
151
+ #yoxview #yoxview_infoPanel a.yoxviewInfoLink
152
+ {
153
+ display: none;
154
+ opacity: 0.8;
155
+ float: right;
156
+ margin-right: 5px;
157
+ margin-top: 5px;
158
+ }
159
+ #yoxview #yoxview_infoPanel a.yoxviewInfoLink:hover{ opacity: 1 }
160
+ #yoxview #yoxview_helpPanel
161
+ {
162
+ display: none;
163
+ width: 201px;
164
+ height: 312px;
165
+ position: absolute;
166
+ top: 50%;
167
+ left: 50%;
168
+ margin-top: -171px;
169
+ margin-left: -111px;
170
+ z-index: 5;
171
+ color: White;
172
+ padding: 20px;
173
+ padding-top: 10px;
174
+ cursor: pointer;
175
+ }
176
+ #yoxview #yoxview_helpPanel h1{ font-family: Arial Black, Arial, Sans-Serif; font-size: 1em; }
177
+ #yoxview #yoxview_helpPanel p{ margin-top: 80px; }
178
+ #yoxview #yoxview_helpPanel span#yoxview_closeHelp{ display: block; position: absolute; bottom: 20px; left: 0; text-align: center; width: 100%; }
179
+ #yoxview .yoxview_error
180
+ {
181
+ display: block;
182
+ text-align: center;
183
+ color: White;
184
+ font-family: Arial, Sans-Serif;
185
+ font-size: 14pt;
186
+ top: 41%;
187
+ width: 100%;
188
+ height: 20%;
189
+ position: absolute;
190
+ padding: 10px;
191
+ }
192
+ #yoxview .yoxview_error .errorUrl
193
+ {
194
+ font-size: 10pt;
195
+ }
196
+ #yoxview .yoxview_top{ top: 0; width: 50%; }
197
+
198
+ .yoxview-thumbnails a
199
+ {
200
+ float: left;
201
+ margin: 4px;
202
+ /* For thumbnails opacity: */
203
+ opacity: 0.8;
204
+ filter: alpha(opacity=80);
205
+ }
206
+ .yoxview-thumbnails a:hover
207
+ {
208
+ /* For thumbnails opacity: */
209
+ opacity: 1;
210
+ filter: alpha(opacity=100);
211
+ }
212
+ .yoxview-thumbnails a img
213
+ {
214
+ /* Set white borders around the thumbnails, instead of the browser's default Blue: */
215
+ border: solid 1px #ffffff;
216
+ }
217
+ .yoxview-thumbnails-details{ margin-bottom: 1em; }
218
+ .yoxview-thumbnails-details h2{ margin-bottom: 0; padding: 0; font-size: 1.2em; font-weight: bold;}