Galleriffic 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +17 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/Galleriffic.iml +20 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +5 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +471 -0
- data/Galleriffic.gemspec +24 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +34 -0
- data/Rakefile +1 -0
- data/lib/.DS_Store +0 -0
- data/lib/Galleriffic/version.rb +3 -0
- data/lib/Galleriffic.rb +6 -0
- data/vendor/.DS_Store +0 -0
- data/vendor/assets/.DS_Store +0 -0
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/jquery-1.3.2.js +4376 -0
- data/vendor/assets/javascripts/jquery.galleriffic.js +979 -0
- data/vendor/assets/javascripts/jquery.history.js +168 -0
- data/vendor/assets/javascripts/jquery.opacityrollover.js +42 -0
- data/vendor/assets/javascripts/jush.js +515 -0
- data/vendor/assets/stylesheets/.DS_Store +0 -0
- data/vendor/assets/stylesheets/basic.css +63 -0
- data/vendor/assets/stylesheets/black.css +57 -0
- data/vendor/assets/stylesheets/caption.png +0 -0
- data/vendor/assets/stylesheets/galleriffic-1.css +161 -0
- data/vendor/assets/stylesheets/galleriffic-2.css +150 -0
- data/vendor/assets/stylesheets/galleriffic-3.css +150 -0
- data/vendor/assets/stylesheets/galleriffic-4.css +160 -0
- data/vendor/assets/stylesheets/galleriffic-5.css +197 -0
- data/vendor/assets/stylesheets/jush.css +29 -0
- data/vendor/assets/stylesheets/loader.gif +0 -0
- data/vendor/assets/stylesheets/loaderWhite.gif +0 -0
- data/vendor/assets/stylesheets/nextPageArrow.gif +0 -0
- data/vendor/assets/stylesheets/nextPageArrowWhite.gif +0 -0
- data/vendor/assets/stylesheets/prevPageArrow.gif +0 -0
- data/vendor/assets/stylesheets/prevPageArrowWhite.gif +0 -0
- data/vendor/assets/stylesheets/white.css +57 -0
- metadata +121 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery history plugin
|
3
|
+
*
|
4
|
+
* sample page: http://www.mikage.to/jquery/jquery_history.html
|
5
|
+
*
|
6
|
+
* Copyright (c) 2006-2009 Taku Sano (Mikage Sawatari)
|
7
|
+
* Licensed under the MIT License:
|
8
|
+
* http://www.opensource.org/licenses/mit-license.php
|
9
|
+
*
|
10
|
+
* Modified by Lincoln Cooper to add Safari support and only call the callback once during initialization
|
11
|
+
* for msie when no initial hash supplied.
|
12
|
+
*/
|
13
|
+
|
14
|
+
|
15
|
+
jQuery.extend({
|
16
|
+
historyCurrentHash: undefined,
|
17
|
+
historyCallback: undefined,
|
18
|
+
historyIframeSrc: undefined,
|
19
|
+
|
20
|
+
historyInit: function(callback, src){
|
21
|
+
jQuery.historyCallback = callback;
|
22
|
+
if (src) jQuery.historyIframeSrc = src;
|
23
|
+
var current_hash = location.hash.replace(/\?.*$/, '');
|
24
|
+
|
25
|
+
jQuery.historyCurrentHash = current_hash;
|
26
|
+
// if ((jQuery.browser.msie) && (jQuery.browser.version < 8)) {
|
27
|
+
if (jQuery.browser.msie) {
|
28
|
+
// To stop the callback firing twice during initilization if no hash present
|
29
|
+
if (jQuery.historyCurrentHash == '') {
|
30
|
+
jQuery.historyCurrentHash = '#';
|
31
|
+
}
|
32
|
+
|
33
|
+
// add hidden iframe for IE
|
34
|
+
jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"'+
|
35
|
+
(jQuery.historyIframeSrc ? ' src="'+jQuery.historyIframeSrc+'"' : '')
|
36
|
+
+'></iframe>'
|
37
|
+
);
|
38
|
+
var ihistory = jQuery("#jQuery_history")[0];
|
39
|
+
var iframe = ihistory.contentWindow.document;
|
40
|
+
iframe.open();
|
41
|
+
iframe.close();
|
42
|
+
iframe.location.hash = current_hash;
|
43
|
+
}
|
44
|
+
else if (jQuery.browser.safari) {
|
45
|
+
// etablish back/forward stacks
|
46
|
+
jQuery.historyBackStack = [];
|
47
|
+
jQuery.historyBackStack.length = history.length;
|
48
|
+
jQuery.historyForwardStack = [];
|
49
|
+
jQuery.lastHistoryLength = history.length;
|
50
|
+
|
51
|
+
jQuery.isFirst = true;
|
52
|
+
}
|
53
|
+
if(current_hash)
|
54
|
+
jQuery.historyCallback(current_hash.replace(/^#/, ''));
|
55
|
+
setInterval(jQuery.historyCheck, 100);
|
56
|
+
},
|
57
|
+
|
58
|
+
historyAddHistory: function(hash) {
|
59
|
+
// This makes the looping function do something
|
60
|
+
jQuery.historyBackStack.push(hash);
|
61
|
+
|
62
|
+
jQuery.historyForwardStack.length = 0; // clear forwardStack (true click occured)
|
63
|
+
this.isFirst = true;
|
64
|
+
},
|
65
|
+
|
66
|
+
historyCheck: function(){
|
67
|
+
// if ((jQuery.browser.msie) && (jQuery.browser.version < 8)) {
|
68
|
+
if (jQuery.browser.msie) {
|
69
|
+
// On IE, check for location.hash of iframe
|
70
|
+
var ihistory = jQuery("#jQuery_history")[0];
|
71
|
+
var iframe = ihistory.contentDocument || ihistory.contentWindow.document;
|
72
|
+
var current_hash = iframe.location.hash.replace(/\?.*$/, '');
|
73
|
+
if(current_hash != jQuery.historyCurrentHash) {
|
74
|
+
|
75
|
+
location.hash = current_hash;
|
76
|
+
jQuery.historyCurrentHash = current_hash;
|
77
|
+
jQuery.historyCallback(current_hash.replace(/^#/, ''));
|
78
|
+
|
79
|
+
}
|
80
|
+
} else if (jQuery.browser.safari) {
|
81
|
+
if(jQuery.lastHistoryLength == history.length && jQuery.historyBackStack.length > jQuery.lastHistoryLength) {
|
82
|
+
jQuery.historyBackStack.shift();
|
83
|
+
}
|
84
|
+
if (!jQuery.dontCheck) {
|
85
|
+
var historyDelta = history.length - jQuery.historyBackStack.length;
|
86
|
+
jQuery.lastHistoryLength = history.length;
|
87
|
+
|
88
|
+
if (historyDelta) { // back or forward button has been pushed
|
89
|
+
jQuery.isFirst = false;
|
90
|
+
if (historyDelta < 0) { // back button has been pushed
|
91
|
+
// move items to forward stack
|
92
|
+
for (var i = 0; i < Math.abs(historyDelta); i++) jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());
|
93
|
+
} else { // forward button has been pushed
|
94
|
+
// move items to back stack
|
95
|
+
for (var i = 0; i < historyDelta; i++) jQuery.historyBackStack.push(jQuery.historyForwardStack.shift());
|
96
|
+
}
|
97
|
+
var cachedHash = jQuery.historyBackStack[jQuery.historyBackStack.length - 1];
|
98
|
+
if (cachedHash != undefined) {
|
99
|
+
jQuery.historyCurrentHash = location.hash.replace(/\?.*$/, '');
|
100
|
+
jQuery.historyCallback(cachedHash);
|
101
|
+
}
|
102
|
+
} else if (jQuery.historyBackStack[jQuery.historyBackStack.length - 1] == undefined && !jQuery.isFirst) {
|
103
|
+
// back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
|
104
|
+
// document.URL doesn't change in Safari
|
105
|
+
if (location.hash) {
|
106
|
+
var current_hash = location.hash;
|
107
|
+
jQuery.historyCallback(location.hash.replace(/^#/, ''));
|
108
|
+
} else {
|
109
|
+
var current_hash = '';
|
110
|
+
jQuery.historyCallback('');
|
111
|
+
}
|
112
|
+
jQuery.isFirst = true;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
} else {
|
116
|
+
// otherwise, check for location.hash
|
117
|
+
var current_hash = location.hash.replace(/\?.*$/, '');
|
118
|
+
if(current_hash != jQuery.historyCurrentHash) {
|
119
|
+
jQuery.historyCurrentHash = current_hash;
|
120
|
+
jQuery.historyCallback(current_hash.replace(/^#/, ''));
|
121
|
+
}
|
122
|
+
}
|
123
|
+
},
|
124
|
+
historyLoad: function(hash){
|
125
|
+
var newhash;
|
126
|
+
hash = decodeURIComponent(hash.replace(/\?.*$/, ''));
|
127
|
+
|
128
|
+
if (jQuery.browser.safari) {
|
129
|
+
newhash = hash;
|
130
|
+
}
|
131
|
+
else {
|
132
|
+
newhash = '#' + hash;
|
133
|
+
location.hash = newhash;
|
134
|
+
}
|
135
|
+
jQuery.historyCurrentHash = newhash;
|
136
|
+
|
137
|
+
// if ((jQuery.browser.msie) && (jQuery.browser.version < 8)) {
|
138
|
+
if (jQuery.browser.msie) {
|
139
|
+
var ihistory = jQuery("#jQuery_history")[0];
|
140
|
+
var iframe = ihistory.contentWindow.document;
|
141
|
+
iframe.open();
|
142
|
+
iframe.close();
|
143
|
+
iframe.location.hash = newhash;
|
144
|
+
jQuery.lastHistoryLength = history.length;
|
145
|
+
jQuery.historyCallback(hash);
|
146
|
+
}
|
147
|
+
else if (jQuery.browser.safari) {
|
148
|
+
jQuery.dontCheck = true;
|
149
|
+
// Manually keep track of the history values for Safari
|
150
|
+
this.historyAddHistory(hash);
|
151
|
+
|
152
|
+
// Wait a while before allowing checking so that Safari has time to update the "history" object
|
153
|
+
// correctly (otherwise the check loop would detect a false change in hash).
|
154
|
+
var fn = function() {jQuery.dontCheck = false;};
|
155
|
+
window.setTimeout(fn, 200);
|
156
|
+
jQuery.historyCallback(hash);
|
157
|
+
// N.B. "location.hash=" must be the last line of code for Safari as execution stops afterwards.
|
158
|
+
// By explicitly using the "location.hash" command (instead of using a variable set to "location.hash") the
|
159
|
+
// URL in the browser and the "history" object are both updated correctly.
|
160
|
+
location.hash = newhash;
|
161
|
+
}
|
162
|
+
else {
|
163
|
+
jQuery.historyCallback(hash);
|
164
|
+
}
|
165
|
+
}
|
166
|
+
});
|
167
|
+
|
168
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* jQuery Opacity Rollover plugin
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 Trent Foley (http://trentacular.com)
|
5
|
+
* Licensed under the MIT License:
|
6
|
+
* http://www.opensource.org/licenses/mit-license.php
|
7
|
+
*/
|
8
|
+
;(function($) {
|
9
|
+
var defaults = {
|
10
|
+
mouseOutOpacity: 0.67,
|
11
|
+
mouseOverOpacity: 1.0,
|
12
|
+
fadeSpeed: 'fast',
|
13
|
+
exemptionSelector: '.selected'
|
14
|
+
};
|
15
|
+
|
16
|
+
$.fn.opacityrollover = function(settings) {
|
17
|
+
// Initialize the effect
|
18
|
+
$.extend(this, defaults, settings);
|
19
|
+
|
20
|
+
var config = this;
|
21
|
+
|
22
|
+
function fadeTo(element, opacity) {
|
23
|
+
var $target = $(element);
|
24
|
+
|
25
|
+
if (config.exemptionSelector)
|
26
|
+
$target = $target.not(config.exemptionSelector);
|
27
|
+
|
28
|
+
$target.fadeTo(config.fadeSpeed, opacity);
|
29
|
+
}
|
30
|
+
|
31
|
+
this.css('opacity', this.mouseOutOpacity)
|
32
|
+
.hover(
|
33
|
+
function () {
|
34
|
+
fadeTo(this, config.mouseOverOpacity);
|
35
|
+
},
|
36
|
+
function () {
|
37
|
+
fadeTo(this, config.mouseOutOpacity);
|
38
|
+
});
|
39
|
+
|
40
|
+
return this;
|
41
|
+
};
|
42
|
+
})(jQuery);
|