');
19 |
20 | $('#notification-message-close').click(function () {
21 | $('#notification-message').hide();
22 | });
23 |
24 |
25 | // After initialization, expose a common notification function
26 | app.showNotification = function (header, text) {
27 | $('#notification-message-header').text(header);
28 | $('#notification-message-body').text(text);
29 | $('#notification-message').slideDown('fast');
30 | };
31 | };
32 |
33 | return app;
34 | })();
35 |
36 | // MIT License:
37 |
38 | // Permission is hereby granted, free of charge, to any person obtaining
39 | // a copy of this software and associated documentation files (the
40 | // ""Software""), to deal in the Software without restriction, including
41 | // without limitation the rights to use, copy, modify, merge, publish,
42 | // distribute, sublicense, and/or sell copies of the Software, and to
43 | // permit persons to whom the Software is furnished to do so, subject to
44 | // the following conditions:
45 |
46 | // The above copyright notice and this permission notice shall be
47 | // included in all copies or substantial portions of the Software.
48 |
49 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
50 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
51 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
53 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
54 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
55 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/old/AttachmentsDemoWeb/AppRead/Home/Home.css:
--------------------------------------------------------------------------------
1 | /* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.*/
2 | /* Page-specific styling */
3 |
4 | #details {
5 | margin-left: 15px;
6 | }
7 |
8 | #details th {
9 | text-align: left;
10 | padding-right: 10px;
11 | }
12 |
13 | #from {
14 | cursor: pointer;
15 | color: #336699;
16 | }
17 |
18 | #from:focus, #from:hover, #from:active {
19 | color: #4ea2df;
20 | }
21 |
22 | /*
23 | MIT License:
24 |
25 | Permission is hereby granted, free of charge, to any person obtaining
26 | a copy of this software and associated documentation files (the
27 | ""Software""), to deal in the Software without restriction, including
28 | without limitation the rights to use, copy, modify, merge, publish,
29 | distribute, sublicense, and/or sell copies of the Software, and to
30 | permit persons to whom the Software is furnished to do so, subject to
31 | the following conditions:
32 |
33 | The above copyright notice and this permission notice shall be
34 | included in all copies or substantial portions of the Software.
35 |
36 | THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
37 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
40 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
41 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
42 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43 | */
--------------------------------------------------------------------------------
/old/AttachmentsDemoWeb/AppRead/Home/Home.html:
--------------------------------------------------------------------------------
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 |
Attachments:
27 |
28 |
29 |
30 |
Name
Size (KB)
31 |
32 |
33 |
34 |
35 |
36 |
37 |
Please wait, checking for user consent...
38 |
39 |
40 |
Please click the Authorize button to give consent for OneDrive access before clicking the Save button.
41 |
42 |
43 |
44 |
45 |
46 |
68 |
--------------------------------------------------------------------------------
/old/AttachmentsDemoWeb/AppRead/Home/Home.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
2 | ///
3 |
4 | (function () {
5 | "use strict";
6 |
7 | // The Office initialize function must be run each time a new page is loaded
8 | Office.initialize = function (reason) {
9 | $(document).ready(function () {
10 | app.initialize();
11 |
12 | $('#saveAttachment').click(saveAttachment);
13 | $('#providePermission').click(doOAuthFlow);
14 |
15 | checkForConsent();
16 | displayItemDetails();
17 | });
18 | };
19 |
20 | // Displays the attachments from the current mail item
21 | function displayItemDetails() {
22 | var item = Office.context.mailbox.item;
23 |
24 | for (var i = 0; i < item.attachments.length; i++) {
25 | $('