created template selecting
This commit is contained in:
@@ -13,6 +13,5 @@
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require_tree .
|
||||
//= require active_scaffold
|
||||
//= require bootstrap-sprockets
|
||||
|
||||
7
web/app/assets/javascripts/template_select_form.js
Normal file
7
web/app/assets/javascripts/template_select_form.js
Normal file
@@ -0,0 +1,7 @@
|
||||
$(document).ready(function() {
|
||||
$(".template-selection").click( function(event) {
|
||||
var templateId = event.target.id.match(/\d/g).join("");
|
||||
$("#template_id").val(templateId);
|
||||
$("#create_from_template_form").submit();
|
||||
});
|
||||
});
|
||||
@@ -18,12 +18,48 @@
|
||||
color: green;
|
||||
}
|
||||
.server-thumbnail {
|
||||
margin: 15px;
|
||||
padding: 15px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.server-icon:hover {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: gray;
|
||||
}
|
||||
|
||||
.server-icon {
|
||||
border-style: none;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.server-name {
|
||||
margin-top: 5px;
|
||||
text-transform: uppercase;
|
||||
font-size: 16px !important;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.template-description {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.template-selection {
|
||||
cursor: pointer;
|
||||
border-style: none;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.template-selection:hover {
|
||||
cursor: pointer;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: gray;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user