Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
10f3b70d
Commit
10f3b70d
authored
Dec 14, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ee-ph-es-modules' into 'master'
EE port of ph-es-modules See merge request gitlab-org/gitlab-ee!3779
parents
5feaa733
e999e995
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
121 deletions
+67
-121
app/assets/javascripts/activities.js
app/assets/javascripts/activities.js
+1
-4
app/assets/javascripts/admin.js
app/assets/javascripts/admin.js
+55
-59
app/assets/javascripts/aside.js
app/assets/javascripts/aside.js
+0
-24
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+7
-6
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-3
app/assets/javascripts/users/user_tabs.js
app/assets/javascripts/users/user_tabs.js
+2
-1
app/assets/stylesheets/framework/mobile.scss
app/assets/stylesheets/framework/mobile.scss
+0
-17
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+0
-3
app/views/shared/_show_aside.html.haml
app/views/shared/_show_aside.html.haml
+0
-2
spec/javascripts/activities_spec.js
spec/javascripts/activities_spec.js
+2
-2
No files found.
app/assets/javascripts/activities.js
View file @
10f3b70d
...
...
@@ -4,7 +4,7 @@
import
Cookies
from
'
js-cookie
'
;
import
{
localTimeAgo
}
from
'
./lib/utils/datetime_utility
'
;
class
Activities
{
export
default
class
Activities
{
constructor
()
{
Pager
.
init
(
20
,
true
,
false
,
data
=>
data
,
this
.
updateTooltips
);
...
...
@@ -34,6 +34,3 @@ class Activities {
$sender
.
closest
(
'
li
'
).
toggleClass
(
'
active
'
);
}
}
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
Activities
=
Activities
;
app/assets/javascripts/admin.js
View file @
10f3b70d
/* eslint-disable func-names, space-before-function-paren, wrap-iife, one-var, no-var, one-var-declaration-per-line, no-unused-vars, no-else-return, prefer-arrow-callback, camelcase, quotes, comma-dangle, max-len */
import
{
refreshCurrentPage
}
from
'
./lib/utils/url_utility
'
;
window
.
Admin
=
(
function
()
{
function
Admin
()
{
var
modal
,
showBlacklistType
;
$
(
'
input#user_force_random_password
'
).
on
(
'
change
'
,
function
(
elem
)
{
var
elems
;
elems
=
$
(
'
#user_password, #user_password_confirmation
'
);
if
(
$
(
this
).
attr
(
'
checked
'
))
{
return
elems
.
val
(
''
).
attr
(
'
disabled
'
,
true
);
}
else
{
return
elems
.
removeAttr
(
'
disabled
'
);
}
});
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-toggle-colors-link
'
,
function
(
e
)
{
e
.
preventDefault
();
return
$
(
'
.js-toggle-colors-container
'
).
toggle
();
});
$
(
'
.log-tabs a
'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
return
$
(
this
).
tab
(
'
show
'
);
});
$
(
'
.log-bottom
'
).
click
(
function
(
e
)
{
var
visible_log
;
e
.
preventDefault
();
visible_log
=
$
(
"
.file-content:visible
"
);
return
visible_log
.
animate
({
scrollTop
:
visible_log
.
find
(
'
ol
'
).
height
()
},
"
fast
"
);
});
modal
=
$
(
'
.change-owner-holder
'
);
$
(
'
.change-owner-link
'
).
bind
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
$
(
this
).
hide
();
return
modal
.
show
();
});
$
(
'
.change-owner-cancel-link
'
).
bind
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
modal
.
hide
();
return
$
(
'
.change-owner-link
'
).
show
();
});
$
(
'
li.project_member
'
).
bind
(
'
ajax:success
'
,
function
()
{
return
refreshCurrentPage
();
});
$
(
'
li.group_member
'
).
bind
(
'
ajax:success
'
,
function
()
{
return
refreshCurrentPage
();
});
showBlacklistType
=
function
()
{
if
(
$
(
"
input[name='blacklist_type']:checked
"
).
val
()
===
'
file
'
)
{
$
(
'
.blacklist-file
'
).
show
();
return
$
(
'
.blacklist-raw
'
).
hide
();
}
else
{
$
(
'
.blacklist-file
'
).
hide
();
return
$
(
'
.blacklist-raw
'
).
show
();
}
};
$
(
"
input[name='blacklist_type']
"
).
click
(
showBlacklistType
);
showBlacklistType
();
function
showBlacklistType
()
{
if
(
$
(
'
input[name="blacklist_type"]:checked
'
).
val
()
===
'
file
'
)
{
$
(
'
.blacklist-file
'
).
show
();
$
(
'
.blacklist-raw
'
).
hide
();
}
else
{
$
(
'
.blacklist-file
'
).
hide
();
$
(
'
.blacklist-raw
'
).
show
();
}
}
return
Admin
;
})();
export
default
function
adminInit
()
{
const
modal
=
$
(
'
.change-owner-holder
'
);
$
(
'
input#user_force_random_password
'
).
on
(
'
change
'
,
function
randomPasswordClick
()
{
const
$elems
=
$
(
'
#user_password, #user_password_confirmation
'
);
if
(
$
(
this
).
attr
(
'
checked
'
))
{
$elems
.
val
(
''
).
attr
(
'
disabled
'
,
true
);
}
else
{
$elems
.
removeAttr
(
'
disabled
'
);
}
});
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-toggle-colors-link
'
,
(
e
)
=>
{
e
.
preventDefault
();
$
(
'
.js-toggle-colors-container
'
).
toggle
();
});
$
(
'
.log-tabs a
'
).
on
(
'
click
'
,
function
logTabsClick
(
e
)
{
e
.
preventDefault
();
$
(
this
).
tab
(
'
show
'
);
});
$
(
'
.log-bottom
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
const
$visibleLog
=
$
(
'
.file-content:visible
'
);
$visibleLog
.
animate
({
scrollTop
:
$visibleLog
.
find
(
'
ol
'
).
height
(),
},
'
fast
'
);
});
$
(
'
.change-owner-link
'
).
on
(
'
click
'
,
function
changeOwnerLinkClick
(
e
)
{
e
.
preventDefault
();
$
(
this
).
hide
();
modal
.
show
();
});
$
(
'
.change-owner-cancel-link
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
modal
.
hide
();
$
(
'
.change-owner-link
'
).
show
();
});
$
(
'
li.project_member, li.group_member
'
).
on
(
'
ajax:success
'
,
refreshCurrentPage
);
$
(
"
input[name='blacklist_type']
"
).
on
(
'
click
'
,
showBlacklistType
);
showBlacklistType
();
}
app/assets/javascripts/aside.js
deleted
100644 → 0
View file @
5feaa733
/* eslint-disable func-names, space-before-function-paren, wrap-iife, quotes, prefer-arrow-callback, no-var, one-var, one-var-declaration-per-line, no-else-return, max-len */
window
.
Aside
=
(
function
()
{
function
Aside
()
{
$
(
document
).
off
(
"
click
"
,
"
a.show-aside
"
);
$
(
document
).
on
(
"
click
"
,
'
a.show-aside
'
,
function
(
e
)
{
var
btn
,
icon
;
e
.
preventDefault
();
btn
=
$
(
e
.
currentTarget
);
icon
=
btn
.
find
(
'
i
'
);
if
(
icon
.
hasClass
(
'
fa-angle-left
'
))
{
btn
.
parent
().
find
(
'
section
'
).
hide
();
btn
.
parent
().
find
(
'
aside
'
).
fadeIn
();
return
icon
.
removeClass
(
'
fa-angle-left
'
).
addClass
(
'
fa-angle-right
'
);
}
else
{
btn
.
parent
().
find
(
'
aside
'
).
hide
();
btn
.
parent
().
find
(
'
section
'
).
fadeIn
();
return
icon
.
removeClass
(
'
fa-angle-right
'
).
addClass
(
'
fa-angle-left
'
);
}
});
}
return
Aside
;
})();
app/assets/javascripts/dispatcher.js
View file @
10f3b70d
...
...
@@ -16,7 +16,7 @@ import BuildArtifacts from './build_artifacts';
import
CILintEditor
from
'
./ci_lint_editor
'
;
import
groupsSelect
from
'
./groups_select
'
;
import
Search
from
'
./search
'
;
/* global Admin */
import
initAdmin
from
'
./admin
'
;
import
NamespaceSelect
from
'
./namespace_select
'
;
import
NewCommitForm
from
'
./new_commit_form
'
;
import
Project
from
'
./project
'
;
...
...
@@ -97,6 +97,7 @@ import Diff from './diff';
import
ProjectLabelSubscription
from
'
./project_label_subscription
'
;
import
ProjectVariables
from
'
./project_variables
'
;
import
SearchAutocomplete
from
'
./search_autocomplete
'
;
import
Activities
from
'
./activities
'
;
// EE-only
import
ApproversSelect
from
'
./approvers_select
'
;
...
...
@@ -366,7 +367,7 @@ import initGroupAnalytics from './init_group_analytics';
shortcut_handler
=
new
ShortcutsIssuable
(
true
);
break
;
case
'
dashboard:activity
'
:
new
gl
.
Activities
();
new
Activities
();
break
;
case
'
projects:commit:show
'
:
new
Diff
();
...
...
@@ -387,7 +388,7 @@ import initGroupAnalytics from './init_group_analytics';
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
break
;
case
'
projects:activity
'
:
new
gl
.
Activities
();
new
Activities
();
shortcut_handler
=
new
ShortcutsNavigation
();
break
;
case
'
projects:commits:show
'
:
...
...
@@ -408,7 +409,7 @@ import initGroupAnalytics from './init_group_analytics';
if
(
$
(
'
#tree-slider
'
).
length
)
new
TreeView
();
if
(
$
(
'
.blob-viewer
'
).
length
)
new
BlobViewer
();
if
(
$
(
'
.project-show-activity
'
).
length
)
new
gl
.
Activities
();
if
(
$
(
'
.project-show-activity
'
).
length
)
new
Activities
();
$
(
'
#tree-slider
'
).
waitForImages
(
function
()
{
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
...
...
@@ -449,7 +450,7 @@ import initGroupAnalytics from './init_group_analytics';
});
break
;
case
'
groups:activity
'
:
new
gl
.
Activities
();
new
Activities
();
break
;
case
'
groups:show
'
:
const
newGroupChildWrapper
=
document
.
querySelector
(
'
.js-new-project-subgroup
'
);
...
...
@@ -664,7 +665,7 @@ import initGroupAnalytics from './init_group_analytics';
// needed in rspec
gl
.
u2fAuthenticate
=
u2fAuthenticate
;
case
'
admin
'
:
new
Admin
();
init
Admin
();
switch
(
path
[
1
])
{
case
'
broadcast_messages
'
:
initBroadcastMessagesForm
();
...
...
app/assets/javascripts/main.js
View file @
10f3b70d
/* eslint-disable func-names, space-before-function-paren, no-var, quotes, consistent-return, prefer-arrow-callback, comma-dangle, object-shorthand, no-new, max-len, no-multi-spaces, import/newline-after-import, import/first */
/* global ConfirmDangerModal */
/* global Aside */
import
jQuery
from
'
jquery
'
;
import
_
from
'
underscore
'
;
...
...
@@ -37,7 +36,6 @@ import './behaviors/';
// everything else
import
'
./activities
'
;
import
'
./admin
'
;
import
'
./aside
'
;
import
loadAwardsHandler
from
'
./awards_handler
'
;
import
bp
from
'
./breakpoints
'
;
import
'
./confirm_danger_modal
'
;
...
...
@@ -285,7 +283,6 @@ $(function () {
return
fitSidebarForSize
();
});
loadAwardsHandler
();
new
Aside
();
renderTimeago
();
...
...
app/assets/javascripts/users/user_tabs.js
View file @
10f3b70d
import
Activities
from
'
../activities
'
;
import
ActivityCalendar
from
'
./activity_calendar
'
;
import
{
localTimeAgo
}
from
'
../lib/utils/datetime_utility
'
;
...
...
@@ -170,7 +171,7 @@ export default class UserTabs {
});
// eslint-disable-next-line no-new
new
gl
.
Activities
();
new
Activities
();
this
.
loaded
.
activity
=
true
;
}
...
...
app/assets/stylesheets/framework/mobile.scss
View file @
10f3b70d
...
...
@@ -111,21 +111,4 @@
aside
:not
(
.right-sidebar
)
{
display
:
none
;
}
.show-aside
{
display
:
block
!
important
;
}
}
.show-aside
{
display
:
none
;
position
:
fixed
;
right
:
0
;
top
:
30%
;
padding
:
5px
15px
;
background
:
$show-aside-bg
;
font-size
:
20px
;
color
:
$show-aside-color
;
z-index
:
100
;
box-shadow
:
0
1px
2px
$show-aside-shadow
;
}
app/assets/stylesheets/framework/variables.scss
View file @
10f3b70d
...
...
@@ -246,9 +246,6 @@ $btn-sm-side-margin: 7px;
$btn-xs-side-margin
:
5px
;
$issue-status-expired
:
$orange-500
;
$issuable-sidebar-color
:
$gl-text-color-secondary
;
$show-aside-bg
:
#eee
;
$show-aside-color
:
#777
;
$show-aside-shadow
:
#ddd
;
$group-path-color
:
#999
;
$project-path-color
:
#999
;
$namespace-kind-color
:
#aaa
;
...
...
app/views/shared/_show_aside.html.haml
deleted
100644 → 0
View file @
5feaa733
=
link_to
'#aside'
,
class:
'show-aside'
do
%i
.fa.fa-angle-left
spec/javascripts/activities_spec.js
View file @
10f3b70d
...
...
@@ -2,7 +2,7 @@
import
'
vendor/jquery.endless-scroll
'
;
import
'
~/pager
'
;
import
'
~/activities
'
;
import
Activities
from
'
~/activities
'
;
(()
=>
{
window
.
gon
||
(
window
.
gon
=
{});
...
...
@@ -35,7 +35,7 @@ import '~/activities';
describe
(
'
Activities
'
,
()
=>
{
beforeEach
(()
=>
{
loadFixtures
(
fixtureTemplate
);
new
gl
.
Activities
();
new
Activities
();
});
for
(
let
i
=
0
;
i
<
filters
.
length
;
i
+=
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment