From e955ed05ae283640ec310d62b73ea721e640392e Mon Sep 17 00:00:00 2001 From: David Huynh Date: Fri, 12 Aug 2011 19:15:58 +0000 Subject: [PATCH] Made sure busy indicator shows up for GData importing when needed. Fixed radio button issue with GData worksheet selection. Fixed resizing issue with open project action area. Fixed NullPointerException in RecordModel. git-svn-id: http://google-refine.googlecode.com/svn/trunk@2198 7d457c2a-affb-35e4-300a-418c747d4874 --- .../gdata/module/scripts/index/importing-controller.js | 3 ++- main/src/com/google/refine/model/RecordModel.java | 5 ++++- main/webapp/modules/core/MOD-INF/controller.js | 2 ++ main/webapp/modules/core/scripts/index.js | 4 ++-- main/webapp/modules/core/scripts/index/open-project-ui.js | 1 + main/webapp/modules/core/styles/util/dialog.less | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/extensions/gdata/module/scripts/index/importing-controller.js b/extensions/gdata/module/scripts/index/importing-controller.js index ee0e3087c..f782a67c4 100644 --- a/extensions/gdata/module/scripts/index/importing-controller.js +++ b/extensions/gdata/module/scripts/index/importing-controller.js @@ -45,7 +45,7 @@ Refine.GDataImportingController = function(createProjectUI) { Refine.CreateProjectUI.controllers.push(Refine.GDataImportingController); Refine.GDataImportingController.prototype.startImportingDocument = function(doc) { - var dismiss = DialogSystem.showBusy("Preparing importing job ..."); + var dismiss = DialogSystem.showBusy("Preparing ..."); var self = this; $.post( @@ -188,6 +188,7 @@ Refine.GDataImportingController.prototype._showParsingPanel = function() { var td0 = $(tr.insertCell(0)).attr('width', '1%'); var checkbox = $('') .attr('type', 'radio') + .attr('name', 'gdata-importing-parsing-worksheet') .attr('sheetUrl', this.link) .appendTo(td0); if (i === 0) { diff --git a/main/src/com/google/refine/model/RecordModel.java b/main/src/com/google/refine/model/RecordModel.java index 3364cbae8..468d60e09 100644 --- a/main/src/com/google/refine/model/RecordModel.java +++ b/main/src/com/google/refine/model/RecordModel.java @@ -95,7 +95,10 @@ public class RecordModel implements Jsonizable { throws JSONException { writer.object(); - writer.key("hasRecords"); writer.value(_records.size() < _rowDependencies.size()); + writer.key("hasRecords"); + writer.value( + _records != null && _rowDependencies != null && + _records.size() < _rowDependencies.size()); writer.endObject(); } diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 85c2517f5..551ba4cb8 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -322,6 +322,8 @@ function init() { "styles/jquery-ui-overrides.less", "styles/common.less", "styles/pure.css", + "styles/util/dialog.less", + "styles/index.less", "styles/index/create-project-ui.less", "styles/index/open-project-ui.less", diff --git a/main/webapp/modules/core/scripts/index.js b/main/webapp/modules/core/scripts/index.js index 83559b34f..ca0d5f0ad 100644 --- a/main/webapp/modules/core/scripts/index.js +++ b/main/webapp/modules/core/scripts/index.js @@ -39,13 +39,13 @@ var Refine = { Refine.selectActionArea = function(id) { $('.action-area-tab').removeClass('selected'); - $('.action-area-tab-body').css('visibility', 'hidden').css('z-index', '100'); + $('.action-area-tab-body').css('visibility', 'hidden').css('z-index', '50'); for (var i = 0; i < Refine.actionAreas.length; i++) { var actionArea = Refine.actionAreas[i]; if (id == actionArea.id) { actionArea.tabElmt.addClass('selected'); - actionArea.bodyElmt.css('visibility', 'visible').css('z-index', '110');; + actionArea.bodyElmt.css('visibility', 'visible').css('z-index', '55');; } } }; diff --git a/main/webapp/modules/core/scripts/index/open-project-ui.js b/main/webapp/modules/core/scripts/index/open-project-ui.js index 3d5e02365..95fe6063c 100644 --- a/main/webapp/modules/core/scripts/index/open-project-ui.js +++ b/main/webapp/modules/core/scripts/index/open-project-ui.js @@ -93,6 +93,7 @@ Refine.OpenProjectUI.prototype._fetchProjects = function() { null, function(data) { self._renderProjects(data); + self.resize(); }, "json" ); diff --git a/main/webapp/modules/core/styles/util/dialog.less b/main/webapp/modules/core/styles/util/dialog.less index 4609d5e4c..08d8f97b3 100644 --- a/main/webapp/modules/core/styles/util/dialog.less +++ b/main/webapp/modules/core/styles/util/dialog.less @@ -88,5 +88,5 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .dialog-busy { width: 400px; border: none; - .rounded_corners(); + .rounded_corners(20px); }