Permalink
Browse files

Bug fix - closes #10

  • Loading branch information...
1 parent a137355 commit 58a6fc2d4a921962a52142feb2e18ad47f59b205 @benkeen committed Mar 31, 2013
Showing with 10 additions and 6 deletions.
  1. +10 −6 resources/scripts/generator.js
@@ -1159,6 +1159,7 @@ define([
$("#gdDataSetHelpNav a").removeClass("gdSelected");
$(link).addClass("gdSelected");
+ $("#gdDataSetHelpNav").scrollTop($(link).offset().top);
// set the header to the name of the Data Type
$("#gdFocusedDataTypeHeader").html($(link).html());
@@ -1198,12 +1199,6 @@ define([
// remove any custom styles
$(".gdHelpSection").removeAttr("style");
- // if required, ensure the appropriate Data Type item is selected
- if (opts.dataType !== null) {
- var helpNavEl = ($("#gdDataSetHelpNav li[data-module='" + opts.dataType + "']"))[0];
- _showDataTypeHelp(helpNavEl);
- }
-
// open the dialog
$("#gdMainDialog").dialog({
title: 'generate<span style="color:#48b34d">data</span>.com',
@@ -1220,6 +1215,15 @@ define([
]
});
+ // if required, ensure the appropriate Data Type item is selected. This is done after
+ // the dialog is opened because it needs to set the appropriate offset height of the
+ // left sidebar to focus on the appropriate Data Type's help link. This can only be computed
+ // after it's been opened.
+ if (opts.dataType !== null) {
+ var helpNavEl = ($("#gdDataSetHelpNav li[data-module='" + opts.dataType + "']"))[0];
+ _showDataTypeHelp(helpNavEl);
+ }
+
utils.insertModalSpinner({ modalID: "gdMainDialog" });
if (opts.tab == 2) {

0 comments on commit 58a6fc2

Please sign in to comment.