Last active
April 2, 2016 10:06
-
-
Save rozanovz/acace449b0f9f852c8cf8dff35ffb4c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (ui.item.sortable.dropindex !== undefined) { | |
| let positions = []; | |
| ui.item.sortable.sourceModel.forEach((metric, index) => { | |
| positions.push({cardMetricRelationId: metric.relationId, position: index + 1}); | |
| }); | |
| this.cardBuilder.loading = true; | |
| return this.card.metrics.updatePositions(positions).then(() => { | |
| this.cardBuilder.refresh(); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| updatePositions(positions) { | |
| return this.DataProvider.post('card/updateMetricsPosition/' + this.card.id, {positions: positions}, false); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment