Commit b185941b authored by Gabriel Mazetto's avatar Gabriel Mazetto

More codestyle changes for haml and ES6

parent aa074632
......@@ -45,6 +45,7 @@
/*= require shortcuts_network */
/*= require jquery.nicescroll */
/*= require date.format */
/*= require geo/geo_bundle */
/*= require_directory ./behaviors */
/*= require_directory ./blob */
/*= require_directory ./templates */
......
//= require vue
/* global modal Vue */
(() => {
Vue.component('geo-clone-dialog', {
name: 'geo-clone-dialog',
window.gl = window.gl || {};
window.gl.geo = window.gl.geo || {};
window.gl.geo.CloneDialog = Vue.extend({
props: ['title', 'id'],
data() {
return this.$parent.$data;
......@@ -33,14 +34,4 @@
</div>
`,
});
$(document).ready(() => {
const geoClone = document.getElementById('geo-clone');
if (geoClone) {
gl.GeoCloneDialog = new Vue({
el: geoClone,
data: Object.assign({}, geoClone.dataset),
});
}
});
})(window.gl || (window.gl = {}));
})();
/* global modal Vue */
//= require vue
//= require ./components/geo_clone_dialog
$(document).ready(() => {
window.gl = window.gl || {};
const $geoClone = document.getElementById('geo-clone');
if ($geoClone) {
gl.GeoClone = new Vue({
el: $geoClone,
components: {
'geo-clone-dialog': gl.geo.CloneDialog,
},
data: Object.assign({}, $geoClone.dataset),
});
}
});
......@@ -38,9 +38,9 @@
e.preventDefault();
var $this = $(this);
if (gl.GeoCloneDialog) {
gl.GeoCloneDialog.cloneUrlSecondary = $this.attr('href');
gl.GeoCloneDialog.cloneUrlPrimary = $this.data('primaryUrl');
if (gl.GeoClone) {
gl.GeoClone.cloneUrlSecondary = $this.attr('href');
gl.GeoClone.cloneUrlPrimary = $this.data('primaryUrl');
}
});
......
#geo-clone{data: {clone_url_secondary: h(default_url_to_repo(project)), clone_url_primary: h(geo_primary_default_url_to_repo(project))}}
%geo-clone-dialog{id: 'modal-geo-info', title: 'How to work faster with Geo'}
%span{slot: 'clipboard-1'}
#geo-clone{ data: { clone_url_secondary: h(default_url_to_repo(project)), clone_url_primary: h(geo_primary_default_url_to_repo(project)) } }
%geo-clone-dialog{ id: 'modal-geo-info', title: 'How to work faster with Geo' }
%span{ slot: 'clipboard-1' }
= clipboard_button(clipboard_target: 'pre#geo-info-1')
%span{slot: 'clipboard-2'}
%span{ slot: 'clipboard-2' }
= clipboard_button(clipboard_target: 'pre#geo-info-2')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment