From eee57a349e9d1bbb1ebfa6444a4bd939604f2a5a Mon Sep 17 00:00:00 2001
From: Thomas Steur <thomas.steur@googlemail.com>
Date: Tue, 16 Sep 2014 09:30:16 +0200
Subject: [PATCH] refs #4996 give contents table a bit more space

---
 plugins/Contents/Contents.php               | 6 ++++++
 plugins/Contents/Reports/Base.php           | 3 ++-
 plugins/Contents/stylesheets/datatable.less | 3 +++
 3 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 plugins/Contents/stylesheets/datatable.less

diff --git a/plugins/Contents/Contents.php b/plugins/Contents/Contents.php
index d1272dead1..21bebd9c04 100644
--- a/plugins/Contents/Contents.php
+++ b/plugins/Contents/Contents.php
@@ -18,6 +18,7 @@ class Contents extends \Piwik\Plugin
         return array(
             'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations',
             'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+            'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
         );
     }
 
@@ -33,4 +34,9 @@ class Contents extends \Piwik\Plugin
         $jsFiles[] = "plugins/Contents/javascripts/contentsDataTable.js";
     }
 
+    public function getStylesheetFiles(&$stylesheets)
+    {
+        $stylesheets[] = "plugins/Contents/stylesheets/datatable.less";
+    }
+
 }
diff --git a/plugins/Contents/Reports/Base.php b/plugins/Contents/Reports/Base.php
index 537fce049b..752dab959e 100644
--- a/plugins/Contents/Reports/Base.php
+++ b/plugins/Contents/Reports/Base.php
@@ -30,7 +30,8 @@ abstract class Base extends Report
      */
     public function configureView(ViewDataTable $view)
     {
-        $view->config->datatable_js_type = 'ContentsDataTable';
+        $view->config->datatable_js_type   = 'ContentsDataTable';
+        $view->config->datatable_css_class = 'ContentsDataTable';
 
         if (!empty($this->dimension)) {
             $view->config->addTranslations(array('label' => $this->dimension->getName()));
diff --git a/plugins/Contents/stylesheets/datatable.less b/plugins/Contents/stylesheets/datatable.less
new file mode 100644
index 0000000000..2ecce8d2ee
--- /dev/null
+++ b/plugins/Contents/stylesheets/datatable.less
@@ -0,0 +1,3 @@
+#content:not(.admin)  .ContentsDataTable > .dataTableWrapper {
+  width: 750px;
+}
\ No newline at end of file
-- 
GitLab