Skip to content

Commit

Permalink
* fix deletion of sources (no longer bad request)
Browse files Browse the repository at this point in the history
* disable tag click on smartphone
* shortcuts mark/unmark as read and star/unstar also available on closed articles
  • Loading branch information
SSilence committed Apr 10, 2013
1 parent e023f10 commit 2050272
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 31 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ CHANGELOG
---------

Version 2.6-SNAPSHOT
* Fixed OPML import for other formats (thanks a lot to Remy Gardette)
* fixed OPML import for other formats (thanks a lot to Remy Gardette)
* fix deletion of sources (no longer bad request)
* disable tag click on smartphone
* shortcuts mark/unmark as read and star/unstar also available on closed articles

Version 2.5
* new navigation with right/left cursor (thanks a lot to jicho)
Expand Down
41 changes: 21 additions & 20 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,29 +80,30 @@

// only loggedin users
if($f3->get('auth')->isLoggedin()===true) {
$f3->route('GET /items', 'controllers\Items->listItems'); // json
$f3->route('POST /mark/@item', 'controllers\Items->mark'); // json
$f3->route('POST /mark', 'controllers\Items->mark'); // json
$f3->route('POST /unmark/@item', 'controllers\Items->unmark'); // json
$f3->route('POST /starr/@item', 'controllers\Items->starr'); // json
$f3->route('POST /unstarr/@item', 'controllers\Items->unstarr'); // json
$f3->route('GET /stats', 'controllers\Items->stats'); // json
$f3->route('GET /items', 'controllers\Items->listItems'); // json
$f3->route('POST /mark/@item', 'controllers\Items->mark'); // json
$f3->route('POST /mark', 'controllers\Items->mark'); // json
$f3->route('POST /unmark/@item', 'controllers\Items->unmark'); // json
$f3->route('POST /starr/@item', 'controllers\Items->starr'); // json
$f3->route('POST /unstarr/@item', 'controllers\Items->unstarr'); // json
$f3->route('GET /stats', 'controllers\Items->stats'); // json

$f3->route('GET /source/params', 'controllers\Sources->params'); // html
$f3->route('GET /sources', 'controllers\Sources->show'); // html
$f3->route('GET /source', 'controllers\Sources->add'); // html
$f3->route('GET /sources/list', 'controllers\Sources->listSources'); // json
$f3->route('POST /source/@id', 'controllers\Sources->write'); // json
$f3->route('POST /source', 'controllers\Sources->write'); // json
$f3->route('DELETE /source/@id', 'controllers\Sources->remove'); // json
$f3->route('GET /sources/spouts', 'controllers\Sources->spouts'); // json
$f3->route('GET /sources/stats', 'controllers\Sources->stats'); // json
$f3->route('GET /source/params', 'controllers\Sources->params'); // html
$f3->route('GET /sources', 'controllers\Sources->show'); // html
$f3->route('GET /source', 'controllers\Sources->add'); // html
$f3->route('GET /sources/list', 'controllers\Sources->listSources'); // json
$f3->route('POST /source/@id', 'controllers\Sources->write'); // json
$f3->route('POST /source', 'controllers\Sources->write'); // json
$f3->route('DELETE /source/@id', 'controllers\Sources->remove'); // json
$f3->route('POST /source/delete/@id', 'controllers\Sources->remove'); // json
$f3->route('GET /sources/spouts', 'controllers\Sources->spouts'); // json
$f3->route('GET /sources/stats', 'controllers\Sources->stats'); // json

$f3->route('GET /tags', 'controllers\Tags->listTags'); // json
$f3->route('POST /tags/color', 'controllers\Tags->color'); // json
$f3->route('GET /tags', 'controllers\Tags->listTags'); // json
$f3->route('POST /tags/color', 'controllers\Tags->color'); // json

$f3->route('GET /opml', 'controllers\Opml->show'); // html
$f3->route('POST /opml', 'controllers\Opml->add'); // html
$f3->route('GET /opml', 'controllers\Opml->show'); // html
$f3->route('POST /opml', 'controllers\Opml->add'); // html
}

// dispatch
Expand Down
18 changes: 10 additions & 8 deletions public/js/selfoss-events-entries.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,15 @@ selfoss.events.entries = function(e) {
$('.entry-tags-tag').colorByBrightness();

// click a tag
$('.entry-tags-tag').unbind('click').click(function() {
var tag = $(this).html();
$('#nav-tags .tag').each(function(index, item) {
if($(item).html()==tag) {
$(item).click();
return false;
}
if(selfoss.isSmartphone()==false) {
$('.entry-tags-tag').unbind('click').click(function() {
var tag = $(this).html();
$('#nav-tags .tag').each(function(index, item) {
if($(item).html()==tag) {
$(item).click();
return false;
}
});
});
});
}
};
2 changes: 1 addition & 1 deletion public/js/selfoss-events-entriestoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ selfoss.events.entriesToolbar = function(parent) {
var unread = $(this).hasClass('active')==true;
var button = $("#entry"+id+" .entry-unread, #entrr"+id+" .entry-unread");
var parent = $("#entry"+id+", #entrr"+id);

// update button
var setButton = function(unread) {
if(unread) {
Expand Down
2 changes: 1 addition & 1 deletion public/js/selfoss-events-sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ selfoss.events.sources = function() {

// delete on server
$.ajax({
url: $('base').attr('href')+'source/'+id,
url: $('base').attr('href')+'source/delete/'+id,
type: 'POST',
success: function() {
parent.fadeOut('fast', function() {
Expand Down
2 changes: 2 additions & 0 deletions public/js/selfoss-shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ selfoss.shortcuts = {

// star/unstar
$(document).bind('keydown', 's', function() {
selfoss.events.entriesToolbar($('.entry.selected'));
$('.entry.selected .entry-starr').click();
});

// mark/unmark
$(document).bind('keydown', 'm', function() {
selfoss.events.entriesToolbar($('.entry.selected'));
$('.entry.selected .entry-unread').click();
});

Expand Down

0 comments on commit 2050272

Please sign in to comment.