diff options
Diffstat (limited to 'src/Wallabag')
6 files changed, 120 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery.tinydot.js b/src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery.tinydot.js new file mode 100644 index 00000000..bf9eadef --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery.tinydot.js | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * jQuery tinydot 0.2.0 | ||
3 | * | ||
4 | * Copyright (c) Alexander Danilov | ||
5 | * modos189.ru | ||
6 | * | ||
7 | * Plugin website: | ||
8 | * tinydot.modos189.ru | ||
9 | * | ||
10 | * Licensed under the MIT license. | ||
11 | * http://en.wikipedia.org/wiki/MIT_License | ||
12 | */ | ||
13 | |||
14 | (function( $, undef ) | ||
15 | { | ||
16 | if ( $.fn.tinydot ) | ||
17 | { | ||
18 | return; | ||
19 | } | ||
20 | |||
21 | $.fn.tinydot = function( o ) { | ||
22 | |||
23 | var $dot = this; | ||
24 | $dot.child = getChildOrDie($dot); | ||
25 | $dot.orgContent = $($dot.child).html(); | ||
26 | ellipsis( $dot ); | ||
27 | |||
28 | $dot.watch = function() | ||
29 | { | ||
30 | $(window).on('resize', function(){ | ||
31 | if ( watchInt ) | ||
32 | { | ||
33 | clearInterval( watchInt ); | ||
34 | } | ||
35 | watchInt = setTimeout( | ||
36 | function() | ||
37 | { | ||
38 | reinitialize($dot); | ||
39 | }, 100 | ||
40 | ); | ||
41 | }); | ||
42 | |||
43 | return $dot; | ||
44 | }; | ||
45 | |||
46 | var opts = $.extend( true, {}, $.fn.tinydot.defaults, o ), | ||
47 | watchInt = null; | ||
48 | |||
49 | if ( opts.watch ) | ||
50 | { | ||
51 | $dot.watch(); | ||
52 | } | ||
53 | } | ||
54 | |||
55 | // public | ||
56 | $.fn.tinydot.defaults = { | ||
57 | 'watch' : false | ||
58 | }; | ||
59 | |||
60 | function getChildOrDie( $elem ) | ||
61 | { | ||
62 | var childrens = $elem.children(); | ||
63 | if (childrens.length == 0) { | ||
64 | // create children | ||
65 | var data = $($elem).html(); | ||
66 | $elem.html(''); | ||
67 | $elem.append('<span />'); | ||
68 | return $elem.children('span').html(data); | ||
69 | } else { | ||
70 | return childrens[0]; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | function reinitialize( $elem ) | ||
75 | { | ||
76 | $($elem.child).html($elem.orgContent); | ||
77 | ellipsis( $elem ); | ||
78 | } | ||
79 | |||
80 | function ellipsis( $elem ) { | ||
81 | var divh=$($elem).height(); | ||
82 | while ($($elem.child).outerHeight()>divh) { | ||
83 | $($elem.child).html(function (index, html) { | ||
84 | return html.replace(/\W*\s(\S)*$/, '...'); | ||
85 | }); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | })( jQuery ); | ||
90 | |||
91 | jQuery(document).ready(function($) { | ||
92 | //We only invoke jQuery.tinydot on elements that have dot-ellipsis class | ||
93 | $(".dot-ellipsis").each(function(){ | ||
94 | //Checking if update on window resize required | ||
95 | var watch_window=$(this).hasClass("dot-resize-update"); | ||
96 | |||
97 | //Invoking jQuery.tinydot | ||
98 | var x = new Object(); | ||
99 | if (watch_window) | ||
100 | x.watch='window'; | ||
101 | $(this).tinydot(x); | ||
102 | }); | ||
103 | }); | ||
diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery.tinydot.min.js b/src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery.tinydot.min.js new file mode 100644 index 00000000..74754629 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/public/themes/material/js/jquery.tinydot.min.js | |||
@@ -0,0 +1 @@ | |||
!function(a,b){function c(b){var c=b.children();if(0==c.length){var d=a(b).html();return b.html(""),b.append("<span />"),b.children("span").html(d)}return c[0]}function d(b){a(b.child).html(b.orgContent),e(b)}function e(b){for(var c=a(b).height();a(b.child).outerHeight()>c;)a(b.child).html(function(a,b){return b.replace(/\W*\s(\S)*$/,"...")})}a.fn.tinydot||(a.fn.tinydot=function(b){var f=this;f.child=c(f),f.orgContent=a(f.child).html(),e(f),f.watch=function(){return a(window).on("resize",function(){h&&clearInterval(h),h=setTimeout(function(){d(f)},100)}),f};var g=a.extend(!0,{},a.fn.tinydot.defaults,b),h=null;g.watch&&f.watch()},a.fn.tinydot.defaults={watch:!1})}(jQuery),jQuery(document).ready(function(a){a(".dot-ellipsis").each(function(){var b=a(this).hasClass("dot-resize-update"),c=new Object;b&&(c.watch="window"),a(this).tinydot(c)})}); | |||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index a061bdc3..806a4eef 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | |||
@@ -29,7 +29,7 @@ | |||
29 | <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> | 29 | <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> |
30 | {% endif %} | 30 | {% endif %} |
31 | 31 | ||
32 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|striptags }}">{{ entry.title|striptags|raw }}</a></span> | 32 | <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|raw }}</a></span> |
33 | 33 | ||
34 | <div class="estimatedTime grey-text"> | 34 | <div class="estimatedTime grey-text"> |
35 | <span class="tool reading-time"> | 35 | <span class="tool reading-time"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 50134357..6e95345c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -7,7 +7,9 @@ | |||
7 | 7 | ||
8 | {% block scripts %} | 8 | {% block scripts %} |
9 | {{ parent() }} | 9 | {{ parent() }} |
10 | <script src="{{ asset('bundles/wallabagcore/themes/material/js/material.min.js') }}"></script> | 10 | <script src="{{ asset('bundles/wallabagcore/themes/material/js/jquery.tinydot.min.js') }}"></script> |
11 | <script src="{{ asset('bundles/wallabagcore/themes/material/js/materialize.min.js') }}"></script> | ||
12 | <script src="{{ asset('bundles/wallabagcore/themes/material/js/init.js') }}"></script> | ||
11 | {% endblock %} | 13 | {% endblock %} |
12 | 14 | ||
13 | {% block header %} | 15 | {% block header %} |
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml new file mode 100644 index 00000000..53a1afd1 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml | |||
@@ -0,0 +1,11 @@ | |||
1 | # Two factor mail | ||
2 | auth_code: | ||
3 | on: 'sus' | ||
4 | mailer: | ||
5 | subject: "Còdi d'autentificacion wallabag" | ||
6 | body: | ||
7 | hello: "Bonjorn %user%," | ||
8 | first_para: "Estant qu'avètz activat la dobla autentificacion sus vòtre compte wallabag e que venètz de vos conectar dempuèi un novèl aparelh (ordinador, mobil, etc.) vos mandem un còdi per validar la connexion." | ||
9 | second_para: "Vaquí lo còdi a dintrar :" | ||
10 | support: "S'avètz un problèma de connexion, dobtetz pas a contacter l'assisténcia : " | ||
11 | signature: "La còla de wallabag" | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig b/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig index 13a903ab..938f1a31 100644 --- a/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig | |||
@@ -41,7 +41,7 @@ | |||
41 | <i class="material-icons right">send</i> | 41 | <i class="material-icons right">send</i> |
42 | </button> | 42 | </button> |
43 | </div> | 43 | </div> |
44 | <div class="center"> | 44 | <div class="row center"> |
45 | <a href="{{ path('fos_user_resetting_request') }}">{{ 'security.login.forgot_password'|trans }}</a> | 45 | <a href="{{ path('fos_user_resetting_request') }}">{{ 'security.login.forgot_password'|trans }}</a> |
46 | </div> | 46 | </div> |
47 | </form> | 47 | </form> |