Merge branch 'test-filemanager' into login

This commit is contained in:
ansuz
2016-12-19 12:37:28 +01:00
18 changed files with 517 additions and 166 deletions

View File

@@ -105,7 +105,7 @@ define([
});
// var isArray = function (o) { return Object.prototype.toString.call(o) === '[object Array]'; };
var isArray = $.isArray;
var isArray = common.isArray = $.isArray;
var fixHTML = common.fixHTML = function (html) {
return html.replace(/</g, '&lt;');
@@ -185,7 +185,6 @@ define([
secret.key = Crypto.createEditCryptor().editKeyStr;
} else {
var hash = secretHash || window.location.hash.slice(1);
console.log(hash);
if (hash.length === 0) {
secret.keys = Crypto.createEditCryptor();
secret.key = Crypto.createEditCryptor().editKeyStr;
@@ -893,22 +892,9 @@ define([
/*
* Alertifyjs
*/
var styleAlerts = common.styleAlerts = function (href) {
var $link = $('link[href="/customize/alertify.css"]');
if ($link.length) {
return;
/*$link.attr('href', '');
$link.attr('href', '/customize/alertify.css');
return;*/
}
href = href || '/customize/alertify.css';
$('head').append($('<link>', {
rel: 'stylesheet',
id: 'alertifyCSS',
href: href,
}));
};
// TODO: remove styleAlerts in all the apps
var styleAlerts = common.styleAlerts = function () {};
var findCancelButton = common.findCancelButton = function () {
return $('button.cancel');
@@ -940,7 +926,6 @@ define([
};
common.alert = function (msg, cb) {
common.styleAlerts();
cb = cb || function () {};
var keyHandler = listenForKeys(function (e) { // yes
findOKButton().click();
@@ -952,7 +937,6 @@ define([
};
common.prompt = function (msg, def, cb, opt) {
common.styleAlerts();
opt = opt || {};
cb = cb || function () {};
@@ -976,7 +960,6 @@ define([
};
common.confirm = function (msg, cb, opt) {
common.styleAlerts();
opt = opt || {};
cb = cb || function () {};
var keyHandler = listenForKeys(function (e) {