manage assets through npm

first draft

remote assetic totally

work

nearly there

use at least nodejs > 0.12

use proper version of grunt

bump nodejs version for travis

update npm

workaround for materialize

install node 5.0

add grunt-cli

baggy theme & cache node modules

cache bower & npm

make travis build assets on php7 only

exclude installing node & npm if not needed & use bash

clean & try to make icomoon work on baggy

ready

config for travis

rebase

make travis work

more travis work

impove travis & update deps

add missing pixrem deps

add module through oddly lost

ui updates

install latest nodejs

add install_dev.sh, link local binaries for npm/bower/grunt

ui improvements (mostly baggy)

fix travis build

no need to install on travis

Add unread filter to entries pages

Add the ability to filter for unread pages in the filters menu.

Add unread filter test to EntryControllerTest

Add a new test to the EntryControllerTest collection which checks that
only entries which have not been archived (and are treated as "unread")
are retrieved.

Improve English translation

Update FAQ

-Fix grammar
-Add notes about MTA, firewall, and SELinux

Update installation instructions

-Fix grammar
-Add SELinux section

add screenshots of android docu in English

Fix the deletion of Tags/Entries relation when delete an entry
Fix #2121

Move fixtures to the right place

Display a message when saving an entry failed

When saving an entry fail because of database error we previously just returned `false`.
Now we got an error in the log and the displayed notice to the user is updated too.

Change ManyToMany between entry & tag

Following https://gist.github.com/Ocramius/3121916

Be sure to remove the related entity when removing an entity.

Let say you have Entry -> EntryTag -> Tag.
If you remove the entry:

 - before that commit, the EntryTag will stay (at least using SQLite).
 - with that commit, the related entity is removed

Prepare wallabag 2.0.5

enforce older materialize version
This commit is contained in:
Thomas Citharel
2016-03-08 17:02:34 +01:00
parent 9f95b14dec
commit 5ecdfcd041
160 changed files with 2743 additions and 17580 deletions

View File

@ -0,0 +1,6 @@
$(document).ready(function() {
current_url = window.location.href
if (current_url.match("&closewin=true")) {
window.close();
}
});

View File

@ -0,0 +1,47 @@
jQuery(function($) {
function split( val ) {
return val.split( /,\s*/ );
}
function extractLast( term ) {
return split( term ).pop();
}
$("#value").bind("keydown", function(event) {
if (event.keyCode === $.ui.keyCode.TAB && $(this).data("ui-autocomplete").menu.active) {
event.preventDefault();
}
}).autocomplete({
source : function(request, response) {
$.getJSON("./?view=tags", {
term : extractLast(request.term),
//id: $(':hidden#entry_id').val()
}, response);
},
search : function() {
// custom minLength
var term = extractLast(this.value);
if (term.length < 1) {
return false;
}
},
focus : function() {
// prevent value inserted on focus
return false;
},
select : function(event, ui) {
var terms = split(this.value);
// remove the current input
terms.pop();
// add the selected item
terms.push(ui.item.value);
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});

View File

@ -0,0 +1,17 @@
$(function(){
//---------------------------------------------------------------------------
// Show the close icon when the user hover over a message
//---------------------------------------------------------------------------
// $('.messages').on('mouseenter', function(){
// $(this).find('a.closeMessage').stop(true, true).show();
// }).on('mouseleave', function(){
// $(this).find('a.closeMessage').stop(true, true).hide();
// });
//---------------------------------------------------------------------------
// Close the message box when the user clicks the close icon
//---------------------------------------------------------------------------
$('a.closeMessage').on('click', function(){
$(this).parents('div.messages').slideUp(300, function(){ $(this).remove(); });
return false;
});
});

View File

@ -0,0 +1,101 @@
var $ = global.jquery = require('jquery');
require('jquery.cookie');
require('jquery-ui');
var annotator = require('annotator');
$.fn.ready(function() {
var $listmode = $('#listmode'),
$listentries = $("#list-entries");
/* ==========================================================================
Menu
========================================================================== */
$("#menu").click(function(){
$("#links").toggleClass('menu--open');
if ($('#content').hasClass('opacity03')) {
$('#content').removeClass('opacity03');
}
});
/* ==========================================================================
List mode or Table Mode
========================================================================== */
$listmode.click(function(){
if ( jquery.cookie("listmode") == 1 ) {
// Cookie
$.removeCookie("listmode");
$listentries.removeClass("listmode");
$listmode.removeClass("tablemode");
$listmode.addClass("listmode");
}
else {
// Cookie
jquery.cookie("listmode", 1, {expires: 365});
$listentries.addClass("listmode");
$listmode.removeClass("listmode");
$listmode.addClass("tablemode");
}
});
/* ==========================================================================
Cookie listmode
========================================================================== */
if ( jquery.cookie("listmode") == 1 ) {
$listentries.addClass("listmode");
$listmode.removeClass("listmode");
$listmode.addClass("tablemode");
}
/* ==========================================================================
Add tag panel
========================================================================== */
$('#nav-btn-add-tag').on('click', function(){
$(".nav-panel-add-tag").toggle(100);
$(".nav-panel-menu").addClass('hidden');
$("#tag_label").focus();
return false;
});
/* ==========================================================================
Annotations & Remember position
========================================================================== */
if ($("article").length) {
var app = new annotator.App();
app.include(annotator.ui.main, {
element: document.querySelector('article')
});
var x = JSON.parse($('#annotationroutes').html());
app.include(annotator.storage.http, x);
app.start().then(function () {
app.annotations.load({entry: x.entryId});
});
$(window).scroll(function(e){
var scrollTop = $(window).scrollTop();
var docHeight = $(document).height();
var scrollPercent = (scrollTop) / (docHeight);
var scrollPercentRounded = Math.round(scrollPercent*100)/100;
savePercent(x.entryId, scrollPercentRounded);
});
retrievePercent(x.entryId);
$(window).resize(function(){
retrievePercent(x.entryId);
});
}
});

View File

@ -0,0 +1,100 @@
$(document).ready(function() {
$("#search-form").hide();
$("#bagit-form").hide();
$("#filter-form").hide();
$("#download-form").hide();
//---------------------------------------------------------------------------
// Toggle the "Search" popup in the sidebar
//---------------------------------------------------------------------------
function toggleSearch() {
$("#search-form").toggle();
$("#search").toggleClass("current");
$("#search").toggleClass("active-current");
$("#search-arrow").toggleClass("arrow-down");
if ($("#search").hasClass("current")) {
$("#content").addClass("opacity03");
} else {
$("#content").removeClass("opacity03");
}
}
//---------------------------------------------------------------------------
// Toggle the "Filter" popup on entries list
//---------------------------------------------------------------------------
function toggleFilter() {
$("#filter-form").toggle();
}
//---------------------------------------------------------------------------
// Toggle the "Download" popup on entries list
//---------------------------------------------------------------------------
function toggleDownload() {
$("#download-form").toggle();
}
//---------------------------------------------------------------------------
// Toggle the "Save a Link" popup in the sidebar
//---------------------------------------------------------------------------
function toggleBagit() {
$("#bagit-form").toggle();
$("#bagit").toggleClass("current");
$("#bagit").toggleClass("active-current");
$("#bagit-arrow").toggleClass("arrow-down");
if ($("#bagit").hasClass("current")) {
$("#content").addClass("opacity03");
} else {
$("#content").removeClass("opacity03");
}
}
//---------------------------------------------------------------------------
// Close all #links popups in the sidebar
//---------------------------------------------------------------------------
function closePopups() {
$("#links .messages").hide();
$("#links > li > a").removeClass("active-current");
$("#links > li > a").removeClass("current");
$("[id$=-arrow]").removeClass("arrow-down");
$("#content").removeClass("opacity03");
}
$("#search").click(function(){
closePopups();
toggleSearch();
$("#searchfield").focus();
});
$(".filter-btn").click(function(){
closePopups();
toggleFilter();
});
$(".download-btn").click(function(){
closePopups();
toggleDownload();
});
$("#bagit").click(function(){
closePopups();
toggleBagit();
$("#plainurl").focus();
});
$("#search-form-close").click(function(){
toggleSearch();
});
$("#filter-form-close").click(function(){
toggleFilter();
});
$("#download-form-close").click(function(){
toggleDownload();
});
$("#bagit-form-close").click(function(){
toggleBagit();
});
});

View File

@ -0,0 +1,78 @@
$.fn.ready(function() {
var $bagit = $('#bagit'),
$bagitForm = $('#bagit-form'),
$bagitFormForm = $('#bagit-form-form');
/* ==========================================================================
bag it link and close button
========================================================================== */
function toggleSaveLinkForm(url, event) {
$("#add-link-result").empty();
$bagit.toggleClass("active-current");
//only if bag-it link is not presented on page
if ( $bagit.length === 0 ) {
if ( event !== 'undefined' && event ) {
$bagitForm.css( {position:"absolute", top:event.pageY, left:event.pageX-200});
}
else {
$bagitForm.css( {position:"relative", top:"auto", left:"auto"});
}
}
if ($("#search-form").length != 0) {
$("#search").removeClass("current");
$("#search-arrow").removeClass("arrow-down");
$("#search-form").hide();
}
$bagitForm.toggle();
$('#content').toggleClass("opacity03");
if (url !== 'undefined' && url) {
$('#plainurl').val(url);
}
$('#plainurl').focus();
}
//send "bag it link" form request via ajax
$bagitFormForm.submit( function(event) {
$("body").css("cursor", "wait");
$("#add-link-result").empty();
$.ajax({
type: $bagitFormForm.attr('method'),
url: $bagitFormForm.attr('action'),
data: $bagitFormForm.serialize(),
success: function(data) {
$('#add-link-result').html("Done!");
$('#plainurl').val('');
$('#plainurl').blur('');
$("body").css("cursor", "auto");
},
error: function(data) {
$('#add-link-result').html("Failed!");
$("body").css("cursor", "auto");
}
});
event.preventDefault();
});
/* ==========================================================================
Process all links inside an article
========================================================================== */
$("article a[href^='http']").after(function() {
return " <a href=\"" + $(this).attr('href') + "\" class=\"add-to-wallabag-link-after\" alt=\"add to wallabag\" title=\"add to wallabag\"></a> ";
});
$(".add-to-wallabag-link-after").click(function(event){
toggleSaveLinkForm($(this).attr('href'), event);
event.preventDefault();
});
});