summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@pfSense.org>2013-08-05 16:07:26 -0700
committerRenato Botelho <garga@pfSense.org>2013-08-05 16:07:26 -0700
commit445518827846a00a1a4b5bb02a20895b76aa537d (patch)
tree3145f2572dcedaeff26341da97a21715d7163c5e
parent3efa7976c418a0ec7014d81a8fbc6de6ded00caa (diff)
parent1bc946f108f332b314e9f0c4c1dafb554f3b8b85 (diff)
downloadpfsense-445518827846a00a1a4b5bb02a20895b76aa537d.zip
pfsense-445518827846a00a1a4b5bb02a20895b76aa537d.tar.gz
Merge pull request #765 from CharlieMarshall/rss
fix / make RSS widget textarea full width & remove whitespaces
-rw-r--r--usr/local/www/themes/_corporate/all.css9
-rwxr-xr-xusr/local/www/themes/code-red/all.css9
-rw-r--r--usr/local/www/themes/metallic/all.css9
-rw-r--r--usr/local/www/themes/nervecenter/all.css9
-rw-r--r--usr/local/www/themes/pfsense-dropdown/all.css9
-rw-r--r--usr/local/www/themes/pfsense/all.css9
-rw-r--r--usr/local/www/themes/pfsense_ng/all.css9
-rw-r--r--usr/local/www/themes/pfsense_ng_fs/all.css9
-rw-r--r--usr/local/www/themes/the_wall/all.css9
-rw-r--r--usr/local/www/widgets/widgets/rss.widget.php36
10 files changed, 99 insertions, 18 deletions
diff --git a/usr/local/www/themes/_corporate/all.css b/usr/local/www/themes/_corporate/all.css
index 8a6c639..dbec369 100644
--- a/usr/local/www/themes/_corporate/all.css
+++ b/usr/local/www/themes/_corporate/all.css
@@ -1197,3 +1197,12 @@ div#log span.log-protocol-mini-header {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/code-red/all.css b/usr/local/www/themes/code-red/all.css
index 534516b..b2cd42e 100755
--- a/usr/local/www/themes/code-red/all.css
+++ b/usr/local/www/themes/code-red/all.css
@@ -1291,3 +1291,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/metallic/all.css b/usr/local/www/themes/metallic/all.css
index 30afe16..1beef1e 100644
--- a/usr/local/www/themes/metallic/all.css
+++ b/usr/local/www/themes/metallic/all.css
@@ -1261,3 +1261,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/nervecenter/all.css b/usr/local/www/themes/nervecenter/all.css
index 552a7db..38fec3c 100644
--- a/usr/local/www/themes/nervecenter/all.css
+++ b/usr/local/www/themes/nervecenter/all.css
@@ -1292,3 +1292,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/pfsense-dropdown/all.css b/usr/local/www/themes/pfsense-dropdown/all.css
index e603cb7..6fd62fd 100644
--- a/usr/local/www/themes/pfsense-dropdown/all.css
+++ b/usr/local/www/themes/pfsense-dropdown/all.css
@@ -1015,3 +1015,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/pfsense/all.css b/usr/local/www/themes/pfsense/all.css
index 15e9787..6c6431f 100644
--- a/usr/local/www/themes/pfsense/all.css
+++ b/usr/local/www/themes/pfsense/all.css
@@ -1024,3 +1024,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/pfsense_ng/all.css b/usr/local/www/themes/pfsense_ng/all.css
index bcfb5b4..7cb6d3f 100644
--- a/usr/local/www/themes/pfsense_ng/all.css
+++ b/usr/local/www/themes/pfsense_ng/all.css
@@ -1403,3 +1403,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/pfsense_ng_fs/all.css b/usr/local/www/themes/pfsense_ng_fs/all.css
index 7f0b4f1..f837986 100644
--- a/usr/local/www/themes/pfsense_ng_fs/all.css
+++ b/usr/local/www/themes/pfsense_ng_fs/all.css
@@ -1364,3 +1364,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/themes/the_wall/all.css b/usr/local/www/themes/the_wall/all.css
index 5b58f08..25b3281 100644
--- a/usr/local/www/themes/the_wall/all.css
+++ b/usr/local/www/themes/the_wall/all.css
@@ -1300,3 +1300,12 @@ table.sortable thead {
.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; }
.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; }
+
+/* widget textarea styles - full width */
+.textarea_widget {
+ width: 100%;
+ resize:vertical;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* IE 8+ */
+}
diff --git a/usr/local/www/widgets/widgets/rss.widget.php b/usr/local/www/widgets/widgets/rss.widget.php
index f955fcd..5f06422 100644
--- a/usr/local/www/widgets/widgets/rss.widget.php
+++ b/usr/local/www/widgets/widgets/rss.widget.php
@@ -42,8 +42,8 @@ if($_POST['rssfeed']) {
}
// Use saved feed and max items
-if($config['widgets']['rssfeed'])
- $rss_feed_s = explode(",", $config['widgets']['rssfeed']);
+if($config['widgets']['rssfeed'])
+ $rss_feed_s = explode(",", $config['widgets']['rssfeed']);
if($config['widgets']['rssmaxitems'])
$max_items = $config['widgets']['rssmaxitems'];
@@ -59,19 +59,19 @@ if(!$rss_feed_s) {
$rss_feed_s = "http://blog.pfsense.org";
$config['widgets']['rssfeed'] = "http://blog.pfsense.org";
}
-
+
if(!$max_items)
$max_items = 10;
if(!$rsswidgetheight)
$rsswidgetheight = 300;
-
+
if(!$rsswidgettextlength)
$rsswidgettextlength = 140; // oh twitter, how do we love thee?
-if($config['widgets']['rssfeed'])
+if($config['widgets']['rssfeed'])
$textarea_txt = str_replace(",", "\n", $config['widgets']['rssfeed']);
-else
+else
$textarea_txt = "";
?>
@@ -80,51 +80,51 @@ else
<div id="rss-settings" class="widgetconfigdiv" style="display:none;">
<form action="/widgets/widgets/rss.widget.php" method="post" name="iformc">
- <textarea name="rssfeed" class="formfld unknown" id="rssfeed" cols="40" rows="3"><?=$textarea_txt;?></textarea>
+ <textarea name="rssfeed" class="formfld unknown textarea_widget" id="rssfeed" cols="40" rows="3"><?=$textarea_txt;?></textarea>
<br/>
<table summary="rss widget">
<tr>
<td align="right">
- Display number of items:
+ Display number of items:
</td>
<td>
<select name='rssmaxitems' id='rssmaxitems'>
<option value='<?= $max_items ?>'><?= $max_items ?></option>
<?php
- for($x=100; $x<5100; $x=$x+100)
+ for($x=100; $x<5100; $x=$x+100)
echo "<option value='{$x}'>{$x}</option>\n";
?>
</select>
</td>
</tr>
<tr>
- <td align="right">
- Widget height:
+ <td align="right">
+ Widget height:
</td>
<td>
<select name='rsswidgetheight' id='rsswidgetheight'>
<option value='<?= $rsswidgetheight ?>'><?= $rsswidgetheight ?>px</option>
<?php
- for($x=100; $x<5100; $x=$x+100)
+ for($x=100; $x<5100; $x=$x+100)
echo "<option value='{$x}'>{$x}px</option>\n";
?>
</select>
</td>
</tr>
<tr>
- <td align="right">
+ <td align="right">
Show how many characters from story:
</td>
<td>
<select name='rsswidgettextlength' id='rsswidgettextlength'>
<option value='<?= $rsswidgettextlength ?>'><?= $rsswidgettextlength ?></option>
<?php
- for($x=10; $x<5100; $x=$x+10)
+ for($x=10; $x<5100; $x=$x+10)
echo "<option value='{$x}'>{$x}</option>\n";
?>
</select>
</td>
- </tr>
+ </tr>
<tr>
<td>
&nbsp;
@@ -150,7 +150,7 @@ else
if(strlen($string) > $length)
return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer;
return $string;
- }
+ }
$feed = new SimplePie();
$feed->set_cache_location("/tmp/simplepie/");
$feed->set_feed_url($rss_feed_s);
@@ -169,10 +169,10 @@ else
$counter++;
if($counter > $max_items)
break;
- echo "<hr/>";
+ echo "<hr/>";
}
?>
-</div>
+</div>
<!-- needed to display the widget settings menu -->
<script type="text/javascript">
OpenPOWER on IntegriCloud