filebrowser/assets/public/js/application.js

31 lines
951 B
JavaScript
Raw Normal View History

2016-06-28 13:59:33 +00:00
'use strict';
2016-06-28 16:12:02 +00:00
document.addEventListener('DOMContentLoaded', event => {
document.getElementById('logout').insertAdjacentHTML('beforebegin', `<a href="/admin/settings/">
<div class="action">
<i class="material-icons">settings</i>
</div>
</a>`);
document.getElementById('submit').insertAdjacentHTML('afterend', `<div class="right">
<button id="publish" type="submit" data-type="content-only">
<span>
<i class="material-icons">send</i>
</span>
<span>publish</span>
</button>
</div>`);
if (document.getElementById('date') || document.getElementById('publishdate')) {
document.querySelector('#editor .right').insertAdjacentHTML('afterbegin', ` <button id="schedule" type="submit" data-type="content-only">
<span>
<i class="material-icons">alarm</i>
</span>
<span>Schedule</span>
</button>`);
}
});