summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ajax/seturl.php15
-rw-r--r--appinfo/app.php2
-rw-r--r--css/news.css61
-rw-r--r--index.php2
-rw-r--r--js/news.js29
-rw-r--r--js/settings.js (renamed from js/admin.js)0
-rw-r--r--settings.php9
-rw-r--r--templates/main.php21
-rw-r--r--templates/settings.php6
9 files changed, 43 insertions, 102 deletions
diff --git a/ajax/seturl.php b/ajax/seturl.php
deleted file mode 100644
index 832a44569..000000000
--- a/ajax/seturl.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011, Frank Karlitschek <karlitschek@kde.org>
- * This file is licensed under the Affero General Public License version 3 or later.
- * See the COPYING-README file.
- */
-
-require_once('../../../lib/base.php');
-OC_Util::checkAdminUser();
-
-OC_Config::setValue( 'somesetting', $_POST['somesetting'] );
-
-echo 'true';
-
-?>
diff --git a/appinfo/app.php b/appinfo/app.php
index 703272574..eb1b54455 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -24,7 +24,7 @@ OC::$CLASSPATH['OC_News_Utils'] = 'apps/news/lib/utils.php';
$l = new OC_l10n('news');
-OCP\App::registerAdmin('news','settings');
+OCP\App::registerPersonal('news', 'settings');
OCP\App::register( array(
'order' => 70,
diff --git a/css/news.css b/css/news.css
index 5147c27db..0c75af7c4 100644
--- a/css/news.css
+++ b/css/news.css
@@ -3,66 +3,9 @@
#feeds { background: #fff; width: 20em; left: 12.5em; top: 3.7em; bottom:3em; position: fixed; overflow: auto; padding: 0; margin: 0; }
#feeds a { height: 23px; display: block; margin: 0 0 0 0; padding: 0 0 0 25px; }
#bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;}
-#addmenu { float: left; margin: 0.2em 0 0 1em; }
-#settings { float: right; margin: 0.2em 1em 0 0; }
.svg { border: inherit; background: inherit; }
+.news_input { float:left; font-size:12px; padding:4px 2px; border:solid 1px #aacfe4; width:200px; }
-#addmenu ul li ul li a:hover {
- background: #ECF1E7;
- padding-left:9px;
- border-left: solid 1px #000;}
-
-#addmenu ul li ul li {
- width: 140px;
- border: none;
- padding-top: 3px;
- padding-bottom:3px;
- padding-left: 3px;
- padding-right: 3px;
-}
-
-#addmenu ul li ul li a {
- font: 11px arial;
- font-weight:normal;
- font-variant: small-caps;
- padding-top:3px;
- padding-bottom:3px;}
-
-#addmenu ul li {
- float: left;
- width: 146px;
- font-weight: bold;
- border-top: solid 1px;
- border-bottom: solid 1px;
-}
-
-#addmenu ul li a {
- font-weight: bold;
- padding: 15px 10px;}
-
-#addmenu li{
- position:relative;
- float:left;}
-
-#addmenu ul li ul, #addmenu:hover ul li ul, #addmenu:hover ul li:hover ul li ul{
- display:none;
- list-style-type:none;
- width: 140px;}
-
-#addmenu:hover ul, #addmenu:hover ul li:hover ul, #addmenu:hover ul li:hover ul li:hover ul {
- display:block;}
-
-#addmenu:hover ul li:hover ul li:hover ul {
- position: absolute;
- margin-left: 145px;
- margin-top: -22px;
- font: 10px;}
-
-#addmenu:hover ul li:hover ul {
- position: absolute;
- margin-top: 1px;
- font: 10px;
- bottom: 100%;
-}
+ul.controls li { float: left; }
diff --git a/index.php b/index.php
index 82419fa90..c8ce296cc 100644
--- a/index.php
+++ b/index.php
@@ -24,7 +24,7 @@ OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('news');
OCP\App::setActiveNavigationEntry('news');
-//OCP\Util::addscript('news','news');
+OCP\Util::addscript('news','news');
OCP\Util::addStyle('news', 'news');
$foldermapper = new OC_News_FolderMapper(OCP\USER::getUser());
diff --git a/js/news.js b/js/news.js
index 3544e1e4b..728ba6df0 100644
--- a/js/news.js
+++ b/js/news.js
@@ -1,11 +1,32 @@
News={
UI:{
- createNew:function() {
-
+ overview:function(){
+ if($('#addfeedfolder_dialog').dialog('isOpen') == true){
+ $('#addfeedfolder_dialog').dialog('moveToTop');
+ }else{
+ $('#dialog_holder').load(OC.filePath('news', 'ajax', 'addfeedfolder.php'), function(jsondata){
+ if(jsondata.status != 'error'){
+ $('#addfeedfolder_dialog').dialog({
+ minWidth: 600,
+ close: function(event, ui) {
+ $(this).dialog('destroy').remove();
+ }
+ }).css('overflow','visible');
+ } else {
+ alert(jsondata.data.message);
+ }
+ });
+ }
+ return false;
}
}
}
-$(document).ready(function(){
+$(document).ready(function(){
+
+ $('#addfeedfolder').click(News.UI.overview);
+ $('#addfeedfolder').keydown(News.UI.overview);
+
+ $('#feed_add_submit').click(addBookmark);
-}); \ No newline at end of file
+}); \ No newline at end of file
diff --git a/js/admin.js b/js/settings.js
index 4c645d241..4c645d241 100644
--- a/js/admin.js
+++ b/js/settings.js
diff --git a/settings.php b/settings.php
index 2fc3d0804..94d057358 100644
--- a/settings.php
+++ b/settings.php
@@ -1,13 +1,8 @@
<?php
-OC_Util::checkAdminUser();
+//OCP\Util::addscript( "news", "admin" );
-OC_Util::addScript( "news", "admin" );
-
-$tmpl = new OC_Template( 'news', 'settings');
-
-$tmpl->assign('url',OC_Config::getValue( "somesetting", '' ));
+$tmpl = new OCP\Template( 'news', 'settings');
return $tmpl->fetchPage();
-?>
diff --git a/templates/main.php b/templates/main.php
index 6febe245e..f05a548b6 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -5,21 +5,20 @@
</div>
<div id="bottomcontrols">
-<div id="addmenu">
- <ul>
- <li>
<form>
- <button class="svg" id="add" title="<?php echo $l->t('Add Feed/Folder'); ?>"><img class="svg" src="<?php echo OCP\Util::linkTo('news', 'img/add.svg'); ?>" alt="<?php echo $l->t('Add Feed/Folder'); ?>" /></button>
- </form>
+ <ul class="controls">
+ <li><button class="svg" id="addfeedfolder" title="<?php echo $l->t('Add Feed/Folder'); ?>"><img class="svg" src="<?php echo OCP\Util::linkTo('news', 'img/add.svg'); ?>" alt="<?php echo $l->t('Add Feed/Folder'); ?>" /></button></li>
+ <li><button class="svg" title="<?php echo $l->t('Change View'); ?>">Eye</button></li>
+ <li><button class="svg" title="<?php echo $l->t('Settings'); ?>">Settings</button></li>
<ul>
- <li><a href="p1.html">Feed</a></li>
- <li><a href="p2.hmtl">Folder</a></li>
- </li>
- </ul>
-</div>
+ </form>
</div>
-
+
<div id="rightcontent" class="rightcontent">
<?php ?>
</div>
+<!-- Dialogs -->
+<div id="dialog_holder"></div>
+<!-- End of Dialogs -->
+
diff --git a/templates/settings.php b/templates/settings.php
index ddd1272e2..ccbb004f0 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -1,10 +1,8 @@
<form id="news">
<fieldset class="personalblock">
- <strong>App Template</strong><br />
- <input type="text" name="somesetting" id="somesetting" value="<?php echo $_['url']; ?>" placeholder="<?php echo $l->t('Some Setting');?>" />
+ <strong>News</strong><br />
+ <input type="text" name="opml_file" id="opml_file" placeholder="<?php echo $l->t('.opml file');?>" />
<br />
-
-<span class="msg"></span>
</fieldset>
</form>