Proyectos de Subversion Moodle

Rev

Rev 250 | Rev 252 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 250 Rev 251
Línea 164... Línea 164...
164
 
164
 
165
</body>
165
</body>
166
</html>
166
</html>
167
{{#js}}
167
{{#js}}
168
M.util.js_pending('theme_universe/loader');
168
M.util.js_pending('theme_universe/loader');
169
require(['theme_universe/loader', 'theme_universe/drawer'], function(Loader, Drawer) {
169
require(['theme_universe/loader', 'theme_universe/drawer', 'jquery'], function(Loader, Drawer, $) {
170
    Drawer.init();
170
    Drawer.init();
Línea 171... Línea 171...
171
    M.util.js_complete('theme_universe/loader');
171
    M.util.js_complete('theme_universe/loader');
172
 
172
 
Línea 193... Línea 193...
193
                    $h5Video.css("height", "93vh");
193
                    $h5Video.css("height", "93vh");
194
                }
194
                }
195
            }
195
            }
196
        }
196
        }
197
    }
197
    }
-
 
198
    
-
 
199
      function renderBlockButtons(){
-
 
200
        const buttonsContainer = $("#blocks_buttons");
-
 
201
        const blocksContainer = $(".block-region");
-
 
202
        const blocks = blocksContainer.find("section.block").toArray();
Línea -... Línea 203...
-
 
203
 
-
 
204
        $(blocksContainer).addClass("tab-content")
-
 
205
 
-
 
206
        const blocksObjs = []
-
 
207
 
-
 
208
        $(blocks).each((index, block) => {
-
 
209
            const blckId = $(block).attr("id").trim()
-
 
210
            const blckTitle = $(block).find(".card-title").text()
-
 
211
 
-
 
212
            $(block).addClass("tab-pane fade")
-
 
213
            if(index === 0) $(block).addClass("active show")
-
 
214
 
-
 
215
            const blckObj = { id: blckId, title: blckTitle }
-
 
216
 
-
 
217
            blocksObjs.push(blckObj)
-
 
218
        })
-
 
219
 
-
 
220
        blocksObjs.forEach(({ id, title }, index)=> {
-
 
221
            const blockBtn = `
-
 
222
                <button class="btn nav-link ${index === 0 ? 'active' : ''}" data-toggle="tab" data-target="#${id}" type="button" role="tab" aria-controls="nav-home" aria-selected="true">${title}</button>
-
 
223
            ` 
-
 
224
 
-
 
225
            buttonsContainer.append(blockBtn)
-
 
226
            $(blocksContainer).removeClass("d-none")
-
 
227
        })
-
 
228
    }
-
 
229
 
198
 
230
    renderBlockButtons()
199
    resizeVideoIframe()
231
    resizeVideoIframe()
200
});
232
});