-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qa] Switched to prettier for CSS/JS formatting
- Loading branch information
1 parent
072ced9
commit b786a0e
Showing
6 changed files
with
91 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
django_x509/static/django-x509/css/renew_confirmation.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
input[type="submit"] { | ||
background: #ba2121; | ||
border-radius: 4px; | ||
padding: 10px 15px; | ||
color: #fff; | ||
background: #ba2121; | ||
border-radius: 4px; | ||
padding: 10px 15px; | ||
color: #fff; | ||
} | ||
a.cancel-link { | ||
display: inline-block; | ||
vertical-align: middle; | ||
height: 15px; | ||
line-height: 15px; | ||
background: #ddd; | ||
border-radius: 4px; | ||
padding: 10px 15px; | ||
color: #333; | ||
margin: 0 0 0 10px; | ||
display: inline-block; | ||
vertical-align: middle; | ||
height: 15px; | ||
line-height: 15px; | ||
background: #ddd; | ||
border-radius: 4px; | ||
padding: 10px 15px; | ||
color: #333; | ||
margin: 0 0 0 10px; | ||
} | ||
a.cancel-link:hover { | ||
background-color: #ddd; | ||
background-color: #ddd; | ||
} | ||
input[type="submit"]:hover { | ||
background-color: #ba2121; | ||
background-color: #ba2121; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,60 @@ | ||
django.jQuery(function ($) { | ||
'use strict'; | ||
// select private_key/certificate field text on click | ||
$('.field-certificate, .field-private_key').find(".readonly").on('click', function () { | ||
var range, selection; | ||
if (window.getSelection) { | ||
selection = window.getSelection(); | ||
range = document.createRange(); | ||
range.selectNodeContents(this); | ||
selection.removeAllRanges(); | ||
selection.addRange(range); | ||
} else if (document.body.createTextRange) { | ||
range = document.body.createTextRange(); | ||
range.moveToElementText(this); | ||
range.select(); | ||
} | ||
"use strict"; | ||
// select private_key/certificate field text on click | ||
$(".field-certificate, .field-private_key") | ||
.find(".readonly") | ||
.on("click", function () { | ||
var range, selection; | ||
if (window.getSelection) { | ||
selection = window.getSelection(); | ||
range = document.createRange(); | ||
range.selectNodeContents(this); | ||
selection.removeAllRanges(); | ||
selection.addRange(range); | ||
} else if (document.body.createTextRange) { | ||
range = document.body.createTextRange(); | ||
range.moveToElementText(this); | ||
range.select(); | ||
} | ||
}); | ||
var changePopupPage = new RegExp(/\d\/change\/\?/); | ||
var url = window.location.href; | ||
var operationType = $('.field-operation_type select'); | ||
// enable switcher only in add forms | ||
if (!operationType.length || $('form .deletelink-box').length > 0 || changePopupPage.test(url)) { | ||
$('.field-operation_type').hide(); | ||
return; | ||
var changePopupPage = new RegExp(/\d\/change\/\?/); | ||
var url = window.location.href; | ||
var operationType = $(".field-operation_type select"); | ||
// enable switcher only in add forms | ||
if ( | ||
!operationType.length || | ||
$("form .deletelink-box").length > 0 || | ||
changePopupPage.test(url) | ||
) { | ||
$(".field-operation_type").hide(); | ||
return; | ||
} | ||
// function for operation_type switcher | ||
var showFields = function () { | ||
// define fields for each operation | ||
var importFields = $( | ||
".form-row:not(.field-certificate, .field-operation_type, " + | ||
".field-private_key, .field-name, .field-ca, .field-passphrase)", | ||
), | ||
newFields = $(".form-row:not(.field-certificate, .field-private_key)"), | ||
defaultFields = $(".form-row:not(.field-operation_type)"), | ||
allFields = $(".form-row"), | ||
value = operationType.val(); | ||
if (value === "-") { | ||
allFields.show(); | ||
defaultFields.hide(); | ||
} | ||
// function for operation_type switcher | ||
var showFields = function () { | ||
// define fields for each operation | ||
var importFields = $('.form-row:not(.field-certificate, .field-operation_type, ' + | ||
'.field-private_key, .field-name, .field-ca, .field-passphrase)'), | ||
newFields = $('.form-row:not(.field-certificate, .field-private_key)'), | ||
defaultFields = $('.form-row:not(.field-operation_type)'), | ||
allFields = $('.form-row'), | ||
value = operationType.val(); | ||
if (value === '-') { | ||
allFields.show(); | ||
defaultFields.hide(); | ||
} | ||
if (value === 'new') { | ||
allFields.hide(); | ||
newFields.show(); | ||
} | ||
if (value === 'import') { | ||
allFields.show(); | ||
importFields.hide(); | ||
} | ||
}; | ||
if (value === "new") { | ||
allFields.hide(); | ||
newFields.show(); | ||
} | ||
if (value === "import") { | ||
allFields.show(); | ||
importFields.hide(); | ||
} | ||
}; | ||
showFields(); | ||
operationType.on("change", function (e) { | ||
showFields(); | ||
operationType.on('change', function (e) { | ||
showFields(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters