diff options
Diffstat (limited to 'core/src/jquery')
-rw-r--r-- | core/src/jquery/avatar.js | 10 | ||||
-rw-r--r-- | core/src/jquery/contactsmenu.js | 4 | ||||
-rw-r--r-- | core/src/jquery/css/jquery-ui-fixes.scss | 29 | ||||
-rw-r--r-- | core/src/jquery/css/jquery.ocdialog.scss | 10 | ||||
-rw-r--r-- | core/src/jquery/octemplate.js | 2 | ||||
-rw-r--r-- | core/src/jquery/requesttoken.js | 4 | ||||
-rw-r--r-- | core/src/jquery/showpassword.js | 3 |
7 files changed, 42 insertions, 20 deletions
diff --git a/core/src/jquery/avatar.js b/core/src/jquery/avatar.js index 826d94f7a08..3851a26ce31 100644 --- a/core/src/jquery/avatar.js +++ b/core/src/jquery/avatar.js @@ -3,10 +3,10 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import { getCurrentUser } from '@nextcloud/auth' +import { generateUrl } from '@nextcloud/router' import $ from 'jquery' -import OC from '../OC/index.js' - /** * This plugin inserts the right avatar for the user, depending on, whether a * custom avatar is uploaded - which it uses then - or not, and display a @@ -90,8 +90,8 @@ $.fn.avatar = function(user, size, ie8fix, hidedefault, callback, displayname) { let url // If this is our own avatar we have to use the version attribute - if (user === OC.getCurrentUser().uid) { - url = OC.generateUrl( + if (user === getCurrentUser()?.uid) { + url = generateUrl( '/avatar/{user}/{size}?v={version}', { user, @@ -99,7 +99,7 @@ $.fn.avatar = function(user, size, ie8fix, hidedefault, callback, displayname) { version: oc_userconfig.avatar.version, }) } else { - url = OC.generateUrl( + url = generateUrl( '/avatar/{user}/{size}', { user, diff --git a/core/src/jquery/contactsmenu.js b/core/src/jquery/contactsmenu.js index 8c59c02133b..fba014c364e 100644 --- a/core/src/jquery/contactsmenu.js +++ b/core/src/jquery/contactsmenu.js @@ -5,7 +5,7 @@ import $ from 'jquery' -import OC from '../OC/index.js' +import { generateUrl } from '@nextcloud/router' import { isA11yActivation } from '../Util/a11y.js' const LIST = '' @@ -51,7 +51,7 @@ $.fn.contactsMenu = function(shareWith, shareType, appendTo) { } $list.addClass('loaded') - $.ajax(OC.generateUrl('/contactsmenu/findOne'), { + $.ajax(generateUrl('/contactsmenu/findOne'), { method: 'POST', data: { shareType, diff --git a/core/src/jquery/css/jquery-ui-fixes.scss b/core/src/jquery/css/jquery-ui-fixes.scss index b248e99f831..637f4bfe14b 100644 --- a/core/src/jquery/css/jquery-ui-fixes.scss +++ b/core/src/jquery/css/jquery-ui-fixes.scss @@ -9,14 +9,17 @@ background: var(--color-main-background) none; color: var(--color-main-text); } + .ui-widget-content a { color: var(--color-main-text); } + .ui-widget-header { border: none; color: var(--color-main-text); background-image: none; } + .ui-widget-header a { color: var(--color-main-text); } @@ -31,11 +34,13 @@ font-weight: bold; color: #555; } + .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555; } + .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, @@ -47,12 +52,14 @@ font-weight: bold; color: var(--color-main-text); } + .ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: var(--color-main-text); } + .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { @@ -61,6 +68,7 @@ font-weight: bold; color: var(--color-main-text); } + .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { @@ -77,11 +85,13 @@ color: var(--color-text-light); font-weight: 600; } + .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { color: var(--color-text-lighter); } + .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { @@ -89,11 +99,13 @@ background: var(--color-error) none; color: #ffffff; } + .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } + .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { @@ -105,20 +117,25 @@ .ui-state-default .ui-icon { background-image: url('images/ui-icons_1d2d44_256x240.png'); } + .ui-state-hover .ui-icon, .ui-state-focus .ui-icon { background-image: url('images/ui-icons_1d2d44_256x240.png'); } + .ui-state-active .ui-icon { background-image: url('images/ui-icons_1d2d44_256x240.png'); } + .ui-state-highlight .ui-icon { background-image: url('images/ui-icons_ffffff_256x240.png'); } + .ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background-image: url('images/ui-icons_ffd27a_256x240.png'); } + .ui-icon.ui-icon-none { display: none; } @@ -130,6 +147,7 @@ background: #666666 url('images/ui-bg_diagonals-thick_20_666666_40x40.png') 50% 50% repeat; opacity: .5; } + .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; @@ -143,8 +161,8 @@ border: none; .ui-tabs-nav.ui-corner-all { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + border-end-start-radius: 0; + border-end-end-radius: 0; } .ui-tabs-nav { @@ -189,7 +207,8 @@ .ui-menu-item a { color: var(--color-text-lighter); display: block; - padding: 4px 4px 4px 14px; + padding: 4px; + padding-inline-start: 14px; &.ui-state-focus, &.ui-state-active { box-shadow: inset 4px 0 var(--color-primary-element); @@ -205,8 +224,8 @@ &.ui-corner-all { border-radius: 0; - border-bottom-left-radius: var(--border-radius); - border-bottom-right-radius: var(--border-radius); + border-end-start-radius: var(--border-radius); + border-end-end-radius: var(--border-radius); } .ui-state-hover, .ui-widget-content .ui-state-hover, diff --git a/core/src/jquery/css/jquery.ocdialog.scss b/core/src/jquery/css/jquery.ocdialog.scss index 759bf2b1250..b950d98c381 100644 --- a/core/src/jquery/css/jquery.ocdialog.scss +++ b/core/src/jquery/css/jquery.ocdialog.scss @@ -13,20 +13,22 @@ box-sizing: border-box; min-width: 200px; top: 50%; - left: 50%; + inset-inline-start: 50%; transform: translate(-50%, -50%); max-height: calc(100% - 20px); max-width: calc(100% - 20px); overflow: auto; } + .oc-dialog-title { background: var(--color-main-background); } + .oc-dialog-buttonrow { position: relative; display: flex; background: transparent; - right: 0; + inset-inline-end: 0; bottom: 0; padding: 0; padding-top: 10px; @@ -57,7 +59,7 @@ width: 44px !important; height: 44px !important; top: 4px; - right: 4px; + inset-inline-end: 4px; padding: 25px; background: var(--icon-close-dark) no-repeat center; opacity: .5; @@ -76,7 +78,7 @@ z-index: 100001; position: fixed; top: 0; - left: 0; + inset-inline-start: 0; width: 100%; height: 100%; } diff --git a/core/src/jquery/octemplate.js b/core/src/jquery/octemplate.js index 8de0a9d9506..cecbe880aa6 100644 --- a/core/src/jquery/octemplate.js +++ b/core/src/jquery/octemplate.js @@ -89,7 +89,7 @@ const Template = { function(a, b) { const r = o[b] return typeof r === 'string' || typeof r === 'number' ? r : a - } + }, ) } catch (e) { console.error(e, 'data:', data) diff --git a/core/src/jquery/requesttoken.js b/core/src/jquery/requesttoken.js index c2868e2728a..1e9e06515a6 100644 --- a/core/src/jquery/requesttoken.js +++ b/core/src/jquery/requesttoken.js @@ -5,11 +5,11 @@ import $ from 'jquery' -import { getToken } from '../OC/requesttoken.js' +import { getRequestToken } from '../OC/requesttoken.ts' $(document).on('ajaxSend', function(elm, xhr, settings) { if (settings.crossDomain === false) { - xhr.setRequestHeader('requesttoken', getToken()) + xhr.setRequestHeader('requesttoken', getRequestToken()) xhr.setRequestHeader('OCS-APIREQUEST', 'true') } }) diff --git a/core/src/jquery/showpassword.js b/core/src/jquery/showpassword.js index 3c8f72dd3fd..8d938d7853b 100644 --- a/core/src/jquery/showpassword.js +++ b/core/src/jquery/showpassword.js @@ -3,13 +3,14 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +/** @typedef {import('jquery')} jQuery */ import $ from 'jquery' /** * @name Show Password * @description * @version 1.3.0 - * @requires Jquery 1.5 + * @requires jQuery 1.5 * * @author Jan Jarfalk <jan.jarfalk@unwrongest.com> * author-website http://www.unwrongest.com |