Merge pull request #18783 from nextcloud/fix/sidebar/do-not-wait-domcontentloaded-for-init

Init OCA.Files.Sidebar right away
This commit is contained in:
Roeland Jago Douma 2020-01-10 07:53:27 +01:00 committed by GitHub
commit e886ce7218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 10 deletions

View File

@ -282,5 +282,5 @@ e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
i.default.use(G.a),i.default.prototype.t=t,window.addEventListener("DOMContentLoaded",(function(){if(window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new M}),Object.assign(window.OCA.Files.Sidebar,{Tab:$}),document.getElementById("content")&&!document.getElementById("app-sidebar")){var e=document.getElementById("content"),t=document.createElement("div");t.id="app-sidebar",e.appendChild(t)}new i.default({name:"SidebarRoot",render:function(e){return e(T)}}).$mount("#app-sidebar")}))}]); i.default.use(G.a),i.default.prototype.t=t,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new M}),Object.assign(window.OCA.Files.Sidebar,{Tab:$}),window.addEventListener("DOMContentLoaded",(function(){if(document.getElementById("content")&&!document.getElementById("app-sidebar")){var e=document.getElementById("content"),t=document.createElement("div");t.id="app-sidebar",e.appendChild(t)}new i.default({name:"SidebarRoot",render:function(e){return e(T)}}).$mount("#app-sidebar")}))}]);
//# sourceMappingURL=sidebar.js.map //# sourceMappingURL=sidebar.js.map

File diff suppressed because one or more lines are too long

View File

@ -30,15 +30,14 @@ Vue.use(VueClipboard)
Vue.prototype.t = t Vue.prototype.t = t
window.addEventListener('DOMContentLoaded', () => { // Init Sidebar Service
if (!window.OCA.Files) {
// Init Sidebar Service
if (!window.OCA.Files) {
window.OCA.Files = {} window.OCA.Files = {}
} }
Object.assign(window.OCA.Files, { Sidebar: new Sidebar() }) Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
Object.assign(window.OCA.Files.Sidebar, { Tab }) Object.assign(window.OCA.Files.Sidebar, { Tab })
window.addEventListener('DOMContentLoaded', () => {
// Make sure we have a proper layout // Make sure we have a proper layout
if (document.getElementById('content')) { if (document.getElementById('content')) {