Projet

Général

Profil

Révision b433176d

Ajouté par Assos Assos il y a environ 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/colorbox/README.txt
1
Drupal colorbox module:
2
------------------------
3
Maintainers:
4
  Fredrik Jonsson (http://drupal.org/user/5546)
5
Requires - Drupal 7
6
License - GPL (see LICENSE)
7

  
1
CONTENTS OF THIS FILE
2
---------------------
3
   
4
 * Introduction
5
 * Features
6
 * Requirements
7
 * Installation
8
 * Configuration
9
 * Use the Views Colorbox Trigger field
10
 * Add a custom Colorbox style to your theme
11
 * Load images from custom links in a Colorbox
12
 * Load content in a Colorbox
13
 * Load inline content in a Colorbox
14
 * Drush
15
 * Image in Colorbox not displayed in Internet Explorer 8
16
 * Maintainers
17

  
18

  
19
INTRODUCTION
20
------------
8 21

  
9
Overview:
10
--------
11 22
Colorbox is a light-weight, customizable lightbox plugin for jQuery 1.4.3+.
12 23
This module allows for integration of Colorbox into Drupal.
13 24
The jQuery library is a part of Drupal since version 5+.
......
19 30
* Colorbox - http://www.jacklmoore.com/colorbox/
20 31

  
21 32

  
22
Features:
33
FEATURES:
23 34
---------
24 35

  
25
The Colorbox module:
36
The Colorbox:
26 37

  
27 38
* Excellent integration with Image field and Image styles
28 39
* Choose between a default style and 5 example styles that are included.
......
42 53
* Released under the MIT License.
43 54

  
44 55

  
45
Installation:
56
REQUIREMENTS
57
------------
58

  
59
This module requires the following modules:
60

  
61
 * Libraries API (https://www.drupal.org/project/libraries)
62

  
63

  
64
INSTALLATION
46 65
------------
47
1. Download and unpack the Libraries module directory in your modules folder
48
   (this will usually be "sites/all/modules/").
49
   Link: http://drupal.org/project/libraries
50
2. Download and unpack the Colorbox module directory in your modules folder
51
   (this will usually be "sites/all/modules/").
52
3. Download and unpack the Colorbox plugin in "sites/all/libraries".
66

  
67
 1. Download and unpack the Libraries module directory in your modules folder
68
    (this will usually be "sites/all/modules/").
69
    Link: http://drupal.org/project/libraries
70

  
71
 2. Download and unpack the Colorbox module directory in your modules folder
72
    (this will usually be "sites/all/modules/").
73

  
74
 3. Download and unpack the Colorbox plugin in "sites/all/libraries".
53 75
    Make sure the path to the plugin file becomes:
54 76
    "sites/all/libraries/colorbox/jquery.colorbox-min.js"
55
   Link: https://github.com/jackmoore/colorbox/archive/1.x.zip
56
   Drush users can use the command "drush colorbox-plugin".
57
4. Go to "Administer" -> "Modules" and enable the Colorbox module.
77
    Link: https://github.com/jackmoore/colorbox/archive/1.x.zip
78
    Drush users can use the command "drush colorbox-plugin".
79

  
80
 4. Go to "Administer" -> "Modules" and enable the Colorbox.
81

  
82
    Install as you would normally install a contributed Drupal module. See:
83
    https://drupal.org/documentation/install/modules-themes/modules-7 for
84
    further information.
58 85

  
86
    Note:
87
    If you download the Colorbox plugin using the makefile included you should 
88
    assurance that unzip command is available on your host.
59 89

  
60
Configuration:
90

  
91
CONFIGURATION
61 92
-------------
62
Go to "Configuration" -> "Media" -> "Colorbox" to find
63
all the configuration options.
93

  
94
 * Go to "Configuration" » "Media" » "Colorbox" to find all the configuration
95
   options.
64 96

  
65 97

  
66
Use the Views Colorbox Trigger field:
98
USE THE VIEWS COLORBOX TRIGGER FIELD
67 99
------------------------------------
68 100
TODO
69 101

  
70 102

  
71
Add a custom Colorbox style to your theme:
103
ADD A CUSTOM COLORBOX STYLE TO YOUR THEME
72 104
----------------------------------------
73 105
The easiest way is to start with either the default style or one of the
74
example styles included in the Colorbox JS library download. Simply copy the entire
75
style folder to your theme and rename it to something logical like "mycolorbox".
76
Inside that folder are both a .css and .js file, rename both of those as well to match
77
your folder name: i.e. "colorbox_mycolorbox.css" and "colorbox_mycolorbox.js"
106
example styles included in the Colorbox JS library download. Simply copy the
107
entire style folder to your theme and rename it to something logical like
108
"mycolorbox". Inside that folder are both a .css and .js file, rename both of
109
those as well to  match your folder name: i.e. "colorbox_mycolorbox.css" and
110
"colorbox_mycolorbox.js"
78 111

  
79 112
Add entries in your theme's .info file for the Colorbox CSS/JS files:
80 113

  
......
86 119
Make any CSS adjustments to your "colorbox_mycolorbox.css" file.
87 120

  
88 121

  
89
Load images from custom links in a Colorbox:
122
LOAD IMAGES FROM CUSTOM LINKS IN A COLORBOX
90 123
--------------------------------------------
91 124

  
92 125
Add the class "colorbox" to the link and point its href attribute to the image
93 126
you want to display in the Colorbox.
94 127

  
95 128

  
96
Load content in a Colorbox:
129
LOAD CONTENT IN A COLORBOX
97 130
---------------------------
98 131
Check the "Enable Colorbox load" option in Colorbox settings.
99 132

  
......
105 138
Other modules may activate this for easy Colorbox integration.
106 139

  
107 140

  
108
Load inline content in a Colorbox:
141
LOAD INLINE CONTENT IN A COLORBOX
109 142
----------------------------------
110 143
Check the "Enable Colorbox inline"  option in Colorbox settings.
111 144

  
......
118 151

  
119 152
It could e.g. look like this.
120 153

  
121
<a class="colorbox-inline" href="?width=500&height=500&inline=true#id-of-content">Link to click</a>
154
<a class="colorbox-inline" href="?width=500&height=500&inline=true#id-of-content">
155
  Link to click
156
</a>
122 157

  
123 158
<div style="display: none;">
124
<div id="id-of-content">What ever content you want to display in a Colorbox.</div>
159
  <div id="id-of-content">
160
    What ever content you want to display in a Colorbox.
161
  </div>
125 162
</div>
126 163

  
127 164
Other modules may activate this for easy Colorbox integration.
128 165

  
129 166

  
130
Drush:
167
DRUSH
131 168
------
132 169
A Drush command is provides for easy installation of the Colorbox
133 170
plugin itself.
......
139 176
recommended unless you know what you are doing.
140 177

  
141 178

  
142
Image in Colorbox not displayed in Internet Explorer 8:
179
IMAGE IN COLORBOX NOT DISPLAYED IN INTERNET EXPLORER 8
143 180
-------------------------------------------------------
144 181

  
145 182
If your theme has CSS like this (popular in responsive design):
......
155 192
  max-width: none;
156 193
}
157 194

  
195

  
196
MAINTAINERS
197
-----------
198

  
199
Current maintainers:
200
 * Fredrik Jonsson (frjo) - https://www.drupal.org/user/5546
201
 * Joe Wheaton (jdwfly) - https://www.drupal.org/user/298179
202
 * Renato Gonçalves (RenatoG) - https://www.drupal.org/user/3326031
203
 * Sam Becker (Sam152) - https://www.drupal.org/user/1485048
204
 * rsmylski - https://www.drupal.org/user/1324348
205
 * lsolesen - https://www.drupal.org/user/527206
drupal7/sites/all/modules/colorbox/colorbox-insert-image.tpl.php
28 28
 */
29 29
?>
30 30
<a href="<?php print $path; ?>" title="__title__" class="colorbox colorbox-insert-image" data-colorbox-gallery="<?php print $gallery_id; ?>">
31
  <img src="<?php print $url; ?>" <?php if ($width && $height): ?>width="<?php print $width; ?>" height="<?php print $height; ?>" <?php endif; ?>alt="__alt__" title="__title__" class="<?php print $class; ?>" />
31
  <img src="<?php print $url; ?>" <?php if ($width && $height): ?>width="<?php print $width; ?>" height="<?php print $height; ?>" <?php
32
 endif; ?>alt="__alt__" title="__title__" class="<?php print $class; ?>" />
32 33
</a>
drupal7/sites/all/modules/colorbox/colorbox.admin.inc
50 50
    '#type' => 'checkbox',
51 51
    '#title' => t('Enable Colorbox inline'),
52 52
    '#default_value' => variable_get('colorbox_inline', 0),
53
    '#description' => t('This enables custom links that can open inline content in a Colorbox. Add the class "colorbox-inline" to the link and build the url like this "?width=500&height=500&inline=true#id-of-content". Other modules may activate this for easy Colorbox integration.'),
53
    '#description' => t('<a href="https://www.drupal.org/files/druplicon-small.png" class="colorbox">This</a> enables custom links that can open inline content in a Colorbox. Add the class "colorbox-inline" to the link and build the url like this "?width=500&height=500&inline=true#id-of-content". Other modules may activate this for easy Colorbox integration.'),
54 54
  );
55 55

  
56 56
  $form['colorbox_custom_settings'] = array(
......
73 73
    '#title' => t('Style'),
74 74
    '#options' => $colorbox_styles,
75 75
    '#default_value' => variable_get('colorbox_style', 'default'),
76
    '#description' => t('Select the style to use for the Colorbox. The example styles are the ones that come with the Colorbox plugin. Select "None" if you have added Colorbox styles to your theme.'),
76
    '#description' => t('Select the style to use for the Colorbox. The example styles are the ones that come with the Colorbox plugin. Select "None" if you have added Colorbox styles to your theme. <br> <strong>Examples</strong>: <ul><li><a href="/sites/all/modules/colorbox/images/admin/example_default.png" target="blank">Default</a></li><li><a href="/sites/all/modules/colorbox/images/admin/example_plain.png" target="blank">Plain</a></li><li><a href="/sites/all/modules/colorbox/images/admin/example_stockholm_syndrome.png" target="blank">Stockholm Syndrome</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_1.png" target="blank">Example 1</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_2.png" target="blank">Example 2</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_3.png" target="blank">Example 3</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_4.png" target="blank">Example 4</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_5.png" target="blank">Example 5</a></li><li><a href="/sites/all/modules/colorbox/images/admin/example_none.png" target="blank">None</a></li></ul>'),
77 77
  );
78 78
  $form['colorbox_custom_settings']['colorbox_custom_settings_activate'] = array(
79 79
    '#type' => 'radios',
......
93 93
  $form['colorbox_custom_settings']['colorbox_transition_type'] = array(
94 94
    '#type' => 'radios',
95 95
    '#title' => t('Transition type'),
96
    '#options' => array('elastic' => t('Elastic'), 'fade' => t('Fade'), 'none' => t('None')),
96
    '#options' => array(
97
      'elastic' => t('Elastic'),
98
      'fade' => t('Fade'),
99
      'none' => t('None'),
100
    ),
97 101
    '#default_value' => variable_get('colorbox_transition_type', 'elastic'),
98 102
    '#description' => t('The transition type.'),
99 103
  );
100 104
  $form['colorbox_custom_settings']['colorbox_transition_speed'] = array(
101 105
    '#type' => 'select',
102 106
    '#title' => t('Transition speed'),
103
    '#options' => drupal_map_assoc(array(100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600)),
107
    '#options' => drupal_map_assoc(array(
108
      100,
109
      150,
110
      200,
111
      250,
112
      300,
113
      350,
114
      400,
115
      450,
116
      500,
117
      550,
118
      600,
119
    )),
104 120
    '#default_value' => variable_get('colorbox_transition_speed', 350),
105 121
    '#description' => t('Sets the speed of the fade and elastic transitions, in milliseconds.'),
106 122
  );
107 123
  $form['colorbox_custom_settings']['colorbox_opacity'] = array(
108 124
    '#type' => 'select',
109 125
    '#title' => t('Opacity'),
110
    '#options' => drupal_map_assoc(array('0', '0.10', '0.15', '0.20', '0.25', '0.30', '0.35', '0.40', '0.45', '0.50', '0.55', '0.60', '0.65', '0.70', '0.75', '0.80', '0.85', '0.90', '0.95', '1')),
126
    '#options' => drupal_map_assoc(array(
127
      '0',
128
      '0.10',
129
      '0.15',
130
      '0.20',
131
      '0.25',
132
      '0.30',
133
      '0.35',
134
      '0.40',
135
      '0.45',
136
      '0.50',
137
      '0.55',
138
      '0.60',
139
      '0.65',
140
      '0.70',
141
      '0.75',
142
      '0.80',
143
      '0.85',
144
      '0.90',
145
      '0.95',
146
      '1',
147
    )),
111 148
    '#default_value' => variable_get('colorbox_opacity', '0.85'),
112 149
    '#description' => t('The overlay opacity level. Range: 0 to 1.'),
113 150
  );
......
183 220
    '#type' => 'checkbox',
184 221
    '#title' => t('Fixed'),
185 222
    '#default_value' => variable_get('colorbox_fixed', 1),
186
    '#description' => t('If the Colorbox should be displayed in a fixed position within the visitor\'s viewport or relative to the document.'),
223
    '#description' => t("If the Colorbox should be displayed in a fixed position within the visitor's viewport or relative to the document."),
187 224
  );
188 225

  
189 226
  $form['colorbox_custom_settings']['colorbox_slideshow_settings'] = array(
......
223 260
  $form['colorbox_custom_settings']['colorbox_slideshow_settings']['colorbox_slideshowspeed'] = array(
224 261
    '#type' => 'select',
225 262
    '#title' => t('Slideshow speed'),
226
    '#options' => drupal_map_assoc(array(1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000)),
263
    '#options' => drupal_map_assoc(array(
264
      1000,
265
      1500,
266
      2000,
267
      2500,
268
      3000,
269
      3500,
270
      4000,
271
      4500,
272
      5000,
273
      5500,
274
      6000,
275
    )),
227 276
    '#default_value' => variable_get('colorbox_slideshowspeed', 2500),
228 277
    '#description' => t('Sets the speed of the slideshow, in milliseconds.'),
229 278
  );
......
292 341
  $form['colorbox_advanced_settings']['colorbox_caption_trim_length'] = array(
293 342
    '#type' => 'select',
294 343
    '#title' => t('Caption max length'),
295
    '#options' => drupal_map_assoc(array(40, 45, 50, 55, 60, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120)),
344
    '#options' => drupal_map_assoc(array(
345
      40,
346
      45,
347
      50,
348
      55,
349
      60,
350
      70,
351
      75,
352
      80,
353
      85,
354
      90,
355
      95,
356
      100,
357
      105,
358
      110,
359
      115,
360
      120,
361
    )),
296 362
    '#default_value' => variable_get('colorbox_caption_trim_length', 75),
297 363
    '#states' => array(
298 364
      'visible' => array(
......
310 376
    '#type' => 'textarea',
311 377
    '#title' => '<span class="element-invisible">' . t('Pages') . '</span>',
312 378
    '#default_value' => variable_get('colorbox_pages', "admin*\nimagebrowser*\nimg_assist*\nimce*\nnode/add/*\nnode/*/edit\nprint/*\nprintpdf/*\nsystem/ajax\nsystem/ajax/*"),
313
    '#description' => t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
379
    '#description' => t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page. <p><a href=\"#\" class=\"colorbox-reset-specific-pages-default\">Reset to default</a></p>", array(
380
      '%blog' => 'blog',
381
      '%blog-wildcard' => 'blog/*',
382
      '%front' => '<front>',
383
    )),
314 384
  );
315 385
  $form['colorbox_advanced_settings']['colorbox_compression_type'] = array(
316 386
    '#type' => 'radios',
drupal7/sites/all/modules/colorbox/colorbox.api.php
11 11
 * Implements hook_colorbox_settings_alter().
12 12
 *
13 13
 * @param array $settings
14
 *   An associative array of Colorbox settings. See the
15
 *   @link http://colorpowered.com/colorbox/ Colorbox documentation @endlink
16
 *   for the full list of supported parameters.
14
 *   An associative array of Colorbox settings. See the.
17 15
 * @param string $style
18 16
 *   The name of the active style plugin. If $style is 'none', no Colorbox
19 17
 *   theme will be loaded.
18
 *
19
 * @link http://colorpowered.com/colorbox/ Colorbox documentation @endlink
20
 *   for the full list of supported parameters.
21
 *
22
 * @codingStandardsIgnoreStart
20 23
 */
21 24
function hook_colorbox_settings_alter(&$settings, &$style) {
25
  // @codingStandardsIgnoreEnd.
22 26
  // Disable automatic downscaling of images to maxWidth/maxHeight size.
23 27
  $settings['scalePhotos'] = FALSE;
24 28

  
drupal7/sites/all/modules/colorbox/colorbox.info
3 3
dependencies[] = libraries (>=2.x)
4 4
core = 7.x
5 5
configure = admin/config/media/colorbox
6
package = Media
6 7

  
7 8
files[] = views/colorbox_handler_field_colorbox.inc
8 9

  
9
; Information added by Drupal.org packaging script on 2017-04-04
10
version = "7.x-2.13"
10
; Information added by Drupal.org packaging script on 2020-04-13
11
version = "7.x-2.15"
11 12
core = "7.x"
12 13
project = "colorbox"
13
datestamp = "1491291489"
14

  
14
datestamp = "1586785587"
drupal7/sites/all/modules/colorbox/colorbox.install
5 5
 * Install, update and uninstall functions for the colorbox module.
6 6
 */
7 7

  
8
/**
9
 * Implements hook_enable().
10
 */
11
function colorbox_enable() {
12
  drupal_set_message(t('Thanks for installing Colorbox'));
13
  drupal_set_message(t('You may configure Colorbox by visiting <a href="@url_settings">@url_settings</a>', array(
14
    '@url_settings' => url('admin/config/media/colorbox'),
15
  )));
16
}
17

  
8 18
/**
9 19
 * Implements hook_requirements().
10 20
 */
......
22 32
        'title' => $t('Colorbox plugin'),
23 33
        'value' => $t('@e: At least @a', array('@e' => $error_type, '@a' => COLORBOX_MIN_PLUGIN_VERSION)),
24 34
        'severity' => REQUIREMENT_ERROR,
25
        'description' => $t('!error You need to download the !colorbox, extract the archive and place the colorbox directory in the %path directory on your server.', array('!error' => $error_message, '!colorbox' => l($t('Colorbox plugin'), $library['download url']), '%path' => 'sites/all/libraries')),
35
        'description' => $t('!error You need to download the !colorbox, extract the archive and place the colorbox directory in the %path directory on your server.', array(
36
          '!error' => $error_message,
37
          '!colorbox' => l($t('Colorbox plugin'),
38
          $library['download url']),
39
          '%path' => 'sites/all/libraries',
40
        )),
26 41
      );
27 42
    }
28 43
    elseif (version_compare($library['version'], COLORBOX_MIN_PLUGIN_VERSION, '>=')) {
......
37 52
        'title' => $t('Colorbox plugin'),
38 53
        'value' => $t('At least @a', array('@a' => COLORBOX_MIN_PLUGIN_VERSION)),
39 54
        'severity' => REQUIREMENT_ERROR,
40
        'description' => $t('You need to download a later version of the !colorbox and replace the old version located in the %path directory on your server.', array('!colorbox' => l($t('Colorbox plugin'), $library['download url']), '%path' => $library['library path'])),
55
        'description' => $t('You need to download a later version of the !colorbox and replace the old version located in the %path directory on your server.', array(
56
          '!colorbox' => l($t('Colorbox plugin'),
57
          $library['download url']),
58
          '%path' => $library['library path'],
59
        )),
41 60
      );
42 61
    }
43 62
  }
......
63 82
}
64 83

  
65 84
/**
66
 * Delete the unused colorbox_title_trim and
67
 * colorbox_title_trim_length variables.
85
 * Implements hook_update_N().
86
 *
87
 * Delete the unused colorbox_title_trim and colorbox_title_trim_length
88
 * variables.
68 89
 */
69 90
function colorbox_update_7002() {
70 91
  $ret = array();
......
117 138

  
118 139
  return $ret;
119 140
}
120

  
drupal7/sites/all/modules/colorbox/colorbox.module
2 2

  
3 3
/**
4 4
 * @file
5
 * A light-weight, customizable lightbox plugin for jQuery 1.3
5
 * A light-weight, customizable lightbox plugin for jQuery 1.3.
6 6
 */
7 7

  
8 8
/**
......
10 10
 */
11 11
define('COLORBOX_MIN_PLUGIN_VERSION', '1.6.1');
12 12

  
13

  
14 13
/**
15 14
 * Implements hook_theme().
16 15
 */
......
25 24
      ),
26 25
      'file' => 'colorbox.theme.inc',
27 26
    ),
28

  
29 27
    'colorbox_insert_image' => array(
30 28
      'variables' => array(
31 29
        'item' => NULL,
......
35 33
      'pattern' => 'colorbox_insert_image__[a-z0-9_]+',
36 34
      'file' => 'colorbox.theme.inc',
37 35
    ),
38

  
39 36
    'colorbox_image_formatter' => array(
40 37
      'variables' => array(
41 38
        'item' => NULL,
42 39
        'entity_type' => NULL,
43 40
        'entity' => NULL,
44
        'node' => NULL,  // Left for legacy support.
41
        // Left for legacy support.
42
        'node' => NULL,
45 43
        'field' => array(),
46 44
        'display_settings' => array(),
47 45
        'delta' => NULL,
......
56 54
 */
57 55
function colorbox_init() {
58 56
  // Do not load colorbox during the Drupal installation process, e.g. if part
59
  // of installation profiles. Only add the JavaScript and CSS on specified paths.
57
  // of installation profiles. Only add the JavaScript and CSS on specified
58
  // paths.
60 59
  if (!drupal_installation_attempted() && _colorbox_active()) {
61 60
    _colorbox_doheader();
62 61
  }
......
164 163
function _colorbox_doheader() {
165 164
  static $already_added = FALSE;
166 165
  if ($already_added) {
167
    return; // Don't add the JavaScript and CSS multiple times.
166
    // Don't add the JavaScript and CSS multiple times.
167
    return;
168 168
  }
169 169

  
170 170
  // Insert options and translated strings as JavaScript settings.
......
209 209
    );
210 210
  }
211 211

  
212
  $js_settings['specificPagesDefaultValue'] = "admin*\nimagebrowser*\nimg_assist*\nimce*\nnode/add/*\nnode/*/edit\nprint/*\nprintpdf/*\nsystem/ajax\nsystem/ajax/*";
213

  
212 214
  $path = drupal_get_path('module', 'colorbox');
213 215
  $style = variable_get('colorbox_style', 'default');
214 216

  
......
229 231
  switch ($style) {
230 232
    case 'none':
231 233
      break;
234

  
232 235
    case 'default':
233 236
    case 'plain':
234 237
    case 'stockholmsyndrome':
235 238
      drupal_add_css($path . '/styles/' . $style . '/colorbox_style.css');
236 239
      drupal_add_js($path . '/styles/' . $style . '/colorbox_style.js');
237 240
      break;
241

  
238 242
    default:
239 243
      drupal_add_css($style . '/colorbox.css');
240 244
  }
......
338 342
  );
339 343

  
340 344
  $caption = array(
341
    'auto' =>  t('Automatic'),
345
    'auto' => t('Automatic'),
342 346
    'title' => t('Title text'),
343 347
    'alt' => t('Alt text'),
344 348
    'node_title' => t('Content title'),
......
363 367
    ),
364 368
  );
365 369
  // Allow users to hide or set a custom recursion limit.
366
  // The module token_tweaks sets a global recursion limit that can not be bypassed.
370
  // The module token_tweaks sets a global recursion limit that can not be
371
  // bypassed.
367 372
  if (module_exists('token') && $recursion_limit = min(variable_get('token_tree_recursion_limit', 3), variable_get('colorbox_token_recursion_limit', 3))) {
368 373
    // File entities do not have $field, only $instance.
369 374
    if (!empty($field)) {
......
459 464
  }
460 465

  
461 466
  $caption = array(
462
    'auto' =>  t('Automatic'),
467
    'auto' => t('Automatic'),
463 468
    'title' => t('Title text'),
464 469
    'alt' => t('Alt text'),
465 470
    'node_title' => t('Content title'),
......
487 492
        '#item' => $item,
488 493
        '#entity_type' => $entity_type,
489 494
        '#entity' => $entity,
490
        '#node' => $entity, // Left for legacy support.
495
        // Left for legacy support.
496
        '#node' => $entity,
491 497
        '#field' => $field,
492 498
        '#display_settings' => $display['settings'],
493 499
        '#delta' => $delta,
......
501 507
/**
502 508
 * Implements hook_insert_styles().
503 509
 *
510
 * @codingStandardsIgnoreStart
504 511
 * @return array
512
 *   Returns a array with styles.
505 513
 */
506 514
function colorbox_insert_styles() {
507 515
  $insert_styles = array();
......
513 521
  return $insert_styles;
514 522
}
515 523

  
524
/**
525
 * Implements hook_help().
526
 */
527
function colorbox_help($path, $arg) {
528

  
529
  switch ($path) {
530
    case 'admin/help#colorbox':
531
      $output = '<h3>' . t('About') . '</h3>';
532
      $output .= '<p>' . t('<a target="_blank" href="@colorbox_project_link">Colorbox</a> is a light-weight customizable lightbox plugin for jQuery. This module allows for integration of Colorbox into Drupal.', array('@colorbox_project_link' => 'https://www.drupal.org/project/colorbox')) . '</p>';
533
      $output .= '<p>' . t('Images, iframed or inline content etc. can be displayed in a overlay above the current page.') . '</p>';
534

  
535
      $output .= '<h3>' . t('Usage') . '</h3>';
536
      $output .= '<p>' . t('Go to "Configuration" » "Media" » "Colorbox" to find all the configuration options.') . '</p>';
537

  
538
      $output .= '<h3>' . t('Features') . '</h3>';
539
      $output .= '<b>' . t('The Colorbox:') . '</b>';
540
      $output .= '<ul>';
541
      $output .= '<li>' . t('Excellent integration with Image field and Image styles') . '</li>';
542
      $output .= '<li>' . t('Choose between a default style and 5 example styles that are included.') . '</li>';
543
      $output .= '<li>' . t('Style the Colorbox with a custom colorbox.css file in your theme.') . '</li>';
544
      $output .= '<li>' . t('Drush command to download and install the Colorbox plugin in sites/all/libraries') . '</li>';
545
      $output .= '</ul>';
546

  
547
      $output .= '<b>' . t('The Colorbox plugin:') . '</b>';
548
      $output .= '<ul>';
549
      $output .= '<li>' . t('Supports photos, grouping, slideshow, ajax, inline, and iframed content.') . '</li>';
550
      $output .= '<li>' . t('Appearance is controlled through CSS so it can be restyled.') . '</li>';
551
      $output .= '<li>' . t('Preloads upcoming images in a photo group.') . '</li>';
552
      $output .= '<li>' . t('Completely unobtrusive, options are set in the JS and require no') . '</li>';
553
      $output .= '<li>' . t('changes to existing HTML.') . '</li>';
554
      $output .= '<li>' . t('Compatible with: jQuery 1.3.2+ in Firefox, Safari, Chrome, Opera,') . '</li>';
555
      $output .= '<li>' . t('Internet Explorer 7+.') . '</li>';
556
      $output .= '<li>' . t('Released under the MIT License.') . '</p>';
557
      $output .= '</ul>';
558

  
559
      $output .= '<h3>' . t('Colorbox screencasts') . '</h3>';
560
      $output .= '<b>' . t('Part 1 to 3 is for an older 7.x-1.x version of the Colorbox:') . '</b>';
561
      $output .= '<ul>';
562
      $output .= '<li>' . t('Part 1: <a href="@colorbox_screencasts_part1" target="blank">Installation and image field integration on Vimeo</a>', array('@colorbox_screencasts_part1' => 'https://vimeo.com/19122850')) . '</li>';
563
      $output .= '<li>' . t('Part 2: <a href="@colorbox_screencasts_part2" target="blank">Inline images with the Insert module on Vimeo</a>', array('@colorbox_screencasts_part2' => 'https://vimeo.com/19386122')) . '</li>';
564
      $output .= '<li>' . t('Part 3: <a href="@colorbox_screencasts_part3" target="blank">Building a image gallery and a image slideshow.</a>', array('@colorbox_screencasts_part3' => 'https://vimeo.com/26411524')) . '</li>';
565
      $output .= '</ul>';
566

  
567
      $output .= '<b>' . t('Contributed screencasts:') . '</b>';
568
      $output .= '<ul>';
569
      $output .= '<li>' . t('<a href="@colorbox_contributed_screencasts_part1" target="blank">Drupal 7 Colorbox project</a> by Code Karate', array('@colorbox_contributed_screencasts_part1' => 'http://codekarate.com/daily-dose-of-drupal/drupal-7-colorbox-module')) . '</li>';
570
      $output .= '<li>' . t('<a href="@colorbox_contributed_screencasts_part2" target="blank">Creating and Theming a Node Photo Gallery with Drupal 7 and Colorbox</a> by High Rock Media.', array('@colorbox_contributed_screencasts_part2' => 'http://dannyenglander.com/blog/screencast-creating-and-theming-node-photo-gallery-drupal-7-and-colorbox')) . '</li>';
571
      $output .= '<li>' . t('<a href="@colorbox_contributed_screencasts_part3" target="blank">How to Build a Lightbox Portfolio in Drupal 7</a> by CMS Quickstart', array('@colorbox_contributed_screencasts_part3' => 'http://www.cmsquickstart.com/blog/tutorial-how-build-lightbox-portfolio-drupal-7')) . '</li>';
572
      $output .= '</ul>';
573

  
574
      $output .= '<h3>' . t('Load Content in a Colorbox') . '</h3>';
575
      $output .= '<p>' . t('Check the "Enable Colorbox load" option in Colorbox settings.') . '</p>';
576
      $output .= '<p>' . t('This enables custom links that can open content in a Colorbox.') . '</p>';
577
      $output .= '<p>' . t('Add the class "colorbox-load" to the link and build the url like this "[path]?width=500&height=500&iframe=true" or "[path]?width=500&height=500" if you don\'t want an iframe.') . '</p>';
578
      $output .= '<p>' . t('Other projects may activate this for easy Colorbox integration.') . '</p>';
579

  
580
      $output .= '<h3>' . t('Load Images from custom links in a Colorbox') . '</h3>';
581
      $output .= '<p>' . t('Add the class "colorbox" to the link and point its href attribute to the image you want to display in the Colorbox.') . '</p>';
582

  
583
      return $output;
584
  }
585
}
586

  
516 587
/**
517 588
 * Implements hook_insert_content().
518 589
 */
519 590
function colorbox_insert_content($item, $style, $widget) {
520 591
  list($item['module_name'], $item['style_name']) = explode('__', $style['name'], 2);
521
  return theme(array('colorbox_insert_image__' . str_replace('-', '_', $item['style_name']), 'colorbox_insert_image'), array('item' => $item, 'widget' => $widget));
592
  return theme(array(
593
    'colorbox_insert_image__' . str_replace('-', '_', $item['style_name']),
594
    'colorbox_insert_image',
595
      ), array(
596
    'item' => $item,
597
    'widget' => $widget,
598
  ));
522 599
}
523 600

  
524 601
/**
525
 * Machine names normally need to be unique but that does not apply to galleries.
602
 * Gallery Exists Function.
603
 *
604
 * Machine names normally need to be unique but that does not apply to
605
 * galleries.
526 606
 *
527 607
 * @return false
528 608
 *   Always FALSE
drupal7/sites/all/modules/colorbox/colorbox.theme.inc
18 18
 *   An HTML string representing the themed output.
19 19
 *
20 20
 * @ingroup themeable
21
 *
22
 * @codingStandardsIgnoreStart
21 23
 */
22 24
function theme_colorbox_image_formatter($variables) {
25
  // @codingStandardsIgnoreEnd
26
  global $language;
23 27
  static $gallery_token = NULL;
24 28
  $item = $variables['item'];
25 29
  $entity_type = $variables['entity_type'];
......
95 99
      break;
96 100

  
97 101
    case 'custom':
98
      $caption = token_replace($settings['colorbox_caption_custom'], array($entity_type => $entity, 'file' => (object) $item), array('clear' => TRUE));
102
      $caption = token_replace($settings['colorbox_caption_custom'], array($entity_type => $entity, 'file' => (object) $item), array('clear' => TRUE, 'language' => $language));
99 103
      break;
100 104

  
101 105
    default:
102 106
      $caption = '';
103 107
  }
104 108

  
105
  // Shorten the caption for the example styles or when caption shortening is active.
109
  // Shorten the caption for the example styles or when caption shortening is
110
  // active.
106 111
  $colorbox_style = variable_get('colorbox_style', 'default');
107 112
  $trim_length = variable_get('colorbox_caption_trim_length', 75);
108 113
  if (((strpos($colorbox_style, 'colorbox/example') !== FALSE) || variable_get('colorbox_caption_trim', 0)) && (drupal_strlen($caption) > $trim_length)) {
......
110 115
  }
111 116

  
112 117
  // Build the gallery id.
113
  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
118
  list($id) = entity_extract_ids($entity_type, $entity);
114 119
  $entity_id = !empty($id) ? $entity_type . '-' . $id : 'entity-id';
115 120
  switch ($settings['colorbox_gallery']) {
116 121
    case 'post':
......
126 131
      break;
127 132

  
128 133
    case 'field_page':
129
      $gallery_id = 'gallery-' . $field['field_name'];
134
      $gallery_id = isset($field['field_name']) ? 'gallery-' . $field['field_name'] : 'gallery-page';
130 135
      break;
131 136

  
132 137
    case 'custom':
......
137 142
      $gallery_id = '';
138 143
  }
139 144

  
140
  // If gallery id is not empty add unique per-request token to avoid images being added manually to galleries.
145
  // If gallery id is not empty add unique per-request token to avoid images
146
  // being added manually to galleries.
141 147
  if (!empty($gallery_id) && variable_get('colorbox_unique_token', 1)) {
142
    // Check if gallery token has already been set, we need to reuse the token for the whole request.
148
    // Check if gallery token has already been set, we need to reuse the token
149
    // for the whole request.
143 150
    if (is_null($gallery_token)) {
144 151
      // We use a short token since randomness is not critical.
145 152
      $gallery_token = drupal_random_key(8);
......
154 161
    $path = file_create_url($image['path']);
155 162
  }
156 163

  
157
  return theme('colorbox_imagefield', array('image' => $image, 'path' => $path, 'title' => $caption, 'gid' => $gallery_id));
164
  return theme('colorbox_imagefield', array(
165
    'image' => $image,
166
    'path' => $path,
167
    'title' => $caption,
168
    'gid' => $gallery_id,
169
  ));
158 170
}
159 171

  
160 172
/**
......
171 183
 *   An HTML string containing a link to the given path.
172 184
 *
173 185
 * @ingroup themeable
186
 *
187
 * @codingStandardsIgnoreStart
174 188
 */
175 189
function theme_colorbox_imagefield($variables) {
190
  // @codingStandardsIgnoreEnd
176 191
  $class = array('colorbox');
177 192

  
178 193
  if ($variables['image']['style_name'] == 'hide') {
......
204 219
 * Preprocess variables for the colorbox-insert-image.tpl.php file.
205 220
 *
206 221
 * @param array $variables
222
 *   Array with variables values.
223
 *
224
 * @codingStandardsIgnoreStart
207 225
 */
208 226
function template_preprocess_colorbox_insert_image(&$variables) {
227
  // @codingStandardsIgnoreEnd
209 228
  $item = $variables['item'];
210 229
  $variables['file'] = file_load($item['fid']);
211 230
  $variables['style_name'] = $item['style_name'];
drupal7/sites/all/modules/colorbox/drush/colorbox.drush.inc
2 2

  
3 3
/**
4 4
 * @file
5
 *   drush integration for colorbox.
5
 * Drush integration for colorbox.
6 6
 */
7 7

  
8 8
/**
......
12 12
define('COLORBOX_DOWNLOAD_PREFIX', 'colorbox-');
13 13

  
14 14
/**
15
 * Implementation of hook_drush_command().
15
 * Implements hook_drush_command().
16 16
 *
17 17
 * In this hook, you specify which commands your
18 18
 * drush module makes available, what it does and
......
23 23
 *
24 24
 * See `drush topic docs-commands` for a list of recognized keys.
25 25
 *
26
 * @codingStandardsIgnoreLine
26 27
 * @return array
27 28
 *   An associative array describing your command(s).
28 29
 */
29 30
function colorbox_drush_command() {
30 31
  $items = array();
31 32

  
32
  // the key in the $items array is the name of the command.
33
  // The key in the $items array is the name of the command.
33 34
  $items['colorbox-plugin'] = array(
34 35
    'callback' => 'drush_colorbox_plugin',
35 36
    'description' => dt('Download and install the Colorbox plugin.'),
36
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, // No bootstrap.
37
  // No bootstrap.
38
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
37 39
    'arguments' => array(
38 40
      'path' => dt('Optional. A path where to install the Colorbox plugin. If omitted Drush will use the default location.'),
39 41
    ),
......
44 46
}
45 47

  
46 48
/**
47
 * Implementation of hook_drush_help().
49
 * Implements hook_drush_help().
48 50
 *
49 51
 * This function is called whenever a drush user calls
50 52
 * 'drush help <name-of-your-command>'
51 53
 *
54
 * @codingStandardsIgnoreLine
52 55
 * @param string $section
53 56
 *   A string with the help section (prepend with 'drush:')
54 57
 *
58
 * @codingStandardsIgnoreLine
55 59
 * @return string
56 60
 *   A string with the help text for your command.
57 61
 */
......
66 70
 * Implements drush_MODULE_pre_pm_enable().
67 71
 */
68 72
function drush_colorbox_pre_pm_enable() {
69
   $modules = drush_get_context('PM_ENABLE_MODULES');
70
   if (in_array('colorbox', $modules) && !drush_get_option('skip')) {
71
     drush_colorbox_plugin();
72
   }
73
  $modules = drush_get_context('PM_ENABLE_MODULES');
74
  if (in_array('colorbox', $modules) && !drush_get_option('skip')) {
75
    drush_colorbox_plugin();
76
  }
73 77
}
74 78

  
75 79
/**
......
96 100
    $olddir = getcwd();
97 101
    chdir($path);
98 102

  
99
    // Download the zip archive
103
    // Download the zip archive.
100 104
    if ($filepath = drush_download_file(COLORBOX_DOWNLOAD_URI)) {
101 105
      $filename = basename($filepath);
102 106
      $dirname = COLORBOX_DOWNLOAD_PREFIX . basename($filepath, '.zip');
......
108 112
        drush_log(dt('A existing Colorbox plugin was deleted from @path', array('@path' => $path)), 'notice');
109 113
      }
110 114

  
111
      // Decompress the zip archive
115
      // Decompress the zip archive.
112 116
      drush_tarball_extract($filename);
113 117

  
114 118
      // Change the directory name to "colorbox" if needed.
drupal7/sites/all/modules/colorbox/js/colorbox.js
7 7

  
8 8
Drupal.behaviors.initColorbox = {
9 9
  attach: function (context, settings) {
10
    if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
10
    if (!$.isFunction($('a, area, input', context).colorbox) || typeof settings.colorbox === 'undefined') {
11 11
      return;
12 12
    }
13 13

  
......
30 30
    };
31 31

  
32 32
    $('.colorbox', context)
33
      .once('init-colorbox')
34
      .colorbox(settings.colorbox);
33
      .once('init-colorbox').each(function(){
34
        $(this).colorbox(settings.colorbox);
35
      });
35 36

  
36 37
    $(context).bind('cbox_complete', function () {
37 38
      Drupal.attachBehaviors('#cboxLoadedContent');
drupal7/sites/all/modules/colorbox/js/colorbox_admin_settings.js
7 7

  
8 8
Drupal.behaviors.initColorboxAdminSettings = {
9 9
  attach: function (context, settings) {
10

  
10 11
    $('div.colorbox-custom-settings-activate input.form-radio', context).click(function () {
11 12
      if (this.value == 1) {
12 13
        $('div.colorbox-custom-settings', context).show();
......
31 32
        $('div.colorbox-title-trim-settings', context).hide();
32 33
      }
33 34
    });
35
    $('.colorbox-reset-specific-pages-default', context).click(function (event) {
36

  
37
      event.preventDefault();
38

  
39
      var colorbox_specific_pages_default_value = Drupal.settings.colorbox.specificPagesDefaultValue;
40

  
41
      if (typeof colorbox_specific_pages_default_value !== 'undefined' && colorbox_specific_pages_default_value.length > 0) {
42
        $("#edit-colorbox-pages").val(colorbox_specific_pages_default_value);
43
      }
44
    });
34 45
  }
35 46
};
36 47

  
drupal7/sites/all/modules/colorbox/styles/default/colorbox_style.css
2 2
 * Colorbox Core Style:
3 3
 * The following CSS is consistent between example themes and should not be altered.
4 4
 */
5
#colorbox, #cboxOverlay, #cboxWrapper {
5
#colorbox,
6
#cboxOverlay,
7
#cboxWrapper {
6 8
  position: absolute;
7 9
  top: 0;
8 10
  left: 0;
......
14 16
  width: 100%;
15 17
  height: 100%;
16 18
}
17
#cboxMiddleLeft, #cboxBottomLeft {
19
#cboxMiddleLeft,
20
#cboxBottomLeft {
18 21
  clear: left;
19 22
}
20 23
#cboxContent {
......
27 30
#cboxTitle {
28 31
  margin: 0;
29 32
}
30
#cboxLoadingOverlay, #cboxLoadingGraphic {
33
#cboxLoadingOverlay,
34
#cboxLoadingGraphic {
31 35
  position: absolute;
32 36
  top: 0;
33 37
  left: 0;
......
38 42
 * These elements are buttons, and may need to have additional
39 43
 * styles reset to avoid unwanted base styles.
40 44
 */
41
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow {
45
#cboxPrevious,
46
#cboxNext,
47
#cboxClose,
48
#cboxSlideshow {
42 49
  border: 0;
43 50
  padding: 0;
44 51
  margin: 0;
......
51 58
 * Avoid outlines on :active (mouseclick),
52 59
 * but preserve outlines on :focus (tabbed navigating)
53 60
 */
54
#cboxPrevious:active, #cboxNext:active, #cboxClose:active, #cboxSlideshow:active {
61
#cboxPrevious:active,
62
#cboxNext:active,
63
#cboxClose:active,
64
#cboxSlideshow:active {
55 65
  outline: 0;
56 66
}
57 67
.cboxPhoto {
......
59 69
  margin: auto;
60 70
  border: 0;
61 71
  display: block;
62
  max-width: none;
72
  max-width: 100%;
73
  max-height: 100%;
63 74
}
64 75
.cboxIframe {
65 76
  width: 100%;
......
68 79
  border: 0;
69 80
}
70 81
/* Reset box sizing to content-box if theme is using border-box. */
71
#colorbox, #cboxContent, #cboxLoadedContent {
82
#colorbox,
83
#cboxContent,
84
#cboxLoadedContent {
72 85
  -moz-box-sizing: content-box;
73 86
  -webkit-box-sizing: content-box;
74 87
  box-sizing: content-box;
......
85 98
#colorbox {
86 99
  outline: 0;
87 100
}
88
  #cboxWrapper {
89
    background: #fff;
90
    -moz-border-radius: 5px;
91
    -webkit-border-radius: 5px;
92
    border-radius: 5px;
93
  }
94
    #cboxTopLeft {
95
      width: 15px;
96
      height: 15px;
97
    }
98
    #cboxTopCenter {
99
      height: 15px;
100
    }
101
    #cboxTopRight {
102
      width: 15px;
103
      height: 15px;
104
    }
105
    #cboxBottomLeft {
106
      width: 15px;
107
      height: 10px;
108
    }
109
    #cboxBottomCenter {
110
      height: 10px;
111
    }
112
    #cboxBottomRight {
113
      width: 15px;
114
      height: 10px;
115
    }
116
    #cboxMiddleLeft {
117
      width: 15px;
118
    }
119
    #cboxMiddleRight {
120
      width: 15px;
121
    }
122
    #cboxContent {
123
      background: #fff;
124
      overflow: hidden;
125
    }
126
      #cboxError {
127
        padding: 50px;
128
        border: 1px solid #ccc;
129
      }
130
      #cboxLoadedContent {
131
        margin-bottom: 28px;
132
      }
133
      #cboxTitle {
134
        position: absolute;
135
        background: rgba(255, 255, 255, 0.7);
136
        bottom: 28px;
137
        left: 0;
138
        color: #535353;
139
        width: 100%;
140
        padding: 4px 6px;
141
        -moz-box-sizing: border-box;
142
        -webkit-box-sizing: border-box;
143
        box-sizing: border-box;
144
      }
145
      #cboxCurrent {
146
        position: absolute;
147
        bottom: 4px;
148
        left: 60px;
149
        color: #949494;
150
      }
151
      .cboxSlideshow_on #cboxSlideshow {
152
        position: absolute;
153
        bottom: 0px;
154
        right: 30px;
155
        background: url(images/controls.png) no-repeat -75px -50px;
156
        width: 25px;
157
        height: 25px;
158
        text-indent: -9999px;
159
      }
160
      .cboxSlideshow_on #cboxSlideshow:hover {
161
        background-position: -101px -50px;
162
      }
163
      .cboxSlideshow_off #cboxSlideshow {
164
        position: absolute;
165
        bottom: 0px;
166
        right: 30px;
167
        background: url(images/controls.png) no-repeat -25px -50px;
168
        width: 25px;
169
        height: 25px;
170
        text-indent: -9999px;
171
      }
172
      .cboxSlideshow_off #cboxSlideshow:hover {
173
        background-position: -49px -50px;
174
      }
175
      #cboxPrevious {
176
        position: absolute;
177
        bottom: 0;
178
        left: 0;
179
        background: url(images/controls.png) no-repeat -75px 0px;
180
        width: 25px;
181
        height: 25px;
182
        text-indent: -9999px;
183
      }
184
      #cboxPrevious:hover {
185
        background-position: -75px -25px;
186
      }
187
      #cboxNext {
188
        position: absolute;
189
        bottom: 0;
190
        left: 27px;
191
        background: url(images/controls.png) no-repeat -50px 0px;
192
        width: 25px;
193
        height: 25px;
194
        text-indent: -9999px;
195
      }
196
      #cboxNext:hover {
197
        background-position: -50px -25px;
198
      }
199
      #cboxLoadingOverlay {
200
        background: #fff;
201
      }
202
      #cboxLoadingGraphic {
203
        background: url(images/loading_animation.gif) no-repeat center center;
204
      }
205
      #cboxClose {
206
        position: absolute;
207
        bottom: 0;
208
        right: 0;
209
        background: url(images/controls.png) no-repeat -25px 0px;
210
        width: 25px;
211
        height: 25px;
212
        text-indent: -9999px;
213
      }
214
      #cboxClose:hover {
215
        background-position: -25px -25px;
216
      }
101
#cboxWrapper {
102
  background: #fff;
103
  -moz-border-radius: 5px;
104
  -webkit-border-radius: 5px;
105
  border-radius: 5px;
106
}
107
#cboxTopLeft {
108
  width: 15px;
109
  height: 15px;
110
}
111
#cboxTopCenter {
112
  height: 15px;
113
}
114
#cboxTopRight {
115
  width: 15px;
116
  height: 15px;
117
}
118
#cboxBottomLeft {
119
  width: 15px;
120
  height: 10px;
121
}
122
#cboxBottomCenter {
123
  height: 10px;
124
}
125
#cboxBottomRight {
126
  width: 15px;
127
  height: 10px;
128
}
129
#cboxMiddleLeft {
130
  width: 15px;
131
}
132
#cboxMiddleRight {
133
  width: 15px;
134
}
135
#cboxContent {
136
  background: #fff;
137
  overflow: hidden;
138
}
139
#cboxError {
140
  padding: 50px;
141
  border: 1px solid #ccc;
142
}
143
#cboxLoadedContent {
144
  margin-bottom: 28px;
145
}
146
#cboxTitle {
147
  position: absolute;
148
  background: rgba(255, 255, 255, 0.7);
149
  bottom: 28px;
150
  left: 0;
151
  color: #535353;
152
  width: 100%;
153
  padding: 4px 6px;
154
  -moz-box-sizing: border-box;
155
  -webkit-box-sizing: border-box;
156
  box-sizing: border-box;
157
}
158
#cboxCurrent {
159
  position: absolute;
160
  bottom: 4px;
161
  left: 60px;
162
  color: #949494;
163
}
164
.cboxSlideshow_on #cboxSlideshow {
165
  position: absolute;
166
  bottom: 0px;
167
  right: 30px;
168
  background: url(images/controls.png) no-repeat -75px -50px;
169
  width: 25px;
170
  height: 25px;
171
  text-indent: -9999px;
172
}
173
.cboxSlideshow_on #cboxSlideshow:hover {
174
  background-position: -101px -50px;
175
}
176
.cboxSlideshow_off #cboxSlideshow {
177
  position: absolute;
178
  bottom: 0px;
179
  right: 30px;
180
  background: url(images/controls.png) no-repeat -25px -50px;
181
  width: 25px;
182
  height: 25px;
183
  text-indent: -9999px;
184
}
185
.cboxSlideshow_off #cboxSlideshow:hover {
186
  background-position: -49px -50px;
187
}
188
#cboxPrevious {
189
  position: absolute;
190
  bottom: 0;
191
  left: 0;
192
  background: url(images/controls.png) no-repeat -75px 0px;
193
  width: 25px;
194
  height: 25px;
195
  text-indent: -9999px;
196
}
197
#cboxPrevious:hover {
198
  background-position: -75px -25px;
199
}
200
#cboxNext {
201
  position: absolute;
202
  bottom: 0;
203
  left: 27px;
204
  background: url(images/controls.png) no-repeat -50px 0px;
205
  width: 25px;
206
  height: 25px;
207
  text-indent: -9999px;
208
}
209
#cboxNext:hover {
210
  background-position: -50px -25px;
211
}
212
#cboxLoadingOverlay {
213
  background: #fff;
214
}
215
#cboxLoadingGraphic {
216
  background: url(images/loading_animation.gif) no-repeat center center;
217
}
218
#cboxClose {
219
  position: absolute;
220
  bottom: 0;
221
  right: 0;
222
  background: url(images/controls.png) no-repeat -25px 0px;
223
  width: 25px;
224
  height: 25px;
225
  text-indent: -9999px;
226
}
227
#cboxClose:hover {
228
  background-position: -25px -25px;
229
}
drupal7/sites/all/modules/colorbox/styles/plain/colorbox_style.css
2 2
 * Colorbox Core Style:
3 3
 * The following CSS is consistent between example themes and should not be altered.
4 4
 */
5
#colorbox, #cboxOverlay, #cboxWrapper {
5
#colorbox,
6
#cboxOverlay,
7
#cboxWrapper {
6 8
  position: absolute;
7 9
  top: 0;
8 10
  left: 0;
......
14 16
  width: 100%;
15 17
  height: 100%;
16 18
}
17
#cboxMiddleLeft, #cboxBottomLeft {
19
#cboxMiddleLeft,
20
#cboxBottomLeft {
18 21
  clear: left;
19 22
}
20 23
#cboxContent {
......
27 30
#cboxTitle {
28 31
  margin: 0;
29 32
}
30
#cboxLoadingOverlay, #cboxLoadingGraphic {
33
#cboxLoadingOverlay,
34
#cboxLoadingGraphic {
31 35
  position: absolute;
32 36
  top: 0;
33 37
  left: 0;
......
38 42
 * These elements are buttons, and may need to have additional
39 43
 * styles reset to avoid unwanted base styles.
40 44
 */
41
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow {
45
#cboxPrevious,
46
#cboxNext,
47
#cboxClose,
48
#cboxSlideshow {
42 49
  border: 0;
43 50
  padding: 0;
44 51
  margin: 0;
......
51 58
 * Avoid outlines on :active (mouseclick),
52 59
 * but preserve outlines on :focus (tabbed navigating)
53 60
 */
54
#cboxPrevious:active, #cboxNext:active, #cboxClose:active, #cboxSlideshow:active {
61
#cboxPrevious:active,
62
#cboxNext:active,
63
#cboxClose:active,
64
#cboxSlideshow:active {
55 65
  outline: 0;
56 66
}
57 67
.cboxPhoto {
......
68 78
  border: 0;
69 79
}
70 80
/* Reset box sizing to content-box if theme is using border-box. */
71
#colorbox, #cboxContent, #cboxLoadedContent {
81
#colorbox,
82
#cboxContent,
83
#cboxLoadedContent {
72 84
  -moz-box-sizing: content-box;
73 85
  -webkit-box-sizing: content-box;
74 86
  box-sizing: content-box;
......
85 97
#colorbox {
86 98
  outline: 0;
87 99
}
88
  #cboxWrapper {}
89
    #cboxContent {
90
      overflow: hidden;
91
    }
92
      #cboxContent, .cboxPhoto {
93
        -webkit-border-radius: 5px;
94
        -moz-border-radius: 5px;
95
        border-radius: 5px;
96
      }
97
      #cboxError {
98
        padding: 50px;
99
        border: 1px solid #ccc;
100
      }
101
      #cboxTitle {
102
        position: absolute;
103
        background: rgba(255, 255, 255, 0.7);
104
        bottom: 0;
105
        left: 0;
106
        color: #535353;
107
        width: 100%;
108
        padding: 4px 6px;
109
        -moz-box-sizing: border-box;
110
        -webkit-box-sizing: border-box;
111
        box-sizing: border-box;
112
        -webkit-border-bottom-right-radius: 5px;
113
        -webkit-border-bottom-left-radius: 5px;
114
        -moz-border-radius-bottomright: 5px;
115
        -moz-border-radius-bottomleft: 5px;
116
        border-bottom-right-radius: 5px;
117
        border-bottom-left-radius: 5px;
118
      }
100
/* @codingStandardsIgnoreLine */
101
#cboxWrapper {
102
}
103
#cboxContent {
104
  overflow: hidden;
105
}
106
#cboxContent,
107
.cboxPhoto {
108
  -webkit-border-radius: 5px;
109
  -moz-border-radius: 5px;
110
  border-radius: 5px;
111
}
112
#cboxError {
113
  padding: 50px;
114
  border: 1px solid #ccc;
115
}
116
#cboxTitle {
117
  position: absolute;
118
  background: rgba(255, 255, 255, 0.7);
119
  bottom: 0;
120
  left: 0;
121
  color: #535353;
122
  width: 100%;
123
  padding: 4px 6px;
124
  -moz-box-sizing: border-box;
125
  -webkit-box-sizing: border-box;
126
  box-sizing: border-box;
127
  -webkit-border-bottom-right-radius: 5px;
128
  -webkit-border-bottom-left-radius: 5px;
129
  -moz-border-radius-bottomright: 5px;
130
  -moz-border-radius-bottomleft: 5px;
131
  border-bottom-right-radius: 5px;
132
  border-bottom-left-radius: 5px;
133
}
119 134

  
120
      #cboxLoadingOverlay {
121
        background: #fff;
122
      }
123
      #cboxLoadingGraphic {
124
        background: url(images/loading_animation.gif) no-repeat center center;
125
      }
126
      #cboxClose.cbox-close-plain {
127
        position: absolute;
128
        font-size: 20px;
129
        line-height: 18px;
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff