Commit 53f7fcd0 authored by Filipa Lacerda's avatar Filipa Lacerda

Remove slots

parent c76d7afd
...@@ -23,27 +23,29 @@ ...@@ -23,27 +23,29 @@
* *
*/ */
mounted() { mounted() {
// const playIcon = document.querySelector('.play-icon-svg.hidden svg'); const playIcon = document.querySelector('.play-icon-svg.hidden svg');
//
// const dropdownContainer = this.$el.querySelector('.dropdown-play-icon-container'); const dropdownContainer = this.$el.querySelector('.dropdown-play-icon-container');
// const actionContainers = this.$el.querySelectorAll('.action-play-icon-container'); const actionContainers = this.$el.querySelectorAll('.action-play-icon-container');
// // Phantomjs does not have support to iterate a nodelist. // Phantomjs does not have support to iterate a nodelist.
// const actionsArray = [].slice.call(actionContainers); const actionsArray = [].slice.call(actionContainers);
//
// if (playIcon && actionsArray && dropdownContainer) { if (playIcon && actionsArray && dropdownContainer) {
// dropdownContainer.appendChild(playIcon.cloneNode(true)); dropdownContainer.appendChild(playIcon.cloneNode(true));
//
// actionsArray.forEach((element) => { actionsArray.forEach((element) => {
// element.appendChild(playIcon.cloneNode(true)); element.appendChild(playIcon.cloneNode(true));
// }); });
// } }
}, },
template: ` template: `
<div class="inline"> <div class="inline">
<div class="dropdown"> <div class="dropdown">
<a class="dropdown-new btn btn-default" data-toggle="dropdown"> <a class="dropdown-new btn btn-default" data-toggle="dropdown">
<slot name="actionplayicon"></slot> <span class="dropdown-play-icon-container">
<!-- svg goes here -->
</span>
<i class="fa fa-caret-down"></i> <i class="fa fa-caret-down"></i>
</a> </a>
...@@ -53,7 +55,9 @@ ...@@ -53,7 +55,9 @@
data-method="post" data-method="post"
rel="nofollow" rel="nofollow"
class="js-manual-action-link"> class="js-manual-action-link">
<slot name="actionplayicon"></slot> <span class="action-play-icon-container">
<!-- svg goes here -->
</span>
<span v-html="action.name"></span> <span v-html="action.name"></span>
</a> </a>
</li> </li>
......
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
= page_specific_javascript_tag("environments/environments_bundle.js") = page_specific_javascript_tag("environments/environments_bundle.js")
.commit-icon-svg.hidden .commit-icon-svg.hidden
= custom_icon("icon_commit") = custom_icon("icon_commit")
.play-icon-svg.hidden
.play-icon-svg{ slot: "actionplayicon" } = custom_icon("icon_play")
%span.hide
= custom_icon("icon_play")
#environments-list-view{ data: { environments_data: environments_list_data, #environments-list-view{ data: { environments_data: environments_list_data,
"can-create-deployment" => can?(current_user, :create_deployment, @project).to_s, "can-create-deployment" => can?(current_user, :create_deployment, @project).to_s,
......
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