Rev3337, Fix big site download button
This commit is contained in:
parent
dea669ac26
commit
bda31aea59
4 changed files with 15 additions and 11 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.6.2"
|
||||
self.rev = 3335
|
||||
self.rev = 3337
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Loading
|
||||
constructor: ->
|
||||
constructor: (@wrapper) ->
|
||||
if window.show_loadingscreen then @showScreen()
|
||||
@timer_hide = null
|
||||
|
||||
|
@ -27,7 +27,8 @@ class Loading
|
|||
if $(".console .button-setlimit").length == 0 # Not displaying it yet
|
||||
line = @printLine("Site size: <b>#{parseInt(site_info.settings.size/1024/1024)}MB</b> is larger than default allowed #{parseInt(site_info.size_limit)}MB", "warning")
|
||||
button = $("<a href='#Set+limit' class='button button-setlimit'>" + "Open site and set size limit to #{site_info.next_size_limit}MB" + "</a>")
|
||||
button.on "click", (-> return window.wrapper.setSizeLimit(site_info.next_size_limit) )
|
||||
button.on "click", =>
|
||||
return @wrapper.setSizeLimit(site_info.next_size_limit)
|
||||
line.after(button)
|
||||
setTimeout (=>
|
||||
@printLine('Ready.')
|
||||
|
@ -67,4 +68,4 @@ class Loading
|
|||
|
||||
|
||||
|
||||
window.Loading = Loading
|
||||
window.Loading = Loading
|
||||
|
|
|
@ -2,7 +2,7 @@ class Wrapper
|
|||
constructor: (ws_url) ->
|
||||
@log "Created!"
|
||||
|
||||
@loading = new Loading()
|
||||
@loading = new Loading(@)
|
||||
@notifications = new Notifications($(".notifications"))
|
||||
@fixbutton = new Fixbutton()
|
||||
|
||||
|
|
|
@ -574,7 +574,8 @@ jQuery.extend( jQuery.easing,
|
|||
var Loading;
|
||||
|
||||
Loading = (function() {
|
||||
function Loading() {
|
||||
function Loading(wrapper) {
|
||||
this.wrapper = wrapper;
|
||||
if (window.show_loadingscreen) {
|
||||
this.showScreen();
|
||||
}
|
||||
|
@ -610,9 +611,11 @@ jQuery.extend( jQuery.easing,
|
|||
if ($(".console .button-setlimit").length === 0) {
|
||||
line = this.printLine("Site size: <b>" + (parseInt(site_info.settings.size / 1024 / 1024)) + "MB</b> is larger than default allowed " + (parseInt(site_info.size_limit)) + "MB", "warning");
|
||||
button = $("<a href='#Set+limit' class='button button-setlimit'>" + ("Open site and set size limit to " + site_info.next_size_limit + "MB") + "</a>");
|
||||
button.on("click", (function() {
|
||||
return window.wrapper.setSizeLimit(site_info.next_size_limit);
|
||||
}));
|
||||
button.on("click", (function(_this) {
|
||||
return function() {
|
||||
return _this.wrapper.setSizeLimit(site_info.next_size_limit);
|
||||
};
|
||||
})(this));
|
||||
line.after(button);
|
||||
return setTimeout(((function(_this) {
|
||||
return function() {
|
||||
|
@ -680,6 +683,7 @@ jQuery.extend( jQuery.easing,
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- src/Ui/media/Notifications.coffee ---- */
|
||||
|
||||
|
||||
|
@ -830,7 +834,7 @@ jQuery.extend( jQuery.easing,
|
|||
this.onMessageWebsocket = bind(this.onMessageWebsocket, this);
|
||||
this.verifyEvent = bind(this.verifyEvent, this);
|
||||
this.log("Created!");
|
||||
this.loading = new Loading();
|
||||
this.loading = new Loading(this);
|
||||
this.notifications = new Notifications($(".notifications"));
|
||||
this.fixbutton = new Fixbutton();
|
||||
window.addEventListener("message", this.onMessageInner, false);
|
||||
|
@ -1618,7 +1622,6 @@ jQuery.extend( jQuery.easing,
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- src/Ui/media/WrapperZeroFrame.coffee ---- */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue