aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-26 22:53:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-26 22:53:51 -0300
commit3697ce7f9d83762c8ac015f11219b0d02f9ddf3e (patch)
treeb7b1a0b4f690f5936d18cdc7e5b17005384f1d1b
parent7bdf5f7a1e9fcdf1888f42ef8e7e92a7bc472fa6 (diff)
downloadmuamba-3697ce7f9d83762c8ac015f11219b0d02f9ddf3e.tar.gz
muamba-3697ce7f9d83762c8ac015f11219b0d02f9ddf3e.tar.bz2
Colorbox support
-rw-r--r--features/muamba_interface/muamba_interface.info30
-rw-r--r--features/muamba_interface/muamba_interface.strongarm.inc207
-rw-r--r--muamba.info1
-rw-r--r--muamba.js20
-rw-r--r--muamba.make3
-rw-r--r--muamba.theme.inc15
6 files changed, 273 insertions, 3 deletions
diff --git a/features/muamba_interface/muamba_interface.info b/features/muamba_interface/muamba_interface.info
index 1890406..84505b7 100644
--- a/features/muamba_interface/muamba_interface.info
+++ b/features/muamba_interface/muamba_interface.info
@@ -2,11 +2,41 @@ core = "7.x"
dependencies[] = "strongarm"
description = "Muamba Interface Feature"
features[ctools][] = "strongarm:strongarm:1"
+features[variable][] = "colorbox_caption_trim"
+features[variable][] = "colorbox_caption_trim_length"
+features[variable][] = "colorbox_compression_type"
+features[variable][] = "colorbox_custom_settings_activate"
+features[variable][] = "colorbox_fixed"
+features[variable][] = "colorbox_initialheight"
+features[variable][] = "colorbox_initialwidth"
+features[variable][] = "colorbox_inline"
+features[variable][] = "colorbox_load"
+features[variable][] = "colorbox_login"
+features[variable][] = "colorbox_login_links"
+features[variable][] = "colorbox_maxheight"
+features[variable][] = "colorbox_maxwidth"
+features[variable][] = "colorbox_opacity"
+features[variable][] = "colorbox_overlayclose"
+features[variable][] = "colorbox_pages"
+features[variable][] = "colorbox_path"
+features[variable][] = "colorbox_slideshow"
+features[variable][] = "colorbox_slideshowauto"
+features[variable][] = "colorbox_slideshowspeed"
+features[variable][] = "colorbox_style"
+features[variable][] = "colorbox_text_close"
+features[variable][] = "colorbox_text_current"
+features[variable][] = "colorbox_text_next"
+features[variable][] = "colorbox_text_previous"
+features[variable][] = "colorbox_text_start"
+features[variable][] = "colorbox_text_stop"
+features[variable][] = "colorbox_transition_speed"
+features[variable][] = "colorbox_transition_type"
features[variable][] = "site_mail"
features[variable][] = "site_name"
features[variable][] = "theme_default"
features[variable][] = "theme_settings"
name = "Muamba Interface"
package = "Features"
+php = "5.2.4"
project = "muamba_interface"
version = "7.x-0.1"
diff --git a/features/muamba_interface/muamba_interface.strongarm.inc b/features/muamba_interface/muamba_interface.strongarm.inc
index c2531f8..ebfad8a 100644
--- a/features/muamba_interface/muamba_interface.strongarm.inc
+++ b/features/muamba_interface/muamba_interface.strongarm.inc
@@ -13,6 +13,213 @@ function muamba_interface_strongarm() {
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_caption_trim';
+ $strongarm->value = '0';
+ $export['colorbox_caption_trim'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_caption_trim_length';
+ $strongarm->value = '75';
+ $export['colorbox_caption_trim_length'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_compression_type';
+ $strongarm->value = 'min';
+ $export['colorbox_compression_type'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_custom_settings_activate';
+ $strongarm->value = '0';
+ $export['colorbox_custom_settings_activate'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_fixed';
+ $strongarm->value = 1;
+ $export['colorbox_fixed'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_initialheight';
+ $strongarm->value = '100';
+ $export['colorbox_initialheight'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_initialwidth';
+ $strongarm->value = '300';
+ $export['colorbox_initialwidth'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_inline';
+ $strongarm->value = 1;
+ $export['colorbox_inline'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_load';
+ $strongarm->value = 1;
+ $export['colorbox_load'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_login';
+ $strongarm->value = 0;
+ $export['colorbox_login'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_login_links';
+ $strongarm->value = '0';
+ $export['colorbox_login_links'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_maxheight';
+ $strongarm->value = '100%';
+ $export['colorbox_maxheight'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_maxwidth';
+ $strongarm->value = '100%';
+ $export['colorbox_maxwidth'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_opacity';
+ $strongarm->value = '0.85';
+ $export['colorbox_opacity'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_overlayclose';
+ $strongarm->value = 1;
+ $export['colorbox_overlayclose'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_pages';
+ $strongarm->value = 'admin*
+img_assist*
+imce*
+node/add/*
+node/*/edit';
+ $export['colorbox_pages'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_path';
+ $strongarm->value = 'sites/all/libraries/colorbox';
+ $export['colorbox_path'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_slideshow';
+ $strongarm->value = '0';
+ $export['colorbox_slideshow'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_slideshowauto';
+ $strongarm->value = 1;
+ $export['colorbox_slideshowauto'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_slideshowspeed';
+ $strongarm->value = '2500';
+ $export['colorbox_slideshowspeed'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_style';
+ $strongarm->value = 'default';
+ $export['colorbox_style'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_text_close';
+ $strongarm->value = 'Close';
+ $export['colorbox_text_close'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_text_current';
+ $strongarm->value = '{current} of {total}';
+ $export['colorbox_text_current'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_text_next';
+ $strongarm->value = 'Next »';
+ $export['colorbox_text_next'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_text_previous';
+ $strongarm->value = '« Prev';
+ $export['colorbox_text_previous'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_text_start';
+ $strongarm->value = 'start slideshow';
+ $export['colorbox_text_start'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_text_stop';
+ $strongarm->value = 'stop slideshow';
+ $export['colorbox_text_stop'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_transition_speed';
+ $strongarm->value = '350';
+ $export['colorbox_transition_speed'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'colorbox_transition_type';
+ $strongarm->value = 'elastic';
+ $export['colorbox_transition_type'] = $strongarm;
+
+ $strongarm = new stdClass;
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
$strongarm->name = 'site_mail';
$strongarm->value = 'muamba@sarava.org';
$export['site_mail'] = $strongarm;
diff --git a/muamba.info b/muamba.info
index 05c134e..68ef7de 100644
--- a/muamba.info
+++ b/muamba.info
@@ -10,3 +10,4 @@ dependencies[] = muamba_interface
dependencies[] = muamba_system
dependencies[] = privatemsg
dependencies[] = l10n_update
+dependencies[] = colorbox
diff --git a/muamba.js b/muamba.js
index e69de29..b1f9062 100644
--- a/muamba.js
+++ b/muamba.js
@@ -0,0 +1,20 @@
+(function ($) {
+
+ Drupal.behaviors.muamba = {
+ attach: function (context, settings) {
+ // Ajax colorbox support
+ // See https://drupal.org/node/836160#comment-4870846
+ $('.colorbox-ajax', context).each( function() {
+ // get the current URL
+ var oldUrl = $(this).attr('href');
+ // append the required parameters
+ // TODO: there might be already a ? at the url,
+ // in that case use & instead
+ var newUrl = oldUrl + '?template=colorbox';
+ // update the links href
+ $(this).attr('href', newUrl);
+ });
+ }
+ };
+
+}(jQuery));
diff --git a/muamba.make b/muamba.make
index 08a0515..c53f4a2 100644
--- a/muamba.make
+++ b/muamba.make
@@ -10,6 +10,7 @@ core = 7.x
api = 2
; essential
+;projects[] = flag
projects[] = views
projects[] = ctools
projects[] = features
@@ -18,7 +19,7 @@ projects[] = panels
projects[] = og
projects[] = entity
projects[] = libraries
-;projects[] = flag
+projects[] = colorbox
; administration
projects[] = l10n_update
diff --git a/muamba.theme.inc b/muamba.theme.inc
index b2da534..c2cc38f 100644
--- a/muamba.theme.inc
+++ b/muamba.theme.inc
@@ -9,6 +9,9 @@
* Theme callback.
*/
function theme_muamba_transactions($variables) {
+ $path = drupal_get_path('module', 'muamba');
+ drupal_add_js($path .'/muamba.js');
+
$rows = array();
$type = $variables['type'];
$transactions = $variables['transactions'];
@@ -41,12 +44,20 @@ function theme_muamba_transactions($variables) {
'user' => $transaction['user']->name,
'status' => t(muamba_statuses($transaction['status'])),
'actions' => implode($actions, ' | '),
- 'thread' => l(t('view'), 'messages/view/'. $transaction['thread_id']),
+ 'thread' => l(
+ t('view messages'),
+ 'messages/view/'. $transaction['thread_id'],
+ array(
+ 'attributes' => array(
+ 'class' => array('colorbox-ajax', 'colorbox-load')
+ )
+ )
+ )
);
}
// Make a table for them.
- $header = array(t('Asset'), t('User'), t('Status'), t('Actions'), t('Messages'));
+ $header = array(t('Item'), t('User'), t('Status'), t('Actions'), t('Negotiation'));
$output .= theme('table', array('header' => $header, 'rows' => $rows));
$output .= '</div>';