syncing with upstream

This commit is contained in:
Senad Uka
2018-01-15 13:31:00 +01:00
parent bc646b86c2
commit fe35b0aa91
24 changed files with 325 additions and 149 deletions

View File

@@ -616,13 +616,20 @@ i.icon-info-circled {
}
/* line 75 */
.info_message {
color: black;
padding-left: 5px;
margin: 0 auto;
}
/* line 81 */
.error_message {
color: red;
padding-left: 5px;
margin: 0 auto;
}
/* line 81 */
/* line 87 */
input, select {
width: calc(100% - 20px);
padding: 10px;
@@ -633,7 +640,7 @@ input, select {
letter-spacing: 2px;
}
/* line 91 */
/* line 97 */
select {
-webkit-appearance: none;
-moz-appearance: none;
@@ -641,14 +648,14 @@ select {
background: #F4F4F4 url("https://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png") no-repeat calc(100% - 15px);
}
/* line 98 */
/* line 104 */
.submit, .download {
padding: 20px;
text-align: center;
border-top: 1px solid #EAEAEA;
}
/* line 104 */
/* line 110 */
.button, button {
background: #5199F5;
color: white;
@@ -660,7 +667,7 @@ select {
letter-spacing: 2px;
}
/* line 115 */
/* line 121 */
.navigation_buttons {
display: flex;
justify-content: flex-end;
@@ -668,18 +675,18 @@ select {
border-bottom: 1px solid #EAEAEA;
padding: 20px;
}
/* line 122 */
/* line 128 */
.navigation_buttons a {
text-decoration: none;
width: auto;
margin: 0 20px;
}
/* line 128 */
/* line 134 */
.navigation_buttons .button {
width: auto;
}
/* line 133 */
/* line 139 */
.back {
border: 2px solid #5199F5;
color: #5199F5;
@@ -687,12 +694,12 @@ select {
margin-left: 10px;
}
/* line 140 */
/* line 146 */
a.back {
text-decoration: none;
}
/* line 144 */
/* line 150 */
.sample_images {
display: flex;
justify-content: flex-end;
@@ -700,18 +707,18 @@ a.back {
border-bottom: 1px solid #EAEAEA;
padding: 15px;
}
/* line 151 */
/* line 157 */
.sample_images a {
text-decoration: none;
width: auto;
margin: 2px 5px;
}
/* line 157 */
/* line 163 */
.sample_images .button {
width: auto;
}
/* line 162 */
/* line 168 */
.image_button, button {
background: #5199F5;
color: white;

View File

@@ -2,21 +2,29 @@
$(document).ready(function () {
$("#sf_msg_container").empty();
$("#sf_msg_container").show();
$('#sf-spinner-panel').css('width', '100%'); // Workaround for Safari issue
$.ajax({
type: 'POST',
url: '/load_dxf/'
}).done(function(r) {
console.log(r)
$("#sf_msg_container").append('<li class="">DXF from Sales Force loaded successfully.</li>');
setTimeout(function() { window.location.reload() }, 500);
}).fail(function(r) {
// console.log(r.status)
r.responseJSON.errors.forEach((msg) => {
$("#sf_msg_container").append('<li class="error_message">' + msg + '</li>');
})
}).always(function() {
}).done(function(data, textStatus, jqXHR) { // 200 or 202
if (data && data.messages) {
data.messages.forEach((msg) => {
$("#sf_msg_container").append('<li class="info_message">' + msg + '</li>');
})
$("#sf_msg_container").show();
}
if (jqXHR.status == 200) {
setTimeout(function() { window.location.reload() }, 1000);
}
}).fail(function(jqXHR, textStatus, errorThrown) { // 400, 404, 5xx
// console.log(jqXHR, textStatus, errorThrown)
if (jqXHR.responseJSON && jqXHR.responseJSON.errors) {
jqXHR.responseJSON.errors.forEach((msg) => {
$("#sf_msg_container").append('<li class="error_message">' + msg + '</li>');
})
$("#sf_msg_container").show();
}
}).always(function(r) {
$('#sf-spinner-panel').css('width', '0%'); // Workaround for Safari issue
});
});

View File

@@ -73,7 +73,7 @@
}
});
inverterStringsPerInverter.val(inverterStringsPerInverterValue);
inverterStringsPerInverterForm.css('display', 'inherit');
inverterStringsPerInverterForm.css('display', 'block');
} else {
inverterStringsPerInverter.append($('<option selected value="0"></option>'));
inverterStringsPerInverterForm.css('display', 'none');
@@ -160,7 +160,8 @@
if (data) {
$('#standalone_inverter_id').val(uuid);
$('#standalone_ac_run_length').val(data['ac_run_length']);
$('#attachment-point').val(data['attachment_point'][0]);
var attach_point = data['attachment_point'][1];
$('#attachment_point option[value=' + attach_point + ']').attr('selected','selected');
fillInverterData(data, '#inverter');