From a9a3944cbf85ea1d5e6ccd217de0723aec4ceced Mon Sep 17 00:00:00 2001 From: David Huynh Date: Sun, 17 Oct 2010 20:49:54 +0000 Subject: [PATCH] Upgraded to suggest 1.2.1. Fixed issue 160: Cancel button on Search for Match dialog sometimes not working. git-svn-id: http://google-refine.googlecode.com/svn/trunk@1587 7d457c2a-affb-35e4-300a-418c747d4874 --- main/webapp/modules/core/MOD-INF/controller.js | 4 ++-- .../css/{suggest-1.2.min.css => suggest-1.2.1.min.css} | 2 +- .../{suggest-1.2.min.js => suggest-1.2.1.min.js} | 10 +++++----- main/webapp/modules/core/scripts/util/dialog.js | 1 + main/webapp/modules/core/scripts/util/menu.js | 1 + .../modules/core/scripts/views/data-table/cell-ui.js | 9 ++++++--- 6 files changed, 16 insertions(+), 11 deletions(-) rename main/webapp/modules/core/externals/suggest/css/{suggest-1.2.min.css => suggest-1.2.1.min.css} (99%) rename main/webapp/modules/core/externals/suggest/{suggest-1.2.min.js => suggest-1.2.1.min.js} (93%) diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index a657c13d5..d2436495e 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -164,7 +164,7 @@ function init() { [ "externals/jquery-1.4.2.min.js", "externals/jquery.cookie.js", - "externals/suggest/suggest-1.2.min.js", + "externals/suggest/suggest-1.2.1.min.js", "externals/jquery-ui/jquery-ui-1.8.custom.min.js", "externals/imgareaselect/jquery.imgareaselect.js", "externals/date.js", @@ -222,7 +222,7 @@ function init() { "project/styles", module, [ - "externals/suggest/css/suggest-1.2.min.css", + "externals/suggest/css/suggest-1.2.1.min.css", "externals/jquery-ui/css/ui-lightness/jquery-ui-1.8.custom.css", "externals/imgareaselect/css/imgareaselect-default.css", diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-1.2.min.css b/main/webapp/modules/core/externals/suggest/css/suggest-1.2.1.min.css similarity index 99% rename from main/webapp/modules/core/externals/suggest/css/suggest-1.2.min.css rename to main/webapp/modules/core/externals/suggest/css/suggest-1.2.1.min.css index dba951ea0..70ff6b79c 100644 --- a/main/webapp/modules/core/externals/suggest/css/suggest-1.2.min.css +++ b/main/webapp/modules/core/externals/suggest/css/suggest-1.2.1.min.css @@ -111,4 +111,4 @@ p.fbs-flyout-image-true,h3.fbs-flyout-image-true,h1.fbs-flyout-image-true{margin * html .fbs-item-name{width:253px !important;} * html .fbs-item-name{width:100%;} * html .fbs-flyout-content:after{height:1px;} -/* Version:r94143M Built:Thu Apr 29 2010 by daepark */ +/* Version:r94764M Built:Tue May 11 2010 by daepark */ \ No newline at end of file diff --git a/main/webapp/modules/core/externals/suggest/suggest-1.2.min.js b/main/webapp/modules/core/externals/suggest/suggest-1.2.1.min.js similarity index 93% rename from main/webapp/modules/core/externals/suggest/suggest-1.2.min.js rename to main/webapp/modules/core/externals/suggest/suggest-1.2.1.min.js index e0ec8d373..fccdc694c 100644 --- a/main/webapp/modules/core/externals/suggest/suggest-1.2.min.js +++ b/main/webapp/modules/core/externals/suggest/suggest-1.2.1.min.js @@ -44,10 +44,10 @@ a.metaKey||a.ctrlKey)){a=this.options;a=this.pane.is(":visible")&&c("."+a.css.it this.options.css.item+":visible",this.list).length){this.updown(false);a.preventDefault()}else e||this.check_required(a)}}},shift_enter:function(){},escape:function(){this.hide_all()},up:function(a){this.updown(true,a.ctrlKey||a.shiftKey)},down:function(a){this.updown(false,null,a.ctrlKey||a.shiftKey)},updown:function(a,b,e){var i=this.options.css,d=this.list;if(this.pane.is(":visible")){var g=c("."+i.item+":visible",d);if(g.length){d=c(g[0]);g=c(g[g.length-1]);var f=this.get_selected()||[];clearTimeout(this.ignore_mouseover.timeout); this._ignore_mouseover=false;if(a)if(b)this._goto(d);else if(f.length)if(f[0]==d[0]){d.removeClass(i.selected);this.input.val(this.input.data("original.suggest"));this.hoverout_list()}else this._goto(f.prevAll("."+i.item+":visible:first"));else this._goto(g);else if(e)this._goto(g);else if(f.length)if(f[0]==g[0]){g.removeClass(i.selected);this.input.val(this.input.data("original.suggest"));this.hoverout_list()}else this._goto(f.nextAll("."+i.item+":visible:first"));else this._goto(d)}}else a||this.textchange()}, _goto:function(a){a.trigger("mouseover.suggest");var b=a.data("data.suggest");this.input.val(b?b.name:this.input.data("original.suggest"));this.scroll_to(a)},scroll_to:function(a){var b=this.list,e=b.scrollTop(),i=e+b.innerHeight(),d=a.outerHeight();a=a.prevAll().length*d;d=a+d;if(ai){this.ignore_mouseover();b.scrollTop(e+d-i)}},textchange:function(){this.input.removeData("data.suggest");this.input.trigger("fb-textchange",this);var a=this.input.val(); -if(a==="")this.status_start();else{this.status_loading();this.request(a)}},request:function(){},response:function(a){"cost"in a&&this.trackEvent(this.name,"response","cost",a.cost);if(this.check_response(a)){var b=[];if(c.isArray(a))b=a;else if("result"in a)b=a.result;var e=c.map(arguments,function(f){return f});this.response_hook.apply(this,e);var i=null,d=this,g=this.options;c.each(b,function(f,j){j=d.create_item(j,a).bind("mouseover.suggest",function(l){d.mouseover_item(l)}).data("data.suggest", -j);d.list.append(j);if(f===0)i=j});this.input.data("original.suggest",this.input.val());c("."+g.css.item,this.list).length===0&&g.nomatch&&this.list.append(c('
  • ').html(g.nomatch).bind("click.suggest",function(f){f.stopPropagation()}));e.push(i);this.show_hook.apply(this,e);this.position();this.pane_show()}},pane_show:function(){var a=false;if(c("> li",this.list).length)a=true;a||this.pane.children(":not(."+this.options.css.list+")").each(function(){a=c(this).is(":visible"); -return!a});if(a)if(this.options.animate){var b=this;this.pane.slideDown("fast",function(){b.input.trigger("fb-pane-show",b)})}else{this.pane.show();this.input.trigger("fb-pane-show",this)}else{this.pane.hide();this.input.trigger("fb-pane-hide",this)}},create_item:function(a){var b=this.options.css;li=c("
  • ").addClass(b.item);var e=c("
  • ').html(g.nomatch).bind("click.suggest",function(f){f.stopPropagation()}));e.push(i);this.show_hook.apply(this,e);this.position();this.pane_show()}}},pane_show:function(){var a=false;if(c("> li",this.list).length)a=true;a||this.pane.children(":not(."+this.options.css.list+")").each(function(){if(c(this).css("display")!= +"none"){a=true;return false}});if(a)if(this.options.animate){var b=this;this.pane.slideDown("fast",function(){b.input.trigger("fb-pane-show",b)})}else{this.pane.show();this.input.trigger("fb-pane-show",this)}else{this.pane.hide();this.input.trigger("fb-pane-hide",this)}},create_item:function(a){var b=this.options.css;li=c("
  • ").addClass(b.item);var e=c("