|
|
@@ -493,6 +493,27 @@ function init_posts() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function inject_script(name) {
|
|
|
+ var script = document.createElement('script');
|
|
|
+ script.async = 'async';
|
|
|
+ script.defer = 'defer';
|
|
|
+ script.src = '../scripts/' + name;
|
|
|
+ document.head.appendChild(script);
|
|
|
+}
|
|
|
+
|
|
|
+function init_sticky_column() {
|
|
|
+ if (!window.$ || !window.$.fn.stick_in_parent) {
|
|
|
+ if (window.console) {
|
|
|
+ console.log('FreshRSS waiting for Sticky-kit…');
|
|
|
+ }
|
|
|
+ window.setTimeout(init_sticky_column, 200);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if ($('.toggle_aside').css('display') === 'none') {
|
|
|
+ $('#aside_feed .tree').stick_in_parent({parent:'#aside_feed'});
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function init_column_categories() {
|
|
|
if (context.current_view !== 'normal') {
|
|
|
return;
|
|
|
@@ -508,7 +529,7 @@ function init_column_categories() {
|
|
|
this.alt = '▽';
|
|
|
}
|
|
|
});
|
|
|
- $(this).parent().next(".tree-folder-items").slideToggle( 400 , function() { $(document.body).trigger("sticky_kit:recalc"); } );
|
|
|
+ $(this).parent().next(".tree-folder-items").slideToggle(300 , function() { $(document.body).trigger("sticky_kit:recalc"); });
|
|
|
return false;
|
|
|
});
|
|
|
$('#aside_feed').on('click', '.tree-folder-items .item .dropdown-toggle', function () {
|
|
|
@@ -519,9 +540,8 @@ function init_column_categories() {
|
|
|
$(this).attr('href', '#dropdown-' + feed_id).prev('.dropdown-target').attr('id', 'dropdown-' + feed_id).parent().append(template);
|
|
|
}
|
|
|
});
|
|
|
- if( $('.toggle_aside').css('display')=='none') {
|
|
|
- $('#aside_feed .tree').stick_in_parent();
|
|
|
- }
|
|
|
+
|
|
|
+ init_sticky_column();
|
|
|
}
|
|
|
|
|
|
function init_shortcuts() {
|
|
|
@@ -529,7 +549,7 @@ function init_shortcuts() {
|
|
|
if (window.console) {
|
|
|
console.log('FreshRSS waiting for sortcut.js…');
|
|
|
}
|
|
|
- window.setTimeout(init_shortcuts, 50);
|
|
|
+ window.setTimeout(init_shortcuts, 200);
|
|
|
return;
|
|
|
}
|
|
|
// Touches de manipulation
|
|
|
@@ -1313,7 +1333,7 @@ function init_normal() {
|
|
|
if (window.console) {
|
|
|
console.log('FreshRSS waiting for content…');
|
|
|
}
|
|
|
- window.setTimeout(init_normal, 50);
|
|
|
+ window.setTimeout(init_normal, 100);
|
|
|
return;
|
|
|
}
|
|
|
init_column_categories();
|
|
|
@@ -1328,11 +1348,12 @@ function init_beforeDOM() {
|
|
|
if (window.console) {
|
|
|
console.log('FreshRSS waiting for jQuery…');
|
|
|
}
|
|
|
- window.setTimeout(init_beforeDOM, 50);
|
|
|
+ window.setTimeout(init_beforeDOM, 100);
|
|
|
return;
|
|
|
}
|
|
|
init_confirm_action();
|
|
|
if (['normal', 'reader', 'global'].indexOf(context.current_view) >= 0) {
|
|
|
+ inject_script('jquery.sticky-kit.min.js');
|
|
|
init_normal();
|
|
|
}
|
|
|
}
|
|
|
@@ -1342,7 +1363,7 @@ function init_afterDOM() {
|
|
|
if (window.console) {
|
|
|
console.log('FreshRSS waiting again for jQuery…');
|
|
|
}
|
|
|
- window.setTimeout(init_afterDOM, 50);
|
|
|
+ window.setTimeout(init_afterDOM, 100);
|
|
|
return;
|
|
|
}
|
|
|
init_notifications();
|