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
7d471af7
Commit
7d471af7
authored
Mar 15, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conflicts in JS
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
839279f0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
318 deletions
+0
-318
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+0
-6
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+0
-4
app/assets/javascripts/boards/filtered_search_boards.js
app/assets/javascripts/boards/filtered_search_boards.js
+0
-10
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+0
-8
app/assets/javascripts/confirm_danger_modal.js
app/assets/javascripts/confirm_danger_modal.js
+0
-30
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+0
-194
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-66
No files found.
app/assets/javascripts/api.js
View file @
7d471af7
...
...
@@ -10,10 +10,7 @@ var Api = {
licensePath
:
"
/api/:version/templates/licenses/:key
"
,
gitignorePath
:
"
/api/:version/templates/gitignores/:key
"
,
gitlabCiYmlPath
:
"
/api/:version/templates/gitlab_ci_ymls/:key
"
,
<<<<<<<
HEAD
ldapGroupsPath
:
"
/api/:version/ldap/:provider/groups.json
"
,
=======
>>>>>>>
ce
/
master
dockerfilePath
:
"
/api/:version/templates/dockerfiles/:key
"
,
issuableTemplatePath
:
"
/:namespace_path/:project_path/templates/:type/:key
"
,
group
:
function
(
group_id
,
callback
)
{
...
...
@@ -146,7 +143,6 @@ var Api = {
url
=
gon
.
relative_url_root
+
url
;
}
return
url
.
replace
(
'
:version
'
,
gon
.
api_version
);
<<<<<<<
HEAD
},
ldap_groups
:
function
(
query
,
provider
,
callback
)
{
var
url
;
...
...
@@ -164,8 +160,6 @@ var Api = {
}).
done
(
function
(
groups
)
{
return
callback
(
groups
);
});
=======
>>>>>>>
ce
/
master
}
};
...
...
app/assets/javascripts/boards/boards_bundle.js
View file @
7d471af7
...
...
@@ -75,11 +75,7 @@ $(() => {
gl
.
boardService
=
new
BoardService
(
this
.
endpoint
,
this
.
bulkUpdatePath
,
this
.
boardId
);
<<<<<<<
HEAD
this
.
filterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
,
[(
this
.
milestoneTitle
?
'
milestone
'
:
null
)]);
=======
this
.
filterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
);
>>>>>>>
ce
/
master
// Listen for updateTokens event
eventHub
.
$on
(
'
updateTokens
'
,
this
.
updateTokens
);
...
...
app/assets/javascripts/boards/filtered_search_boards.js
View file @
7d471af7
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
<<<<<<<
HEAD
constructor
(
store
,
updateUrl
=
false
,
cantEdit
=
[])
{
=======
constructor
(
store
,
updateUrl
=
false
)
{
>>>>>>>
ce
/
master
super
(
'
boards
'
);
this
.
store
=
store
;
...
...
@@ -12,10 +8,7 @@ export default class FilteredSearchBoards extends gl.FilteredSearchManager {
// Issue boards is slightly different, we handle all the requests async
// instead or reloading the page, we just re-fire the list ajax requests
this
.
isHandledAsync
=
true
;
<<<<<<<
HEAD
this
.
cantEdit
=
cantEdit
;
=======
>>>>>>>
ce
/
master
}
updateObject
(
path
)
{
...
...
@@ -39,13 +32,10 @@ export default class FilteredSearchBoards extends gl.FilteredSearchManager {
// Get the placeholder back if search is empty
this
.
filteredSearchInput
.
dispatchEvent
(
new
Event
(
'
input
'
));
}
<<<<<<<
HEAD
canEdit
(
token
)
{
const
tokenName
=
token
.
querySelector
(
'
.name
'
).
textContent
.
trim
();
return
this
.
cantEdit
.
indexOf
(
tokenName
)
===
-
1
;
}
=======
>>>>>>>
ce
/
master
}
app/assets/javascripts/boards/stores/boards_store.js
View file @
7d471af7
...
...
@@ -22,14 +22,11 @@
create
()
{
this
.
state
.
lists
=
[];
this
.
filter
.
path
=
gl
.
utils
.
getUrlParamsArray
().
join
(
'
&
'
);
<<<<<<<
HEAD
},
createNewListDropdownData
()
{
this
.
state
.
currentBoard
=
{};
this
.
state
.
currentPage
=
''
;
this
.
state
.
reload
=
false
;
=======
>>>>>>>
ce
/
master
},
addList
(
listObj
)
{
const
list
=
new
List
(
listObj
);
...
...
@@ -127,17 +124,12 @@
return
list
[
key
]
===
val
&&
byType
;
})[
0
];
},
<<<<<<<
HEAD
updateFiltersUrl
(
replaceState
=
false
)
{
if
(
replaceState
)
{
history
.
replaceState
(
null
,
null
,
`?
${
this
.
filter
.
path
}
`
);
}
else
{
history
.
pushState
(
null
,
null
,
`?
${
this
.
filter
.
path
}
`
);
}
=======
updateFiltersUrl
()
{
history
.
pushState
(
null
,
null
,
`?
${
this
.
filter
.
path
}
`
);
>>>>>>>
ce
/
master
}
};
})();
app/assets/javascripts/confirm_danger_modal.js
View file @
7d471af7
/* eslint-disable func-names, space-before-function-paren, wrap-iife, one-var, no-var, camelcase, one-var-declaration-per-line, no-else-return, max-len */
<<<<<<<
HEAD
window
.
ConfirmDangerModal
=
(
function
()
{
function
ConfirmDangerModal
(
form
,
text
,
arg
)
{
...
...
@@ -31,34 +30,5 @@ window.ConfirmDangerModal = (function() {
})(
this
));
}
=======
window
.
ConfirmDangerModal
=
(
function
()
{
function
ConfirmDangerModal
(
form
,
text
)
{
var
project_path
,
submit
;
this
.
form
=
form
;
$
(
'
.js-confirm-text
'
).
text
(
text
||
''
);
$
(
'
.js-confirm-danger-input
'
).
val
(
''
);
$
(
'
#modal-confirm-danger
'
).
modal
(
'
show
'
);
project_path
=
$
(
'
.js-confirm-danger-match
'
).
text
();
submit
=
$
(
'
.js-confirm-danger-submit
'
);
submit
.
disable
();
$
(
'
.js-confirm-danger-input
'
).
off
(
'
input
'
);
$
(
'
.js-confirm-danger-input
'
).
on
(
'
input
'
,
function
()
{
if
(
gl
.
utils
.
rstrip
(
$
(
this
).
val
())
===
project_path
)
{
return
submit
.
enable
();
}
else
{
return
submit
.
disable
();
}
});
$
(
'
.js-confirm-danger-submit
'
).
off
(
'
click
'
);
$
(
'
.js-confirm-danger-submit
'
).
on
(
'
click
'
,
(
function
(
_this
)
{
return
function
()
{
return
_this
.
form
.
submit
();
};
})(
this
));
}
>>>>>>>
ce
/
master
return
ConfirmDangerModal
;
})();
app/assets/javascripts/gl_dropdown.js
View file @
7d471af7
...
...
@@ -274,7 +274,6 @@ GitLabDropdown = (function() {
selector
=
'
.dropdown-content li:not(
'
+
NON_SELECTABLE_CLASSES
+
'
)
'
;
if
(
_this
.
dropdown
.
find
(
'
.dropdown-toggle-page
'
).
length
)
{
selector
=
"
.dropdown-page-one
"
+
selector
;
<<<<<<<
HEAD
}
return
$
(
selector
);
};
...
...
@@ -299,32 +298,6 @@ GitLabDropdown = (function() {
currentIndex
=
0
;
}
}
=======
}
return
$
(
selector
);
};
})(
this
),
data
:
(
function
(
_this
)
{
return
function
()
{
return
_this
.
fullData
;
};
})(
this
),
callback
:
(
function
(
_this
)
{
return
function
(
data
)
{
_this
.
parseData
(
data
);
if
(
_this
.
filterInput
.
val
()
!==
''
)
{
selector
=
SELECTABLE_CLASSES
;
if
(
_this
.
dropdown
.
find
(
'
.dropdown-toggle-page
'
).
length
)
{
selector
=
"
.dropdown-page-one
"
+
selector
;
}
if
(
$
(
_this
.
el
).
is
(
'
input
'
))
{
currentIndex
=
-
1
;
}
else
{
$
(
selector
,
_this
.
dropdown
).
first
().
find
(
'
a
'
).
addClass
(
'
is-focused
'
);
currentIndex
=
0
;
}
}
>>>>>>>
ce
/
master
};
})(
this
)
});
...
...
@@ -481,54 +454,6 @@ GitLabDropdown = (function() {
}
else
{
this
.
focusTextInput
();
}
<<<<<<<
HEAD
if
(
this
.
options
.
showMenuAbove
)
{
this
.
positionMenuAbove
();
}
if
(
this
.
options
.
opened
)
{
this
.
options
.
opened
.
call
(
this
,
e
);
}
return
this
.
dropdown
.
trigger
(
'
shown.gl.dropdown
'
);
};
GitLabDropdown
.
prototype
.
positionMenuAbove
=
function
()
{
var
$button
=
$
(
this
.
el
);
var
$menu
=
this
.
dropdown
.
find
(
'
.dropdown-menu
'
);
$menu
.
css
(
'
top
'
,
(
$button
.
height
()
+
$menu
.
height
())
*
-
1
);
};
GitLabDropdown
.
prototype
.
hidden
=
function
(
e
)
{
var
$input
;
this
.
resetRows
();
this
.
removeArrayKeyEvent
();
$input
=
this
.
dropdown
.
find
(
"
.dropdown-input-field
"
);
if
(
this
.
options
.
filterable
)
{
$input
.
blur
();
}
if
(
this
.
dropdown
.
find
(
"
.dropdown-toggle-page
"
).
length
)
{
$
(
'
.dropdown-menu
'
,
this
.
dropdown
).
removeClass
(
PAGE_TWO_CLASS
);
}
if
(
this
.
options
.
hidden
)
{
this
.
options
.
hidden
.
call
(
this
,
e
);
}
return
this
.
dropdown
.
trigger
(
'
hidden.gl.dropdown
'
);
};
// Render the full menu
GitLabDropdown
.
prototype
.
renderMenu
=
function
(
html
)
{
if
(
this
.
options
.
renderMenu
)
{
return
this
.
options
.
renderMenu
(
html
);
}
else
{
var
ul
=
document
.
createElement
(
'
ul
'
);
for
(
var
i
=
0
;
i
<
html
.
length
;
i
+=
1
)
{
var
el
=
html
[
i
];
=======
if
(
this
.
options
.
showMenuAbove
)
{
this
.
positionMenuAbove
();
...
...
@@ -575,7 +500,6 @@ GitLabDropdown = (function() {
for
(
var
i
=
0
;
i
<
html
.
length
;
i
+=
1
)
{
var
el
=
html
[
i
];
>>>>>>>
ce
/
master
if
(
el
instanceof
jQuery
)
{
el
=
el
.
get
(
0
);
}
...
...
@@ -590,7 +514,6 @@ GitLabDropdown = (function() {
return
ul
;
}
};
<<<<<<<
HEAD
// Append the menu into the dropdown
GitLabDropdown
.
prototype
.
appendMenu
=
function
(
html
)
{
...
...
@@ -656,87 +579,6 @@ GitLabDropdown = (function() {
if
(
field
.
length
)
{
selected
=
true
;
}
=======
// Append the menu into the dropdown
GitLabDropdown
.
prototype
.
appendMenu
=
function
(
html
)
{
return
this
.
clearMenu
().
append
(
html
);
};
GitLabDropdown
.
prototype
.
clearMenu
=
function
()
{
var
selector
;
selector
=
'
.dropdown-content
'
;
if
(
this
.
dropdown
.
find
(
"
.dropdown-toggle-page
"
).
length
)
{
selector
=
"
.dropdown-page-one .dropdown-content
"
;
}
return
$
(
selector
,
this
.
dropdown
).
empty
();
};
GitLabDropdown
.
prototype
.
renderItem
=
function
(
data
,
group
,
index
)
{
var
field
,
fieldName
,
html
,
selected
,
text
,
url
,
value
;
if
(
group
==
null
)
{
group
=
false
;
}
if
(
index
==
null
)
{
// Render the row
index
=
false
;
}
html
=
document
.
createElement
(
'
li
'
);
if
(
data
===
'
divider
'
||
data
===
'
separator
'
)
{
html
.
className
=
data
;
return
html
;
}
// Header
if
(
data
.
header
!=
null
)
{
html
.
className
=
'
dropdown-header
'
;
html
.
innerHTML
=
data
.
header
;
return
html
;
}
if
(
this
.
options
.
renderRow
)
{
// Call the render function
html
=
this
.
options
.
renderRow
.
call
(
this
.
options
,
data
,
this
);
}
else
{
if
(
!
selected
)
{
value
=
this
.
options
.
id
?
this
.
options
.
id
(
data
)
:
data
.
id
;
fieldName
=
this
.
options
.
fieldName
;
if
(
value
)
{
value
=
value
.
toString
().
replace
(
/'/g
,
'
\\\'
'
);
}
field
=
this
.
dropdown
.
parent
().
find
(
"
input[name='
"
+
fieldName
+
"
'][value='
"
+
value
+
"
']
"
);
if
(
field
.
length
)
{
selected
=
true
;
}
}
// Set URL
if
(
this
.
options
.
url
!=
null
)
{
url
=
this
.
options
.
url
(
data
);
}
else
{
url
=
data
.
url
!=
null
?
data
.
url
:
'
#
'
;
}
// Set Text
if
(
this
.
options
.
text
!=
null
)
{
text
=
this
.
options
.
text
(
data
);
}
else
{
text
=
data
.
text
!=
null
?
data
.
text
:
''
;
}
if
(
this
.
highlight
)
{
text
=
this
.
highlightTextMatches
(
text
,
this
.
filterInput
.
val
());
}
// Create the list item & the link
var
link
=
document
.
createElement
(
'
a
'
);
link
.
href
=
url
;
link
.
innerHTML
=
text
;
if
(
selected
)
{
link
.
className
=
'
is-active
'
;
}
if
(
group
)
{
link
.
dataset
.
group
=
group
;
link
.
dataset
.
index
=
index
;
>>>>>>>
ce
/
master
}
// Set URL
if
(
this
.
options
.
url
!=
null
)
{
...
...
@@ -756,32 +598,15 @@ GitLabDropdown = (function() {
// Create the list item & the link
var
link
=
document
.
createElement
(
'
a
'
);
<<<<<<<
HEAD
link
.
href
=
url
;
link
.
innerHTML
=
text
;
if
(
selected
)
{
link
.
className
=
'
is-active
'
;
=======
html
.
appendChild
(
link
);
}
return
html
;
};
GitLabDropdown
.
prototype
.
highlightTextMatches
=
function
(
text
,
term
)
{
var
occurrences
;
occurrences
=
fuzzaldrinPlus
.
match
(
text
,
term
);
return
text
.
split
(
''
).
map
(
function
(
character
,
i
)
{
if
(
indexOf
.
call
(
occurrences
,
i
)
!==
-
1
)
{
return
"
<b>
"
+
character
+
"
</b>
"
;
}
else
{
return
character
;
>>>>>>>
ce
/
master
}
}).
join
(
''
);
};
<<<<<<<
HEAD
if
(
group
)
{
link
.
dataset
.
group
=
group
;
link
.
dataset
.
index
=
index
;
...
...
@@ -812,16 +637,6 @@ GitLabDropdown = (function() {
GitLabDropdown
.
prototype
.
rowClicked
=
function
(
el
)
{
var
field
,
fieldName
,
groupName
,
isInput
,
selectedIndex
,
selectedObject
,
value
,
isMarking
;
=======
GitLabDropdown
.
prototype
.
noResults
=
function
()
{
var
html
;
return
html
=
"
<li class='dropdown-menu-empty-link'> <a href='#' class='is-focused'> No matching results. </a> </li>
"
;
};
GitLabDropdown
.
prototype
.
rowClicked
=
function
(
el
)
{
var
field
,
fieldName
,
groupName
,
isInput
,
selectedIndex
,
selectedObject
,
value
,
isMarking
;
>>>>>>>
ce
/
master
fieldName
=
this
.
options
.
fieldName
;
isInput
=
$
(
this
.
el
).
is
(
'
input
'
);
if
(
this
.
renderedData
)
{
...
...
@@ -1032,21 +847,12 @@ GitLabDropdown = (function() {
instance
=
null
;
}
return
$
(
this
.
el
).
find
(
"
.dropdown-toggle-text
"
).
text
(
this
.
options
.
toggleLabel
(
selected
,
el
,
instance
));
<<<<<<<
HEAD
};
GitLabDropdown
.
prototype
.
clearField
=
function
(
field
,
isInput
)
{
return
isInput
?
field
.
val
(
''
)
:
field
.
remove
();
};
=======
};
GitLabDropdown
.
prototype
.
clearField
=
function
(
field
,
isInput
)
{
return
isInput
?
field
.
val
(
''
)
:
field
.
remove
();
};
>>>>>>>
ce
/
master
return
GitLabDropdown
;
})();
...
...
app/assets/javascripts/main.js
View file @
7d471af7
...
...
@@ -198,7 +198,6 @@ import './visibility_select';
import
'
./wikis
'
;
import
'
./zen_mode
'
;
<<<<<<<
HEAD
// EE-only scripts
require
(
'
./admin_email_select
'
);
require
(
'
./application_settings
'
);
...
...
@@ -207,8 +206,6 @@ require('./ldap_groups_select');
require
(
'
./path_locks
'
);
require
(
'
./weight_select
'
);
=======
>>>>>>>
ce
/
master
document
.
addEventListener
(
'
beforeunload
'
,
function
()
{
// Unbind scroll events
$
(
document
).
off
(
'
scroll
'
);
...
...
@@ -298,7 +295,6 @@ $(function () {
if
(
$flash
.
length
>
0
)
{
$flash
.
click
(
function
()
{
return
$
(
this
).
fadeOut
();
<<<<<<<
HEAD
});
$flash
.
show
();
}
...
...
@@ -362,68 +358,6 @@ $(function () {
return
new
ConfirmDangerModal
(
form
,
text
,
{
warningMessage
:
warningMessage
});
=======
});
$flash
.
show
();
}
// Disable form buttons while a form is submitting
$body
.
on
(
'
ajax:complete, ajax:beforeSend, submit
'
,
'
form
'
,
function
(
e
)
{
var
buttons
;
buttons
=
$
(
'
[type="submit"]
'
,
this
);
switch
(
e
.
type
)
{
case
'
ajax:beforeSend
'
:
case
'
submit
'
:
return
buttons
.
disable
();
default
:
return
buttons
.
enable
();
}
});
$
(
document
).
ajaxError
(
function
(
e
,
xhrObj
)
{
var
ref
=
xhrObj
.
status
;
if
(
xhrObj
.
status
===
401
)
{
return
new
Flash
(
'
You need to be logged in.
'
,
'
alert
'
);
}
else
if
(
ref
===
404
||
ref
===
500
)
{
return
new
Flash
(
'
Something went wrong on our end.
'
,
'
alert
'
);
}
});
$
(
'
.account-box
'
).
hover
(
function
()
{
// Show/Hide the profile menu when hovering the account box
return
$
(
this
).
toggleClass
(
'
hover
'
);
});
$document
.
on
(
'
click
'
,
'
.diff-content .js-show-suppressed-diff
'
,
function
()
{
var
$container
;
$container
=
$
(
this
).
parent
();
$container
.
next
(
'
table
'
).
show
();
return
$container
.
remove
();
// Commit show suppressed diff
});
$
(
'
.navbar-toggle
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.header-content .title
'
).
toggle
();
$
(
'
.header-content .header-logo
'
).
toggle
();
$
(
'
.header-content .navbar-collapse
'
).
toggle
();
return
$
(
'
.navbar-toggle
'
).
toggleClass
(
'
active
'
);
});
// Show/hide comments on diff
$body
.
on
(
'
click
'
,
'
.js-toggle-diff-comments
'
,
function
(
e
)
{
var
$this
=
$
(
this
);
var
notesHolders
=
$this
.
closest
(
'
.diff-file
'
).
find
(
'
.notes_holder
'
);
$this
.
toggleClass
(
'
active
'
);
if
(
$this
.
hasClass
(
'
active
'
))
{
notesHolders
.
show
().
find
(
'
.hide, .content
'
).
show
();
}
else
{
notesHolders
.
hide
().
find
(
'
.content
'
).
hide
();
}
$
(
document
).
trigger
(
'
toggle.comments
'
);
return
e
.
preventDefault
();
});
$document
.
off
(
'
click
'
,
'
.js-confirm-danger
'
);
$document
.
on
(
'
click
'
,
'
.js-confirm-danger
'
,
function
(
e
)
{
var
btn
=
$
(
e
.
target
);
var
form
=
btn
.
closest
(
'
form
'
);
var
text
=
btn
.
data
(
'
confirm-danger-message
'
);
e
.
preventDefault
();
return
new
ConfirmDangerModal
(
form
,
text
);
>>>>>>>
ce
/
master
});
$
(
'
input[type="search"]
'
).
each
(
function
()
{
var
$this
=
$
(
this
);
...
...
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