2014-08-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_clippy.php: changed to modal version. * include/javascript/intro.js: added feature to avoid the exit, and the pull request to original repository is solicited too (https://github.com/usablica/intro.js/pull/311). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
de5a16b29d
commit
7acf5c6b8a
|
@ -1,3 +1,11 @@
|
|||
2014-08-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_clippy.php: changed to modal version.
|
||||
|
||||
* include/javascript/intro.js: added feature to avoid the exit, and
|
||||
the pull request to original repository is solicited too
|
||||
(https://github.com/usablica/intro.js/pull/311).
|
||||
|
||||
2014-08-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* general/header.php, godmode/setup/setup_general.php,
|
||||
|
|
|
@ -105,12 +105,8 @@ function clippy_write_javascript_helps_steps($helps) {
|
|||
exitOnEsc: true, //false,
|
||||
})
|
||||
.onexit(function(value) {
|
||||
console.log("onexit");
|
||||
return false;
|
||||
})
|
||||
.oncomplete(function(value) {
|
||||
console.log("oncomplete");
|
||||
|
||||
exit = confirm("<?php echo __("Do you want to exit the help tour?"); ?>");
|
||||
return exit;
|
||||
});
|
||||
|
||||
<?php
|
||||
|
|
|
@ -184,12 +184,19 @@
|
|||
|
||||
self._onKeyDown = function(e) {
|
||||
if (e.keyCode === 27 && self._options.exitOnEsc == true) {
|
||||
//escape key pressed, exit the intro
|
||||
_exitIntro.call(self, targetElm);
|
||||
propagate_exit = true;
|
||||
|
||||
//check if any callback is defined
|
||||
if (self._introExitCallback != undefined) {
|
||||
self._introExitCallback.call(self);
|
||||
propagate_exit = self._introExitCallback.call(self);
|
||||
if (typeof(propagate_exit) == "undefined")
|
||||
propagate_exit = true;
|
||||
}
|
||||
|
||||
//escape key pressed, exit the intro
|
||||
if (propagate_exit)
|
||||
_exitIntro.call(self, targetElm);
|
||||
|
||||
} else if(e.keyCode === 37) {
|
||||
//left arrow
|
||||
_previousStep.call(self);
|
||||
|
@ -676,14 +683,21 @@
|
|||
skipTooltipButton.innerHTML = this._options.skipLabel;
|
||||
|
||||
skipTooltipButton.onclick = function() {
|
||||
propagate_exit = true;
|
||||
|
||||
if (self._introItems.length - 1 == self._currentStep && typeof (self._introCompleteCallback) === 'function') {
|
||||
self._introCompleteCallback.call(self);
|
||||
propagate_exit = self._introCompleteCallback.call(self);
|
||||
if (typeof(propagate_exit) == "undefined")
|
||||
propagate_exit = true;
|
||||
}
|
||||
|
||||
if (self._introItems.length - 1 != self._currentStep && typeof (self._introExitCallback) === 'function') {
|
||||
self._introExitCallback.call(self);
|
||||
propagate_exit = self._introExitCallback.call(self);
|
||||
if (typeof(propagate_exit) == "undefined")
|
||||
propagate_exit = true;
|
||||
}
|
||||
|
||||
if (propagate_exit)
|
||||
_exitIntro.call(self, self._targetElement);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue