[Mapbender-commits] r6454 - trunk/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jun 29 10:00:42 EDT 2010
Author: christoph
Date: 2010-06-29 14:00:42 +0000 (Tue, 29 Jun 2010)
New Revision: 6454
Modified:
trunk/mapbender/lib/wizard.js
Log:
Modified: trunk/mapbender/lib/wizard.js
===================================================================
--- trunk/mapbender/lib/wizard.js 2010-06-29 13:33:34 UTC (rev 6453)
+++ trunk/mapbender/lib/wizard.js 2010-06-29 14:00:42 UTC (rev 6454)
@@ -37,8 +37,7 @@
_clickHandler: function (e, $t) {
this._getPath($t);
this._navigate($t);
- console.log("to" + $t.attr("id"));
- this._trigger("wizardto" + $t.attr("id"), [true]);
+ this._trigger("to" + $t.attr("id"), e, {});
if (e) {
e.preventDefault();
}
@@ -57,22 +56,23 @@
}
var found = false;
var abort = false;
- var wizardInstance = this.element;
+ var wizardInstance = this;
$target.parents().each(function () {
if (abort || found) {
return;
}
var $currentElement = $(this);
// not this target's wizard
- if ($currentElement.data("isWizard") && $currentElement.get(0) !== wizardInstance.get(0)) {
+ if (!$currentElement.data("wizard")) {
+ return;
+ }
+ if ($currentElement.data("wizard") !== wizardInstance) {
abort = true;
return;
}
// this target's wizard
- if ($currentElement.data("isWizard") && $currentElement.get(0) === wizardInstance.get(0)) {
- found = true;
- return;
- }
+ found = true;
+ return;
});
if (abort || !found) {
new Mapbender.Warning("not this target's wizard, or not found, aborting");
@@ -91,7 +91,7 @@
_create: function () {
var wizardInstance = this;
var $wiz = wizardInstance.element;
- $wiz.data("isWizard", true);
+ $wiz.data("wizard", wizardInstance);
if (this.options.startWith) {
this._getPath(this.options.startWith);
More information about the Mapbender_commits
mailing list