File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ var __meta__ = {
108108 }
109109
110110 if ( operator === "isnullorempty" ) {
111- filter = kendo . format ( "{0} {1} null or {0} {1} ''" , field , filter ) ;
111+ filter = kendo . format ( "( {0} {1} null or {0} {1} '') " , field , filter ) ;
112112 } else if ( operator === "isnotnullorempty" ) {
113- filter = kendo . format ( "{0} {1} null and {0} {1} ''" , field , filter ) ;
113+ filter = kendo . format ( "( {0} {1} null and {0} {1} '') " , field , filter ) ;
114114 } else if ( operator === "isnull" || operator === "isnotnull" ) {
115115 filter = kendo . format ( "{0} {1} null" , field , filter ) ;
116116 } else if ( operator === "isempty" || operator === "isnotempty" ) {
Original file line number Diff line number Diff line change @@ -540,7 +540,7 @@ var __meta__ = {
540540 closeOnClick : true ,
541541 hoverDelay : 100 ,
542542 scrollable : false ,
543- popupCollision : undefined
543+ popupCollision : null
544544 } ,
545545
546546 _initData : function ( ) {
@@ -1097,7 +1097,16 @@ var __meta__ = {
10971097 parentHorizontal = root && horizontal ,
10981098 directions = parseDirection ( direction , root , isRtl ) ,
10991099 effects = options . animation . open . effects ,
1100- openEffects = effects !== undefined ? effects : "slideIn:" + getEffectDirection ( direction , root ) ;
1100+ openEffects = effects !== undefined ? effects : "slideIn:" + getEffectDirection ( direction , root ) ,
1101+ collision ;
1102+
1103+ if ( options . popupCollision !== null ) {
1104+ collision = options . popupCollision ;
1105+ } else if ( parentHorizontal ) {
1106+ collision = "fit" ;
1107+ } else {
1108+ collision = "fit flip" ;
1109+ }
11011110
11021111 if ( ! popup ) {
11031112 popup = div . kendoPopup ( {
@@ -1111,7 +1120,7 @@ var __meta__ = {
11111120 } ,
11121121 origin : directions . origin ,
11131122 position : directions . position ,
1114- collision : options . popupCollision !== undefined ? options . popupCollision : ( parentHorizontal ? "fit" : "fit flip" ) ,
1123+ collision : collision ,
11151124 anchor : li ,
11161125 appendTo : overflowWrapper || li ,
11171126 animation : {
Original file line number Diff line number Diff line change 236236
237237 it ( "$filter and isnullorempty operator uses eq" , function ( ) {
238238 var result = parameterMap ( { filter : { filters : [ { field : "Name" , operator : "isnullorempty" } ] } } ) ;
239- assert . equal ( result . $filter , "Name eq null or Name eq ''" ) ;
239+ assert . equal ( result . $filter , "( Name eq null or Name eq '') " ) ;
240240 } ) ;
241241
242242
247247
248248 it ( "$filter and isnotnullorempty operator uses ne" , function ( ) {
249249 var result = parameterMap ( { filter : { filters : [ { field : "Name" , operator : "isnotnullorempty" } ] } } ) ;
250- assert . equal ( result . $filter , "Name ne null and Name ne ''" ) ;
250+ assert . equal ( result . $filter , "( Name ne null and Name ne '') " ) ;
251251 } ) ;
252252
253253 it ( "$filter with nested field" , function ( ) {
Original file line number Diff line number Diff line change @@ -108,5 +108,15 @@ it("binding invisible to false shows the menu", function() {
108108
109109 assert . isOk ( menu . wrapper . css ( "display" ) != "none" , "menu is not invisible" ) ;
110110} ) ;
111+
112+ it ( "the data-popup-collision configuration is parsed correctly" , function ( ) {
113+ dom = $ ( '<div data-role="menu" data-popup-collision="flip flip"></div>' ) ;
114+
115+ kendo . bind ( dom ) ;
116+
117+ var menu = dom . data ( "kendoMenu" ) ;
118+
119+ assert . isOk ( menu . options . popupCollision === "flip flip" ) ;
120+ } ) ;
111121 } ) ;
112122} ( ) ) ;
You can’t perform that action at this time.
0 commit comments