forked from OfficeDev/outlook-add-in-command-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
35 lines (27 loc) · 1.15 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information.
/* Common app functionality */
var app = (function () {
"use strict";
var app = {};
// Common initialization function (to be called from each page)
app.initialize = function () {
$('body').append(
'<div id="notification-message">' +
'<div class="padding">' +
'<div id="notification-message-close"></div>' +
'<div id="notification-message-header"></div>' +
'<div id="notification-message-body"></div>' +
'</div>' +
'</div>');
$('#notification-message-close').click(function () {
$('#notification-message').hide();
});
// After initialization, expose a common notification function
app.showNotification = function (header, text) {
$('#notification-message-header').text(header);
$('#notification-message-body').text(text);
$('#notification-message').slideDown('fast');
};
};
return app;
})();