adminpanel 2.1.7 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -3
- data/Gemfile +3 -27
- data/adminpanel.gemspec +24 -23
- data/app/assets/images/adminpanel/loguito.png +0 -0
- data/app/assets/javascripts/adminpanel/bootstrap-wysihtml5-4pre.js +120 -120
- data/app/assets/javascripts/adminpanel/spinner.js.coffee +6 -6
- data/app/assets/stylesheets/adminpanel/bootstrap-wysihtml5.css +21 -75
- data/app/controllers/adminpanel/analytics_controller.rb +34 -2
- data/app/controllers/adminpanel/application_controller.rb +7 -6
- data/app/controllers/adminpanel/categories_controller.rb +0 -1
- data/app/controllers/adminpanel/galleries_controller.rb +0 -1
- data/app/controllers/adminpanel/permissions_controller.rb +14 -0
- data/app/controllers/adminpanel/rols_controller.rb +10 -0
- data/app/controllers/adminpanel/sections_controller.rb +11 -14
- data/app/controllers/adminpanel/sessions_controller.rb +45 -11
- data/app/controllers/adminpanel/users_controller.rb +2 -4
- data/app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb +31 -0
- data/app/controllers/concerns/adminpanel/analytics/twitter_analytics.rb +25 -0
- data/app/controllers/concerns/adminpanel/facebook_actions.rb +7 -5
- data/app/controllers/concerns/adminpanel/rest_actions.rb +12 -0
- data/app/controllers/concerns/adminpanel/twitter_actions.rb +40 -0
- data/app/helpers/adminpanel/adminpanel_form_builder.rb +21 -14
- data/app/helpers/adminpanel/analytics_helper.rb +22 -2
- data/app/helpers/adminpanel/application_helper.rb +2 -2
- data/app/helpers/adminpanel/breadcrumbs_helper.rb +8 -6
- data/app/helpers/adminpanel/router_helper.rb +4 -0
- data/app/helpers/adminpanel/sessions_helper.rb +2 -2
- data/app/helpers/adminpanel/shared_pages_helper.rb +3 -3
- data/{lib/generators/adminpanel/initialize/templates → app/models}/ability.rb +18 -6
- data/app/models/adminpanel/analytic.rb +1 -0
- data/app/models/adminpanel/auth.rb +4 -1
- data/app/models/adminpanel/permission.rb +52 -0
- data/app/models/adminpanel/rol.rb +35 -0
- data/app/models/adminpanel/user.rb +8 -8
- data/app/models/concerns/adminpanel/base.rb +4 -0
- data/app/models/concerns/adminpanel/facebook.rb +1 -1
- data/app/models/concerns/adminpanel/twitter.rb +27 -0
- data/app/views/adminpanel/analytics/{_widget_task_statistics.html.erb → _fb_statistic_widget.html.erb} +0 -0
- data/app/views/adminpanel/analytics/_header.html.erb +8 -2
- data/app/views/adminpanel/analytics/_instagram_details_modal.html.erb +55 -0
- data/app/views/adminpanel/analytics/_instagram_media.html.erb +25 -0
- data/app/views/adminpanel/analytics/_tweet.html.erb +32 -0
- data/app/views/adminpanel/analytics/_twitter_reply_modal.html.erb +41 -0
- data/app/views/adminpanel/analytics/fb.html.erb +6 -6
- data/app/views/adminpanel/analytics/instagram.html.erb +65 -0
- data/app/views/adminpanel/analytics/twitter.html.erb +89 -0
- data/app/views/adminpanel/sections/edit.html.erb +2 -5
- data/app/views/layouts/_side_menu.html.erb +3 -3
- data/app/views/layouts/admin.html.erb +2 -2
- data/app/views/shared/_delete_icon_button.html.erb +1 -1
- data/app/views/shared/_edit_icon_button.html.erb +1 -1
- data/app/views/shared/_fb_icon_button.html.erb +1 -1
- data/app/views/shared/_form_fields.html.erb +1 -1
- data/app/views/shared/_new_resource_button.html.erb +1 -2
- data/app/views/shared/_twitter_icon_button.html.erb +26 -0
- data/app/views/shared/_twitter_publish_modal.html.erb +40 -0
- data/app/views/shared/index.html.erb +5 -3
- data/app/views/shared/show.html.erb +7 -3
- data/config/initializers/twitter-oauth.rb +15 -0
- data/config/locales/en.yml +1 -1
- data/config/locales/es.yml +20 -1
- data/config/routes.rb +25 -5
- data/lib/adminpanel.rb +3 -0
- data/lib/adminpanel/engine.rb +19 -5
- data/lib/adminpanel/version.rb +1 -1
- data/lib/generators/adminpanel/initialize/initialize_generator.rb +0 -11
- data/lib/generators/adminpanel/initialize/templates/adminpanel_setup.rb +12 -0
- data/lib/generators/adminpanel/initialize/templates/create_adminpanel_tables.rb +74 -46
- data/lib/generators/adminpanel/resource/resource_generator_helper.rb +1 -1
- data/lib/generators/adminpanel/resource/templates/adminpanel_resource_template.rb +1 -1
- data/lib/tasks/adminpanel/adminpanel.rake +5 -5
- data/test/dummy/app/models/adminpanel/item.rb +1 -1
- data/test/dummy/app/models/adminpanel/mug.rb +1 -0
- data/test/dummy/app/models/adminpanel/photo.rb +4 -0
- data/test/dummy/app/models/adminpanel/product.rb +7 -1
- data/test/dummy/app/models/adminpanel/salesman.rb +1 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -1
- data/test/dummy/db/schema.rb +9 -2
- data/test/dummy/test/fixtures/adminpanel/permissions.yml +42 -0
- data/test/dummy/test/fixtures/adminpanel/rols.yml +28 -0
- data/test/dummy/test/fixtures/adminpanel/salesmen.yml +1 -0
- data/test/dummy/test/fixtures/adminpanel/users.yml +49 -1
- data/test/features/shared/resource/index_test.rb +1 -0
- data/test/features/shared/ui/action_exclution_test.rb +1 -0
- data/test/helpers/breadcrumbs_helper_test.rb +34 -0
- data/test/helpers/router_helper_test.rb +21 -0
- data/test/helpers/shared_pages_helper_test.rb +35 -0
- data/test/models/ability_test.rb +52 -0
- data/test/models/adminpanel/gallery_test.rb +0 -2
- data/test/models/adminpanel/user_test.rb +1 -1
- data/test/support/shared_database.rb +11 -0
- data/test/support/view_case.rb +34 -0
- data/test/tasks/adminpanel_rake_test.rb +5 -2
- data/test/test_helper.rb +1 -41
- metadata +191 -200
- data/app/assets/javascripts/adminpanel/jquery.facybox.js +0 -395
- data/app/assets/stylesheets/adminpanel/facybox.css +0 -146
- data/app/models/adminpanel/group.rb +0 -6
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/models/ability.rb +0 -31
- data/test/dummy/test/fixtures/adminpanel/groups.yml +0 -4
@@ -1,395 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* facybox (for jQuery)
|
3
|
-
* version: 1.0 (11/09/2009)
|
4
|
-
* @requires jQuery v1.2 or later
|
5
|
-
*
|
6
|
-
* Examples at http://bitbonsai.com/facybox/
|
7
|
-
*
|
8
|
-
* Licensed under the MIT:
|
9
|
-
* http://www.opensource.org/licenses/mit-license.php
|
10
|
-
*
|
11
|
-
* Copyright 2009 Mauricio Wolff [ chris@ozmm.org ]
|
12
|
-
*/
|
13
|
-
;(function($) {
|
14
|
-
|
15
|
-
$.fn.fixPNG = function() {
|
16
|
-
return this.each(function () {
|
17
|
-
var image = $(this).css('backgroundImage');
|
18
|
-
|
19
|
-
if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
|
20
|
-
image = RegExp.$1;
|
21
|
-
$(this).css({
|
22
|
-
'backgroundImage': 'none',
|
23
|
-
'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')"
|
24
|
-
}).each(function () {
|
25
|
-
var position = $(this).css('position');
|
26
|
-
if (position != 'absolute' && position != 'relative')
|
27
|
-
$(this).css('position', 'relative');
|
28
|
-
});
|
29
|
-
}
|
30
|
-
});
|
31
|
-
};
|
32
|
-
|
33
|
-
//TODO refactor using data.content_klass
|
34
|
-
$.facybox = function(data, klass) {
|
35
|
-
$.facybox.loading();
|
36
|
-
$.facybox.content_klass = klass;
|
37
|
-
if (data.ajax) revealAjax(data.ajax);
|
38
|
-
else if(data.image) revealImage(data.image);
|
39
|
-
else if(data.images) revealGallery(data.images,data.initial);
|
40
|
-
else if(data.div) revealHref(data.div);
|
41
|
-
else if($.isFunction(data)) data.call($);
|
42
|
-
else $.facybox.reveal(data);
|
43
|
-
}
|
44
|
-
|
45
|
-
/*
|
46
|
-
* Public, $.facybox methods
|
47
|
-
*/
|
48
|
-
|
49
|
-
$.extend($.facybox, {
|
50
|
-
//possible option: noAutoload --- will build facybox only when it is needed
|
51
|
-
settings: {
|
52
|
-
opacity : 0.3,
|
53
|
-
overlay : true,
|
54
|
-
modal : false,
|
55
|
-
imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ],
|
56
|
-
imageMimeTypes : [ 'image/jpeg', 'image/png', 'image/gif' ]
|
57
|
-
},
|
58
|
-
|
59
|
-
html : function(){
|
60
|
-
return '\
|
61
|
-
<div id="facybox" style="display:none;"> \
|
62
|
-
<div class="popup"> \
|
63
|
-
<table> \
|
64
|
-
<tbody> \
|
65
|
-
<tr> \
|
66
|
-
<td class="nw"/><td class="n" /><td class="ne"/> \
|
67
|
-
</tr> \
|
68
|
-
<tr> \
|
69
|
-
<td class="w" /> \
|
70
|
-
<td class="body"> \
|
71
|
-
<div class="footer"> </div> \
|
72
|
-
<a href="#" class="close"></a>\
|
73
|
-
<div class="content"> \
|
74
|
-
</div> \
|
75
|
-
</td> \
|
76
|
-
<td class="e"/> \
|
77
|
-
</tr> \
|
78
|
-
<tr> \
|
79
|
-
<td class="sw"/><td class="s"/><td class="se"/> \
|
80
|
-
</tr> \
|
81
|
-
</tbody> \
|
82
|
-
</table> \
|
83
|
-
</div> \
|
84
|
-
</div> \
|
85
|
-
<div class="loading"></div> \
|
86
|
-
'
|
87
|
-
},
|
88
|
-
|
89
|
-
loading: function(){
|
90
|
-
init();
|
91
|
-
if($('.loading',$('#facybox'))[0]) return;//already in loading state...
|
92
|
-
showOverlay();
|
93
|
-
$.facybox.wait();
|
94
|
-
if (!$.facybox.settings.modal) {
|
95
|
-
$(document).bind('keydown.facybox', function(e) {
|
96
|
-
if(e.keyCode == 27) $.facybox.close();//ESC
|
97
|
-
});
|
98
|
-
}
|
99
|
-
$(document).trigger('loading.facybox');
|
100
|
-
},
|
101
|
-
|
102
|
-
wait: function(){
|
103
|
-
var $f = $('#facybox');
|
104
|
-
$('.content',$f).empty();//clear out old content
|
105
|
-
$('.body',$f).children().hide().end().append('<div class="loading"></div>');
|
106
|
-
$f.fadeIn('fast');
|
107
|
-
$.facybox.centralize();
|
108
|
-
$(document).trigger('reveal.facybox').trigger('afterReveal.facybox');
|
109
|
-
},
|
110
|
-
|
111
|
-
centralize: function(){
|
112
|
-
|
113
|
-
var $f = $('#facybox');
|
114
|
-
var pos = $.facybox.getViewport();
|
115
|
-
var wl = parseInt(pos[0]/2) - parseInt($f.find("table").width() / 2);
|
116
|
-
var fh = parseInt($f.height());
|
117
|
-
|
118
|
-
if(pos[1] > fh){
|
119
|
-
var t = (pos[3] + (pos[1] - fh)/2);
|
120
|
-
$f.css({ 'left': wl, 'top': t });
|
121
|
-
// console.log('height smaller then window: '+fh, pos[1], pos[3])
|
122
|
-
} else {
|
123
|
-
var t = (pos[3] + (pos[1] /10));
|
124
|
-
$f.css({ 'left': wl, 'top': t });
|
125
|
-
// console.log('height bigger then window')
|
126
|
-
}
|
127
|
-
},
|
128
|
-
|
129
|
-
getViewport: function() {
|
130
|
-
// [1009, 426, 0, 704]
|
131
|
-
return [$(window).width(), $(window).height(), $(window).scrollLeft(), $(window).scrollTop()];
|
132
|
-
},
|
133
|
-
|
134
|
-
reveal: function(content){
|
135
|
-
$(document).trigger('beforeReveal.facybox');
|
136
|
-
var $f = $('#facybox');
|
137
|
-
$('.content',$f)
|
138
|
-
.attr('class',($.facybox.content_klass||'')+' content') //do not simply add the new class, since on the next call the old classes would remain
|
139
|
-
.html(content);
|
140
|
-
$('.loading',$f).remove();
|
141
|
-
|
142
|
-
var $body = $('.body',$f);
|
143
|
-
|
144
|
-
$body.children().fadeIn('fast');
|
145
|
-
|
146
|
-
$.facybox.centralize();
|
147
|
-
|
148
|
-
$(document).trigger('reveal.facybox').trigger('afterReveal.facybox');
|
149
|
-
},
|
150
|
-
|
151
|
-
close: function(){
|
152
|
-
$(document).trigger('close.facybox');
|
153
|
-
return false;
|
154
|
-
}
|
155
|
-
})
|
156
|
-
|
157
|
-
/*
|
158
|
-
* Bind to links, on click they open a facybox which
|
159
|
-
* contains what their href points to
|
160
|
-
*/
|
161
|
-
$.fn.facybox = function(settings) {
|
162
|
-
var $this = $(this);
|
163
|
-
if(!$this[0]) return $this;//called on empty elements, just stop and continue chain
|
164
|
-
if(settings)$.extend($.facybox.settings, settings);
|
165
|
-
if(!$.facybox.settings.noAutoload) init();
|
166
|
-
|
167
|
-
$this.bind('click.facybox',function(){
|
168
|
-
$.facybox.loading();
|
169
|
-
// support for rel="facybox.inline_popup" syntax, to add a class
|
170
|
-
// also supports deprecated "facybox[.inline_popup]" syntax
|
171
|
-
var klass = this.rel.match(/facybox\[?\.(\w+)\]?/);
|
172
|
-
$.facybox.content_klass = klass ? klass[1] : '';
|
173
|
-
revealHref(this.href);
|
174
|
-
return false;
|
175
|
-
});
|
176
|
-
return $this;//continue chain
|
177
|
-
}
|
178
|
-
|
179
|
-
/*
|
180
|
-
* Private methods
|
181
|
-
*/
|
182
|
-
// called one time to setup facybox on this page
|
183
|
-
function init() {
|
184
|
-
if($.facybox.settings.inited) return;
|
185
|
-
else $.facybox.settings.inited = true;
|
186
|
-
|
187
|
-
$(document).trigger('init.facybox');
|
188
|
-
makeBackwardsCompatible();
|
189
|
-
|
190
|
-
var imageTypes = $.facybox.settings.imageTypes.join('|');
|
191
|
-
$.facybox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')', 'i');
|
192
|
-
|
193
|
-
$('body').append($.facybox.html());//insert facybox to dom
|
194
|
-
|
195
|
-
|
196
|
-
// ie hacks
|
197
|
-
var $f = $("#facybox");
|
198
|
-
|
199
|
-
// it amazes me that this is still better than native png32 support in ie8...
|
200
|
-
if($.browser.msie){
|
201
|
-
$(".n, .s, .w, .e, .nw, .ne, .sw, .se", $f).fixPNG();
|
202
|
-
// ie6
|
203
|
-
if(parseInt($.browser.version) <= 6){
|
204
|
-
var css = "<style type='text/css' media='screen'>* html #facybox_overlay { position: absolute; height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');}</style>"
|
205
|
-
$('head').append(css);
|
206
|
-
$(".close", $f).fixPNG();
|
207
|
-
$(".close",$f).css({
|
208
|
-
'right': '15px'
|
209
|
-
});
|
210
|
-
}
|
211
|
-
$(".w, .e",$f).css({
|
212
|
-
width: '13px',
|
213
|
-
'font-size': '0'
|
214
|
-
}).text(" ");
|
215
|
-
}
|
216
|
-
|
217
|
-
//if we did not autoload, so the user has just clicked the facybox and pre-loading is useless
|
218
|
-
if(! $.facybox.settings.noAutoload){
|
219
|
-
preloadImages();
|
220
|
-
}
|
221
|
-
$('#facybox .close').click($.facybox.close);
|
222
|
-
}
|
223
|
-
|
224
|
-
//preloads all the static facybox images
|
225
|
-
function preloadImages(){
|
226
|
-
//TODO preload prev/next ?
|
227
|
-
$('#facybox').find('.n, .close , .s, .w, .e, .nw, ne, sw, se').each(function() {
|
228
|
-
backgroundImage = $(this).css('background-image');
|
229
|
-
if (backgroundImage === 'none') return;
|
230
|
-
var img = new Image();
|
231
|
-
img.src = backgroundImage.replace(/url\("?(.*?)"?\)/, '$1');
|
232
|
-
});
|
233
|
-
// var img = new Image();
|
234
|
-
// img.src = 'images/loading.gif';
|
235
|
-
/*
|
236
|
-
TODO: remove and load preloader from filament group
|
237
|
-
*/
|
238
|
-
}
|
239
|
-
|
240
|
-
function makeBackwardsCompatible() {
|
241
|
-
var $s = $.facybox.settings;
|
242
|
-
$s.imageTypes = $s.image_types || $s.imageTypes;
|
243
|
-
$s.facyboxHtml = $s.facybox_html || $s.facyboxHtml;
|
244
|
-
}
|
245
|
-
|
246
|
-
// Figures out what you want to display and displays it
|
247
|
-
// formats are:
|
248
|
-
// div: #id
|
249
|
-
// image: blah.extension
|
250
|
-
// ajax: anything else
|
251
|
-
function revealHref(href) {
|
252
|
-
// div
|
253
|
-
if(href.match(/#/)) {
|
254
|
-
var url = window.location.href.split('#')[0];
|
255
|
-
var target = href.replace(url,'');
|
256
|
-
if (target == '#') return
|
257
|
-
$.facybox.reveal($(target).html(), $.facybox.content_klass);
|
258
|
-
// image
|
259
|
-
} else if(href.match($.facybox.settings.imageTypesRegexp)) {
|
260
|
-
revealImage(href);
|
261
|
-
// ajax
|
262
|
-
} else { revealAjax(href)}
|
263
|
-
}
|
264
|
-
|
265
|
-
function revealGallery(hrefs, initial) {
|
266
|
-
//initial position
|
267
|
-
var position = $.inArray(initial||0,hrefs);
|
268
|
-
if(position ==-1){
|
269
|
-
position = 0;
|
270
|
-
}
|
271
|
-
|
272
|
-
//build navigation and ensure it will be removed
|
273
|
-
var $footer = $('#facybox div.footer');
|
274
|
-
|
275
|
-
$footer.append($('<div class="navigation"><a class="prev"/><a class="next"/><div class="counter"></div></div>'));
|
276
|
-
var $nav = $('#facybox .navigation');
|
277
|
-
|
278
|
-
$(document).bind('afterClose.facybox',function(){$nav.remove()});
|
279
|
-
|
280
|
-
function change_image(diff){
|
281
|
-
position = (position + diff + hrefs.length) % hrefs.length;
|
282
|
-
revealImage(hrefs[position]);
|
283
|
-
$nav.find('.counter').html(position +1+" / "+hrefs.length);
|
284
|
-
}
|
285
|
-
change_image(0);
|
286
|
-
|
287
|
-
//bind events
|
288
|
-
$('.prev',$nav).click(function(){change_image(-1)});
|
289
|
-
$('.next',$nav).click(function(){change_image(1)});
|
290
|
-
$(document).bind('keydown.facybox', function(e) {
|
291
|
-
if(e.keyCode == 39)change_image(1); // right
|
292
|
-
if(e.keyCode == 37)change_image(-1); // left
|
293
|
-
});
|
294
|
-
}
|
295
|
-
|
296
|
-
function revealImage(href){
|
297
|
-
|
298
|
-
var $f = $("#facybox");
|
299
|
-
|
300
|
-
$('#facybox .content').empty();
|
301
|
-
$.facybox.loading();//TODO loading must be shown until image is loaded -> stopLoading() on onload
|
302
|
-
var image = new Image();
|
303
|
-
image.onload = function() {
|
304
|
-
$.facybox.reveal('<div class="image"><img src="' + image.src + '" /></div>', $.facybox.content_klass);
|
305
|
-
|
306
|
-
var $footer = $("div.footer",$f);
|
307
|
-
var $content = $("div.content",$f);
|
308
|
-
var $navigation = $("div.navigation",$f);
|
309
|
-
var $next = $("a.next",$f);
|
310
|
-
var $prev = $("a.prev",$f);
|
311
|
-
var $counter = $("div.counter",$f);
|
312
|
-
|
313
|
-
var size = [$content.width(), $content.height()];
|
314
|
-
|
315
|
-
$footer.width(size[0]).height(size[1]);
|
316
|
-
$navigation.width(size[0]).height(size[1]);
|
317
|
-
$next.width(parseInt(size[0]/2)).height(size[1]).css({ left: (size[0]/2) });
|
318
|
-
$prev.width(size[0]/2).height(size[1]);
|
319
|
-
$counter.width(parseInt($f.width() -26)).css({'opacity' : 0.5, '-moz-border-radius' : '8px', '-webkit-border-radius' : '8px'})
|
320
|
-
|
321
|
-
}
|
322
|
-
image.src = href;
|
323
|
-
}
|
324
|
-
|
325
|
-
function revealAjax(href) {
|
326
|
-
// $.get(href, function(data) { $.facybox.reveal(data) });
|
327
|
-
$.ajax({
|
328
|
-
type: "GET",
|
329
|
-
url: href,
|
330
|
-
complete: function(XMLHttpRequest, textStatus) {
|
331
|
-
content_type = XMLHttpRequest.getResponseHeader("Content-Type");
|
332
|
-
if ( jQuery.inArray(content_type, $.facybox.settings.imageMimeTypes) >= 0 ) {
|
333
|
-
revealImage(href)
|
334
|
-
$.facybox.centralize();
|
335
|
-
} else {
|
336
|
-
$.facybox.reveal( XMLHttpRequest.responseText );
|
337
|
-
}
|
338
|
-
}
|
339
|
-
});
|
340
|
-
}
|
341
|
-
|
342
|
-
function skipOverlay() {
|
343
|
-
return $.facybox.settings.overlay == false || $.facybox.settings.opacity === null
|
344
|
-
}
|
345
|
-
|
346
|
-
function showOverlay() {
|
347
|
-
if(skipOverlay()) return;
|
348
|
-
|
349
|
-
if($('#facybox_overlay').length == 0){
|
350
|
-
$("body").append('<div id="facybox_overlay" class="facybox_hide"></div>');
|
351
|
-
}
|
352
|
-
|
353
|
-
$('#facybox_overlay').hide().addClass("facybox_overlayBG")
|
354
|
-
.css('opacity', $.facybox.settings.opacity)
|
355
|
-
.fadeIn(200);
|
356
|
-
if(!$.facybox.settings.modal){
|
357
|
-
$('#facybox_overlay').click(function(){ $(document).trigger('close.facybox')})
|
358
|
-
}
|
359
|
-
}
|
360
|
-
|
361
|
-
function hideOverlay() {
|
362
|
-
if(skipOverlay()) return;
|
363
|
-
|
364
|
-
$('#facybox_overlay').fadeOut(200, function(){
|
365
|
-
$("#facybox_overlay").removeClass("facybox_overlayBG").
|
366
|
-
addClass("facybox_hide").
|
367
|
-
remove();
|
368
|
-
})
|
369
|
-
}
|
370
|
-
|
371
|
-
/*
|
372
|
-
* Bindings
|
373
|
-
*/
|
374
|
-
|
375
|
-
$(document).bind('close.facybox', function() {
|
376
|
-
$(document).unbind('keydown.facybox');
|
377
|
-
|
378
|
-
// ie hacks
|
379
|
-
var $f = $("#facybox");
|
380
|
-
if($.browser.msie){
|
381
|
-
$('#facybox').hide();
|
382
|
-
hideOverlay();
|
383
|
-
$('#facybox .loading').remove();
|
384
|
-
} else {
|
385
|
-
$('#facybox').fadeOut('fast',function() {
|
386
|
-
$('#facybox .content').removeClass().addClass('content');//revert changing class
|
387
|
-
hideOverlay();
|
388
|
-
$('#facybox .loading').remove();
|
389
|
-
})
|
390
|
-
}
|
391
|
-
|
392
|
-
$(document).trigger('afterClose.facybox');
|
393
|
-
});
|
394
|
-
|
395
|
-
})(jQuery);
|
@@ -1,146 +0,0 @@
|
|
1
|
-
#facybox {
|
2
|
-
position: absolute;
|
3
|
-
top: 0;
|
4
|
-
left: 0;
|
5
|
-
margin: -20px 0 0 -20px;
|
6
|
-
z-index: 100;
|
7
|
-
text-align: left;
|
8
|
-
padding: 18px;
|
9
|
-
min-width: 40px;
|
10
|
-
min-height: 40px;
|
11
|
-
}
|
12
|
-
#facybox .w, #facybox .e, #facybox .nw,
|
13
|
-
#facybox .ne, #facybox .sw, #facybox .se {
|
14
|
-
min-height: 18px;
|
15
|
-
min-width: 13px;
|
16
|
-
}
|
17
|
-
#facybox .n, #facybox .s {
|
18
|
-
background-repeat: repeat-x;
|
19
|
-
height: 18px;
|
20
|
-
}
|
21
|
-
#facybox .w, #facybox .e {
|
22
|
-
background-repeat: repeat-y;
|
23
|
-
}
|
24
|
-
|
25
|
-
#facybox .nw, #facybox .ne, #facybox .sw, #facybox .se,
|
26
|
-
#facybox a.next, #facybox a.prev,
|
27
|
-
#facybox .closek #facybox .loading {
|
28
|
-
background-repeat: no-repeat;
|
29
|
-
}
|
30
|
-
|
31
|
-
#facybox a.next {
|
32
|
-
background-position: 9999px 50%;
|
33
|
-
}
|
34
|
-
|
35
|
-
#facybox a.prev {
|
36
|
-
background-position: -9999px 50%;
|
37
|
-
}
|
38
|
-
#facybox a.prev:hover{
|
39
|
-
background-position: 0 50%;
|
40
|
-
}
|
41
|
-
#facybox a.next:hover{
|
42
|
-
background-position: 100% 50%;
|
43
|
-
}
|
44
|
-
|
45
|
-
#facybox .close {
|
46
|
-
position: absolute;
|
47
|
-
top: 5px;
|
48
|
-
right: 0;
|
49
|
-
display: block;
|
50
|
-
width: 30px;
|
51
|
-
height: 30px;
|
52
|
-
}
|
53
|
-
|
54
|
-
#facybox .prev,
|
55
|
-
#facybox .next{
|
56
|
-
display: block;
|
57
|
-
position: absolute;
|
58
|
-
cursor: pointer;
|
59
|
-
}
|
60
|
-
|
61
|
-
#facybox .navigation .counter{
|
62
|
-
background: #000;
|
63
|
-
color: #fff;
|
64
|
-
text-align: center;
|
65
|
-
position: absolute;
|
66
|
-
bottom: -33px;
|
67
|
-
left: -10px;
|
68
|
-
padding: 2px 0;
|
69
|
-
font-size: 11px;
|
70
|
-
}
|
71
|
-
|
72
|
-
#facybox .loading {
|
73
|
-
margin: 0 auto;
|
74
|
-
width: 22px;
|
75
|
-
height: 22px;
|
76
|
-
text-align: center;
|
77
|
-
}
|
78
|
-
|
79
|
-
#facybox .popup {
|
80
|
-
position: relative;
|
81
|
-
}
|
82
|
-
|
83
|
-
#facybox table {
|
84
|
-
border-collapse: collapse;
|
85
|
-
}
|
86
|
-
|
87
|
-
#facybox td {
|
88
|
-
border-bottom: 0;
|
89
|
-
padding: 0;
|
90
|
-
}
|
91
|
-
|
92
|
-
#facybox .body {
|
93
|
-
padding: 10px;
|
94
|
-
background: #fff;
|
95
|
-
width: auto;
|
96
|
-
}
|
97
|
-
|
98
|
-
#facybox .loading {
|
99
|
-
text-align: center;
|
100
|
-
}
|
101
|
-
|
102
|
-
#facybox .image {
|
103
|
-
text-align: center;
|
104
|
-
line-height: 0;
|
105
|
-
}
|
106
|
-
|
107
|
-
#facybox img {
|
108
|
-
border: 0;
|
109
|
-
margin: 0;
|
110
|
-
}
|
111
|
-
|
112
|
-
#facybox .footer {
|
113
|
-
position: absolute;
|
114
|
-
top: 28px;
|
115
|
-
left: 23px;
|
116
|
-
padding: 0;
|
117
|
-
width: 90%;
|
118
|
-
}
|
119
|
-
|
120
|
-
#facybox .footer img {
|
121
|
-
vertical-align: middle;
|
122
|
-
}
|
123
|
-
|
124
|
-
#facybox .tl, #facybox .tr, #facybox .bl, #facybox .br {
|
125
|
-
height: 10px;
|
126
|
-
width: 10px;
|
127
|
-
overflow: hidden;
|
128
|
-
padding: 0;
|
129
|
-
}
|
130
|
-
|
131
|
-
#facybox_overlay {
|
132
|
-
position: fixed;
|
133
|
-
top: 0px;
|
134
|
-
left: 0px;
|
135
|
-
height: 100%;
|
136
|
-
width: 100%;
|
137
|
-
}
|
138
|
-
|
139
|
-
.facybox_hide {
|
140
|
-
z-index:-100;
|
141
|
-
}
|
142
|
-
|
143
|
-
.facybox_overlayBG {
|
144
|
-
background-color: #000;
|
145
|
-
z-index: 99;
|
146
|
-
}
|