From cb68f9f589bff6c43da5a2797e8e7b29f905b0ed Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Fri, 12 Oct 2012 16:30:47 -0400 Subject: move firstrun js to an independent script --- index.php | 6 ++---- js/firstrun.js | 9 +++++++++ js/main.js | 5 ----- templates/firstrun.php | 1 - 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/index.php b/index.php index b57d05ab0..d2ce6fc61 100644 --- a/index.php +++ b/index.php @@ -65,11 +65,9 @@ if ($allfeeds) { } else { - - OCP\Util::addScript('news','main'); + OCP\Util::addScript('news','news'); - OCP\Util::addScript('news','menu'); - OCP\Util::addScript('news','items'); + OCP\Util::addScript('news','firstrun'); OCP\Util::addStyle('news','firstrun'); diff --git a/js/firstrun.js b/js/firstrun.js index e69de29bb..532b0e9cb 100644 --- a/js/firstrun.js +++ b/js/firstrun.js @@ -0,0 +1,9 @@ +var News = News || {}; + +$(document).ready(function(){ + + $('#browsebtn_firstrun, #cloudbtn_firstrun, #importbtn_firstrun').hide(); + +}); + + diff --git a/js/main.js b/js/main.js index e8942e096..6c88e9cfe 100644 --- a/js/main.js +++ b/js/main.js @@ -23,11 +23,6 @@ $(document).ready(function(){ News.Objects.Menu = new News.Menu(menuUpdateIntervalMiliseconds, News.Objects.Items); News.Objects.Menu.bindOn('#feeds > ul'); - /* first run script begins */ - $('#browsebtn_firstrun, #cloudbtn_firstrun, #importbtn_firstrun').hide(); - - /* first run script ends */ - $('#addfeed').click(function() { $('#addfeed_dialog').dialog('open'); $('#feed_add_url').html(''); diff --git a/templates/firstrun.php b/templates/firstrun.php index 0e3f443c0..0fc58a8aa 100644 --- a/templates/firstrun.php +++ b/templates/firstrun.php @@ -1,4 +1,3 @@ -

t("You don't have any feed in your reader.") ?>

-- cgit v1.2.3