* Api: Fix mobile template not working with iOS < 10 anymore (iOS < 10 is not compatible with JS ES6)

This commit is contained in:
Hadi Nategh 2019-03-18 15:27:12 +01:00
parent fd662a266b
commit 2126fca1b4
5 changed files with 15 additions and 15 deletions

View File

@ -186,7 +186,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([
this.tinymce = tinymce.init(settings);
// make sure value gets set in case of widget gets loaded by delay like
// inside an inactive tabs
this.tinymce.then(()=> {
this.tinymce.then(function() {
self.set_value(self.htmlNode.val());
if (self.editor && self.editor.editorContainer)
{
@ -332,9 +332,9 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([
// take rte_toolbar into account if no mode restrictly set from template
if (rte_toolbar && !this.mode)
{
var toolbar_diff = et2_htmlarea.TOOLBAR_LIST.filter((i) => {return !(rte_toolbar.indexOf(i) > -1);});
var toolbar_diff = et2_htmlarea.TOOLBAR_LIST.filter(function(i){return !(rte_toolbar.indexOf(i) > -1);});
settings.toolbar = et2_htmlarea.TOOLBAR_ADVANCED;
toolbar_diff.forEach((a) => {
toolbar_diff.forEach(function(a){
let r = new RegExp(a);
settings.toolbar = settings.toolbar.replace(r, '');
});

View File

@ -586,7 +586,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
if (this._type == 'listbox' && this.options.value_class != '')
{
var chosen = this.input.next();
chosen.find('.search-choice-close').each((i,v)=>{
chosen.find('.search-choice-close').each(function(i,v){
jQuery(v).parent().addClass(self.options.value_class + self.options.select_options[v.rel]['value']);
});
}
@ -784,7 +784,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
if (this._type == 'listbox' && this.options.value_class != '')
{
var self = this;
this.input.find('option').each((i,v) => {jQuery(v).addClass(self.options.value_class+v.value)});
this.input.find('option').each(function(i,v) {jQuery(v).addClass(self.options.value_class+v.value)});
}
this.input.chosen({
inherit_select_classes: true,

View File

@ -1939,7 +1939,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
}
// But merge into email can handle several
Promise.all(promises.map(p => p.catch(e => e)))
Promise.all(promises.map(function(p){p.catch(function(e){console.log(e)})}))
.then(function(values) {
// Process document after all shares created
return nm_action(_action, _senders, _target);

View File

@ -264,7 +264,7 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
/**
* resolve given data whilst the condition met
*/
const resolveData = function(_d, condition, action) {
var resolveData = function(_d, condition, action) {
var whilst = function (_d) {
return condition(_d) ? action(condition(_d)).then(whilst) : Promise.resolve(_d);
}
@ -274,7 +274,7 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
/**
* get data promise
*/
const getData = function(_match)
var getData = function(_match)
{
var match = _match;
return new Promise(function(resolve)

View File

@ -20,46 +20,46 @@
* time range label today
* @type Number
*/
const TIME_LABEL_TODAY = 0;
var TIME_LABEL_TODAY = 0;
/**
* time range label yesterday
* @type Number
*/
const TIME_LABEL_YESTERDAY = 1;
var TIME_LABEL_YESTERDAY = 1;
/**
* time range label this month
* @type Number
*/
const TIME_LABEL_THIS_MONTH = 2;
var TIME_LABEL_THIS_MONTH = 2;
/**
* time range label last month
* @type Number
*/
const TIME_LABEL_LAST_MONTH = 3;
var TIME_LABEL_LAST_MONTH = 3;
/**
* Heigh priorority action for notifing about an entry.
* Action: It pops up the entry once
* @type Number
*/
const EGW_PR_NOTIFY_HEIGH = 1;
var EGW_PR_NOTIFY_HEIGH = 1;
/**
* Medium priority for notifing about an entry
* Action: Not defined
* @type Number
*/
const EGW_PR_NOTIFY_MEDIUM = 2;
var EGW_PR_NOTIFY_MEDIUM = 2;
/**
* Low priority for notifing about an entry
* Action: Not defined
* @type Number
*/
const EGW_PR_NOTIFY_LOW = 3;
var EGW_PR_NOTIFY_LOW = 3;
/**
* Interval set by user