summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-10-09 10:48:57 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-10-09 10:48:57 -0400
commit16564c20d5e781f88764333b1832dcdb846cebc2 (patch)
treeef02745148e60a3dcb51296293157f2fe72c78b3
parent468fd8e90c4ecc2006d82a7f5ec52b03a8deb9c5 (diff)
still refactoring to make the firstrun page independent
-rw-r--r--css/firstrun.css52
-rw-r--r--css/news.css44
-rw-r--r--index.php7
-rw-r--r--lib/utils.php10
4 files changed, 62 insertions, 51 deletions
diff --git a/css/firstrun.css b/css/firstrun.css
new file mode 100644
index 000000000..2c3474990
--- /dev/null
+++ b/css/firstrun.css
@@ -0,0 +1,52 @@
+/**
+ * when there are no feeds in the db
+ */
+#firstrun {
+ position: relative;
+ top: 50%;
+ left: 50%;
+ margin-left: -25em;
+ margin-top: -10em;
+ width: 50em;
+ height: 20em;
+ text-align: center;
+ font-weight:bold;
+ font-size:1.5em;
+ color:#777;
+}
+
+ #firstrun small { display: block; font-weight: normal; font-size: 0.8em; margin: .5em 0 1em 0; }
+ #firstrun .button { font-size: 0.7em; }
+
+ #firstrun #selections {
+ font-size:0.8em;
+ margin: 2em auto 2em 10em;
+ clear: both;
+ }
+
+ #firstrun #feed_add_url { width:20em; }
+
+ #firstrun #selections #addfeed_dialog_firstrun, #firstrun #selections #importopml_dialog_firstrun {
+ width:40em;
+ border:1px solid;
+ border-color: gray;
+ border-radius:10px;
+ -moz-border-radius:10px; /* Firefox 3.6 and earlier */
+ }
+
+ #firstrun #selections #addfeed_dialog_firstrun {
+ height:5em;
+ }
+
+ #firstrun #selections #importopml_dialog_firstrun {
+ height:4em;
+ }
+
+#file_upload_start {
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
+ filter:alpha(opacity=0);
+ opacity:0;
+ z-index:1001;
+ width:0;
+ height:0;
+}
diff --git a/css/news.css b/css/news.css
index 315c1a3a8..8212616ea 100644
--- a/css/news.css
+++ b/css/news.css
@@ -23,50 +23,6 @@ div.add_parentfolder {
width:0;
height:0;
}
-
-/**
- * when there are no feeds in the db
- */
-#firstrun {
- position: relative;
- top: 50%;
- left: 50%;
- margin-left: -25em;
- margin-top: -10em;
- width: 50em;
- height: 20em;
- text-align: center;
- font-weight:bold;
- font-size:1.5em;
- color:#777;
-}
-
- #firstrun small { display: block; font-weight: normal; font-size: 0.8em; margin: .5em 0 1em 0; }
- #firstrun .button { font-size: 0.7em; }
-
- #firstrun #selections {
- font-size:0.8em;
- margin: 2em auto 2em 10em;
- clear: both;
- }
-
- #firstrun #feed_add_url { width:20em; }
-
- #firstrun #selections #addfeed_dialog_firstrun, #firstrun #selections #importopml_dialog_firstrun {
- width:40em;
- border:1px solid;
- border-color: gray;
- border-radius:10px;
- -moz-border-radius:10px; /* Firefox 3.6 and earlier */
- }
-
- #firstrun #selections #addfeed_dialog_firstrun {
- height:5em;
- }
-
- #firstrun #selections #importopml_dialog_firstrun {
- height:4em;
- }
/* feed/folder list */
#leftcontent_news {
diff --git a/index.php b/index.php
index 57ca56d7f..b57d05ab0 100644
--- a/index.php
+++ b/index.php
@@ -66,9 +66,12 @@ if ($allfeeds) {
}
else {
- OCP\Util::addScript('news','firstrun');
+ OCP\Util::addScript('news','main');
+ OCP\Util::addScript('news','news');
+ OCP\Util::addScript('news','menu');
+ OCP\Util::addScript('news','items');
- OCP\Util::addStyle('news','news');
+ OCP\Util::addStyle('news','firstrun');
$tmpl = new OCP\Template( 'news', 'firstrun', 'user' );
$tmpl->printPage();
diff --git a/lib/utils.php b/lib/utils.php
index af2322ec3..ab80018d6 100644
--- a/lib/utils.php
+++ b/lib/utils.php
@@ -159,11 +159,11 @@ class Utils {
//try to extract favicon from web page
$absoluteUrl = \SimplePie_Misc::absolutize_url('/', $url);
- $handle = \curl_init ( );
- \curl_setopt ( $handle, CURLOPT_URL, $absoluteUrl );
- \curl_setopt ( $handle, CURLOPT_RETURNTRANSFER, 1 );
- \curl_setopt ( $handle, CURLOPT_FOLLOWLOCATION, TRUE );
- \curl_setopt ( $handle, CURLOPT_MAXREDIRS, 10 );
+ $handle = curl_init ( );
+ curl_setopt ( $handle, CURLOPT_URL, $absoluteUrl );
+ curl_setopt ( $handle, CURLOPT_RETURNTRANSFER, 1 );
+ curl_setopt ( $handle, CURLOPT_FOLLOWLOCATION, TRUE );
+ curl_setopt ( $handle, CURLOPT_MAXREDIRS, 10 );
if ( FALSE!==($page=curl_exec($handle)) ) {
preg_match ( '/<[^>]*link[^>]*(rel=["\']icon["\']|rel=["\']shortcut icon["\']) .*href=["\']([^>]*)["\'].*>/iU', $page, $match );