Download:
child 119:206de4ff7a6c
parent 117:477f7f7cce15
118:f7022798c64a
Anton Shestakov <av6@dwimlabs.net>, Fri, 08 Apr 2016 22:13:02 +0800
register: progress bar on top

8 файлов изменено, 155 вставок(+), 1 удалений(-) [+]
coffee/progress.coffee file | annotate | diff | comparison | revisions
coffee/register.coffee file | annotate | diff | comparison | revisions
css/tram-im.css file | annotate | diff | comparison | revisions
js/progress.js file | annotate | diff | comparison | revisions
js/progress.js.map file | annotate | diff | comparison | revisions
js/register.js file | annotate | diff | comparison | revisions
js/register.js.map file | annotate | diff | comparison | revisions
register.html file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/coffee/progress.coffee Fri Apr 08 22:13:02 2016 +0800
@@ -0,0 +1,14 @@
+class window.Tram.ProgressApp extends Backbone.View
+ initialize: ->
+ @render()
+
+ getStyle: (progress) =>
+ "width: #{ progress ? 0 }%;"
+
+ render: ->
+ @rivet = rivets.bind(@el, model: @model, view: this)
+ @
+
+ remove: ->
+ @rivet.unbind()
+ super
--- a/coffee/register.coffee Fri Apr 08 21:33:16 2016 +0800
+++ b/coffee/register.coffee Fri Apr 08 22:13:02 2016 +0800
@@ -1,3 +1,18 @@
+class window.Tram.ClientState extends Backbone.Model
+
+
+window.clientState = new Tram.ClientState()
+window.progressApp = new Tram.ProgressApp(el: $('[data-app="progress"]'), model: clientState)
+
+
+clientState.on 'change:progress', ->
+ if clientState.get('progress') is 100
+ window.setTimeout ->
+ if clientState.get('progress') is 100
+ clientState.unset('progress')
+ , 600
+
+
class RegistrationData extends Backbone.Model
defaults:
username: ''
@@ -32,6 +47,7 @@
registerfn = ->
if regData.isValid()
+ clientState.set('progress', 0)
X.register(regData.get('username').trim(), regData.get('password1'))
@@ -41,11 +57,13 @@
nickname: vcData.get('nickname').trim()
okcb = ->
+ clientState.set('progress', 100)
console.debug('vcard is set!', arguments)
$('[data-step="vcard"]').addClass('uk-hidden')
location.href = '/'
failcb = ->
+ clientState.unset('progress')
console.warn('vcard is NOT set!', arguments)
$('[data-msg="save-failed"]').removeClass('uk-hidden')
@@ -54,9 +72,11 @@
reader = new FileReader()
reader.onloadend = ->
_(data).extend(avatar: reader.result)
+ clientState.set('progress', 0)
X.savevCard(data, okcb, failcb)
reader.readAsDataURL(file)
else
+ clientState.set('progress', 0)
X.savevCard(data, okcb, failcb)
@@ -94,6 +114,16 @@
$('#fullname').focus()
+X.on 'status', (status) ->
+ switch status
+ when Strophe.Status.REGISTERED
+ clientState.set('progress', 50)
+ when Strophe.Status.CONNECTED
+ clientState.set('progress', 100)
+ else
+ clientState.unset('progress')
+
+
X.startRegistration()
--- a/css/tram-im.css Fri Apr 08 21:33:16 2016 +0800
+++ b/css/tram-im.css Fri Apr 08 22:13:02 2016 +0800
@@ -11,6 +11,14 @@
margin-left: 115px;
}
}
+.uk-progress.page-progress {
+ background: transparent;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ z-index: 1000;
+}
.uk-dropdown > ul {
padding-left: 0;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/js/progress.js Fri Apr 08 22:13:02 2016 +0800
@@ -0,0 +1,42 @@
+// Generated by CoffeeScript 1.10.0
+(function() {
+ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ window.Tram.ProgressApp = (function(superClass) {
+ extend(ProgressApp, superClass);
+
+ function ProgressApp() {
+ this.getStyle = bind(this.getStyle, this);
+ return ProgressApp.__super__.constructor.apply(this, arguments);
+ }
+
+ ProgressApp.prototype.initialize = function() {
+ return this.render();
+ };
+
+ ProgressApp.prototype.getStyle = function(progress) {
+ return "width: " + (progress != null ? progress : 0) + "%;";
+ };
+
+ ProgressApp.prototype.render = function() {
+ this.rivet = rivets.bind(this.el, {
+ model: this.model,
+ view: this
+ });
+ return this;
+ };
+
+ ProgressApp.prototype.remove = function() {
+ this.rivet.unbind();
+ return ProgressApp.__super__.remove.apply(this, arguments);
+ };
+
+ return ProgressApp;
+
+ })(Backbone.View);
+
+}).call(this);
+
+//# sourceMappingURL=progress.js.map
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/js/progress.js.map Fri Apr 08 22:13:02 2016 +0800
@@ -0,0 +1,10 @@
+{
+ "version": 3,
+ "file": "progress.js",
+ "sourceRoot": "..",
+ "sources": [
+ "coffee/progress.coffee"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AAAA,MAAA;;;;EAAM,MAAM,CAAC,IAAI,CAAC;;;;;;;;0BAChB,UAAA,GAAY,SAAA;aACV,IAAC,CAAA,MAAD,CAAA;IADU;;0BAGZ,QAAA,GAAU,SAAC,QAAD;aACR,SAAA,GAAS,oBAAE,WAAW,CAAb,CAAT,GAAyB;IADjB;;0BAGV,MAAA,GAAQ,SAAA;MACN,IAAC,CAAA,KAAD,GAAS,MAAM,CAAC,IAAP,CAAY,IAAC,CAAA,EAAb,EAAiB;QAAA,KAAA,EAAO,IAAC,CAAA,KAAR;QAAe,IAAA,EAAM,IAArB;OAAjB;aACT;IAFM;;0BAIR,MAAA,GAAQ,SAAA;MACN,IAAC,CAAA,KAAK,CAAC,MAAP,CAAA;aACA,yCAAA,SAAA;IAFM;;;;KAX4B,QAAQ,CAAC;AAA/C"
+}
\ No newline at end of file
--- a/js/register.js Fri Apr 08 21:33:16 2016 +0800
+++ b/js/register.js Fri Apr 08 22:13:02 2016 +0800
@@ -4,6 +4,34 @@
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
+ window.Tram.ClientState = (function(superClass) {
+ extend(ClientState, superClass);
+
+ function ClientState() {
+ return ClientState.__super__.constructor.apply(this, arguments);
+ }
+
+ return ClientState;
+
+ })(Backbone.Model);
+
+ window.clientState = new Tram.ClientState();
+
+ window.progressApp = new Tram.ProgressApp({
+ el: $('[data-app="progress"]'),
+ model: clientState
+ });
+
+ clientState.on('change:progress', function() {
+ if (clientState.get('progress') === 100) {
+ return window.setTimeout(function() {
+ if (clientState.get('progress') === 100) {
+ return clientState.unset('progress');
+ }
+ }, 600);
+ }
+ });
+
RegistrationData = (function(superClass) {
extend(RegistrationData, superClass);
@@ -63,6 +91,7 @@
registerfn = function() {
if (regData.isValid()) {
+ clientState.set('progress', 0);
return X.register(regData.get('username').trim(), regData.get('password1'));
}
};
@@ -74,11 +103,13 @@
nickname: vcData.get('nickname').trim()
};
okcb = function() {
+ clientState.set('progress', 100);
console.debug('vcard is set!', arguments);
$('[data-step="vcard"]').addClass('uk-hidden');
return location.href = '/';
};
failcb = function() {
+ clientState.unset('progress');
console.warn('vcard is NOT set!', arguments);
return $('[data-msg="save-failed"]').removeClass('uk-hidden');
};
@@ -89,10 +120,12 @@
_(data).extend({
avatar: reader.result
});
+ clientState.set('progress', 0);
return X.savevCard(data, okcb, failcb);
};
return reader.readAsDataURL(file);
} else {
+ clientState.set('progress', 0);
return X.savevCard(data, okcb, failcb);
}
};
@@ -136,6 +169,17 @@
return $('#fullname').focus();
});
+ X.on('status', function(status) {
+ switch (status) {
+ case Strophe.Status.REGISTERED:
+ return clientState.set('progress', 50);
+ case Strophe.Status.CONNECTED:
+ return clientState.set('progress', 100);
+ default:
+ return clientState.unset('progress');
+ }
+ });
+
X.startRegistration();
$('[data-form="registration"], [data-form="vcard"]').each(function() {
--- a/js/register.js.map Fri Apr 08 21:33:16 2016 +0800
+++ b/js/register.js.map Fri Apr 08 22:13:02 2016 +0800
@@ -6,5 +6,5 @@
"coffee/register.coffee"
],
"names": [],
- "mappings": ";AAAA;AAAA,MAAA,iDAAA;IAAA;;;EAAM;;;;;;;+BACJ,QAAA,GACE;M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,OAAX,CAAmB,CAAC,EAApB,CAAuB,KAAA,GAAQ,CAA/B;QACR,IAAG,KAAK,CAAC,MAAN,KAAkB,CAArB;iBACE,KAAK,CAAC,KAAN,CAAA,EADF;SAAA,MAAA;iBAGE,KAAK,CAAC,IAAN,CAAW,QAAX,CAAoB,CAAC,OAArB,CAA6B,OAA7B,EAHF;SAJF;;IADgC,CAAlC;EAFwD,CAA1D;AAjIA"
}
\ No newline at end of file
--- a/register.html Fri Apr 08 21:33:16 2016 +0800
+++ b/register.html Fri Apr 08 22:13:02 2016 +0800
@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Registration</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.26.2/css/uikit.min.css">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.26.2/css/components/progress.min.css">
<link rel="stylesheet" href="/css/tram-im.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
@@ -17,6 +18,10 @@
<script src="/vendor/strophejs-plugins/vcard/strophe.vcard.js"></script>
</head>
<body>
+ <div class="uk-progress uk-progress-mini page-progress" data-app="progress" rv-hide="model:progress | eq undefined">
+ <div class="uk-progress-bar" rv-style="model:progress | fn view.getStyle"></div>
+ </div>
+
<div class="smart-container">
<div class="uk-alert" data-step="noscript">
<p class="uk-text-center">This page needs JavaScript to work.</p>
@@ -95,6 +100,7 @@
<script src='/js/tram.js'></script>
<script src='/js/rivets.js'></script>
<script src='/js/xmpp.js'></script>
+ <script src='/js/progress.js'></script>
<script src='/config.js'></script>
<script src='/js/register.js'></script>
</body>