mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Merge branch 'django1.7' into django1.8
* django1.7: Refactoring welcome screen to fix input alignment issue. Fixing login rotation. Adding cookies to path inspector. Upgrading httplib2.
This commit is contained in:
commit
b9bf48fa14
5 changed files with 100 additions and 60 deletions
|
@ -24,7 +24,7 @@ dnspython==1.15.0
|
||||||
Fabric==1.14.0
|
Fabric==1.14.0
|
||||||
gunicorn==19.7
|
gunicorn==19.7
|
||||||
hiredis==0.2.0
|
hiredis==0.2.0
|
||||||
httplib2==0.17.4
|
httplib2==0.18.1
|
||||||
image==1.5.27
|
image==1.5.27
|
||||||
isodate==0.5.4
|
isodate==0.5.4
|
||||||
lxml==3.6.4
|
lxml==3.6.4
|
||||||
|
|
|
@ -52,6 +52,18 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.NB-welcome .NB-inner-account {
|
||||||
|
width: 960px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
margin-right: -50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
.NB-button {
|
.NB-button {
|
||||||
border: 1px solid #07360F;
|
border: 1px solid #07360F;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -81,6 +93,7 @@
|
||||||
/* ========== */
|
/* ========== */
|
||||||
|
|
||||||
.NB-welcome-header {
|
.NB-welcome-header {
|
||||||
|
position: relative;
|
||||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#3F5354), to(#1B2424));
|
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#3F5354), to(#1B2424));
|
||||||
background: -moz-linear-gradient(center top , #3F5354 0%, #1B2424 100%) repeat scroll 0 0 transparent;
|
background: -moz-linear-gradient(center top , #3F5354 0%, #1B2424 100%) repeat scroll 0 0 transparent;
|
||||||
height: 420px;
|
height: 420px;
|
||||||
|
@ -274,7 +287,9 @@
|
||||||
/* ================== */
|
/* ================== */
|
||||||
|
|
||||||
.NB-welcome-header-account {
|
.NB-welcome-header-account {
|
||||||
|
pointer-events: all;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
transition: bottom 1s ease-in-out;
|
||||||
bottom: -350px;
|
bottom: -350px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
|
@ -284,7 +299,7 @@
|
||||||
padding: 36px 36px 12px;
|
padding: 36px 36px 12px;
|
||||||
}
|
}
|
||||||
.NB-welcome-header-account.NB-active {
|
.NB-welcome-header-account.NB-active {
|
||||||
bottom: 0;
|
bottom: 0px;
|
||||||
}
|
}
|
||||||
.NB-welcome-header-account .NB-module-header-login {
|
.NB-welcome-header-account .NB-module-header-login {
|
||||||
width: 142px;
|
width: 142px;
|
||||||
|
|
|
@ -15,14 +15,28 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.start_rotation();
|
this.start_rotation();
|
||||||
this.debug_password_autocomplete();
|
_.delay(_.bind(function() {
|
||||||
|
// this.debug_password_autocomplete();
|
||||||
|
}, this), 500);
|
||||||
NEWSBLUR.reader.$s.$layout.hide();
|
NEWSBLUR.reader.$s.$layout.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
debug_password_autocomplete: function() {
|
||||||
|
console.log(['Triggering focus']);
|
||||||
|
this.$("input[name=login-username]").trigger('focus');
|
||||||
|
},
|
||||||
|
|
||||||
// ==========
|
// ==========
|
||||||
// = Header =
|
// = Header =
|
||||||
// ==========
|
// ==========
|
||||||
|
|
||||||
|
fix_misalignment: function(e) {
|
||||||
|
console.log(['Fixing misalignment', e]);
|
||||||
|
|
||||||
|
this.flags.on_signin = true;
|
||||||
|
this.show_signin_form();
|
||||||
|
},
|
||||||
|
|
||||||
click_header_caption: function(e) {
|
click_header_caption: function(e) {
|
||||||
this.flags.on_signin = false;
|
this.flags.on_signin = false;
|
||||||
this.enter_header_caption(e);
|
this.enter_header_caption(e);
|
||||||
|
@ -55,11 +69,16 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
|
|
||||||
start_rotation: function() {
|
start_rotation: function() {
|
||||||
if (this.$('.NB-welcome-header-account').hasClass('NB-active')) {
|
if (this.$('.NB-welcome-header-account').hasClass('NB-active')) {
|
||||||
this.show_signin_form();
|
this.stop_rotation();
|
||||||
}
|
}
|
||||||
this.$('.NB-welcome-header-image img').eq(0).on('load', _.bind(function() {
|
var $first_img = this.$('.NB-welcome-header-image img').eq(0);
|
||||||
|
if ($first_img[0].complete) {
|
||||||
|
setInterval(_.bind(this.rotate_screenshots, this), 3000);
|
||||||
|
} else {
|
||||||
|
$first_img.on('load', _.bind(function() {
|
||||||
setInterval(_.bind(this.rotate_screenshots, this), 3000);
|
setInterval(_.bind(this.rotate_screenshots, this), 3000);
|
||||||
}, this));
|
}, this));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
rotate_screenshots: function(force, callback) {
|
rotate_screenshots: function(force, callback) {
|
||||||
|
@ -82,7 +101,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
var $out_img = $images.not($in_img);
|
var $out_img = $images.not($in_img);
|
||||||
var $in_caption = $captions.eq(r);
|
var $in_caption = $captions.eq(r);
|
||||||
var $out_caption = $captions.not($in_caption);
|
var $out_caption = $captions.not($in_caption);
|
||||||
|
console.log(['Rotate screenshots', force]);
|
||||||
$out_img.removeClass('NB-active');
|
$out_img.removeClass('NB-active');
|
||||||
$in_img.addClass('NB-active');
|
$in_img.addClass('NB-active');
|
||||||
|
|
||||||
|
@ -103,6 +122,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
stop_rotation: function() {
|
stop_rotation: function() {
|
||||||
|
console.log(['stop_rotation']);
|
||||||
this.flags.on_signin = true;
|
this.flags.on_signin = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -122,7 +142,13 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
|
|
||||||
_.delay(_.bind(function() {
|
_.delay(_.bind(function() {
|
||||||
this.rotate_screenshots(4, _.bind(function() {
|
this.rotate_screenshots(4, _.bind(function() {
|
||||||
|
_.delay(_.bind(function() {
|
||||||
|
if (this.$("input:focus").length) {
|
||||||
|
console.log(['Already focused']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$('input[name=login-username]').focus();
|
this.$('input[name=login-username]').focus();
|
||||||
|
}), 50);
|
||||||
}, this));
|
}, this));
|
||||||
}, this), open ? 560 : 0);
|
}, this), open ? 560 : 0);
|
||||||
|
|
||||||
|
@ -138,7 +164,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
var open = NEWSBLUR.reader.toggle_sidebar();
|
var open = NEWSBLUR.reader.toggle_sidebar();
|
||||||
|
|
||||||
this.$('.NB-inner').animate({
|
this.$('.NB-inner,.NB-inner-account').animate({
|
||||||
paddingLeft: open ? 240 : 0
|
paddingLeft: open ? 240 : 0
|
||||||
}, {
|
}, {
|
||||||
queue: false,
|
queue: false,
|
||||||
|
@ -154,7 +180,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
|
|
||||||
NEWSBLUR.reader.close_sidebar();
|
NEWSBLUR.reader.close_sidebar();
|
||||||
|
|
||||||
this.$('.NB-inner').animate({
|
this.$('.NB-inner,.NB-inner-account').animate({
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
}, {
|
}, {
|
||||||
queue: false,
|
queue: false,
|
||||||
|
@ -163,10 +189,6 @@ NEWSBLUR.Welcome = Backbone.View.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$('.NB-welcome-container').removeClass('NB-welcome-tryout');
|
this.$('.NB-welcome-container').removeClass('NB-welcome-tryout');
|
||||||
},
|
|
||||||
|
|
||||||
debug_password_autocomplete: function() {
|
|
||||||
this.$("input[name=login-username]").focus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
|
@ -68,6 +68,10 @@
|
||||||
<img src="{{ MEDIA_URL }}img/welcome/header-android.png">
|
<img src="{{ MEDIA_URL }}img/welcome/header-android.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="NB-inner-account">
|
||||||
|
|
||||||
<div class="NB-welcome-header-account {% if post_request %}NB-active{% endif %}">
|
<div class="NB-welcome-header-account {% if post_request %}NB-active{% endif %}">
|
||||||
<div class="NB-account-header">
|
<div class="NB-account-header">
|
||||||
<div class="NB-module-header-login">Log in</div>
|
<div class="NB-module-header-login">Log in</div>
|
||||||
|
@ -134,7 +138,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,4 +7,4 @@ class DumpRequestMiddleware:
|
||||||
request_data = request.POST or request.GET
|
request_data = request.POST or request.GET
|
||||||
request_items = request_data.items()
|
request_items = request_data.items()
|
||||||
if request_items:
|
if request_items:
|
||||||
logging.debug(" ---> ~FC%s ~SN~FC%s ~SN~BC~FK%s" % (request.method, request.path, dict(request_items)))
|
logging.debug(" ---> ~FC%s ~SN~FC%s ~SN~BC~FK%s~BK~FC %s" % (request.method, request.path, dict(request_items), request.COOKIES))
|
Loading…
Add table
Reference in a new issue