', {'class': 'loadingContainer'});
- if (!hideLogo) {
- $container.append('
');
+ $loading = $(Pages.loadingScreen());
+ $container = $loading.find('.loadingContainer');
+ if (hideLogo) {
+ $loading.find('img').hide();
+ } else {
+ $loading.find('img').show();
}
- var $spinner = $('
', {'class': 'spinnerContainer'});
- UI.spinner($spinner).show();
- var $text = $('
').text(loadingText || Messages.loading);
- $container.append($spinner).append($text);
- $loading.append($container);
+ var $spinner = $loading.find('.spinnerContainer');
+ $spinner.show();
$('body').append($loading);
}
if (Messages.tips && !hideTips) {
diff --git a/www/common/common-util.js b/www/common/common-util.js
index 8cbde420c..e42a0249c 100644
--- a/www/common/common-util.js
+++ b/www/common/common-util.js
@@ -170,5 +170,15 @@ define([], function () {
return parts[0];
};
+ /* for wrapping async functions such that they can only be called once */
+ Util.once = function (f) {
+ var called;
+ return function () {
+ if (called) { return; }
+ called = true;
+ f.apply(this, Array.prototype.slice.call(arguments));
+ };
+ };
+
return Util;
});
diff --git a/www/common/credential.js b/www/common/credential.js
index 432cc0511..ffab595c1 100644
--- a/www/common/credential.js
+++ b/www/common/credential.js
@@ -5,6 +5,13 @@ define([
var Cred = {};
var Scrypt = window.scrypt;
+ Cred.MINIMUM_PASSWORD_LENGTH = typeof(AppConfig.minimum_password_length) === 'number'?
+ AppConfig.minimum_password_length: 8;
+
+ Cred.isLongEnoughPassword = function (passwd) {
+ return passwd.length >= Cred.MINIMUM_PASSWORD_LENGTH;
+ };
+
var isString = Cred.isString = function (x) {
return typeof(x) === 'string';
};
diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js
index 3f8e3ba2c..6f34a0325 100644
--- a/www/common/cryptpad-common.js
+++ b/www/common/cryptpad-common.js
@@ -81,6 +81,8 @@ define([
common.addTooltips = UI.addTooltips;
common.clearTooltips = UI.clearTooltips;
common.importContent = UI.importContent;
+ common.tokenField = UI.tokenField;
+ common.dialog = UI.dialog;
// import common utilities for export
common.find = Util.find;
@@ -1391,6 +1393,21 @@ define([
})
.click(prepareFeedback(type));
break;
+ case 'hashtag':
+ button = $('