mirror of
https://github.com/caddyserver/website.git
synced 2025-04-22 04:56:17 -04:00
Rework AJQuery to $_ to not interfere with jQuery
This commit is contained in:
parent
babfa3a7c0
commit
36841d57d4
13 changed files with 57 additions and 57 deletions
|
@ -365,9 +365,9 @@ quickAssist = function() {
|
|||
// show renders the given state into the quick assist box
|
||||
function show(state) {
|
||||
// reset & show prompt/content
|
||||
$('.quick-assist-question').innerHTML = state.prompt || state.title;
|
||||
$('.quick-assist-content').innerHTML = state.content || '';
|
||||
$('.quick-assist-options').innerHTML = '';
|
||||
$_('.quick-assist-question').innerHTML = state.prompt || state.title;
|
||||
$_('.quick-assist-content').innerHTML = state.content || '';
|
||||
$_('.quick-assist-options').innerHTML = '';
|
||||
|
||||
// render options
|
||||
let hasNext = false;
|
||||
|
@ -385,7 +385,7 @@ quickAssist = function() {
|
|||
} else if (opt.href) {
|
||||
btn.href = opt.href;
|
||||
}
|
||||
$('.quick-assist-options').append(btn);
|
||||
$_('.quick-assist-options').append(btn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ quickAssist = function() {
|
|||
const reset = document.createElement('a');
|
||||
reset.classList.add('button', 'reset');
|
||||
reset.innerText = "Reset";
|
||||
$('.quick-assist-options').append(reset);
|
||||
$_('.quick-assist-options').append(reset);
|
||||
}
|
||||
|
||||
history.push(state);
|
||||
|
@ -429,12 +429,12 @@ quickAssist = function() {
|
|||
const link = document.createElement('a');
|
||||
link.innerText = event.target.dataset.breadcrumb || event.target.innerText;
|
||||
link.dataset.index = history.length;
|
||||
$('.quick-assist-history').append(link);
|
||||
$_('.quick-assist-history').append(link);
|
||||
show(states[event.target.dataset.next]);
|
||||
});
|
||||
|
||||
on('click', '.quick-assist-options a.reset', event => {
|
||||
$('.quick-assist-history a:first-child').dispatchEvent(new Event('click', { bubbles: true }));
|
||||
$_('.quick-assist-history a:first-child').dispatchEvent(new Event('click', { bubbles: true }));
|
||||
})
|
||||
|
||||
// when page loads, show the start of the quick assist
|
||||
|
@ -445,4 +445,4 @@ quickAssist = function() {
|
|||
|
||||
ready(() => {
|
||||
quickAssist();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue