Commit 65b3c4e3 authored by voleger's avatar voleger

Revert changes before SR

parent 90464053
#ignore the folder from PhpStorm IDE
.idea
#ignore files used by eclipse
.buildpath
.project
.settings
...@@ -1072,9 +1072,8 @@ Lightbox = { ...@@ -1072,9 +1072,8 @@ Lightbox = {
parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1]; parts["flashvars"] = parts["style"].match(/flashvars:\s?(.*?);/)[1];
} }
} }
if ($(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)) { if ($(link).attr('rel').match(/\[.*\]\[(.*)\]/)) {
var title = $(link).attr('rel').match(/\[.*\]\[([\s\S]*)\]/)[1]; parts["title"] = $(link).attr('rel').match(/\[.*\]\[(.*)\]/)[1];
parts["title"] = title.replace(/\n/g, '<br />');
} }
return parts; return parts;
}, },
......
...@@ -27,7 +27,7 @@ function theme_lightbox2_image($variables) { ...@@ -27,7 +27,7 @@ function theme_lightbox2_image($variables) {
$image_style = $variables['image_style']; $image_style = $variables['image_style'];
$node_id = $variables['node_id']; $node_id = $variables['node_id'];
$field_name = $variables['field_name']; $field_name = $variables['field_name'];
$caption = isset($variables['caption']) ? $variables['caption'] : 'hidden'; $caption = $variables['caption'];
if (!$variables["lightbox_style"]) { if (!$variables["lightbox_style"]) {
$path['path'] = file_create_url($item['uri']); $path['path'] = file_create_url($item['uri']);
......
...@@ -4,7 +4,7 @@ description = Enables Lightbox2 for Drupal ...@@ -4,7 +4,7 @@ description = Enables Lightbox2 for Drupal
core = 7.x core = 7.x
package = User interface package = User interface
dependencies[] = entity:entity dependencies[] = entity
files[] = lightbox2.install files[] = lightbox2.install
files[] = lightbox2.module files[] = lightbox2.module
...@@ -13,3 +13,10 @@ files[] = lightbox2.admin.inc ...@@ -13,3 +13,10 @@ files[] = lightbox2.admin.inc
files[] = lightbox2_handler_field_lightbox2.inc files[] = lightbox2_handler_field_lightbox2.inc
configure = admin/config/user-interface/lightbox2 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"
...@@ -29,7 +29,6 @@ function lightbox2_uninstall() { ...@@ -29,7 +29,6 @@ function lightbox2_uninstall() {
variable_del('lightbox2_image_count_str'); variable_del('lightbox2_image_count_str');
variable_del('lightbox2_page_count_str'); variable_del('lightbox2_page_count_str');
variable_del('lightbox2_video_count_str'); variable_del('lightbox2_video_count_str');
variable_del('lightbox2_filter_xss_allowed_tags');
variable_del('lightbox2_disable_resize'); variable_del('lightbox2_disable_resize');
variable_del('lightbox2_disable_zoom'); variable_del('lightbox2_disable_zoom');
variable_del('lightbox2_enable_login'); variable_del('lightbox2_enable_login');
...@@ -39,7 +38,6 @@ function lightbox2_uninstall() { ...@@ -39,7 +38,6 @@ function lightbox2_uninstall() {
variable_del('lightbox2_flv_player_flashvars'); variable_del('lightbox2_flv_player_flashvars');
variable_del('lightbox2_page_init_action'); variable_del('lightbox2_page_init_action');
variable_del('lightbox2_page_list'); variable_del('lightbox2_page_list');
variable_del('lightbox2_image_group_node_id');
variable_del('lightbox2_disable_these_urls'); variable_del('lightbox2_disable_these_urls');
variable_del('lightbox2_imagefield_group_node_id'); variable_del('lightbox2_imagefield_group_node_id');
variable_del('lightbox2_imagefield_use_node_title'); variable_del('lightbox2_imagefield_use_node_title');
...@@ -106,13 +104,11 @@ function lightbox2_uninstall() { ...@@ -106,13 +104,11 @@ function lightbox2_uninstall() {
* too late now. * too late now.
*/ */
function lightbox2_update_1() { function lightbox2_update_1() {
$variable_name = 'lightbox2_plus'; $ret = array();
$var = variable_get($variable_name); $ret[] = update_sql('UPDATE {variable} SET name="lightbox2_lite"
if ($var) { WHERE name="lightbox2_plus";');
variable_set('lightbox2_lite', $var);
variable_del($variable_name); return $ret;
}
return array();
} }
/** /**
...@@ -188,11 +184,11 @@ function lightbox2_update_6001() { ...@@ -188,11 +184,11 @@ function lightbox2_update_6001() {
* 'lightbox2_slideshow_pause_on_prev_click'. * 'lightbox2_slideshow_pause_on_prev_click'.
*/ */
function lightbox2_update_6002() { function lightbox2_update_6002() {
$variable_name = 'lightbox2_slideshow_pause_on_prev_click'; $vars = variable_init();
$var = variable_get($variable_name); if (array_key_exists('lightbox2_slideshow_pause_on_prev_click', $vars)) {
if ($var) { $value = $vars['lightbox2_slideshow_pause_on_prev_click'];
variable_set('lightbox2_slideshow_pause_on_previous_click', $var); variable_set('lightbox2_slideshow_pause_on_previous_click', $value);
variable_del($variable_name); variable_del('lightbox2_slideshow_pause_on_prev_click');
} }
return array(); return array();
} }
...@@ -203,3 +199,4 @@ function lightbox2_update_6002() { ...@@ -203,3 +199,4 @@ function lightbox2_update_6002() {
function lightbox2_update_6003() { function lightbox2_update_6003() {
return array(); return array();
} }
...@@ -875,7 +875,6 @@ function lightbox2_field_formatter_settings_form($field, $instance, $view_mode, ...@@ -875,7 +875,6 @@ function lightbox2_field_formatter_settings_form($field, $instance, $view_mode,
return $form; return $form;
} }
/** /**
* Implements hook_field_formatter_settings_summary(). * Implements hook_field_formatter_settings_summary().
*/ */
...@@ -889,26 +888,19 @@ function lightbox2_field_formatter_settings_summary($field, $instance, $view_mod ...@@ -889,26 +888,19 @@ function lightbox2_field_formatter_settings_summary($field, $instance, $view_mod
$summary = ''; $summary = '';
if (!isset($image_styles[$settings['image_style']])) { if(isset($settings['caption']) && isset($settings['type']) && isset($settings['image_style']) && isset($settings['lightbox_style'])) {
$image_styles[$settings['image_style']] = 0; $summary .= '<strong>'.t('Caption field') . '</strong>: ' . $fields[$settings['caption']] . '<br/>';
} $summary .= '<strong>'.t('Display') . '</strong>: ' ;
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>: ';
$summary .= $types[$settings['type']]; $summary .= $types[$settings['type']];
$summary .= ': '; $summary .= ': ';
$summary .= $image_styles[$settings['image_style']]; $summary .= $image_styles[$settings['image_style']];
$summary .= ' => '; $summary .= ' => ';
$summary .= $image_styles[$settings['lightbox_style']]; $summary .= $image_styles[$settings['lightbox_style']];
} } else {
else {
$summary = 'Title - Lightbox: original => original'; $summary = 'Title - Lightbox: original => original';
} }
return $summary; return $summary;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment