enju_leaf 1.1.0.rc3 → 1.1.0.rc4
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 -2
- data/app/controllers/page_controller.rb +2 -2
- data/app/controllers/users_controller.rb +7 -7
- data/app/views/layouts/patrons.html.erb +2 -2
- data/app/views/my_accounts/show.html.erb +9 -1
- data/app/views/page/_menu.html.erb +1 -1
- data/app/views/page/advanced_search.html.erb +2 -2
- data/app/views/page/configuration.html.erb +3 -3
- data/app/views/page/export.html.erb +2 -2
- data/app/views/page/import.html.erb +1 -1
- data/app/views/page/statistics.html.erb +2 -2
- data/app/views/users/index.html.erb +0 -11
- data/app/views/users/new.html.erb +4 -4
- data/app/views/users/show.html.erb +9 -1
- data/config/locales/translation_en.yml +13 -13
- data/config/locales/translation_ja.yml +13 -13
- data/lib/enju_leaf/user.rb +12 -12
- data/lib/enju_leaf/version.rb +1 -1
- data/lib/enju_leaf.rb +2 -2
- data/lib/generators/enju_leaf/setup/setup_generator.rb +10 -3
- data/spec/dummy/db/migrate/001_create_patrons.rb +7 -7
- data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
- data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
- data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
- data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +1 -1
- data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +8 -8
- data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +4 -4
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +2 -2
- data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +3 -3
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +4 -4
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +2 -2
- data/spec/dummy/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +2 -2
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +1 -1
- data/spec/dummy/db/schema.rb +129 -129
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.fdt → _7z.fdt} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.fdx → _7z.fdx} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.fnm → _7z.fnm} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.frq → _7z.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.nrm → _7z.nrm} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.prx → _7z.prx} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.tii → _7z.tii} +0 -0
- data/spec/dummy/solr/data/test/index/{_6z.tis → _7z.tis} +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_g1 +0 -0
- data/spec/factories/{patron.rb → agent.rb} +3 -3
- data/spec/factories/agent_relationship.rb +6 -0
- data/spec/factories/agent_relationship_type.rb +5 -0
- data/spec/factories/agent_type.rb +5 -0
- data/spec/factories/create.rb +1 -1
- data/spec/factories/donate.rb +1 -1
- data/spec/factories/own.rb +1 -1
- data/spec/factories/produce.rb +1 -1
- data/spec/factories/realize.rb +1 -1
- data/spec/fixtures/{patron_import_files.yml → agent_import_files.yml} +18 -18
- data/spec/fixtures/{patron_import_results.yml → agent_import_results.yml} +7 -7
- data/spec/fixtures/{patron_relationship_types.yml → agent_relationship_types.yml} +4 -4
- data/spec/fixtures/{patron_relationships.yml → agent_relationships.yml} +4 -4
- data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
- data/spec/fixtures/{patrons.yml → agents.yml} +47 -47
- data/spec/fixtures/creates.yml +8 -8
- data/spec/fixtures/donates.yml +4 -4
- data/spec/fixtures/owns.yml +3 -3
- data/spec/fixtures/produces.yml +20 -20
- data/spec/fixtures/realizes.yml +11 -11
- data/spec/spec_helper.rb +0 -2
- data/vendor/assets/javascripts/jquery.colorbox.js +70 -33
- data/vendor/assets/javascripts/jquery.ui.menubar.js +342 -187
- data/vendor/assets/stylesheets/jquery.ui.menubar.css +25 -5
- metadata +61 -76
- data/app/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/app/assets/stylesheets/images/border.png +0 -0
- data/app/assets/stylesheets/images/controls.png +0 -0
- data/app/assets/stylesheets/images/icons-18-black.png +0 -0
- data/app/assets/stylesheets/images/icons-18-white.png +0 -0
- data/app/assets/stylesheets/images/icons-36-black.png +0 -0
- data/app/assets/stylesheets/images/icons-36-white.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderBottomCenter.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderBottomLeft.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderBottomRight.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderMiddleLeft.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderMiddleRight.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderTopCenter.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderTopLeft.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderTopRight.png +0 -0
- data/app/assets/stylesheets/images/loading.gif +0 -0
- data/app/assets/stylesheets/images/loading_background.png +0 -0
- data/app/assets/stylesheets/images/overlay.png +0 -0
- data/app/assets/stylesheets/images/spinner_bar.gif +0 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/segments_e1 +0 -0
- data/spec/factories/patron_relationship.rb +0 -6
- data/spec/factories/patron_relationship_type.rb +0 -5
- data/spec/factories/patron_type.rb +0 -5
- data/vendor/assets/stylesheets/images/ie6/borderBottomCenter.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderBottomLeft.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderBottomRight.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderMiddleLeft.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderMiddleRight.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderTopCenter.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderTopLeft.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderTopRight.png +0 -0
data/spec/fixtures/produces.yml
CHANGED
@@ -2,133 +2,133 @@
|
|
2
2
|
produce_00001:
|
3
3
|
updated_at: 2008-01-11 23:28:19.277110 +09:00
|
4
4
|
manifestation_id: 1
|
5
|
-
|
5
|
+
agent_id: 1
|
6
6
|
id: 1
|
7
7
|
position: 1
|
8
8
|
created_at: 2008-01-11 23:28:19.277110 +09:00
|
9
9
|
produce_00002:
|
10
10
|
updated_at: 2008-01-11 23:28:57.068191 +09:00
|
11
11
|
manifestation_id: 2
|
12
|
-
|
12
|
+
agent_id: 2
|
13
13
|
id: 2
|
14
14
|
position: 1
|
15
15
|
created_at: 2008-01-11 23:28:57.068191 +09:00
|
16
16
|
produce_00003:
|
17
17
|
updated_at: 2008-01-11 23:32:03.701425 +09:00
|
18
18
|
manifestation_id: 3
|
19
|
-
|
19
|
+
agent_id: 3
|
20
20
|
id: 3
|
21
21
|
position: 1
|
22
22
|
created_at: 2008-01-11 23:32:03.701425 +09:00
|
23
23
|
produce_00004:
|
24
24
|
updated_at: 2008-01-11 02:34:20.183962 +09:00
|
25
25
|
manifestation_id: 4
|
26
|
-
|
26
|
+
agent_id: 1
|
27
27
|
id: 4
|
28
28
|
position: 1
|
29
29
|
created_at: 2008-01-11 02:34:20.183962 +09:00
|
30
30
|
produce_00005:
|
31
31
|
updated_at: 2008-01-11 02:34:32.352223 +09:00
|
32
32
|
manifestation_id: 5
|
33
|
-
|
33
|
+
agent_id: 2
|
34
34
|
id: 5
|
35
35
|
position: 2
|
36
36
|
created_at: 2008-01-11 02:34:32.352223 +09:00
|
37
37
|
produce_00006:
|
38
38
|
updated_at: 2008-01-11 23:35:36.467584 +09:00
|
39
39
|
manifestation_id: 1
|
40
|
-
|
40
|
+
agent_id: 3
|
41
41
|
id: 6
|
42
42
|
position: 2
|
43
43
|
created_at: 2008-01-11 23:35:36.467584 +09:00
|
44
44
|
produce_00007:
|
45
45
|
updated_at: 2008-01-11 02:40:24.038276 +09:00
|
46
46
|
manifestation_id: 2
|
47
|
-
|
47
|
+
agent_id: 1
|
48
48
|
id: 7
|
49
49
|
position: 1
|
50
50
|
created_at: 2008-01-11 02:40:24.038276 +09:00
|
51
51
|
produce_00008:
|
52
52
|
updated_at: 2008-01-11 02:40:40.316742 +09:00
|
53
53
|
manifestation_id: 3
|
54
|
-
|
54
|
+
agent_id: 2
|
55
55
|
id: 8
|
56
56
|
position: 2
|
57
57
|
created_at: 2008-01-11 02:40:40.316742 +09:00
|
58
58
|
produce_00009:
|
59
59
|
updated_at: 2008-01-11 02:40:55.664604 +09:00
|
60
60
|
manifestation_id: 4
|
61
|
-
|
61
|
+
agent_id: 3
|
62
62
|
id: 9
|
63
63
|
position: 3
|
64
64
|
created_at: 2008-01-11 02:40:55.664604 +09:00
|
65
65
|
produce_00010:
|
66
66
|
updated_at: 2008-01-11 02:44:37.135721 +09:00
|
67
67
|
manifestation_id: 5
|
68
|
-
|
68
|
+
agent_id: 1
|
69
69
|
id: 10
|
70
70
|
position: 1
|
71
71
|
created_at: 2008-01-11 02:44:37.135721 +09:00
|
72
72
|
produce_00101:
|
73
73
|
updated_at: 2010-03-03 20:00:00.135721 +09:00
|
74
74
|
manifestation_id: 207
|
75
|
-
|
75
|
+
agent_id: 102
|
76
76
|
id: 101
|
77
77
|
position: 1
|
78
78
|
created_at: 2010-03-03 20:00:00.135721 +09:00
|
79
79
|
produce_00102:
|
80
80
|
updated_at: 2010-03-03 20:00:00.135721 +09:00
|
81
81
|
manifestation_id: 201
|
82
|
-
|
82
|
+
agent_id: 102
|
83
83
|
id: 102
|
84
84
|
position: 1
|
85
85
|
created_at: 2010-03-03 20:00:00.135721 +09:00
|
86
86
|
produce_00103:
|
87
87
|
updated_at: 2010-03-03 20:00:00.135721 +09:00
|
88
88
|
manifestation_id: 202
|
89
|
-
|
89
|
+
agent_id: 102
|
90
90
|
id: 103
|
91
91
|
position: 1
|
92
92
|
created_at: 2010-03-03 20:00:00.135721 +09:00
|
93
93
|
produce_00104:
|
94
94
|
updated_at: 2010-03-16 11:00:00.135721 +09:00
|
95
95
|
manifestation_id: 208
|
96
|
-
|
96
|
+
agent_id: 101
|
97
97
|
id: 104
|
98
98
|
position: 1
|
99
99
|
created_at: 2010-03-16 11:00:00.135721 +09:00
|
100
100
|
produce_00105:
|
101
101
|
updated_at: 2010-03-16 19:00:00.135721 +09:00
|
102
102
|
manifestation_id: 204
|
103
|
-
|
103
|
+
agent_id: 104
|
104
104
|
id: 105
|
105
105
|
position: 1
|
106
106
|
created_at: 2010-03-16 19:00:00.135721 +09:00
|
107
107
|
produce_00106:
|
108
108
|
updated_at: 2010-03-16 19:00:00.135721 +09:00
|
109
109
|
manifestation_id: 205
|
110
|
-
|
110
|
+
agent_id: 104
|
111
111
|
id: 106
|
112
112
|
position: 1
|
113
113
|
created_at: 2010-03-16 19:00:00.135721 +09:00
|
114
114
|
produce_00107:
|
115
115
|
updated_at: 2010-03-16 19:00:00.135721 +09:00
|
116
116
|
manifestation_id: 206
|
117
|
-
|
117
|
+
agent_id: 104
|
118
118
|
id: 107
|
119
119
|
position: 1
|
120
120
|
created_at: 2010-03-16 19:00:00.135721 +09:00
|
121
121
|
produce_00201:
|
122
122
|
updated_at: 2010-03-15 20:00:00.135721 +09:00
|
123
123
|
manifestation_id: 120
|
124
|
-
|
124
|
+
agent_id: 201
|
125
125
|
id: 201
|
126
126
|
position: 1
|
127
127
|
created_at: 2010-03-15 20:00:00.135721 +09:00
|
128
128
|
produce_00202:
|
129
129
|
updated_at: 2010-03-15 20:00:00.135721 +09:00
|
130
130
|
manifestation_id: 198
|
131
|
-
|
131
|
+
agent_id: 202
|
132
132
|
id: 202
|
133
133
|
position: 1
|
134
134
|
created_at: 2010-03-15 20:00:00.135721 +09:00
|
@@ -139,7 +139,7 @@ produce_00202:
|
|
139
139
|
# Table name: produces
|
140
140
|
#
|
141
141
|
# id :integer not null, primary key
|
142
|
-
#
|
142
|
+
# agent_id :integer not null
|
143
143
|
# manifestation_id :integer not null
|
144
144
|
# position :integer
|
145
145
|
# type :string(255)
|
data/spec/fixtures/realizes.yml
CHANGED
@@ -2,70 +2,70 @@
|
|
2
2
|
realize_00001:
|
3
3
|
updated_at: 2008-01-11 23:28:19.277110 +09:00
|
4
4
|
expression_id: 1
|
5
|
-
|
5
|
+
agent_id: 1
|
6
6
|
id: 1
|
7
7
|
position: 1
|
8
8
|
created_at: 2008-01-11 23:28:19.277110 +09:00
|
9
9
|
realize_00002:
|
10
10
|
updated_at: 2008-01-11 23:28:57.068191 +09:00
|
11
11
|
expression_id: 2
|
12
|
-
|
12
|
+
agent_id: 2
|
13
13
|
id: 2
|
14
14
|
position: 2
|
15
15
|
created_at: 2008-01-11 23:28:57.068191 +09:00
|
16
16
|
realize_00003:
|
17
17
|
updated_at: 2008-01-11 23:32:03.701425 +09:00
|
18
18
|
expression_id: 3
|
19
|
-
|
19
|
+
agent_id: 3
|
20
20
|
id: 3
|
21
21
|
position: 1
|
22
22
|
created_at: 2008-01-11 23:32:03.701425 +09:00
|
23
23
|
realize_00004:
|
24
24
|
updated_at: 2008-01-11 02:34:20.183962 +09:00
|
25
25
|
expression_id: 4
|
26
|
-
|
26
|
+
agent_id: 1
|
27
27
|
id: 4
|
28
28
|
position: 1
|
29
29
|
created_at: 2008-01-11 02:34:20.183962 +09:00
|
30
30
|
realize_00005:
|
31
31
|
updated_at: 2008-01-11 02:34:32.352223 +09:00
|
32
32
|
expression_id: 5
|
33
|
-
|
33
|
+
agent_id: 2
|
34
34
|
id: 5
|
35
35
|
position: 1
|
36
36
|
created_at: 2008-01-11 02:34:32.352223 +09:00
|
37
37
|
realize_00006:
|
38
38
|
updated_at: 2008-01-11 23:35:36.467584 +09:00
|
39
39
|
expression_id: 1
|
40
|
-
|
40
|
+
agent_id: 3
|
41
41
|
id: 6
|
42
42
|
position: 2
|
43
43
|
created_at: 2008-01-11 23:35:36.467584 +09:00
|
44
44
|
realize_00007:
|
45
45
|
updated_at: 2008-01-11 02:40:24.038276 +09:00
|
46
46
|
expression_id: 2
|
47
|
-
|
47
|
+
agent_id: 1
|
48
48
|
id: 7
|
49
49
|
position: 2
|
50
50
|
created_at: 2008-01-11 02:40:24.038276 +09:00
|
51
51
|
realize_00008:
|
52
52
|
updated_at: 2008-01-11 02:40:40.316742 +09:00
|
53
53
|
expression_id: 3
|
54
|
-
|
54
|
+
agent_id: 2
|
55
55
|
id: 8
|
56
56
|
position: 2
|
57
57
|
created_at: 2008-01-11 02:40:40.316742 +09:00
|
58
58
|
realize_00009:
|
59
59
|
updated_at: 2008-01-11 02:40:55.664604 +09:00
|
60
60
|
expression_id: 4
|
61
|
-
|
61
|
+
agent_id: 3
|
62
62
|
id: 9
|
63
63
|
position: 2
|
64
64
|
created_at: 2008-01-11 02:40:55.664604 +09:00
|
65
65
|
realize_00010:
|
66
66
|
updated_at: 2008-01-11 02:44:37.135721 +09:00
|
67
67
|
expression_id: 5
|
68
|
-
|
68
|
+
agent_id: 1
|
69
69
|
id: 10
|
70
70
|
position: 2
|
71
71
|
created_at: 2008-01-11 02:44:37.135721 +09:00
|
@@ -76,7 +76,7 @@ realize_00010:
|
|
76
76
|
# Table name: realizes
|
77
77
|
#
|
78
78
|
# id :integer not null, primary key
|
79
|
-
#
|
79
|
+
# agent_id :integer not null
|
80
80
|
# expression_id :integer not null
|
81
81
|
# position :integer
|
82
82
|
# type :string(255)
|
data/spec/spec_helper.rb
CHANGED
@@ -13,8 +13,6 @@ require 'sunspot-rails-tester'
|
|
13
13
|
# in spec/support/ and its subdirectories.
|
14
14
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
15
15
|
|
16
|
-
$original_sunspot_session = Sunspot.session
|
17
|
-
|
18
16
|
RSpec.configure do |config|
|
19
17
|
# == Mock Framework
|
20
18
|
#
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
|
3
|
-
|
2
|
+
Colorbox v1.4.26 - 2013-06-30
|
3
|
+
jQuery lightbox and modal window plugin
|
4
|
+
(c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox
|
4
5
|
license: http://www.opensource.org/licenses/mit-license.php
|
5
6
|
*/
|
6
7
|
(function ($, document, window) {
|
@@ -32,7 +33,7 @@
|
|
32
33
|
opacity: 0.9,
|
33
34
|
preloading: true,
|
34
35
|
className: false,
|
35
|
-
|
36
|
+
|
36
37
|
// alternate image paths for high-res displays
|
37
38
|
retinaImage: false,
|
38
39
|
retinaUrl: false,
|
@@ -48,6 +49,7 @@
|
|
48
49
|
|
49
50
|
open: false,
|
50
51
|
returnFocus: true,
|
52
|
+
trapFocus: true,
|
51
53
|
reposition: true,
|
52
54
|
loop: true,
|
53
55
|
slideshow: false,
|
@@ -55,13 +57,14 @@
|
|
55
57
|
slideshowSpeed: 2500,
|
56
58
|
slideshowStart: "start slideshow",
|
57
59
|
slideshowStop: "stop slideshow",
|
58
|
-
photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i,
|
60
|
+
photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,
|
59
61
|
|
60
62
|
onOpen: false,
|
61
63
|
onLoad: false,
|
62
64
|
onComplete: false,
|
63
65
|
onCleanup: false,
|
64
66
|
onClosed: false,
|
67
|
+
|
65
68
|
overlayClose: true,
|
66
69
|
escKey: true,
|
67
70
|
arrowKey: true,
|
@@ -70,7 +73,8 @@
|
|
70
73
|
left: false,
|
71
74
|
right: false,
|
72
75
|
fixed: false,
|
73
|
-
data: undefined
|
76
|
+
data: undefined,
|
77
|
+
closeButton: true
|
74
78
|
},
|
75
79
|
|
76
80
|
// Abstracting the HTML and event identifiers for easy rebranding
|
@@ -126,13 +130,14 @@
|
|
126
130
|
div = "div",
|
127
131
|
className,
|
128
132
|
requests = 0,
|
133
|
+
previousCSS = {},
|
129
134
|
init;
|
130
135
|
|
131
136
|
// ****************
|
132
137
|
// HELPER FUNCTIONS
|
133
138
|
// ****************
|
134
139
|
|
135
|
-
//
|
140
|
+
// Convenience function for creating new jQuery objects
|
136
141
|
function $tag(tag, id, css) {
|
137
142
|
var element = document.createElement(tag);
|
138
143
|
|
@@ -336,7 +341,11 @@
|
|
336
341
|
}
|
337
342
|
className = settings.className;
|
338
343
|
|
339
|
-
|
344
|
+
if (settings.closeButton) {
|
345
|
+
$close.html(settings.close).appendTo($content);
|
346
|
+
} else {
|
347
|
+
$close.appendTo('<div/>');
|
348
|
+
}
|
340
349
|
|
341
350
|
if (!open) {
|
342
351
|
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
@@ -366,15 +375,18 @@
|
|
366
375
|
|
367
376
|
$box.focus();
|
368
377
|
|
369
|
-
// Confine focus to the modal
|
370
|
-
// Uses event capturing that is not supported in IE8-
|
371
|
-
if (document.addEventListener) {
|
372
378
|
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
379
|
+
if (settings.trapFocus) {
|
380
|
+
// Confine focus to the modal
|
381
|
+
// Uses event capturing that is not supported in IE8-
|
382
|
+
if (document.addEventListener) {
|
383
|
+
|
384
|
+
document.addEventListener('focus', trapFocus, true);
|
385
|
+
|
386
|
+
$events.one(event_closed, function () {
|
387
|
+
document.removeEventListener('focus', trapFocus, true);
|
388
|
+
});
|
389
|
+
}
|
378
390
|
}
|
379
391
|
|
380
392
|
// Return focus on closing
|
@@ -402,7 +414,7 @@
|
|
402
414
|
tabindex: '-1'
|
403
415
|
}).hide();
|
404
416
|
$overlay = $tag(div, "Overlay").hide();
|
405
|
-
$loadingOverlay = $tag(div, "LoadingOverlay")
|
417
|
+
$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
|
406
418
|
$wrap = $tag(div, "Wrapper");
|
407
419
|
$content = $tag(div, "Content").append(
|
408
420
|
$title = $tag(div, "Title"),
|
@@ -410,9 +422,10 @@
|
|
410
422
|
$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
|
411
423
|
$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
|
412
424
|
$slideshow = $tag('button', "Slideshow"),
|
413
|
-
$loadingOverlay
|
414
|
-
$close = $('<button type="button"/>').attr({id:prefix+'Close'})
|
425
|
+
$loadingOverlay
|
415
426
|
);
|
427
|
+
|
428
|
+
$close = $('<button type="button"/>').attr({id:prefix+'Close'});
|
416
429
|
|
417
430
|
$wrap.append( // The 3x3 Grid that makes up Colorbox
|
418
431
|
$tag(div).append(
|
@@ -445,7 +458,7 @@
|
|
445
458
|
function clickHandler(e) {
|
446
459
|
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
|
447
460
|
// See: http://jacklmoore.com/notes/click-events/
|
448
|
-
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.
|
461
|
+
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
|
449
462
|
e.preventDefault();
|
450
463
|
launch(this);
|
451
464
|
}
|
@@ -595,29 +608,41 @@
|
|
595
608
|
}
|
596
609
|
|
597
610
|
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
|
598
|
-
|
599
|
-
// setting the speed to 0 to reduce the delay between same-sized content.
|
600
|
-
speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0;
|
601
611
|
|
602
612
|
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
|
603
613
|
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
|
604
614
|
// it can invoke an obscure IE bug when using iframes.
|
605
615
|
$wrap[0].style.width = $wrap[0].style.height = "9999px";
|
606
616
|
|
607
|
-
function modalDimensions(
|
608
|
-
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt(
|
609
|
-
$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt(
|
617
|
+
function modalDimensions() {
|
618
|
+
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
|
619
|
+
$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
|
610
620
|
}
|
611
621
|
|
612
622
|
css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
|
613
623
|
|
614
|
-
|
624
|
+
// setting the speed to 0 if the content hasn't changed size or position
|
625
|
+
if (speed) {
|
626
|
+
var tempSpeed = 0;
|
627
|
+
$.each(css, function(i){
|
628
|
+
if (css[i] !== previousCSS[i]) {
|
629
|
+
tempSpeed = speed;
|
630
|
+
return;
|
631
|
+
}
|
632
|
+
});
|
633
|
+
speed = tempSpeed;
|
634
|
+
}
|
635
|
+
|
636
|
+
previousCSS = css;
|
637
|
+
|
638
|
+
if (!speed) {
|
615
639
|
$box.css(css);
|
616
640
|
}
|
641
|
+
|
617
642
|
$box.dequeue().animate(css, {
|
618
|
-
duration: speed,
|
643
|
+
duration: speed || 0,
|
619
644
|
complete: function () {
|
620
|
-
modalDimensions(
|
645
|
+
modalDimensions();
|
621
646
|
|
622
647
|
active = false;
|
623
648
|
|
@@ -635,35 +660,45 @@
|
|
635
660
|
loadedCallback();
|
636
661
|
}
|
637
662
|
},
|
638
|
-
step:
|
639
|
-
modalDimensions(this);
|
640
|
-
}
|
663
|
+
step: modalDimensions
|
641
664
|
});
|
642
665
|
};
|
643
666
|
|
644
667
|
publicMethod.resize = function (options) {
|
668
|
+
var scrolltop;
|
669
|
+
|
645
670
|
if (open) {
|
646
671
|
options = options || {};
|
647
672
|
|
648
673
|
if (options.width) {
|
649
674
|
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
|
650
675
|
}
|
676
|
+
|
651
677
|
if (options.innerWidth) {
|
652
678
|
settings.w = setSize(options.innerWidth, 'x');
|
653
679
|
}
|
680
|
+
|
654
681
|
$loaded.css({width: settings.w});
|
655
682
|
|
656
683
|
if (options.height) {
|
657
684
|
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
|
658
685
|
}
|
686
|
+
|
659
687
|
if (options.innerHeight) {
|
660
688
|
settings.h = setSize(options.innerHeight, 'y');
|
661
689
|
}
|
690
|
+
|
662
691
|
if (!options.innerHeight && !options.height) {
|
692
|
+
scrolltop = $loaded.scrollTop();
|
663
693
|
$loaded.css({height: "auto"});
|
664
694
|
settings.h = $loaded.height();
|
665
695
|
}
|
696
|
+
|
666
697
|
$loaded.css({height: settings.h});
|
698
|
+
|
699
|
+
if(scrolltop) {
|
700
|
+
$loaded.scrollTop(scrolltop);
|
701
|
+
}
|
667
702
|
|
668
703
|
publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
|
669
704
|
}
|
@@ -760,7 +795,7 @@
|
|
760
795
|
|
761
796
|
if (src && isImage(data, src)) {
|
762
797
|
src = retinaUrl(data, src);
|
763
|
-
img =
|
798
|
+
img = document.createElement('img');
|
764
799
|
img.src = src;
|
765
800
|
}
|
766
801
|
});
|
@@ -887,7 +922,9 @@
|
|
887
922
|
|
888
923
|
href = retinaUrl(settings, href);
|
889
924
|
|
890
|
-
|
925
|
+
photo = document.createElement('img');
|
926
|
+
|
927
|
+
$(photo)
|
891
928
|
.addClass(prefix + 'Photo')
|
892
929
|
.bind('error',function () {
|
893
930
|
settings.title = false;
|