Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/activate.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$(document).ready(function() {
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
OCP.Loader.loadScript('firstrunwizard', 'jquery.colorbox.js').then(function() {
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
});
});
24 changes: 19 additions & 5 deletions js/firstrunwizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@

showFirstRunWizard: function(){
var self = this;
if (typeof $.colorbox === 'undefined') {
setTimeout(function () {
self.showFirstRunWizard();
}, 200)
return;
}
$.colorbox({
opacity: 0.7,
transition: 'elastic',
Expand All @@ -148,11 +154,19 @@ $(document).ready(function() {
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
});

$('#expanddiv li[data-id="firstrunwizard-about"] a').on('click', function () {
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
$(this).find('div').remove();
$(this).find('img').show();
OC.hideMenus(function(){return false;});
$('#expanddiv li[data-id="firstrunwizard-about"] a').on('click', function (e) {
var target = $(e.target);
target.prepend($('<div/>').addClass('icon-loading-small'));
target.find('img').hide();
OCP.Loader.loadScript('firstrunwizard', 'jquery.colorbox.js').then(function() {
target.find('icon-loading-small').remove();
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
target.find('div').remove();
target.find('img').show();
OC.hideMenus(function () {
return false;
});
});
return false;
});
});
1 change: 0 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public function register() {
protected function registerScripts() {
/* Always load scripts and styles since we need those for the about menu */
\OC_Util::addStyle('firstrunwizard', 'firstrunwizard');
\OC_Util::addScript('firstrunwizard', 'jquery.colorbox');
\OC_Util::addScript('firstrunwizard', 'firstrunwizard');

/** @var EventDispatcherInterface $dispatcher */
Expand Down