diff options
Diffstat (limited to 'core/src/OCP/whatsnew.js')
-rw-r--r-- | core/src/OCP/whatsnew.js | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/core/src/OCP/whatsnew.js b/core/src/OCP/whatsnew.js index c0df8af7b3f..afcffb7c34f 100644 --- a/core/src/OCP/whatsnew.js +++ b/core/src/OCP/whatsnew.js @@ -1,10 +1,24 @@ /** * @copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de> * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author John Molakvoæ <skjnldsv@protonmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. * - * This file is licensed under the Affero General Public License version 3 or - * later. See the COPYING file. */ import _ from 'underscore' @@ -59,14 +73,14 @@ function onQuerySuccess(data, statusText, xhr, dismissOptions) { menuItem.className = 'menuitem' text = document.createElement('span') - text.innerText = t('core', 'New in') + ' ' + data['ocs']['data']['product'] + text.innerText = t('core', 'New in') + ' ' + data.ocs.data.product text.className = 'caption' menuItem.appendChild(text) icon = document.createElement('span') icon.className = 'icon-close' icon.onclick = function() { - dismiss(data['ocs']['data']['version'], dismissOptions) + dismiss(data.ocs.data.version, dismissOptions) } menuItem.appendChild(icon) @@ -74,8 +88,8 @@ function onQuerySuccess(data, statusText, xhr, dismissOptions) { list.appendChild(item) // Highlights - for (const i in data['ocs']['data']['whatsNew']['regular']) { - const whatsNewTextItem = data['ocs']['data']['whatsNew']['regular'][i] + for (const i in data.ocs.data.whatsNew.regular) { + const whatsNewTextItem = data.ocs.data.whatsNew.regular[i] item = document.createElement('li') menuItem = document.createElement('span') @@ -94,11 +108,11 @@ function onQuerySuccess(data, statusText, xhr, dismissOptions) { } // Changelog URL - if (!_.isUndefined(data['ocs']['data']['changelogURL'])) { + if (!_.isUndefined(data.ocs.data.changelogURL)) { item = document.createElement('li') menuItem = document.createElement('a') - menuItem.href = data['ocs']['data']['changelogURL'] + menuItem.href = data.ocs.data.changelogURL menuItem.rel = 'noreferrer noopener' menuItem.target = '_blank' |