summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleh Vehera2018-10-10 09:48:14 (GMT)
committerOleh Vehera2018-10-10 09:48:14 (GMT)
commit65b3c4e3038a82904c708421d0d9ca27efe6153c (patch)
tree4b3ec63e74ccd4f809197d2188ef034e9081099e
parent9046405302c55ad7fb820bc811a044029f4694de (diff)
Revert changes before SR
-rw-r--r--.gitignore7
-rw-r--r--js/lightbox.js5
-rw-r--r--lightbox2.formatter.inc2
-rw-r--r--lightbox2.info9
-rw-r--r--lightbox2.install25
-rw-r--r--lightbox2.module18
6 files changed, 34 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..81d3255
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+#ignore the folder from PhpStorm IDE
+.idea
+
+#ignore files used by eclipse
+.buildpath
+.project
+.settings
diff --git a/js/lightbox.js b/js/lightbox.js
index 481f693..061cfd6 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -1072,9 +1072,8 @@ Lightbox = {
parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1];
}
}
- if ($(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)) {
- var title = $(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)[1];
- parts["title"] = title.replace(/\n/g, '<br />');
+ if ($(link).attr('rel').match(/\[.*\]\[(.*)\]/)) {
+ parts["title"] = $(link).attr('rel').match(/\[.*\]\[(.*)\]/)[1];
}
return parts;
},
diff --git a/lightbox2.formatter.inc b/lightbox2.formatter.inc
index 9224c2a..7907cab 100644
--- a/lightbox2.formatter.inc
+++ b/lightbox2.formatter.inc
@@ -27,7 +27,7 @@ function theme_lightbox2_image($variables) {
$image_style = $variables['image_style'];
$node_id = $variables['node_id'];
$field_name = $variables['field_name'];
- $caption = isset($variables['caption']) ? $variables['caption'] : 'hidden';
+ $caption = $variables['caption'];
if (!$variables["lightbox_style"]) {
$path['path'] = file_create_url($item['uri']);
diff --git a/lightbox2.info b/lightbox2.info
index 0d8a6a4..48fa008 100644
--- a/lightbox2.info
+++ b/lightbox2.info
@@ -4,7 +4,7 @@ description = Enables Lightbox2 for Drupal
core = 7.x
package = User interface
-dependencies[] = entity:entity
+dependencies[] = entity
files[] = lightbox2.install
files[] = lightbox2.module
@@ -13,3 +13,10 @@ files[] = lightbox2.admin.inc
files[] = lightbox2_handler_field_lightbox2.inc
configure = admin/config/user-interface/lightbox2
+
+; Information added by drupal.org packaging script on 2010-09-24
+version = "7.x-dev"
+core = "7.x"
+project = "lightbox2"
+
+
diff --git a/lightbox2.install b/lightbox2.install
index 13caeb8..a9a2bdc 100644
--- a/lightbox2.install
+++ b/lightbox2.install
@@ -29,7 +29,6 @@ function lightbox2_uninstall() {
variable_del('lightbox2_image_count_str');
variable_del('lightbox2_page_count_str');
variable_del('lightbox2_video_count_str');
- variable_del('lightbox2_filter_xss_allowed_tags');
variable_del('lightbox2_disable_resize');
variable_del('lightbox2_disable_zoom');
variable_del('lightbox2_enable_login');
@@ -39,7 +38,6 @@ function lightbox2_uninstall() {
variable_del('lightbox2_flv_player_flashvars');
variable_del('lightbox2_page_init_action');
variable_del('lightbox2_page_list');
- variable_del('lightbox2_image_group_node_id');
variable_del('lightbox2_disable_these_urls');
variable_del('lightbox2_imagefield_group_node_id');
variable_del('lightbox2_imagefield_use_node_title');
@@ -106,13 +104,11 @@ function lightbox2_uninstall() {
* too late now.
*/
function lightbox2_update_1() {
- $variable_name = 'lightbox2_plus';
- $var = variable_get($variable_name);
- if ($var) {
- variable_set('lightbox2_lite', $var);
- variable_del($variable_name);
- }
- return array();
+ $ret = array();
+ $ret[] = update_sql('UPDATE {variable} SET name="lightbox2_lite"
+ WHERE name="lightbox2_plus";');
+
+ return $ret;
}
/**
@@ -188,11 +184,11 @@ function lightbox2_update_6001() {
* 'lightbox2_slideshow_pause_on_prev_click'.
*/
function lightbox2_update_6002() {
- $variable_name = 'lightbox2_slideshow_pause_on_prev_click';
- $var = variable_get($variable_name);
- if ($var) {
- variable_set('lightbox2_slideshow_pause_on_previous_click', $var);
- variable_del($variable_name);
+ $vars = variable_init();
+ if (array_key_exists('lightbox2_slideshow_pause_on_prev_click', $vars)) {
+ $value = $vars['lightbox2_slideshow_pause_on_prev_click'];
+ variable_set('lightbox2_slideshow_pause_on_previous_click', $value);
+ variable_del('lightbox2_slideshow_pause_on_prev_click');
}
return array();
}
@@ -203,3 +199,4 @@ function lightbox2_update_6002() {
function lightbox2_update_6003() {
return array();
}
+
diff --git a/lightbox2.module b/lightbox2.module
index 3c27633..ea5643e 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -875,7 +875,6 @@ function lightbox2_field_formatter_settings_form($field, $instance, $view_mode,
return $form;
}
-
/**
* Implements hook_field_formatter_settings_summary().
*/
@@ -889,26 +888,19 @@ function lightbox2_field_formatter_settings_summary($field, $instance, $view_mod
$summary = '';
- if (!isset($image_styles[$settings['image_style']])) {
- $image_styles[$settings['image_style']] = 0;
- }
- if (!isset($image_styles[$settings['lightbox_style']])) {
- $image_styles[$settings['lightbox_style']] = 0;
- }
-
- if (isset($settings['caption']) && isset($settings['type']) && isset($settings['image_style']) && isset($settings['lightbox_style'])) {
- $summary .= '<strong>' . t('Caption field') . '</strong>: ' . $fields[$settings['caption']] . '<br/>';
- $summary .= '<strong>' . t('Display') . '</strong>: ';
+ if(isset($settings['caption']) && isset($settings['type']) && isset($settings['image_style']) && isset($settings['lightbox_style'])) {
+ $summary .= '<strong>'.t('Caption field') . '</strong>: ' . $fields[$settings['caption']] . '<br/>';
+ $summary .= '<strong>'.t('Display') . '</strong>: ' ;
$summary .= $types[$settings['type']];
$summary .= ': ';
$summary .= $image_styles[$settings['image_style']];
$summary .= ' => ';
$summary .= $image_styles[$settings['lightbox_style']];
- }
- else {
+ } else {
$summary = 'Title - Lightbox: original => original';
}
+
return $summary;
}