forked from extern/egroupware
Fix missing mailvelope readonly properties from egw_app object
This commit is contained in:
parent
a10b772516
commit
e5674bbc5d
@ -23,6 +23,7 @@ var __extends = (this && this.__extends) || (function () {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.et2_favorites = void 0;
|
||||||
/*egw:uses
|
/*egw:uses
|
||||||
et2_dropdown_button;
|
et2_dropdown_button;
|
||||||
et2_extension_nextmatch;
|
et2_extension_nextmatch;
|
||||||
@ -344,5 +345,6 @@ var et2_favorites = /** @class */ (function (_super) {
|
|||||||
et2_favorites.PREFIX = "favorite_";
|
et2_favorites.PREFIX = "favorite_";
|
||||||
return et2_favorites;
|
return et2_favorites;
|
||||||
}(et2_widget_dropdown_button_1.et2_dropdown_button));
|
}(et2_widget_dropdown_button_1.et2_dropdown_button));
|
||||||
|
exports.et2_favorites = et2_favorites;
|
||||||
et2_core_widget_1.et2_register_widget(et2_favorites, ["favorites"]);
|
et2_core_widget_1.et2_register_widget(et2_favorites, ["favorites"]);
|
||||||
//# sourceMappingURL=et2_widget_favorites.js.map
|
//# sourceMappingURL=et2_widget_favorites.js.map
|
@ -46,7 +46,7 @@ import {ClassWithAttributes} from "./et2_core_inheritance";
|
|||||||
*
|
*
|
||||||
* @augments et2_dropdown_button
|
* @augments et2_dropdown_button
|
||||||
*/
|
*/
|
||||||
class et2_favorites extends et2_dropdown_button implements et2_INextmatchHeader
|
export class et2_favorites extends et2_dropdown_button implements et2_INextmatchHeader
|
||||||
{
|
{
|
||||||
static readonly _attributes : any = {
|
static readonly _attributes : any = {
|
||||||
"default_pref": {
|
"default_pref": {
|
||||||
|
@ -19,6 +19,7 @@ var etemplate2_1 = require("../etemplate/etemplate2");
|
|||||||
var et2_extension_nextmatch_1 = require("../etemplate/et2_extension_nextmatch");
|
var et2_extension_nextmatch_1 = require("../etemplate/et2_extension_nextmatch");
|
||||||
var et2_widget_dialog_1 = require("../etemplate/et2_widget_dialog");
|
var et2_widget_dialog_1 = require("../etemplate/et2_widget_dialog");
|
||||||
var et2_core_widget_1 = require("../etemplate/et2_core_widget");
|
var et2_core_widget_1 = require("../etemplate/et2_core_widget");
|
||||||
|
var et2_widget_favorites_1 = require("../etemplate/et2_widget_favorites");
|
||||||
/**
|
/**
|
||||||
* Common base class for application javascript
|
* Common base class for application javascript
|
||||||
* Each app should extend as needed.
|
* Each app should extend as needed.
|
||||||
@ -55,10 +56,19 @@ var EgwApp = /** @class */ (function () {
|
|||||||
* is not yet ready.
|
* is not yet ready.
|
||||||
*/
|
*/
|
||||||
function EgwApp(appname) {
|
function EgwApp(appname) {
|
||||||
|
/**
|
||||||
|
* PGP begin and end tags
|
||||||
|
*/
|
||||||
|
this.begin_pgp_message = '-----BEGIN PGP MESSAGE-----';
|
||||||
|
this.end_pgp_message = '-----END PGP MESSAGE-----';
|
||||||
/**
|
/**
|
||||||
* Mailvelope "egroupware" Keyring
|
* Mailvelope "egroupware" Keyring
|
||||||
*/
|
*/
|
||||||
this.mailvelope_keyring = undefined;
|
this.mailvelope_keyring = undefined;
|
||||||
|
/**
|
||||||
|
* jQuery selector for Mailvelope iframes in all browsers
|
||||||
|
*/
|
||||||
|
this.mailvelope_iframe_selector = 'iframe[src^="chrome-extension"],iframe[src^="about:blank?mvelo"]';
|
||||||
this.appname = appname;
|
this.appname = appname;
|
||||||
this.egw = egw(this.appname, window);
|
this.egw = egw(this.appname, window);
|
||||||
// Initialize sidebox for non-popups.
|
// Initialize sidebox for non-popups.
|
||||||
@ -330,7 +340,7 @@ var EgwApp = /** @class */ (function () {
|
|||||||
if (button_id != et2_widget_dialog_1.et2_dialog.NO_BUTTON) {
|
if (button_id != et2_widget_dialog_1.et2_dialog.NO_BUTTON) {
|
||||||
that._do_action(action_id, _elems);
|
that._do_action(action_id, _elems);
|
||||||
}
|
}
|
||||||
}, confirm_msg, egw.lang('Confirmation required'), et2_widget_dialog_1.et2_dialog.BUTTONS_YES_NO, et2_widget_dialog_1.et2_dialog.QUESTION_MESSAGE);
|
}, confirm_msg, egw.lang('Confirmation required'), null, et2_widget_dialog_1.et2_dialog.BUTTONS_YES_NO, et2_widget_dialog_1.et2_dialog.QUESTION_MESSAGE);
|
||||||
}
|
}
|
||||||
else if (typeof this._do_action == 'function') {
|
else if (typeof this._do_action == 'function') {
|
||||||
this._do_action(_action.id, _elems);
|
this._do_action(_action.id, _elems);
|
||||||
@ -674,7 +684,7 @@ var EgwApp = /** @class */ (function () {
|
|||||||
var add_to_popup = function (arr) {
|
var add_to_popup = function (arr) {
|
||||||
filter_list.push("<ul>");
|
filter_list.push("<ul>");
|
||||||
jQuery.each(arr, function (index, filter) {
|
jQuery.each(arr, function (index, filter) {
|
||||||
filter_list.push("<li id='index'><span class='filter_id'>" + index + "</span>" +
|
filter_list.push("<li id='index'><span class='filter_id'>" + index.toString() + "</span>" +
|
||||||
(typeof filter != "object" ? "<span class='filter_value'>" + filter + "</span>" : ""));
|
(typeof filter != "object" ? "<span class='filter_value'>" + filter + "</span>" : ""));
|
||||||
if (typeof filter == "object" && filter != null)
|
if (typeof filter == "object" && filter != null)
|
||||||
add_to_popup(filter);
|
add_to_popup(filter);
|
||||||
@ -707,7 +717,7 @@ var EgwApp = /** @class */ (function () {
|
|||||||
et2[i].widgetContainer.iterateOver(function (_widget) {
|
et2[i].widgetContainer.iterateOver(function (_widget) {
|
||||||
_widget.stored_filters = _widget.load_favorites(self.appname);
|
_widget.stored_filters = _widget.load_favorites(self.appname);
|
||||||
_widget.init_filters(_widget);
|
_widget.init_filters(_widget);
|
||||||
}, self, et2_favorites);
|
}, self, et2_widget_favorites_1.et2_favorites);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -887,7 +897,7 @@ var EgwApp = /** @class */ (function () {
|
|||||||
}, jQuery(trash).parentsUntil("li").parent(), true, jQuery(trash).parentsUntil("li").parent());
|
}, jQuery(trash).parentsUntil("li").parent(), true, jQuery(trash).parentsUntil("li").parent());
|
||||||
request.sendRequest(true);
|
request.sendRequest(true);
|
||||||
};
|
};
|
||||||
et2_widget_dialog_1.et2_dialog.show_dialog(do_delete, (egw.lang("Delete") + " " + name + "?"), egw.lang("Delete"), et2_widget_dialog_1.et2_dialog.YES_NO, et2_widget_dialog_1.et2_dialog.QUESTION_MESSAGE);
|
et2_widget_dialog_1.et2_dialog.show_dialog(do_delete, (egw.lang("Delete") + " " + name + "?"), egw.lang("Delete"), null, et2_widget_dialog_1.et2_dialog.BUTTONS_YES_NO, et2_widget_dialog_1.et2_dialog.QUESTION_MESSAGE);
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -1381,7 +1391,7 @@ var EgwApp = /** @class */ (function () {
|
|||||||
self.egw.message(self.egw.lang('Was not able to delete the backup key because %1', _err));
|
self.egw.message(self.egw.lang('Was not able to delete the backup key because %1', _err));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, self.egw.lang('Are you sure, you would like to delete the backup key?'), self.egw.lang('Delete backup key'), {}, et2_widget_dialog_1.et2_dialog.BUTTONS_YES_CANCEL, et2_widget_dialog_1.et2_dialog.QUESTION_MESSAGE, undefined, self.egw);
|
}, self.egw.lang('Are you sure, you would like to delete the backup key?'), self.egw.lang('Delete backup key'), {}, et2_widget_dialog_1.et2_dialog.BUTTONS_YES_NO_CANCEL, et2_widget_dialog_1.et2_dialog.QUESTION_MESSAGE, undefined, self.egw);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Create mailvelope restore dialog
|
* Create mailvelope restore dialog
|
||||||
|
@ -18,6 +18,7 @@ import {et2_container} from "../etemplate/et2_core_baseWidget";
|
|||||||
import {et2_nextmatch} from "../etemplate/et2_extension_nextmatch";
|
import {et2_nextmatch} from "../etemplate/et2_extension_nextmatch";
|
||||||
import {et2_dialog} from "../etemplate/et2_widget_dialog";
|
import {et2_dialog} from "../etemplate/et2_widget_dialog";
|
||||||
import {et2_createWidget} from "../etemplate/et2_core_widget";
|
import {et2_createWidget} from "../etemplate/et2_core_widget";
|
||||||
|
import {et2_favorites} from "../etemplate/et2_widget_favorites";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type for push-message
|
* Type for push-message
|
||||||
@ -472,7 +473,7 @@ export abstract class EgwApp
|
|||||||
{
|
{
|
||||||
that._do_action(action_id, _elems);
|
that._do_action(action_id, _elems);
|
||||||
}
|
}
|
||||||
}, confirm_msg, egw.lang('Confirmation required'), et2_dialog.BUTTONS_YES_NO, et2_dialog.QUESTION_MESSAGE);
|
}, confirm_msg, egw.lang('Confirmation required'),null, et2_dialog.BUTTONS_YES_NO, et2_dialog.QUESTION_MESSAGE);
|
||||||
}
|
}
|
||||||
else if (typeof this._do_action == 'function')
|
else if (typeof this._do_action == 'function')
|
||||||
{
|
{
|
||||||
@ -869,7 +870,7 @@ export abstract class EgwApp
|
|||||||
var add_to_popup = function(arr) {
|
var add_to_popup = function(arr) {
|
||||||
filter_list.push("<ul>");
|
filter_list.push("<ul>");
|
||||||
jQuery.each(arr, function(index, filter) {
|
jQuery.each(arr, function(index, filter) {
|
||||||
filter_list.push("<li id='index'><span class='filter_id'>"+index+"</span>" +
|
filter_list.push("<li id='index'><span class='filter_id'>"+index.toString()+"</span>" +
|
||||||
(typeof filter != "object" ? "<span class='filter_value'>"+filter+"</span>": "")
|
(typeof filter != "object" ? "<span class='filter_value'>"+filter+"</span>": "")
|
||||||
);
|
);
|
||||||
if(typeof filter == "object" && filter != null) add_to_popup(filter);
|
if(typeof filter == "object" && filter != null) add_to_popup(filter);
|
||||||
@ -985,8 +986,8 @@ export abstract class EgwApp
|
|||||||
if(name.val())
|
if(name.val())
|
||||||
{
|
{
|
||||||
// Add to the list
|
// Add to the list
|
||||||
name.val(name.val().replace(/(<([^>]+)>)/ig,""));
|
name.val((<string>name.val()).replace(/(<([^>]+)>)/ig,""));
|
||||||
var safe_name = name.val().replace(/[^A-Za-z0-9-_]/g,"_");
|
var safe_name = (<string>name.val()).replace(/[^A-Za-z0-9-_]/g,"_");
|
||||||
var favorite = {
|
var favorite = {
|
||||||
name: name.val(),
|
name: name.val(),
|
||||||
group: (typeof self.favorite_popup.group != "undefined" &&
|
group: (typeof self.favorite_popup.group != "undefined" &&
|
||||||
@ -1140,7 +1141,7 @@ export abstract class EgwApp
|
|||||||
request.sendRequest(true);
|
request.sendRequest(true);
|
||||||
};
|
};
|
||||||
et2_dialog.show_dialog(do_delete, (egw.lang("Delete") + " " +name +"?"),
|
et2_dialog.show_dialog(do_delete, (egw.lang("Delete") + " " +name +"?"),
|
||||||
egw.lang("Delete"), et2_dialog.YES_NO, et2_dialog.QUESTION_MESSAGE);
|
egw.lang("Delete"), null, et2_dialog.BUTTONS_YES_NO, et2_dialog.QUESTION_MESSAGE);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1155,7 +1156,7 @@ export abstract class EgwApp
|
|||||||
if(!this.sidebox) return;
|
if(!this.sidebox) return;
|
||||||
|
|
||||||
var state = this.getState();
|
var state = this.getState();
|
||||||
var best_match = false;
|
var best_match: any = false;
|
||||||
var best_count = 0;
|
var best_count = 0;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
@ -1729,7 +1730,7 @@ export abstract class EgwApp
|
|||||||
},
|
},
|
||||||
self.egw.lang('Are you sure, you would like to delete the backup key?'),
|
self.egw.lang('Are you sure, you would like to delete the backup key?'),
|
||||||
self.egw.lang('Delete backup key'),
|
self.egw.lang('Delete backup key'),
|
||||||
{}, et2_dialog.BUTTONS_YES_CANCEL, et2_dialog.QUESTION_MESSAGE, undefined, self.egw);
|
{}, et2_dialog.BUTTONS_YES_NO_CANCEL, et2_dialog.QUESTION_MESSAGE, undefined, self.egw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1911,8 +1912,8 @@ export abstract class EgwApp
|
|||||||
/**
|
/**
|
||||||
* PGP begin and end tags
|
* PGP begin and end tags
|
||||||
*/
|
*/
|
||||||
readonly begin_pgp_message: '-----BEGIN PGP MESSAGE-----';
|
readonly begin_pgp_message: string = '-----BEGIN PGP MESSAGE-----';
|
||||||
readonly end_pgp_message: '-----END PGP MESSAGE-----';
|
readonly end_pgp_message: string = '-----END PGP MESSAGE-----';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mailvelope "egroupware" Keyring
|
* Mailvelope "egroupware" Keyring
|
||||||
@ -1922,7 +1923,7 @@ export abstract class EgwApp
|
|||||||
/**
|
/**
|
||||||
* jQuery selector for Mailvelope iframes in all browsers
|
* jQuery selector for Mailvelope iframes in all browsers
|
||||||
*/
|
*/
|
||||||
readonly mailvelope_iframe_selector: 'iframe[src^="chrome-extension"],iframe[src^="about:blank?mvelo"]';
|
readonly mailvelope_iframe_selector: string = 'iframe[src^="chrome-extension"],iframe[src^="about:blank?mvelo"]';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open (or create) "egroupware" keyring and call callback with it
|
* Open (or create) "egroupware" keyring and call callback with it
|
||||||
|
Loading…
Reference in New Issue
Block a user