Skip to content

Commit

Permalink
Merge branch 'QA'
Browse files Browse the repository at this point in the history
  • Loading branch information
kmathmann committed Apr 24, 2017
2 parents e278fe7 + 617247a commit 142f366
Show file tree
Hide file tree
Showing 28 changed files with 392 additions and 311 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"custom-event-polyfill": "^0.3.0",
"es6-promise": "^4.1.0",
"html-to-element": "^1.0.0",
"node-uuid": "^1.4.8",
"uuid": "^3.0.1",
"stylenames": "^1.1.5",
"whatwg-fetch": "^2.0.3"
},
"optionalDependencies": {
"chayns-logger": "^2.5.1"
"chayns-logger": "^2.6.0"
}
}
12 changes: 1 addition & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { getUrlParameters } from './utils/helper';
import ConsoleLogger from './utils/console-logger';
import './polyfill/index';
import './tapp/custom-tapp-communication';
import './json-call/json-call-functions';
import './chayns-web';
import './constants/system-url-parameter';
import './window-objects';
Expand All @@ -19,6 +18,7 @@ logger.init({
overrideOnError: true,
throttleTime: 100,
useDevServer: !isLIVE,
version: VERSION,
middleware: (payload) => {
if (payload.customText) {
payload.data = {
Expand Down Expand Up @@ -53,16 +53,6 @@ logger.init({
}
});

const defaults = {
version: VERSION
};

if (!isLIVE) {
defaults.env = process.env.NODE_ENV;
}

logger.setDefaults(defaults);

const logLevelParameter = parseInt(getUrlParameters().loglevel, 10);

if (!isNaN(logLevelParameter)) {
Expand Down
286 changes: 0 additions & 286 deletions src/json-call/json-call-functions.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/json-chayns-call/calls/add-chayns-call-error-listener.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function addChaynsCallErrorListener(req, res) {
req.addJsonCallEventListener(75);
}
10 changes: 10 additions & 0 deletions src/json-chayns-call/calls/close-window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { closeWindow as closeWindowCall } from '../../json-native-calls/calls/index';

export default function closeWindow(req, res) {
closeWindowCall(req.value.data).then((retVal) => {
res.answer({
status: retVal.status.code,
data: retVal.data
});
});
}
13 changes: 13 additions & 0 deletions src/json-chayns-call/calls/dialogs/alert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Dialog from '../../../ui/dialog/dialog';

export default function showAlert(req, res) {
if (!req.value || req.value.dialog === undefined) {
return res.event(2, 'Field dialog missing.');
}
if ((req.value.dialog.buttons || []).length === 0) {
return res.event(2, 'Field dialog.buttons missing.');
}

Dialog.show(Dialog.type.ALERT, req.value.dialog)
.then(buttonType => res.answer(buttonType));
}
Loading

0 comments on commit 142f366

Please sign in to comment.