Skip to content
Snippets Groups Projects
Commit 51ae8532 authored by Jacob Schatz's avatar Jacob Schatz
Browse files

adds vue to title bar: wip

parent a7612c8a
No related branches found
No related tags found
No related merge requests found
(function(){
window.onload = function() {
var MR = function(){
var store = {state:{}};
var init = function(data){
store.state = data;
console.log('initting')
var mrHeader = new Vue({
el: '#merge-request-header',
data: {
status: $('.status-box').data('status')
status: store.state.status
},
created: function() {
console.log('created');
Loading
Loading
@@ -15,5 +20,7 @@
};
}
 
})()
\ No newline at end of file
return {
init: init
}
};
\ No newline at end of file
Loading
Loading
@@ -136,3 +136,12 @@
.block-connector {
margin-top: -1px;
}
[v-cloak] {
visibility: hidden;
-webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s; /* Firefox < 16 */
-ms-animation: fadein 2s; /* Internet Explorer */
-o-animation: fadein 2s; /* Opera < 12.1 */
animation: fadein 2s;
}
\ No newline at end of file
Loading
Loading
@@ -200,4 +200,4 @@
 
.mr-source-target {
line-height: 31px;
}
}
\ No newline at end of file
Loading
Loading
@@ -60,4 +60,4 @@
= merge_request.task_status
 
.pull-right.hidden-xs
%span updated #{time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago')}
%span updated #{time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago')}
\ No newline at end of file
Loading
Loading
@@ -93,3 +93,10 @@
merge_request = new MergeRequest({
action: "#{controller.action_name}"
});
:javascript
$(function(){
MR().init({
status: "#{@merge_request.state_human_name}"
});
});
.detail-page-header#merge-request-header
.status-box{ class: status_box_class(@merge_request), data:{status: @merge_request.state_human_name} }
{{ status }}
.detail-page-header#merge-request-header{'v-cloak'=> true, transition: "fade"}
.status-box{ class: status_box_class(@merge_request)}
{{ status }}
%span.identifier
Merge Request ##{@merge_request.iid}
%span.creator
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment