diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-30 07:13:27 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-30 07:13:27 -0400 |
commit | 7e2f2272794c58a5a944a2904e3980c056e4a38e (patch) | |
tree | ee8f5a111b7107ab7bb95e1623c2512bdf9fa710 | |
parent | c1e949699ed371e7d1328885e9795c0b8736b3c0 (diff) |
change look of firstrun page
-rw-r--r-- | css/news.css | 27 | ||||
-rw-r--r-- | js/news.js | 9 | ||||
-rw-r--r-- | js/settings.js | 4 | ||||
-rw-r--r-- | templates/part.nofeeds.php | 23 | ||||
-rw-r--r-- | templates/settings.php | 2 |
5 files changed, 31 insertions, 34 deletions
diff --git a/css/news.css b/css/news.css index 3775c6599..595d13fdf 100644 --- a/css/news.css +++ b/css/news.css @@ -40,35 +40,24 @@ div.add_parentfolder { font-size:1.5em; color:#777; } - - #firstrun table { - margin: auto; - } #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 auto; + margin: 2em auto 2em 10em; clear: both; } - - #addfeedbtn { - background-image: url('%appswebroot%/news/img/rss.svg'); - background-position: .5em center; - background-repeat: no-repeat; - padding-left: 1.8em; - } - - #importopmlbtn { - background-image: url('%appswebroot%/news/img/opml-icon.svg'); - background-position: .5em center; - background-repeat: no-repeat; - padding-left: 1.8em; + + #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 */ } - /* feed/folder list */ #leftcontent { width: 20em; diff --git a/js/news.js b/js/news.js index b1c1fc8ce..f45d9c135 100644 --- a/js/news.js +++ b/js/news.js @@ -658,16 +658,15 @@ $(document).ready(function(){ News.Feed.load($(this).attr('data-id')); }); - $('#addfeed_dialog_firstrun').hide(); + /* first run script begins */ + $('#browsebtn_firstrun, #cloudbtn_firstrun, #importbtn_firstrun').hide(); + + /* first run script ends */ $('#addfeed').click(function() { News.UI.overview('#addfeed_dialog','feeddialog.php'); }); - $('#addfeedbtn').click(function() { - $(this).hide(); - $('#addfeed_dialog_firstrun').show(); - }); $('#addfolder').click(function() { News.UI.overview('#addfolder_dialog','folderdialog.php'); diff --git a/js/settings.js b/js/settings.js index b10f3c4fe..ae6e7257e 100644 --- a/js/settings.js +++ b/js/settings.js @@ -35,9 +35,7 @@ News.Settings={ if (News.Settings.importkind == News.Settings.IMPORTCLOUD) { path = News.Settings.importpath; } else if (this.importkind == this.IMPORTLOCAL) { - } - else { - OC.dialogs.alert(t('news','Import kind not specified'), t('news', 'Error')); + } $.post(OC.filePath('news', 'ajax', 'importopml.php'), { path: path }, function(jsondata){ diff --git a/templates/part.nofeeds.php b/templates/part.nofeeds.php index b3748fbe7..0632a191f 100644 --- a/templates/part.nofeeds.php +++ b/templates/part.nofeeds.php @@ -2,12 +2,23 @@ <div id="firstrun"> <h1><?php echo $l->t("You don't have any feed in your reader.") ?></h1> <div id="selections"> - <div id="addfeed_dialog_firstrun"> - <input type="text" id="feed_add_url" placeholder="<?php echo $l->t('Address'); ?>" /> - <input type="submit" value="<?php echo $l->t('Add feed'); ?>" onclick="News.Feed.submit(this)" id="feed_add_submit" /> - </div> - <input type="button" id="addfeedbtn" value="<?php echo $l->t('Add feed') ?>" /><br /> - <input type="button" id="importopmlbtn" value="<?php echo $l->t('Import OPML') ?>" /> + <fieldset id="addfeed_dialog_firstrun"> + <legend style="margin-left:10px;"><img src="<?php echo OCP\Util::imagePath('news','rss.svg'); ?>"> <?php echo $l->t('Add feed') ?></legend> + <input type="text" id="feed_add_url" placeholder="<?php echo $l->t('Address'); ?>" /> + <input type="submit" value="<?php echo $l->t('Subscribe'); ?>" onclick="News.Feed.submit(this)" id="feed_add_submit" /> + </fieldset> + <br /> + <fieldset id="importopml_dialog_firstrun"> + <legend style="margin-left:10px"><img src="<?php echo OCP\Util::imagePath('news','opml-icon.svg'); ?>"> <?php echo $l->t('Import OPML') ?></legend> + <button class="svg" id="browsebtn_firstrun" title="<?php echo $l->t('Upload file from desktop'); ?>" onclick="News.DropDownMenu.fade('ul#feedfoldermenu')"><img class="svg" src="<?php echo OCP\Util::imagePath('core','actions/upload.svg'); ?>" alt="<?php echo $l->t('Upload'); ?>" /></button> + <button class="svg" id="cloudbtn_firstrun" title="<?php echo $l->t('Select file from ownCloud'); ?>"><img class="svg" src="<?php echo OCP\Util::imagePath('core','actions/upload.svg'); ?>" alt="<?php echo $l->t('Select'); ?>" /></button> + <span id="opml_file"> + <?php echo $l->t('Select file from') . ' '; ?><a href='#' class="settings" id="browselink"><?php echo $l->t('local filesystem');?></a> + <?php echo $l->t(' or '); ?><a href='#' class="settings" id="cloudlink"><?php echo $l->t('cloud');?></a>. + </span> + <input type="file" id="file_upload_start" name="files[]" /> + <input style="float: right" id="importbtn_firstrun" type="submit" value="<?php echo $l->t('Import');?>" /> + </fieldset> </div> <div> <?php diff --git a/templates/settings.php b/templates/settings.php index 434eed331..72c5ad2e5 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -3,7 +3,7 @@ <dd><button class="svg" id="browsebtn" title="<?php echo $l->t('Upload file from desktop'); ?>" onclick="News.DropDownMenu.fade('ul#feedfoldermenu')"><img class="svg" src="<?php echo OCP\Util::imagePath('core','actions/upload.svg'); ?>" alt="<?php echo $l->t('Upload'); ?>" /></button> <button class="svg" id="cloudbtn" title="<?php echo $l->t('Select file from ownCloud'); ?>"><img class="svg" src="<?php echo OCP\Util::imagePath('core','actions/upload.svg'); ?>" alt="<?php echo $l->t('Select'); ?>" /></button> <span id="opml_file"> - <?php echo $l->t('No file selected. Select file from '); ?><a href='#' class="settings" id="browselink"><?php echo $l->t('local filesystem');?></a> + <?php echo $l->t('Select file from') . ' '; ?><a href='#' class="settings" id="browselink"><?php echo $l->t('local filesystem');?></a> <?php echo $l->t(' or '); ?><a href='#' class="settings" id="cloudlink"><?php echo $l->t('cloud');?></a>. </span> <input type="file" id="file_upload_start" name="files[]" /> |