mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
More fixes for scrutinizer-ci (+ enable php)
This commit is contained in:
parent
59b32241bf
commit
161ddc9920
5 changed files with 17 additions and 32 deletions
|
|
@ -12,3 +12,4 @@ filter:
|
||||||
- 'data/*'
|
- 'data/*'
|
||||||
checks:
|
checks:
|
||||||
javascript: true
|
javascript: true
|
||||||
|
php: true
|
||||||
9
dev/External/ko.js
vendored
9
dev/External/ko.js
vendored
|
|
@ -135,7 +135,6 @@ ko.bindingHandlers.tooltip = {
|
||||||
init: function(oElement, fValueAccessor) {
|
init: function(oElement, fValueAccessor) {
|
||||||
|
|
||||||
var
|
var
|
||||||
bi18n = true,
|
|
||||||
sValue = '',
|
sValue = '',
|
||||||
Translator = null,
|
Translator = null,
|
||||||
$oEl = $(oElement),
|
$oEl = $(oElement),
|
||||||
|
|
@ -145,7 +144,6 @@ ko.bindingHandlers.tooltip = {
|
||||||
|
|
||||||
if (!Globals.bMobileDevice || bMobile)
|
if (!Globals.bMobileDevice || bMobile)
|
||||||
{
|
{
|
||||||
bi18n = 'on' === ($oEl.data('tooltip-i18n') || 'on');
|
|
||||||
sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
||||||
|
|
||||||
oElement.__opentip = new Opentip(oElement, {
|
oElement.__opentip = new Opentip(oElement, {
|
||||||
|
|
@ -171,7 +169,7 @@ ko.bindingHandlers.tooltip = {
|
||||||
oElement.__opentip.activate();
|
oElement.__opentip.activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bi18n)
|
if ('on' === ($oEl.data('tooltip-i18n') || 'on'))
|
||||||
{
|
{
|
||||||
Translator = require('Common/Translator');
|
Translator = require('Common/Translator');
|
||||||
|
|
||||||
|
|
@ -207,8 +205,9 @@ ko.bindingHandlers.tooltip = {
|
||||||
var sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
var sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
||||||
if (sValue)
|
if (sValue)
|
||||||
{
|
{
|
||||||
var i18n = 'on' === ($oEl.data('tooltip-i18n') || 'on');
|
oElement.__opentip.setContent('on' === ($oEl.data('tooltip-i18n') || 'on') ?
|
||||||
oElement.__opentip.setContent(i18n ? require('Common/Translator').i18n(sValue) : sValue);
|
require('Common/Translator').i18n(sValue) : sValue);
|
||||||
|
|
||||||
oElement.__opentip.activate();
|
oElement.__opentip.activate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ AbstractAjaxPromises.prototype.ajaxRequest = function(sAction, bPost, iTimeOut,
|
||||||
}
|
}
|
||||||
|
|
||||||
// backward capability
|
// backward capability
|
||||||
var sType = Enums.StorageResultType.Error;
|
var sType = '';
|
||||||
switch (true)
|
switch (true)
|
||||||
{
|
{
|
||||||
case 'success' === sTextStatus && oData && oData.Result && sAction === oData.Action:
|
case 'success' === sTextStatus && oData && oData.Result && sAction === oData.Action:
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,11 @@ function AddOpenPgpKeyPopupView()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var
|
var done = false;
|
||||||
done = false,
|
|
||||||
match = null;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
match = reg.exec(keyTrimmed);
|
var match = reg.exec(keyTrimmed);
|
||||||
if (match && 0 < count)
|
if (match && 0 < count)
|
||||||
{
|
{
|
||||||
if (match[0] && match[1] && match[2] && match[1] === match[2])
|
if (match[0] && match[1] && match[2] && match[1] === match[2])
|
||||||
|
|
|
||||||
|
|
@ -1380,13 +1380,9 @@ ComposePopupView.prototype.onBuild = function()
|
||||||
{
|
{
|
||||||
this.initUploader();
|
this.initUploader();
|
||||||
|
|
||||||
var
|
var self = this;
|
||||||
self = this,
|
|
||||||
oScript = null;
|
|
||||||
|
|
||||||
key('ctrl+q, command+q, ctrl+w, command+w', Enums.KeyState.Compose, function() {
|
key('ctrl+q, command+q, ctrl+w, command+w', Enums.KeyState.Compose, Utils.noopFalse);
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
key('`', Enums.KeyState.Compose, function() {
|
key('`', Enums.KeyState.Compose, function() {
|
||||||
if (self.oEditor && !self.oEditor.hasFocus() && !Utils.inFocus())
|
if (self.oEditor && !self.oEditor.hasFocus() && !Utils.inFocus())
|
||||||
|
|
@ -1437,7 +1433,7 @@ ComposePopupView.prototype.onBuild = function()
|
||||||
|
|
||||||
if (this.dropboxEnabled() && this.dropboxApiKey() && !window.Dropbox)
|
if (this.dropboxEnabled() && this.dropboxApiKey() && !window.Dropbox)
|
||||||
{
|
{
|
||||||
oScript = window.document.createElement('script');
|
var oScript = window.document.createElement('script');
|
||||||
oScript.type = 'text/javascript';
|
oScript.type = 'text/javascript';
|
||||||
oScript.src = 'https://www.dropbox.com/static/api/2/dropins.js';
|
oScript.src = 'https://www.dropbox.com/static/api/2/dropins.js';
|
||||||
$(oScript).attr('id', 'dropboxjs').attr('data-app-key', self.dropboxApiKey());
|
$(oScript).attr('id', 'dropboxjs').attr('data-app-key', self.dropboxApiKey());
|
||||||
|
|
@ -1690,8 +1686,9 @@ ComposePopupView.prototype.initUploader = function()
|
||||||
this.dragAndDropVisible(false);
|
this.dragAndDropVisible(false);
|
||||||
}, this))
|
}, this))
|
||||||
.on('onProgress', _.bind(function(sId, iLoaded, iTotal) {
|
.on('onProgress', _.bind(function(sId, iLoaded, iTotal) {
|
||||||
var oItem = null;
|
|
||||||
if (Utils.isUnd(oUploadCache[sId]))
|
var oItem = oUploadCache[sId];
|
||||||
|
if (!oItem)
|
||||||
{
|
{
|
||||||
oItem = this.getAttachmentById(sId);
|
oItem = this.getAttachmentById(sId);
|
||||||
if (oItem)
|
if (oItem)
|
||||||
|
|
@ -1699,10 +1696,6 @@ ComposePopupView.prototype.initUploader = function()
|
||||||
oUploadCache[sId] = oItem;
|
oUploadCache[sId] = oItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
oItem = oUploadCache[sId];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oItem)
|
if (oItem)
|
||||||
{
|
{
|
||||||
|
|
@ -1740,10 +1733,8 @@ ComposePopupView.prototype.initUploader = function()
|
||||||
}, this))
|
}, this))
|
||||||
.on('onStart', _.bind(function(sId) {
|
.on('onStart', _.bind(function(sId) {
|
||||||
|
|
||||||
var
|
var oItem = oUploadCache[sId];
|
||||||
oItem = null;
|
if (!oItem)
|
||||||
|
|
||||||
if (Utils.isUnd(oUploadCache[sId]))
|
|
||||||
{
|
{
|
||||||
oItem = this.getAttachmentById(sId);
|
oItem = this.getAttachmentById(sId);
|
||||||
if (oItem)
|
if (oItem)
|
||||||
|
|
@ -1751,10 +1742,6 @@ ComposePopupView.prototype.initUploader = function()
|
||||||
oUploadCache[sId] = oItem;
|
oUploadCache[sId] = oItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
oItem = oUploadCache[sId];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oItem)
|
if (oItem)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue