diff --git a/xwiki-platform-core/xwiki-platform-bootstrap/src/main/less/modals.less b/xwiki-platform-core/xwiki-platform-bootstrap/src/main/less/modals.less index 2fe8e56fa909..fed3667a8fd8 100644 --- a/xwiki-platform-core/xwiki-platform-bootstrap/src/main/less/modals.less +++ b/xwiki-platform-core/xwiki-platform-bootstrap/src/main/less/modals.less @@ -27,6 +27,12 @@ // Prevent Chrome on Windows from adding a focus outline. For details, see // https://github.com/twbs/bootstrap/pull/10951. outline: 0; + + // If this element is a dialog, we want to reset those default styles. The children elements are the ones painted. + dialog& { + background-color: transparent; + border: 0; + } // When fading in the modal, animate it to slide down &.fade .modal-dialog { diff --git a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/export_modal.vm b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/export_modal.vm index 7b6de7960f21..8d99bcaee91d 100644 --- a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/export_modal.vm +++ b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/export_modal.vm @@ -23,7 +23,7 @@ *# #macro(exportModal) #set ($discard = $xwiki.jsfx.use('uicomponents/exporter/exporter.js', {'forceSkinAction': true})) - - + #if ($doc.documentReference.name == 'WebHome' && $xwiki.exists('XWiki.ExportDocumentTree')) #exportTreeModal() #end @@ -203,7 +203,7 @@ #end ## #macro(exportTreeModal) - - + #end diff --git a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/menus_content.vm b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/menus_content.vm index d7bb939866f3..80e3a3e09732 100644 --- a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/menus_content.vm +++ b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/menus_content.vm @@ -107,10 +107,6 @@ ## Note: Both the admin actions and the more actions menus are now merged into one. #if ($displayAdminMenu || $displayMoreActionsMenu) #displayOptionsMenu() - #if ($canView) - #template("export_modal.vm") - #exportModal() - #end #end #end #set ($discard = $topStaticExtensions.add( { 'content': "$!actionsMenu", 'order': 40000})) diff --git a/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-ui/src/main/resources/XWiki/Notifications/Code/NotificationsWatchUIX.xml b/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-ui/src/main/resources/XWiki/Notifications/Code/NotificationsWatchUIX.xml index 4a52915b2315..d42c688903c1 100644 --- a/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-ui/src/main/resources/XWiki/Notifications/Code/NotificationsWatchUIX.xml +++ b/xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-ui/src/main/resources/XWiki/Notifications/Code/NotificationsWatchUIX.xml @@ -502,17 +502,6 @@ #set($discard = $xwiki.ssx.use('XWiki.Notifications.Code.NotificationsWatchUIX')) #set($discard = $xwiki.jsx.use('XWiki.Notifications.Code.NotificationsWatchUIX')) #set ($watchedStatus = $services.notification.watch.getLocationWatchedStatus($doc)) -## If the watched status informs that the filter is about children it means it's a filter for the space, -## so we should look for ancestor of the space. -#set ($refForAncestorFirstFilter = $doc.getDocumentReference()) -#if ($watchedStatus == 'WATCHED_WITH_CHILDREN_FOR_ALL_EVENTS_AND_FORMATS' || $watchedStatus == 'BLOCKED_WITH_CHILDREN_FOR_ALL_EVENTS_AND_FORMATS') - #set ($refForAncestorFirstFilter = $doc.getDocumentReference().parent) -#end -#set ($ancestorFirstFilter = $services.notification.watch.getFirstFilteredAncestor($refForAncestorFirstFilter)) -#if ($ancestorFirstFilter) - #set ($ancestorRef = $ancestorFirstFilter.left) - #set ($ancestorWatchStatus = $ancestorFirstFilter.right) -#end ## FIXME: the different icons should use the icon service #set ($iconWhenWatched = 'fa-bell') #set ($iconWhenNotSet = 'fa-bell-o') @@ -531,8 +520,159 @@ #set ($watchIcon = $iconWhenCustom) #set ($watchText = $services.localization.render('notifications.watch.button.status.custom', 'html/5.0', [])) #end -## TODO: better way for that? -#set ($isTerminal = ($doc.getDocumentReference().name != 'WebHome')) +#set ($buttonTitle = $services.localization.render('notifications.watch.button.title', [$watchText])) +{{html clean='false'}} +<div class="btn-group" id="watchButton"> + <a href="#" role="button" title="$escapetool.xml($buttonTitle)" class="btn btn-default" data-toggle="modal" data-target="#watchModal"> + <span class="fa $watchIcon"></span> $watchText + </a> +</div> +{{/html}} +#end +{{/velocity}} + + + + org.xwiki.plaftorm.menu.content + + + org.xwiki.platform.notification.watch + + + order=39000 + + + wiki + + + + XWiki.Notifications.Code.NotificationsWatchUIX + 1 + XWiki.UIExtensionClass + ad3c491c-2532-48c7-8559-286a36a90cfb + + XWiki.UIExtensionClass + + + + + + + + + 0 + 0 + select + + async_cached + 3 + Cached + 0 + com.xpn.xwiki.objects.classes.BooleanClass + + + 0 + 0 + select + forbidden + 0 + 1 + async_context + 4 + Context elements + 0 + , + |, + 5 + 0 + action=Action|doc.reference=Document|doc.revision|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.cookies|request.headers|request.parameters=Request parameters|request.remoteAddr|request.session|request.url=Request URL|request.wiki=Request wiki|sheet|user=User|wiki=Wiki + com.xpn.xwiki.objects.classes.StaticListClass + + + 0 + 0 + select + + async_enabled + 2 + Asynchronous rendering + 0 + com.xpn.xwiki.objects.classes.BooleanClass + + + 0 + Text + content + 1 + Executed Content + 0 + 25 + 120 + 0 + com.xpn.xwiki.objects.classes.TextAreaClass + + + 0 + extensionPointId + 5 + Extension Point ID + 30 + 0 + com.xpn.xwiki.objects.classes.StringClass + + + 0 + name + 6 + Extension ID + 30 + 0 + com.xpn.xwiki.objects.classes.StringClass + + + PureText + 0 + PureText + parameters + 7 + Extension Parameters + 0 + 10 + 40 + 0 + com.xpn.xwiki.objects.classes.TextAreaClass + + + 0 + 0 + select + forbidden + 0 + 0 + scope + 8 + Extension Scope + 0 + + |, + 1 + 0 + wiki=Current Wiki|user=Current User|global=Global + com.xpn.xwiki.objects.classes.StaticListClass + + + + 0 + + + + + + 0 + + + {{velocity}} +#if (!$isGuest) #macro (_displayOption $attributeName $optionValue $translationSuffix $iconName $panelClass) <div class="panel panel-default $panelClass"> <div class="panel-radio"> @@ -554,6 +694,23 @@ </div><!-- end collapsed xhint --> </div><!-- end panel --> #end + +#set ($watchedStatus = $services.notification.watch.getLocationWatchedStatus($doc)) +## If the watched status informs that the filter is about children it means it's a filter for the space, +## so we should look for ancestor of the space. +#set ($refForAncestorFirstFilter = $doc.getDocumentReference()) +#if ($watchedStatus == 'WATCHED_WITH_CHILDREN_FOR_ALL_EVENTS_AND_FORMATS' || $watchedStatus == 'BLOCKED_WITH_CHILDREN_FOR_ALL_EVENTS_AND_FORMATS') + #set ($refForAncestorFirstFilter = $doc.getDocumentReference().parent) +#end +#set ($ancestorFirstFilter = $services.notification.watch.getFirstFilteredAncestor($refForAncestorFirstFilter)) +#if ($ancestorFirstFilter) + #set ($ancestorRef = $ancestorFirstFilter.left) + #set ($ancestorWatchStatus = $ancestorFirstFilter.right) +#end + +## TODO: better way for that? +#set ($isTerminal = ($doc.getDocumentReference().name != 'WebHome')) + #set ($watchPageOption = "#_displayOption('watch-page','watchPage','watchpage','page','')") #set ($watchSpaceOption = "#_displayOption('watch-space','watchSpace','watchspace','chart-organisation','')") #set ($unwatchPageAndWatchSpaceOption = "#_displayOption('unwatch-page-watch-space','unwatchPageWatchSpace','watchspace','chart-organisation','')") @@ -567,15 +724,8 @@ #set ($unblockPageOption = "#_displayOption('unblock-page','unblockPage','unblockpage','page','')") #set ($unblockSpaceOption = "#_displayOption('unblock-space','unblockSpace','unblockspace','chart-organisation','')") #set ($unblockWikiOption = "#_displayOption('unblock-wiki','unblockWiki','unblockwiki','world','wiki-option')") - -#set ($buttonTitle = $services.localization.render('notifications.watch.button.title', [$watchText])) {{html clean='false'}} -<div class="btn-group" id="watchButton"> - <a href="#" role="button" title="$escapetool.xml($buttonTitle)" class="btn btn-default" data-toggle="modal" data-target="#watchModal"> - <span class="fa $watchIcon"></span> $watchText - </a> -</div> -<div class="modal fade" tabindex="-1" role="dialog" id="watchModal"> +<dialog class="modal fade" id="watchModal"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> @@ -682,19 +832,19 @@ </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> -</div><!-- /.modal --> +</dialog><!-- /.modal --> {{/html}} #end {{/velocity}} - org.xwiki.plaftorm.menu.content + org.xwiki.platform.template.body.end - org.xwiki.platform.notification.watch + org.xwiki.platform.notification.watchModal - order=39000 + wiki diff --git a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/htmlfooter.vm b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/htmlfooter.vm index fe99dc2d34cc..7cd5af896a49 100644 --- a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/htmlfooter.vm +++ b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/htmlfooter.vm @@ -23,6 +23,17 @@ #if ($services.debug.isEnabled()) #template('debug.vm') #end + #else ## Portlet Mode