1,21c1,43 < From 73428f33492d7769dfdec3f33cfaa2e08c36c46b Mon Sep 17 00:00:00 2001 < From: Daniel Boulet < Date: Mon, 20 Jun 2011 14:54:44 -0500 < Subject: [PATCH] Adding new feature: section breaks. < < --- < columns_filter.module | 38 +++++--- < plugins/columnbreak.inc | 22 +++++- < plugins/columnbreak/columnbreak.css | 12 +++- < plugins/columnbreak/columnbreak.js | 103 +++++++++++++---------- < plugins/columnbreak/images/colbreaktext.png | Bin 0 -> 285 bytes < plugins/columnbreak/images/columnbreak.png | Bin 0 -> 133 bytes < plugins/columnbreak/images/sectionbreak.png | Bin 0 -> 143 bytes < plugins/columnbreak/images/sectionbreaktext.png | Bin 0 -> 337 bytes < plugins/columnbreak/langs/en.js | 4 + < 9 files changed, 119 insertions(+), 60 deletions(-) < create mode 100644 plugins/columnbreak/images/colbreaktext.png < create mode 100644 plugins/columnbreak/images/columnbreak.png < create mode 100644 plugins/columnbreak/images/sectionbreak.png < create mode 100644 plugins/columnbreak/images/sectionbreaktext.png < --- > diff --git a/columns_filter.css b/columns_filter.css > index b035c7f..c12603c 100644 > --- a/columns_filter.css > +++ b/columns_filter.css > @@ -1,12 +1,18 @@ > -.content .content-column { > - float: left; > +.columns-filter-section { > + display: table; > + table-layout: fixed; > + width: 100%; > } > -.content .content-column-2 { > +.columns-filter-section .content-column { > + display: table-cell; > + vertical-align: top; > +} > +.columns-filter-section .content-column-2 { > width: 50%; > } > -.content .content-column-3 { > +.columns-filter-section .content-column-3 { > width: 33%; > } > -.content .content-column-4 { > +.columns-filter-section .content-column-4 { > width: 25%; > } > diff --git a/columns_filter.info b/columns_filter.info > index b66aac5..b1e5375 100644 > --- a/columns_filter.info > +++ b/columns_filter.info > @@ -6,3 +6,10 @@ files[] = columns_filter.module > files[] = plugins/columnbreak.inc > > stylesheets[all][] = columns_filter.css > + > +; Information added by drupal.org packaging script on 2013-09-30 > +version = "7.x-1.x-dev" > +core = "7.x" > +project = "columns_filter" > +datestamp = "1380559649" > + 23c45 < index 7c16f8c..f0e3d4b 100644 --- > index 76cf3c7..3281602 100644 43,53c65 < @@ -16,8 +23,7 @@ < */ < function columns_filter_filter_info() { < $filters['columns_filter'] = array( < - 'title' => t('Columns Filter'), < - 'description' => t('Create column breaks with <!--column-->.'), < + 'title' => t('Separate content into columns'), < 'prepare callback' => 'columns_filter_filter_prepare', < 'process callback' => 'columns_filter_filter_process', < 'tips callback' => 'columns_filter_filter_tips' < @@ -34,8 +40,9 @@ function columns_filter_filter_info() { --- > @@ -33,8 +40,9 @@ function columns_filter_filter_info() { 65c77 < @@ -46,17 +53,20 @@ function columns_filter_filter_prepare($text, $filter, $format, $langcode, $cach --- > @@ -45,17 +53,20 @@ function columns_filter_filter_prepare($text, $filter, $format, $langcode, $cach 94c106 < @@ -65,7 +75,7 @@ function columns_filter_filter_process($text, $filter, $format, $langcode, $cach --- > @@ -64,7 +75,7 @@ function columns_filter_filter_process($text, $filter, $format, $langcode, $cach 99c111,122 < + return t("<!--column--> creates a column break. <!--section--> creates a section break."); --- > + return t("<!--section--> creates a section break. <!--column--> creates a column break. Always add a section break before first column content AND after last column content."); > } > > /** > @@ -115,7 +126,9 @@ function theme_columns_filter_columns($variables) { > $processed_text .= '' . trim($col) . ""; > } > > - return $processed_text; > + drupal_add_css(drupal_get_path('module', 'columns_filter') . '/columns_filter.css'); > + > + return '
' . $processed_text . '
'; 104c127 < index 35b9643..80a829e 100644 --- > index 35b9643..5192a79 100644 107,108c130,135 < @@ -9,12 +9,30 @@ < * Implements hook_wysiwyg_plugin(). --- > @@ -6,16 +6,40 @@ > */ > > /** > - * Implements hook_wysiwyg_plugin(). > + * Implements hook_INCLUDE_plugin(). 111c138,156 < + $module_path = drupal_get_path('module', 'columns_filter'); --- > + $plugin_path = drupal_get_path('module', 'columns_filter') . '/plugins/columnbreak'; > + > + $plugins['sectionbreak'] = array( > + 'title' => t('Section break'), > + 'vendor url' => 'http://drupal.org/project/columns_filter', > + 'icon path' => $plugin_path . '/images', > + 'icon file' => 'sectionbreak.png', > + 'icon title' => t('Insert a section break'), > + 'settings' => array( > + 'text' => 'section', > + 'class' => 'wysiwyg-sectionbreak', > + 'path' => $plugin_path, > + ), > + 'js path' => $plugin_path, > + 'js file' => 'columnbreak.js', > + 'css path' => $plugin_path, > + 'css file' => 'columnbreak.css', > + ); > + 116c161 < + 'icon path' => $module_path . '/plugins/columnbreak/images', --- > + 'icon path' => $plugin_path . '/images', 123,135c168 < + 'path' => $module_path . '/plugins/columnbreak', < + ), < + ); < + $plugins['sectionbreak'] = array( < + 'title' => t('Section break'), < + 'vendor url' => 'http://drupal.org/project/columns_filter', < + 'icon path' => $module_path . '/plugins/columnbreak/images', < + 'icon file' => 'sectionbreak.png', < + 'icon title' => t('Insert a section break'), < + 'settings' => array( < + 'text' => 'section', < + 'class' => 'wysiwyg-sectionbreak', < + 'path' => $module_path . '/plugins/columnbreak', --- > + 'path' => $plugin_path, 137a171 > + 139a174 > - 141c176 < index ef1c205..91b6e43 100644 --- > index ef1c205..0d14f8b 100644 149c184 < + background: transparent url(images/colbreaktext.png) no-repeat center top; --- > + background: transparent url(images/columnbreaktext.png) no-repeat center top; 162c197 < index 9c0c23b..23e6d96 100644 --- > index 9c0c23b..8e1ef26 100644 240c275 < + }; --- > + } 242c277 < + Drupal.wysiwyg.plugins['columnbreak'] = { --- > + Drupal.wysiwyg.plugins['sectionbreak'] = { 258c293 < + return ($(node).is('img.wysiwyg-columnbreak')); --- > + return ($(node).is('img.wysiwyg-sectionbreak')); 259a295 > - 264,265c300,301 < < + Drupal.wysiwyg.plugins['sectionbreak'] = { --- > + > + Drupal.wysiwyg.plugins['columnbreak'] = { 274c310 < + return ($(node).is('img.wysiwyg-sectionbreak')); --- > + return ($(node).is('img.wysiwyg-columnbreak')); 282,296d317 < diff --git a/plugins/columnbreak/images/colbreaktext.png b/plugins/columnbreak/images/colbreaktext.png < new file mode 100644 < index 0000000000000000000000000000000000000000..3d42988abe33ea3a8182207048e574ae99cb1d02 < GIT binary patch < literal 285 < zcmV+&0pk9NP)8`|Z^-~tH{;!J`F9Gu < z57;04^Ly8qAMp$#%oGMBcwRCv@I%#^^L`293Iv+>fL~m#@b9a8P;veMhUhgIKKL05^~8BgDLiS0U;yfZZ1ab16UEeF;GK0S&hM < j|L&R9|HpO(3K|JN)#8GN&K < zDUi=t666=m;PC858jz#z>Eal|5uKcnV33fI&@f@q!k&eUJVDyL;l2mFjFLJ8w7Cr> < bPwFwOf3L_Y6)5cl)WYED>gTe~DWM4fO$R0S < < literal 0 < HcmV?d00001 < --- > index 0000000..b64d4c1 > Binary files /dev/null and b/plugins/columnbreak/images/columnbreak.png differ > diff --git a/plugins/columnbreak/images/columnbreaktext.png b/plugins/columnbreak/images/columnbreaktext.png > new file mode 100644 > index 0000000..e7fafd5 > Binary files /dev/null and b/plugins/columnbreak/images/columnbreaktext.png differ 311,320c328,329 < index 0000000000000000000000000000000000000000..386ec243952b07129bac6330c47b69f23827fd99 < GIT binary patch < literal 143 < zcmeAS@N?(olHy`uVBq!ia0vp^A|TAf3?x51|2hvy@dWsUxYjH?nUIB2c>0_5v?x;Tb#$R_{bXX1%>c6NR&xo>UM)+{?ep+#(q=C#j!*uco_ < hldl^AMEVm|80-aI6yG index 0000000..586091a > Binary files /dev/null and b/plugins/columnbreak/images/sectionbreak.png differ 323,336c332,333 < index 0000000000000000000000000000000000000000..ab4292df80f866b893b9e82145ef4e5361bf56ec < GIT binary patch < literal 337 < zcmeAS@N?(olHy`uVBq!ia0vp^Ak4$T3?z@0N$CM8g8-ip*Z+-0|Fa|huV426#k2p3 < z-v4Lz{NJ_d|DBuv%TxbfI`e<=%>SQ1{Xe$^8xh=lmz(&1G&h6 < z;em3jBv9^vr;B4q#jUH8?q;zXa@avJ&UwTfGc)?<+zgqD^p7S&9sr+RsRpDXp < z=e{%Db-Vhm%=syyN+F*jw#+y#`&B#j62mMeDc1xUmAYMesflUg-EJBSo~P)<%J0t6 < z*K}7i)+wJ7dTq({jX^tYgVzOD2Hwfj|F?)G#h*2*SVEP>g+ZnKr$L6o{tx>9SAOD+ < X@ilfx@&3sM^b3QhtDnm{r-UW|DA1E1 < < literal 0 < HcmV?d00001 < --- > index 0000000..2b70a61 > Binary files /dev/null and b/plugins/columnbreak/images/sectionbreaktext.png differ 350,352d346 < -- < 1.7.2 <