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
4d1bc2c3
Commit
4d1bc2c3
authored
Dec 13, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup widget and approvals store.
parent
735067df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
app/assets/javascripts/merge_request_widget/approvals/stores/approvals_store.js.es6
...ge_request_widget/approvals/stores/approvals_store.js.es6
+3
-4
app/assets/javascripts/merge_request_widget/widget_bundle.js.es6
...ets/javascripts/merge_request_widget/widget_bundle.js.es6
+1
-1
app/assets/javascripts/merge_request_widget/widget_store.js.es6
...sets/javascripts/merge_request_widget/widget_store.js.es6
+2
-2
No files found.
app/assets/javascripts/merge_request_widget/approvals/stores/approvals_store.js.es6
View file @
4d1bc2c3
...
@@ -23,21 +23,20 @@
...
@@ -23,21 +23,20 @@
fetch() {
fetch() {
return this.api.fetchApprovals()
return this.api.fetchApprovals()
.then(
(res)
=> this.assignToRootStore(res.data));
.then(
res
=> this.assignToRootStore(res.data));
}
}
approve() {
approve() {
return this.api.approveMergeRequest()
return this.api.approveMergeRequest()
.then(
(data) => this.rootStore.assignToData(
data));
.then(
res => this.rootStore.assignToData(res.
data));
}
}
unapprove() {
unapprove() {
return this.api.unapproveMergeRequest()
return this.api.unapproveMergeRequest()
.then(
(data) => this.rootStore.assignToData(
data));
.then(
res => this.rootStore.assignToData(res.
data));
}
}
}
}
gl.ApprovalsStore = ApprovalsStore;
gl.ApprovalsStore = ApprovalsStore;
})();
})();
app/assets/javascripts/merge_request_widget/widget_bundle.js.es6
View file @
4d1bc2c3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
$(() => {
$(() => {
const rootEl = document.getElementById('merge-request-widget-app');
const rootEl = document.getElementById('merge-request-widget-app');
const widgetSharedStore = new gl.MergeRequestWidgetStore(rootEl);
// TODO: encapsulate better
const widgetSharedStore = new gl.MergeRequestWidgetStore(rootEl);
gl.MergeRequestWidgetApp = new Vue({
gl.MergeRequestWidgetApp = new Vue({
el: rootEl,
el: rootEl,
...
...
app/assets/javascripts/merge_request_widget/widget_store.js.es6
View file @
4d1bc2c3
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
}
}
initApprovals() {
initApprovals() {
const a
pprovalsStore = new gl.ApprovalsStore(this);
gl.A
pprovalsStore = new gl.ApprovalsStore(this);
this.assignToData('approvals',
approvalsStore.data
);
this.assignToData('approvals',
this.dataset.approvals
);
}
}
assignToData(key, val) {
assignToData(key, val) {
...
...
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