]> gitweb.fluxo.info Git - drupal/muamba.git/commitdiff
Colorbox support
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 27 Sep 2011 01:53:51 +0000 (22:53 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 27 Sep 2011 01:53:51 +0000 (22:53 -0300)
features/muamba_interface/muamba_interface.info
features/muamba_interface/muamba_interface.strongarm.inc
muamba.info
muamba.js
muamba.make
muamba.theme.inc

index 1890406191d6e3a18412896f3ebaade26cc4c899..84505b726a46c9c8b322406cf1f282b3054688bc 100644 (file)
@@ -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"
index c2531f8b692f622a0b7c21052bd87de7c208a936..ebfad8a4dc67e34f59abf510fac928af249b63ec 100644 (file)
 function muamba_interface_strongarm() {
   $export = array();
 
+  $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*\r
+img_assist*\r
+imce*\r
+node/add/*\r
+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;
index 05c134ed417828e75276c2858ed853d8a2a3514d..68ef7de75502376b6bf5564c59ae9a7866c92874 100644 (file)
@@ -10,3 +10,4 @@ dependencies[] = muamba_interface
 dependencies[] = muamba_system
 dependencies[] = privatemsg
 dependencies[] = l10n_update
+dependencies[] = colorbox
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b1f906217dfeb509514ef2f9a4ce69a7870e30f6 100644 (file)
--- 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));
index 08a05153c4cb2c7cf88b7c2dbeebee2b74f5f81b..c53f4a23f77f55a0ca3f65d15ec46c4865e7e3b9 100644 (file)
@@ -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
index b2da534e07661ea18f8980b1589ac79c6a8d0adf..c2cc38f8f5d21c585255ef777660e30f9be26171 100644 (file)
@@ -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>';