enju_leaf 1.1.0.rc1 → 1.1.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/enju_leaf.js +0 -1
- data/app/assets/javascripts/mobile.js +2 -1
- data/app/assets/stylesheets/enju.css +1 -1
- data/app/assets/stylesheets/enju_leaf.css +0 -1
- data/app/assets/stylesheets/mobile.css +1 -1
- data/app/controllers/user_groups_controller.rb +10 -0
- data/app/mailers/notifier.rb +0 -8
- data/app/models/user_group.rb +20 -19
- data/app/views/devise/sessions/new.html.erb +1 -1
- data/app/views/my_accounts/_edit_credential.html.erb +3 -3
- data/app/views/page/_menu.html.erb +1 -1
- data/app/views/page/configuration.html.erb +3 -1
- data/app/views/user_groups/_form.html.erb +6 -1
- data/config/locales/translation_ja.yml +2 -3
- data/config/routes.rb +10 -10
- data/lib/enju_leaf.rb +3 -5
- data/lib/enju_leaf/controller.rb +1 -1
- data/lib/enju_leaf/engine.rb +5 -1
- data/lib/enju_leaf/version.rb +1 -1
- data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +0 -1
- data/lib/generators/enju_leaf/setup/setup_generator.rb +20 -1
- data/lib/generators/enju_leaf/setup/templates/config/application.yml +2 -2
- data/spec/controllers/users_controller_spec.rb +0 -10
- data/spec/dummy/app/controllers/application_controller.rb +8 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.fdt → _6b.fdt} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.fdx → _6b.fdx} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.fnm → _6b.fnm} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.frq → _6b.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.nrm → _6b.nrm} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.prx → _6b.prx} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.tii → _6b.tii} +0 -0
- data/spec/dummy/solr/data/test/index/{_3t.tis → _6b.tis} +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/{segments_7p → segments_cp} +0 -0
- data/spec/fixtures/user_groups.yml +20 -19
- data/spec/models/user_group_spec.rb +7 -7
- data/vendor/assets/javascripts/jquery.colorbox.js +108 -107
- data/vendor/assets/javascripts/{jquery.mobile-1.3.0.js → jquery.mobile-1.3.1.js} +3857 -3758
- data/vendor/assets/stylesheets/colorbox.css +4 -28
- data/vendor/assets/stylesheets/{jquery.mobile-1.3.0.css → jquery.mobile-1.3.1.css} +73 -64
- metadata +61 -35
- data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -693,12 +693,12 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
|
|
693
693
|
t.string "series_statement_identifier"
|
694
694
|
t.string "issn"
|
695
695
|
t.boolean "periodical", :default => false, :null => false
|
696
|
-
t.integer "
|
696
|
+
t.integer "manifestation_id"
|
697
697
|
t.text "note"
|
698
698
|
t.text "title_subseries_transcription"
|
699
699
|
end
|
700
700
|
|
701
|
-
add_index "series_statements", ["
|
701
|
+
add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
702
702
|
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
703
703
|
|
704
704
|
create_table "shelves", :force => true do |t|
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
@@ -1,22 +1,3 @@
|
|
1
|
-
# == Schema Information
|
2
|
-
#
|
3
|
-
# Table name: user_groups
|
4
|
-
#
|
5
|
-
# id :integer not null, primary key
|
6
|
-
# name :string(255)
|
7
|
-
# display_name :text
|
8
|
-
# note :text
|
9
|
-
# position :integer
|
10
|
-
# created_at :datetime not null
|
11
|
-
# updated_at :datetime not null
|
12
|
-
# deleted_at :datetime
|
13
|
-
# valid_period_for_new_user :integer default(0), not null
|
14
|
-
# expired_at :datetime
|
15
|
-
# number_of_day_to_notify_overdue :integer default(1), not null
|
16
|
-
# number_of_day_to_notify_due_date :integer default(7), not null
|
17
|
-
# number_of_time_to_notify_overdue :integer default(3), not null
|
18
|
-
#
|
19
|
-
|
20
1
|
---
|
21
2
|
user_group_00001:
|
22
3
|
name: (not specified)
|
@@ -48,3 +29,23 @@ user_group_00003:
|
|
48
29
|
created_at: 2007-12-23 03:15:05.126457 +09:00
|
49
30
|
position: 3
|
50
31
|
valid_period_for_new_user: 730
|
32
|
+
|
33
|
+
# == Schema Information
|
34
|
+
#
|
35
|
+
# Table name: user_groups
|
36
|
+
#
|
37
|
+
# id :integer not null, primary key
|
38
|
+
# name :string(255)
|
39
|
+
# display_name :text
|
40
|
+
# note :text
|
41
|
+
# position :integer
|
42
|
+
# created_at :datetime not null
|
43
|
+
# updated_at :datetime not null
|
44
|
+
# deleted_at :datetime
|
45
|
+
# valid_period_for_new_user :integer default(0), not null
|
46
|
+
# expired_at :datetime
|
47
|
+
# number_of_day_to_notify_overdue :integer default(1), not null
|
48
|
+
# number_of_day_to_notify_due_date :integer default(7), not null
|
49
|
+
# number_of_time_to_notify_overdue :integer default(3), not null
|
50
|
+
#
|
51
|
+
|
@@ -1,3 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe UserGroup do
|
4
|
+
#pending "add some examples to (or delete) #{__FILE__}"
|
5
|
+
|
6
|
+
end
|
7
|
+
|
1
8
|
# == Schema Information
|
2
9
|
#
|
3
10
|
# Table name: user_groups
|
@@ -17,10 +24,3 @@
|
|
17
24
|
# number_of_time_to_notify_overdue :integer default(3), not null
|
18
25
|
#
|
19
26
|
|
20
|
-
# -*- encoding: utf-8 -*-
|
21
|
-
require 'spec_helper'
|
22
|
-
|
23
|
-
describe UserGroup do
|
24
|
-
#pending "add some examples to (or delete) #{__FILE__}"
|
25
|
-
|
26
|
-
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
jQuery
|
2
|
+
jQuery Colorbox v1.4.14 - 2013-04-16
|
3
3
|
(c) 2013 Jack Moore - jacklmoore.com/colorbox
|
4
4
|
license: http://www.opensource.org/licenses/mit-license.php
|
5
5
|
*/
|
@@ -10,6 +10,7 @@
|
|
10
10
|
defaults = {
|
11
11
|
transition: "elastic",
|
12
12
|
speed: 300,
|
13
|
+
fadeOut: 300,
|
13
14
|
width: false,
|
14
15
|
initialWidth: "600",
|
15
16
|
innerWidth: false,
|
@@ -84,11 +85,6 @@
|
|
84
85
|
event_cleanup = prefix + '_cleanup',
|
85
86
|
event_closed = prefix + '_closed',
|
86
87
|
event_purge = prefix + '_purge',
|
87
|
-
|
88
|
-
// Special Handling for IE
|
89
|
-
isIE = !$.support.leadingWhitespace, // IE6 to IE8
|
90
|
-
isIE6 = isIE && !window.XMLHttpRequest, // IE6
|
91
|
-
event_ie6 = prefix + '_IE6',
|
92
88
|
|
93
89
|
// Cached jQuery Object Variables
|
94
90
|
$overlay,
|
@@ -111,7 +107,7 @@
|
|
111
107
|
$prev,
|
112
108
|
$close,
|
113
109
|
$groupControls,
|
114
|
-
$events = $(
|
110
|
+
$events = $('<a/>'),
|
115
111
|
|
116
112
|
// Variables for cached values or use across multiple functions
|
117
113
|
settings,
|
@@ -129,6 +125,7 @@
|
|
129
125
|
publicMethod,
|
130
126
|
div = "div",
|
131
127
|
className,
|
128
|
+
requests = 0,
|
132
129
|
init;
|
133
130
|
|
134
131
|
// ****************
|
@@ -149,6 +146,12 @@
|
|
149
146
|
|
150
147
|
return $(element);
|
151
148
|
}
|
149
|
+
|
150
|
+
// Get the window height using innerHeight when available to avoid an issue with iOS
|
151
|
+
// http://bugs.jquery.com/ticket/6724
|
152
|
+
function winheight() {
|
153
|
+
return window.innerHeight ? window.innerHeight : $(window).height();
|
154
|
+
}
|
152
155
|
|
153
156
|
// Determine the next and previous members in a group.
|
154
157
|
function getIndex(increment) {
|
@@ -161,7 +164,7 @@
|
|
161
164
|
|
162
165
|
// Convert '%' and 'px' values to integers
|
163
166
|
function setSize(size, dimension) {
|
164
|
-
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() :
|
167
|
+
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
|
165
168
|
}
|
166
169
|
|
167
170
|
// Checks an href to see if it is a photo.
|
@@ -311,19 +314,30 @@
|
|
311
314
|
});
|
312
315
|
index = $related.index(element);
|
313
316
|
|
314
|
-
// Check direct calls to
|
317
|
+
// Check direct calls to Colorbox.
|
315
318
|
if (index === -1) {
|
316
319
|
$related = $related.add(element);
|
317
320
|
index = $related.length - 1;
|
318
321
|
}
|
319
322
|
}
|
320
323
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
324
|
+
$overlay.css({
|
325
|
+
opacity: parseFloat(settings.opacity),
|
326
|
+
cursor: settings.overlayClose ? "pointer" : "auto",
|
327
|
+
visibility: 'visible'
|
328
|
+
}).show();
|
329
|
+
|
330
|
+
|
331
|
+
if (className) {
|
332
|
+
$box.add($overlay).removeClass(className);
|
333
|
+
}
|
334
|
+
if (settings.className) {
|
335
|
+
$box.add($overlay).addClass(settings.className);
|
336
|
+
}
|
337
|
+
className = settings.className;
|
338
|
+
|
339
|
+
$close.html(settings.close).show();
|
340
|
+
|
327
341
|
if (!open) {
|
328
342
|
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
329
343
|
|
@@ -333,83 +347,74 @@
|
|
333
347
|
$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden').appendTo($content);
|
334
348
|
|
335
349
|
// Cache values needed for size calculations
|
336
|
-
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height()
|
350
|
+
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
|
337
351
|
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
|
338
352
|
loadedHeight = $loaded.outerHeight(true);
|
339
353
|
loadedWidth = $loaded.outerWidth(true);
|
340
354
|
|
341
355
|
|
342
|
-
// Opens inital empty
|
356
|
+
// Opens inital empty Colorbox prior to content being loaded.
|
343
357
|
settings.w = setSize(settings.initialWidth, 'x');
|
344
358
|
settings.h = setSize(settings.initialHeight, 'y');
|
345
359
|
publicMethod.position();
|
346
360
|
|
347
|
-
if (isIE6) {
|
348
|
-
$window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () {
|
349
|
-
$overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
|
350
|
-
}).trigger('resize.' + event_ie6);
|
351
|
-
}
|
352
|
-
|
353
361
|
slideshow();
|
354
362
|
|
355
363
|
trigger(event_open, settings.onOpen);
|
356
364
|
|
357
365
|
$groupControls.add($title).hide();
|
366
|
+
|
367
|
+
$box.focus();
|
358
368
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
$events.one(event_closed, function () {
|
377
|
-
$(element).focus();
|
378
|
-
});
|
379
|
-
}
|
369
|
+
// Confine focus to the modal
|
370
|
+
// Uses event capturing that is not supported in IE8-
|
371
|
+
if (document.addEventListener) {
|
372
|
+
|
373
|
+
document.addEventListener('focus', trapFocus, true);
|
374
|
+
|
375
|
+
$events.one(event_closed, function () {
|
376
|
+
document.removeEventListener('focus', trapFocus, true);
|
377
|
+
});
|
378
|
+
}
|
379
|
+
|
380
|
+
// Return focus on closing
|
381
|
+
if (settings.returnFocus) {
|
382
|
+
$events.one(event_closed, function () {
|
383
|
+
$(element).focus();
|
384
|
+
});
|
385
|
+
}
|
380
386
|
}
|
381
387
|
|
382
|
-
|
388
|
+
load();
|
383
389
|
}
|
384
390
|
}
|
385
391
|
|
386
|
-
//
|
392
|
+
// Colorbox's markup needs to be added to the DOM prior to being called
|
387
393
|
// so that the browser will go ahead and load the CSS background images.
|
388
394
|
function appendHTML() {
|
389
395
|
if (!$box && document.body) {
|
390
396
|
init = false;
|
391
|
-
|
392
397
|
$window = $(window);
|
393
398
|
$box = $tag(div).attr({
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
$overlay = $tag(div, "Overlay"
|
399
|
+
id: colorbox,
|
400
|
+
'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
|
401
|
+
role: 'dialog',
|
402
|
+
tabindex: '-1'
|
403
|
+
}).hide();
|
404
|
+
$overlay = $tag(div, "Overlay").hide();
|
400
405
|
$loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic"));
|
401
406
|
$wrap = $tag(div, "Wrapper");
|
402
407
|
$content = $tag(div, "Content").append(
|
403
408
|
$title = $tag(div, "Title"),
|
404
409
|
$current = $tag(div, "Current"),
|
405
|
-
|
406
|
-
$next = $
|
410
|
+
$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
|
411
|
+
$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
|
407
412
|
$slideshow = $tag('button', "Slideshow"),
|
408
|
-
|
409
|
-
$close = $
|
413
|
+
$loadingOverlay,
|
414
|
+
$close = $('<button type="button"/>').attr({id:prefix+'Close'})
|
410
415
|
);
|
411
416
|
|
412
|
-
$wrap.append( // The 3x3 Grid that makes up
|
417
|
+
$wrap.append( // The 3x3 Grid that makes up Colorbox
|
413
418
|
$tag(div).append(
|
414
419
|
$tag(div, "TopLeft"),
|
415
420
|
$topBorder = $tag(div, "TopCenter"),
|
@@ -435,12 +440,12 @@
|
|
435
440
|
}
|
436
441
|
}
|
437
442
|
|
438
|
-
// Add
|
443
|
+
// Add Colorbox's event bindings
|
439
444
|
function addBindings() {
|
440
445
|
function clickHandler(e) {
|
441
446
|
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
|
442
447
|
// See: http://jacklmoore.com/notes/click-events/
|
443
|
-
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) {
|
448
|
+
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.control)) {
|
444
449
|
e.preventDefault();
|
445
450
|
launch(this);
|
446
451
|
}
|
@@ -473,7 +478,7 @@
|
|
473
478
|
e.preventDefault();
|
474
479
|
publicMethod.close();
|
475
480
|
}
|
476
|
-
|
481
|
+
if (open && settings.arrowKey && $related[1] && !e.altKey) {
|
477
482
|
if (key === 37) {
|
478
483
|
e.preventDefault();
|
479
484
|
$prev.click();
|
@@ -499,7 +504,7 @@
|
|
499
504
|
return false;
|
500
505
|
}
|
501
506
|
|
502
|
-
// Don't do anything if
|
507
|
+
// Don't do anything if Colorbox already exists.
|
503
508
|
if ($.colorbox) {
|
504
509
|
return;
|
505
510
|
}
|
@@ -510,8 +515,8 @@
|
|
510
515
|
|
511
516
|
// ****************
|
512
517
|
// PUBLIC FUNCTIONS
|
513
|
-
// Usage format: $.
|
514
|
-
// Usage from within an iframe: parent
|
518
|
+
// Usage format: $.colorbox.close();
|
519
|
+
// Usage from within an iframe: parent.jQuery.colorbox.close();
|
515
520
|
// ****************
|
516
521
|
|
517
522
|
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
|
@@ -562,7 +567,7 @@
|
|
562
567
|
scrollTop = $window.scrollTop();
|
563
568
|
scrollLeft = $window.scrollLeft();
|
564
569
|
|
565
|
-
if (settings.fixed
|
570
|
+
if (settings.fixed) {
|
566
571
|
offset.top -= scrollTop;
|
567
572
|
offset.left -= scrollLeft;
|
568
573
|
$box.css({position: 'fixed'});
|
@@ -582,11 +587,11 @@
|
|
582
587
|
}
|
583
588
|
|
584
589
|
if (settings.bottom !== false) {
|
585
|
-
top += Math.max(
|
590
|
+
top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
|
586
591
|
} else if (settings.top !== false) {
|
587
592
|
top += setSize(settings.top, 'y');
|
588
593
|
} else {
|
589
|
-
top += Math.round(Math.max(
|
594
|
+
top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
|
590
595
|
}
|
591
596
|
|
592
597
|
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
|
@@ -709,8 +714,8 @@
|
|
709
714
|
return;
|
710
715
|
}
|
711
716
|
|
712
|
-
function removeFilter() {
|
713
|
-
if (
|
717
|
+
function removeFilter() { // Needed for IE7 & IE8 in versions of jQuery prior to 1.7.2
|
718
|
+
if ($.support.opacity === false) {
|
714
719
|
$box[0].style.removeAttribute('filter');
|
715
720
|
}
|
716
721
|
}
|
@@ -720,13 +725,7 @@
|
|
720
725
|
$loadingOverlay.hide();
|
721
726
|
trigger(event_complete, settings.onComplete);
|
722
727
|
};
|
723
|
-
|
724
|
-
if (isIE) {
|
725
|
-
//This fadeIn helps the bicubic resampling to kick-in.
|
726
|
-
if (photo) {
|
727
|
-
$loaded.fadeIn(100);
|
728
|
-
}
|
729
|
-
}
|
728
|
+
|
730
729
|
|
731
730
|
$title.html(settings.title).add($loaded).show();
|
732
731
|
|
@@ -824,8 +823,8 @@
|
|
824
823
|
}
|
825
824
|
};
|
826
825
|
|
827
|
-
|
828
|
-
var href, setResize, prep = publicMethod.prep, $inline;
|
826
|
+
function load () {
|
827
|
+
var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
|
829
828
|
|
830
829
|
active = true;
|
831
830
|
|
@@ -833,17 +832,7 @@
|
|
833
832
|
|
834
833
|
element = $related[index];
|
835
834
|
|
836
|
-
|
837
|
-
makeSettings();
|
838
|
-
}
|
839
|
-
|
840
|
-
if (className) {
|
841
|
-
$box.add($overlay).removeClass(className);
|
842
|
-
}
|
843
|
-
if (settings.className) {
|
844
|
-
$box.add($overlay).addClass(settings.className);
|
845
|
-
}
|
846
|
-
className = settings.className;
|
835
|
+
makeSettings();
|
847
836
|
|
848
837
|
trigger(event_purge);
|
849
838
|
|
@@ -880,7 +869,7 @@
|
|
880
869
|
|
881
870
|
if (settings.inline) {
|
882
871
|
// Inserts an empty placeholder where inline content is being pulled from.
|
883
|
-
// An event is bound to put inline content back when
|
872
|
+
// An event is bound to put inline content back when Colorbox closes or loads new content.
|
884
873
|
$inline = $tag(div).hide().insertBefore($(href)[0]);
|
885
874
|
|
886
875
|
$events.one(event_purge, function () {
|
@@ -907,6 +896,12 @@
|
|
907
896
|
.one('load', function () {
|
908
897
|
var percent;
|
909
898
|
|
899
|
+
if (request !== requests) {
|
900
|
+
return;
|
901
|
+
}
|
902
|
+
|
903
|
+
photo.alt = $(element).attr('alt') || $(element).attr('data-alt') || '';
|
904
|
+
|
910
905
|
if (settings.retinaImage && window.devicePixelRatio > 1) {
|
911
906
|
photo.height = photo.height / window.devicePixelRatio;
|
912
907
|
photo.width = photo.width / window.devicePixelRatio;
|
@@ -937,11 +932,10 @@
|
|
937
932
|
publicMethod.next();
|
938
933
|
};
|
939
934
|
}
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
935
|
+
|
936
|
+
photo.style.width = photo.width + 'px';
|
937
|
+
photo.style.height = photo.height + 'px';
|
938
|
+
|
945
939
|
setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
|
946
940
|
prep(photo);
|
947
941
|
}, 1);
|
@@ -952,27 +946,29 @@
|
|
952
946
|
}, 1);
|
953
947
|
} else if (href) {
|
954
948
|
$loadingBay.load(href, settings.data, function (data, status) {
|
955
|
-
|
949
|
+
if (request === requests) {
|
950
|
+
prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
|
951
|
+
}
|
956
952
|
});
|
957
953
|
}
|
958
|
-
}
|
954
|
+
}
|
959
955
|
|
960
956
|
// Navigates to the next page/image in a set.
|
961
957
|
publicMethod.next = function () {
|
962
958
|
if (!active && $related[1] && (settings.loop || $related[index + 1])) {
|
963
959
|
index = getIndex(1);
|
964
|
-
|
960
|
+
launch($related[index]);
|
965
961
|
}
|
966
962
|
};
|
967
963
|
|
968
964
|
publicMethod.prev = function () {
|
969
965
|
if (!active && $related[1] && (settings.loop || index)) {
|
970
966
|
index = getIndex(-1);
|
971
|
-
|
967
|
+
launch($related[index]);
|
972
968
|
}
|
973
969
|
};
|
974
970
|
|
975
|
-
// Note: to use this within an iframe use the following format: parent
|
971
|
+
// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
|
976
972
|
publicMethod.close = function () {
|
977
973
|
if (open && !closing) {
|
978
974
|
|
@@ -982,11 +978,11 @@
|
|
982
978
|
|
983
979
|
trigger(event_cleanup, settings.onCleanup);
|
984
980
|
|
985
|
-
$window.unbind('.' + prefix
|
981
|
+
$window.unbind('.' + prefix);
|
986
982
|
|
987
|
-
$overlay.fadeTo(
|
983
|
+
$overlay.fadeTo(settings.fadeOut || 0, 0);
|
988
984
|
|
989
|
-
$box.stop().fadeTo(
|
985
|
+
$box.stop().fadeTo(settings.fadeOut || 0, 0, function () {
|
990
986
|
|
991
987
|
$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
|
992
988
|
|
@@ -1002,10 +998,15 @@
|
|
1002
998
|
}
|
1003
999
|
};
|
1004
1000
|
|
1005
|
-
// Removes changes
|
1006
|
-
// from jQuery.
|
1001
|
+
// Removes changes Colorbox made to the document, but does not remove the plugin.
|
1007
1002
|
publicMethod.remove = function () {
|
1008
|
-
|
1003
|
+
if (!$box) { return; }
|
1004
|
+
|
1005
|
+
$box.stop();
|
1006
|
+
$.colorbox.close();
|
1007
|
+
$box.stop().remove();
|
1008
|
+
$overlay.remove();
|
1009
|
+
closing = false;
|
1009
1010
|
$box = null;
|
1010
1011
|
$('.' + boxElement)
|
1011
1012
|
.removeData(colorbox)
|
@@ -1014,7 +1015,7 @@
|
|
1014
1015
|
$(document).unbind('click.'+prefix);
|
1015
1016
|
};
|
1016
1017
|
|
1017
|
-
// A method for fetching the current element
|
1018
|
+
// A method for fetching the current element Colorbox is referencing.
|
1018
1019
|
// returns a jQuery object.
|
1019
1020
|
publicMethod.element = function () {
|
1020
1021
|
return $(element);
|