Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
cb36cba1
Valider
cb36cba1
rédigé
8 years ago
par
Thomas Steur
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
make sure widgets in admin are positioned correctly
parent
2988260c
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
plugins/CoreHome/angularjs/content-block/content-block.directive.js
+28
-17
28 ajouts, 17 suppressions
...reHome/angularjs/content-block/content-block.directive.js
avec
28 ajouts
et
17 suppressions
plugins/CoreHome/angularjs/content-block/content-block.directive.js
+
28
−
17
Voir le fichier @
cb36cba1
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
function
piwikContentBlock
(
piwik
){
function
piwikContentBlock
(
piwik
){
var
contentTopPosition
=
null
;
var
adminContent
=
null
;
return
{
return
{
restrict
:
'
A
'
,
restrict
:
'
A
'
,
...
@@ -47,24 +47,35 @@
...
@@ -47,24 +47,35 @@
scope
.
feature
=
scope
.
contentTitle
;
scope
.
feature
=
scope
.
contentTitle
;
}
}
if
(
contentTopPosition
!==
false
)
{
if
(
adminContent
===
null
)
{
if
(
contentTopPosition
===
null
)
{
// cache admin node for further content blocks
var
$content
=
$
(
'
#content.admin
'
);
adminContent
=
$
(
'
#content.admin
'
);
if
(
$content
.
size
())
{
}
// cache top position for further content blocks
contentTopPosition
=
$content
.
offset
().
top
;
var
contentTopPosition
;
}
else
{
contentTopPosition
=
false
;
if
(
adminContent
.
size
())
{
}
contentTopPosition
=
adminContent
.
offset
().
top
;
}
else
{
contentTopPosition
=
false
;
}
if
(
contentTopPosition
||
contentTopPosition
===
0
)
{
var
parents
=
element
.
parentsUntil
(
'
.col
'
,
'
[piwik-widget-loader]
'
);
var
topThis
;
if
(
parents
.
size
())
{
// when shown within the widget loader, we need to get the offset of that element
// as the widget loader might be still shown. Would otherwise not position correctly
// the widgets on the admin home page
topThis
=
parents
.
offset
().
top
;
}
else
{
topThis
=
element
.
offset
().
top
;
}
}
if
(
contentTopPosition
||
contentTopPosition
===
0
)
{
if
((
topThis
-
contentTopPosition
)
<
17
)
{
var
topThis
=
element
.
offset
().
top
;
// we make sure to display the first card with no margin-top to have it on same as line as
if
((
topThis
-
contentTopPosition
)
<
17
)
{
// navigation
// we make sure to display the first card with no margin-top to have it on same as line as
element
.
css
(
'
marginTop
'
,
'
0
'
);
// navigation
element
.
css
(
'
marginTop
'
,
'
0
'
);
}
}
}
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter