diff --git a/app/assets/javascripts/app/services/desktopManager.js b/app/assets/javascripts/app/services/desktopManager.js
index 68bdf6ed3..130d0d21c 100644
--- a/app/assets/javascripts/app/services/desktopManager.js
+++ b/app/assets/javascripts/app/services/desktopManager.js
@@ -32,9 +32,9 @@ class DesktopManager {
this.majorDataChangeHandler && this.majorDataChangeHandler();
}
- getApplicationDataPath() {
- console.assert(this.applicationDataPath, "applicationDataPath is null");
- return this.applicationDataPath;
+ getExtServerHost() {
+ console.assert(this.extServerHost, "extServerHost is null");
+ return this.extServerHost;
}
/*
@@ -152,9 +152,9 @@ class DesktopManager {
}
/* Used to resolve "sn://" */
- desktop_setApplicationDataPath(path) {
- this.applicationDataPath = path;
- this.$rootScope.$broadcast("desktop-did-set-application-path");
+ desktop_setExtServerHost(host) {
+ this.extServerHost = host;
+ this.$rootScope.$broadcast("desktop-did-set-ext-server-host");
}
desktop_setComponentInstallationSyncHandler(handler) {
diff --git a/app/assets/javascripts/app/services/themeManager.js b/app/assets/javascripts/app/services/themeManager.js
index 4fec13392..415885918 100644
--- a/app/assets/javascripts/app/services/themeManager.js
+++ b/app/assets/javascripts/app/services/themeManager.js
@@ -18,7 +18,7 @@ class ThemeManager {
})
if(desktopManager.isDesktop) {
- $rootScope.$on("desktop-did-set-application-path", () => {
+ $rootScope.$on("desktop-did-set-ext-server-host", () => {
this.activateCachedThemes();
})
} else {
diff --git a/dist/javascripts/compiled.js b/dist/javascripts/compiled.js
index 395a5bf7c..fcf851388 100644
--- a/dist/javascripts/compiled.js
+++ b/dist/javascripts/compiled.js
@@ -13078,6 +13078,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
var SKAlert =
/*#__PURE__*/
function () {
@@ -13085,12 +13087,24 @@ function () {
buttons: [{text, style, action}]
*/
function SKAlert(_ref) {
+ var _this = this;
+
var title = _ref.title,
text = _ref.text,
buttons = _ref.buttons;
_classCallCheck(this, SKAlert);
+ _defineProperty(this, "keyupListener", function (event) {
+ if (event.key === "Enter") {
+ var primaryButton = _this.primaryButton();
+
+ primaryButton.action && primaryButton.action();
+
+ _this.dismiss();
+ }
+ });
+
this.title = title;
this.text = text;
this.buttons = buttons;
@@ -13118,9 +13132,30 @@ function () {
var template = "\n
\n
\n
\n
\n
\n
\n
\n ".concat(titleTemplate, "\n\n
\n ").concat(messageTemplate, "\n
\n\n
\n ").concat(buttonsTemplate, "\n
\n
\n
\n
\n
\n
\n
\n ");
return template;
}
+ }, {
+ key: "dismiss",
+ value: function dismiss() {
+ this.onElement.removeChild(this.element);
+ document.removeEventListener("keyup", this.keyupListener);
+ }
+ }, {
+ key: "primaryButton",
+ value: function primaryButton() {
+ var primary = this.buttons.find(function (button) {
+ return button.primary === true;
+ });
+
+ if (!primary) {
+ primary = this.buttons[this.buttons.length - 1];
+ }
+
+ return primary;
+ }
}, {
key: "present",
value: function present() {
+ var _this2 = this;
+
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
onElement = _ref2.onElement;
@@ -13128,21 +13163,21 @@ function () {
onElement = document.body;
}
- var div = document.createElement('div');
- div.innerHTML = this.templateString().trim();
- var background = div.querySelector(".sk-modal-background");
- background.addEventListener('click', function () {
- onElement.removeChild(div);
- });
+ this.onElement = onElement;
+ this.element = document.createElement('div');
+ this.element.className = 'sn-component';
+ this.element.innerHTML = this.templateString().trim();
+ document.addEventListener("keyup", this.keyupListener);
this.buttons.forEach(function (buttonDesc, index) {
- var buttonElem = div.querySelector("#button-".concat(index));
+ var buttonElem = _this2.element.querySelector("#button-".concat(index));
buttonElem.onclick = function () {
buttonDesc.action && buttonDesc.action();
- onElement.removeChild(div);
+
+ _this2.dismiss();
};
});
- onElement.appendChild(div);
+ onElement.appendChild(this.element);
}
}]);
@@ -13157,7 +13192,7 @@ function () {
/***/ })
/******/ ]);;/**
- * @license AngularJS v1.7.8
+ * @license AngularJS v1.7.9
* (c) 2010-2018 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -13257,7 +13292,7 @@ function isValidObjectMaxDepth(maxDepth) {
function minErr(module, ErrorConstructor) {
ErrorConstructor = ErrorConstructor || Error;
- var url = 'https://errors.angularjs.org/1.7.8/';
+ var url = 'https://errors.angularjs.org/1.7.9/';
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
var errRegExp = new RegExp(regex, 'g');
@@ -13639,8 +13674,10 @@ function baseExtend(dst, objs, deep) {
} else if (isElement(src)) {
dst[key] = src.clone();
} else {
- if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
- baseExtend(dst[key], [src], true);
+ if (key !== '__proto__') {
+ if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
+ baseExtend(dst[key], [src], true);
+ }
}
} else {
dst[key] = src;
@@ -15963,11 +16000,11 @@ function toDebugString(obj, maxDepth) {
var version = {
// These placeholder strings will be replaced by grunt's `build` task.
// They need to be double- or single-quoted.
- full: '1.7.8',
+ full: '1.7.9',
major: 1,
minor: 7,
- dot: 8,
- codeName: 'enthusiastic-oblation'
+ dot: 9,
+ codeName: 'pollution-eradication'
};
@@ -16117,7 +16154,7 @@ function publishExternalAPI(angular) {
});
}
])
- .info({ angularVersion: '1.7.8' });
+ .info({ angularVersion: '1.7.9' });
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -20618,7 +20655,7 @@ function $TemplateCacheProvider() {
*
* This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
* actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
- * arrays or objects can have a negative impact on your application performance)
+ * arrays or objects can have a negative impact on your application performance.)
*
*
*
@@ -20941,7 +20978,7 @@ function $TemplateCacheProvider() {
* would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
* case when only one deeply nested directive has `templateUrl`.
*
- * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}
+ * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}.
*
* You can specify `templateUrl` as a string representing the URL or as a function which takes two
* arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
@@ -21002,7 +21039,7 @@ function $TemplateCacheProvider() {
* own templates or compile functions. Compiling these directives results in an infinite loop and
* stack overflow errors.
*
- * This can be avoided by manually using $compile in the postLink function to imperatively compile
+ * This can be avoided by manually using `$compile` in the postLink function to imperatively compile
* a directive's template instead of relying on automatic template compilation via `template` or
* `templateUrl` declaration or manual compilation inside the compile function.
*
@@ -21106,17 +21143,17 @@ function $TemplateCacheProvider() {
*
* * `true` - transclude the content (i.e. the child nodes) of the directive's element.
* * `'element'` - transclude the whole of the directive's element including any directives on this
- * element that defined at a lower priority than this directive. When used, the `template`
+ * element that are defined at a lower priority than this directive. When used, the `template`
* property is ignored.
* * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template.
*
- * **Mult-slot transclusion** is declared by providing an object for the `transclude` property.
+ * **Multi-slot transclusion** is declared by providing an object for the `transclude` property.
*
* This object is a map where the keys are the name of the slot to fill and the value is an element selector
* used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)
* and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).
*
- * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}
+ * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}.
*
* If the element selector is prefixed with a `?` then that slot is optional.
*
@@ -21141,7 +21178,7 @@ function $TemplateCacheProvider() {
*
*
* If you want to manually control the insertion and removal of the transcluded content in your directive
- * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery
+ * then you must use this transclude function. When you call a transclude function it returns a jqLite/JQuery
* object that contains the compiled DOM, which is linked to the correct transclusion scope.
*
* When you call a transclusion function you can pass in a **clone attach function**. This function accepts
@@ -21226,8 +21263,8 @@ function $TemplateCacheProvider() {
* The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
* `link()` or `compile()` functions. It has a variety of uses.
*
- * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways:
- * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access
+ * * *Accessing normalized attribute names:* Directives like `ngBind` can be expressed in many ways:
+ * `ng:bind`, `data-ng-bind`, or `x-ng-bind`. The attributes object allows for normalized access
* to the attributes.
*
* * *Directive inter-communication:* All directives share the same instance of the attributes
@@ -21268,25 +21305,24 @@ function $TemplateCacheProvider() {