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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7e3405d7
Commit
7e3405d7
authored
Jan 08, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix last eslint rules
parent
349d0668
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
169 additions
and
156 deletions
+169
-156
.eslintrc
.eslintrc
+2
-1
app/assets/javascripts/commit/image_file.js
app/assets/javascripts/commit/image_file.js
+98
-96
app/assets/javascripts/groups/components/item_actions.vue
app/assets/javascripts/groups/components/item_actions.vue
+45
-45
app/assets/javascripts/notebook/cells/output/index.vue
app/assets/javascripts/notebook/cells/output/index.vue
+13
-12
app/assets/javascripts/notes/components/comment_form.vue
app/assets/javascripts/notes/components/comment_form.vue
+2
-1
app/assets/javascripts/vue_shared/components/modal.vue
app/assets/javascripts/vue_shared/components/modal.vue
+1
-1
app/assets/javascripts/vue_shared/components/pikaday.vue
app/assets/javascripts/vue_shared/components/pikaday.vue
+3
-0
app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue
...ared/components/sidebar/collapsed_grouped_date_picker.vue
+2
-0
app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue
...javascripts/vue_shared/components/sidebar/date_picker.vue
+3
-0
No files found.
.eslintrc
View file @
7e3405d7
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
"localStorage": false
"localStorage": false
},
},
"parserOptions": {
"parserOptions": {
"parser": "babel-eslint"
"parser": "babel-eslint",
"ecmaVersion": 2017
},
},
"plugins": [
"plugins": [
"filenames",
"filenames",
...
...
app/assets/javascripts/commit/image_file.js
View file @
7e3405d7
...
@@ -94,102 +94,104 @@ export default class ImageFile {
...
@@ -94,102 +94,104 @@ export default class ImageFile {
});
});
return
[
maxWidth
,
maxHeight
];
return
[
maxWidth
,
maxHeight
];
}
}
// eslint-disable-next-line class-methods-use-this
views
=
{
views
()
{
'
two-up
'
:
function
()
{
return
{
return
$
(
'
.two-up.view .wrap
'
,
this
.
file
).
each
((
function
(
_this
)
{
'
two-up
'
:
function
()
{
return
function
(
index
,
wrap
)
{
return
$
(
'
.two-up.view .wrap
'
,
this
.
file
).
each
((
function
(
_this
)
{
$
(
'
img
'
,
wrap
).
each
(
function
()
{
return
function
(
index
,
wrap
)
{
var
currentWidth
;
$
(
'
img
'
,
wrap
).
each
(
function
()
{
currentWidth
=
$
(
this
).
width
();
var
currentWidth
;
if
(
currentWidth
>
availWidth
/
2
)
{
currentWidth
=
$
(
this
).
width
();
return
$
(
this
).
width
(
availWidth
/
2
);
if
(
currentWidth
>
availWidth
/
2
)
{
}
return
$
(
this
).
width
(
availWidth
/
2
);
});
}
return
_this
.
requestImageInfo
(
$
(
'
img
'
,
wrap
),
function
(
width
,
height
)
{
});
$
(
'
.image-info .meta-width
'
,
wrap
).
text
(
width
+
"
px
"
);
return
_this
.
requestImageInfo
(
$
(
'
img
'
,
wrap
),
function
(
width
,
height
)
{
$
(
'
.image-info .meta-height
'
,
wrap
).
text
(
height
+
"
px
"
);
$
(
'
.image-info .meta-width
'
,
wrap
).
text
(
width
+
"
px
"
);
return
$
(
'
.image-info
'
,
wrap
).
removeClass
(
'
hide
'
);
$
(
'
.image-info .meta-height
'
,
wrap
).
text
(
height
+
"
px
"
);
});
return
$
(
'
.image-info
'
,
wrap
).
removeClass
(
'
hide
'
);
};
});
})(
this
));
};
},
})(
this
));
'
swipe
'
:
function
()
{
},
var
maxHeight
,
maxWidth
;
'
swipe
'
:
function
()
{
maxWidth
=
0
;
var
maxHeight
,
maxWidth
;
maxHeight
=
0
;
maxWidth
=
0
;
return
$
(
'
.swipe.view
'
,
this
.
file
).
each
((
function
(
_this
)
{
maxHeight
=
0
;
return
function
(
index
,
view
)
{
return
$
(
'
.swipe.view
'
,
this
.
file
).
each
((
function
(
_this
)
{
var
$swipeWrap
,
$swipeBar
,
$swipeFrame
,
wrapPadding
,
ref
;
return
function
(
index
,
view
)
{
ref
=
_this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
var
$swipeWrap
,
$swipeBar
,
$swipeFrame
,
wrapPadding
,
ref
;
$swipeFrame
=
$
(
'
.swipe-frame
'
,
view
);
ref
=
_this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
$swipeWrap
=
$
(
'
.swipe-wrap
'
,
view
);
$swipeFrame
=
$
(
'
.swipe-frame
'
,
view
);
$swipeBar
=
$
(
'
.swipe-bar
'
,
view
);
$swipeWrap
=
$
(
'
.swipe-wrap
'
,
view
);
$swipeBar
=
$
(
'
.swipe-bar
'
,
view
);
$swipeFrame
.
css
({
width
:
maxWidth
+
16
,
$swipeFrame
.
css
({
height
:
maxHeight
+
28
width
:
maxWidth
+
16
,
});
height
:
maxHeight
+
28
$swipeWrap
.
css
({
});
width
:
maxWidth
+
1
,
$swipeWrap
.
css
({
height
:
maxHeight
+
2
width
:
maxWidth
+
1
,
});
height
:
maxHeight
+
2
// Set swipeBar left position to match image frame
});
$swipeBar
.
css
({
// Set swipeBar left position to match image frame
left
:
1
$swipeBar
.
css
({
});
left
:
1
});
wrapPadding
=
parseInt
(
$swipeWrap
.
css
(
'
right
'
).
replace
(
'
px
'
,
''
),
10
);
wrapPadding
=
parseInt
(
$swipeWrap
.
css
(
'
right
'
).
replace
(
'
px
'
,
''
),
10
);
_this
.
initDraggable
(
$swipeBar
,
wrapPadding
,
function
(
e
,
left
)
{
if
(
left
>
0
&&
left
<
$swipeFrame
.
width
()
-
(
wrapPadding
*
2
))
{
_this
.
initDraggable
(
$swipeBar
,
wrapPadding
,
function
(
e
,
left
)
{
$swipeWrap
.
width
((
maxWidth
+
1
)
-
left
);
if
(
left
>
0
&&
left
<
$swipeFrame
.
width
()
-
(
wrapPadding
*
2
))
{
$swipeBar
.
css
(
'
left
'
,
left
);
$swipeWrap
.
width
((
maxWidth
+
1
)
-
left
);
}
$swipeBar
.
css
(
'
left
'
,
left
);
});
}
};
});
})(
this
));
};
},
})(
this
));
'
onion-skin
'
:
function
()
{
},
var
dragTrackWidth
,
maxHeight
,
maxWidth
;
'
onion-skin
'
:
function
()
{
maxWidth
=
0
;
var
dragTrackWidth
,
maxHeight
,
maxWidth
;
maxHeight
=
0
;
maxWidth
=
0
;
dragTrackWidth
=
$
(
'
.drag-track
'
,
this
.
file
).
width
()
-
$
(
'
.dragger
'
,
this
.
file
).
width
();
maxHeight
=
0
;
return
$
(
'
.onion-skin.view
'
,
this
.
file
).
each
((
function
(
_this
)
{
dragTrackWidth
=
$
(
'
.drag-track
'
,
this
.
file
).
width
()
-
$
(
'
.dragger
'
,
this
.
file
).
width
();
return
function
(
index
,
view
)
{
return
$
(
'
.onion-skin.view
'
,
this
.
file
).
each
((
function
(
_this
)
{
var
$frame
,
$track
,
$dragger
,
$frameAdded
,
framePadding
,
ref
,
dragging
=
false
;
return
function
(
index
,
view
)
{
ref
=
_this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
var
$frame
,
$track
,
$dragger
,
$frameAdded
,
framePadding
,
ref
,
dragging
=
false
;
$frame
=
$
(
'
.onion-skin-frame
'
,
view
);
ref
=
_this
.
prepareFrames
(
view
),
maxWidth
=
ref
[
0
],
maxHeight
=
ref
[
1
];
$frameAdded
=
$
(
'
.frame.added
'
,
view
);
$frame
=
$
(
'
.onion-skin-frame
'
,
view
);
$track
=
$
(
'
.drag-track
'
,
view
);
$frameAdded
=
$
(
'
.frame.added
'
,
view
);
$dragger
=
$
(
'
.dragger
'
,
$track
);
$track
=
$
(
'
.drag-track
'
,
view
);
$dragger
=
$
(
'
.dragger
'
,
$track
);
$frame
.
css
({
width
:
maxWidth
+
16
,
$frame
.
css
({
height
:
maxHeight
+
28
width
:
maxWidth
+
16
,
});
height
:
maxHeight
+
28
$
(
'
.swipe-wrap
'
,
view
).
css
({
});
width
:
maxWidth
+
1
,
$
(
'
.swipe-wrap
'
,
view
).
css
({
height
:
maxHeight
+
2
width
:
maxWidth
+
1
,
});
height
:
maxHeight
+
2
$dragger
.
css
({
});
left
:
dragTrackWidth
$dragger
.
css
({
});
left
:
dragTrackWidth
});
$frameAdded
.
css
(
'
opacity
'
,
1
);
framePadding
=
parseInt
(
$frameAdded
.
css
(
'
right
'
).
replace
(
'
px
'
,
''
),
10
);
$frameAdded
.
css
(
'
opacity
'
,
1
);
framePadding
=
parseInt
(
$frameAdded
.
css
(
'
right
'
).
replace
(
'
px
'
,
''
),
10
);
_this
.
initDraggable
(
$dragger
,
framePadding
,
function
(
e
,
left
)
{
var
opacity
=
left
/
dragTrackWidth
;
_this
.
initDraggable
(
$dragger
,
framePadding
,
function
(
e
,
left
)
{
var
opacity
=
left
/
dragTrackWidth
;
if
(
opacity
>=
0
&&
opacity
<=
1
)
{
$dragger
.
css
(
'
left
'
,
left
);
if
(
opacity
>=
0
&&
opacity
<=
1
)
{
$frameAdded
.
css
(
'
opacity
'
,
opacity
);
$dragger
.
css
(
'
left
'
,
left
);
}
$frameAdded
.
css
(
'
opacity
'
,
opacity
);
});
}
};
});
})(
this
));
};
}
})(
this
));
}
};
}
}
requestImageInfo
(
img
,
callback
)
{
requestImageInfo
(
img
,
callback
)
{
...
...
app/assets/javascripts/groups/components/item_actions.vue
View file @
7e3405d7
<
script
>
<
script
>
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
modal
from
'
~/vue_shared/components/modal.vue
'
;
import
modal
from
'
~/vue_shared/components/modal.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
COMMON_STR
}
from
'
../constants
'
;
import
{
COMMON_STR
}
from
'
../constants
'
;
export
default
{
export
default
{
components
:
{
components
:
{
icon
,
icon
,
modal
,
modal
,
},
directives
:
{
tooltip
,
},
props
:
{
parentGroup
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
({}),
},
},
group
:
{
directives
:
{
type
:
Object
,
tooltip
,
required
:
true
,
},
},
},
props
:
{
data
()
{
parentGroup
:
{
return
{
type
:
Object
,
modalStatus
:
false
,
required
:
false
,
};
default
:
()
=>
({}),
},
},
computed
:
{
group
:
{
leaveBtnTitle
()
{
type
:
Object
,
return
COMMON_STR
.
LEAVE_BTN_TITLE
;
required
:
true
,
},
},
},
editBtnTitle
()
{
data
()
{
return
COMMON_STR
.
EDIT_BTN_TITLE
;
return
{
modalStatus
:
false
,
};
},
},
leaveConfirmationMessage
()
{
computed
:
{
return
s__
(
`GroupsTree|Are you sure you want to leave the "
${
this
.
group
.
fullName
}
" group?`
);
leaveBtnTitle
()
{
return
COMMON_STR
.
LEAVE_BTN_TITLE
;
},
editBtnTitle
()
{
return
COMMON_STR
.
EDIT_BTN_TITLE
;
},
leaveConfirmationMessage
()
{
return
s__
(
`GroupsTree|Are you sure you want to leave the "
${
this
.
group
.
fullName
}
" group?`
);
},
},
},
},
methods
:
{
methods
:
{
onLeaveGroup
()
{
onLeaveGroup
()
{
this
.
modalStatus
=
true
;
this
.
modalStatus
=
true
;
},
leaveGroup
()
{
this
.
modalStatus
=
false
;
eventHub
.
$emit
(
'
leaveGroup
'
,
this
.
group
,
this
.
parentGroup
);
},
},
},
leaveGroup
()
{
};
this
.
modalStatus
=
false
;
eventHub
.
$emit
(
'
leaveGroup
'
,
this
.
group
,
this
.
parentGroup
);
},
},
};
</
script
>
</
script
>
<
template
>
<
template
>
...
...
app/assets/javascripts/notebook/cells/output/index.vue
View file @
7e3405d7
...
@@ -26,30 +26,18 @@
...
@@ -26,30 +26,18 @@
default
:
()
=>
({}),
default
:
()
=>
({}),
},
},
},
},
data
()
{
return
{
outputType
:
''
,
};
},
computed
:
{
computed
:
{
componentName
()
{
componentName
()
{
if
(
this
.
output
.
text
)
{
if
(
this
.
output
.
text
)
{
return
'
code-cell
'
;
return
'
code-cell
'
;
}
else
if
(
this
.
output
.
data
[
'
image/png
'
])
{
}
else
if
(
this
.
output
.
data
[
'
image/png
'
])
{
this
.
outputType
=
'
image/png
'
;
return
'
image-output
'
;
return
'
image-output
'
;
}
else
if
(
this
.
output
.
data
[
'
text/html
'
])
{
}
else
if
(
this
.
output
.
data
[
'
text/html
'
])
{
this
.
outputType
=
'
text/html
'
;
return
'
html-output
'
;
return
'
html-output
'
;
}
else
if
(
this
.
output
.
data
[
'
image/svg+xml
'
])
{
}
else
if
(
this
.
output
.
data
[
'
image/svg+xml
'
])
{
this
.
outputType
=
'
image/svg+xml
'
;
return
'
html-output
'
;
return
'
html-output
'
;
}
}
this
.
outputType
=
'
text/plain
'
;
return
'
code-cell
'
;
return
'
code-cell
'
;
},
},
rawCode
()
{
rawCode
()
{
...
@@ -59,6 +47,19 @@
...
@@ -59,6 +47,19 @@
return
this
.
dataForType
(
this
.
outputType
);
return
this
.
dataForType
(
this
.
outputType
);
},
},
outputType
()
{
if
(
this
.
output
.
text
)
{
return
''
;
}
else
if
(
this
.
output
.
data
[
'
image/png
'
])
{
return
'
image/png
'
;
}
else
if
(
this
.
output
.
data
[
'
text/html
'
])
{
return
'
text/html
'
;
}
else
if
(
this
.
output
.
data
[
'
image/svg+xml
'
])
{
return
'
image/svg+xml
'
;
}
return
'
text/plain
'
;
},
},
},
methods
:
{
methods
:
{
dataForType
(
type
)
{
dataForType
(
type
)
{
...
...
app/assets/javascripts/notes/components/comment_form.vue
View file @
7e3405d7
...
@@ -305,7 +305,8 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
...
@@ -305,7 +305,8 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
</textarea>
</textarea>
</markdown-field>
</markdown-field>
<div
class=
"note-form-actions"
>
<div
class=
"note-form-actions"
>
<div
class=
"pull-left btn-group
<div
class=
"pull-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
<button
<button
@
click.prevent=
"handleSave()"
@
click.prevent=
"handleSave()"
...
...
app/assets/javascripts/vue_shared/components/modal.vue
View file @
7e3405d7
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
name=
"body"
name=
"body"
:text=
"text"
:text=
"text"
>
>
<p>
{{
t
his
.
t
ext
}}
</p>
<p>
{{
text
}}
</p>
</slot>
</slot>
</div>
</div>
<div
<div
...
...
app/assets/javascripts/vue_shared/components/pikaday.vue
View file @
7e3405d7
...
@@ -13,14 +13,17 @@
...
@@ -13,14 +13,17 @@
selectedDate
:
{
selectedDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
minDate
:
{
minDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
maxDate
:
{
maxDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
},
},
mounted
()
{
mounted
()
{
...
...
app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue
View file @
7e3405d7
...
@@ -23,10 +23,12 @@
...
@@ -23,10 +23,12 @@
minDate
:
{
minDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
maxDate
:
{
maxDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
disableClickableIcons
:
{
disableClickableIcons
:
{
type
:
Boolean
,
type
:
Boolean
,
...
...
app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue
View file @
7e3405d7
...
@@ -42,14 +42,17 @@
...
@@ -42,14 +42,17 @@
selectedDate
:
{
selectedDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
minDate
:
{
minDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
maxDate
:
{
maxDate
:
{
type
:
Date
,
type
:
Date
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
},
},
data
()
{
data
()
{
...
...
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