|
@@ -103,9 +103,10 @@ function _KeyFocus(objn){
|
|
//alert(dialogTop+"="+parentObj.height()+"="+obj.offset().top+"="+parentObj[0].offsetHeight+"="+parentObj[0].scrollHeight+"="+parentObj[0].scrollTop)
|
|
//alert(dialogTop+"="+parentObj.height()+"="+obj.offset().top+"="+parentObj[0].offsetHeight+"="+parentObj[0].scrollHeight+"="+parentObj[0].scrollTop)
|
|
}
|
|
}
|
|
//
|
|
//
|
|
|
|
+var adjustmentFlag = false;
|
|
var FOCUS
|
|
var FOCUS
|
|
function setFocus(obj){
|
|
function setFocus(obj){
|
|
- if(!FOCUS){
|
|
|
|
|
|
+ if(!focus){
|
|
FOCUS=$(obj)
|
|
FOCUS=$(obj)
|
|
var parentObj=FOCUS.closest(".dialog-content");
|
|
var parentObj=FOCUS.closest(".dialog-content");
|
|
parentObj.unbind("resizeblock").bind("resizeblock",function(){
|
|
parentObj.unbind("resizeblock").bind("resizeblock",function(){
|
|
@@ -113,12 +114,35 @@ function setFocus(obj){
|
|
parentObj.unbind("resizeblock");
|
|
parentObj.unbind("resizeblock");
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ var isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
|
+ if(!isiOS){
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ if(winHeight == window.innerHeight){
|
|
|
|
+ adjustmentFlag = true;
|
|
|
|
+ $(obj).parents(".dialog-main").css({top: "20px",height: "193px"});
|
|
|
|
+ $(obj).parents(".dialog-content").css({height: "121px"});
|
|
|
|
+ }
|
|
|
|
+ var thisParent = $(obj).parents(".keyWordGroup");
|
|
|
|
+ var thisIndex = parseInt(thisParent.children("lable").children("font").text());
|
|
|
|
+ if($(obj).parents(".dialog-content").height() / thisParent.height() < thisIndex){
|
|
|
|
+ $(obj).closest(".dialog-content").scrollTop((thisIndex-1) * thisParent.height() + (thisIndex - 2) * 10);
|
|
|
|
+ }
|
|
|
|
+ },500);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function setBlur(obj){
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ if(adjustmentFlag){
|
|
|
|
+ $(obj).parents(".dialog-main").css({top: "auto",height: "auto"});
|
|
|
|
+ }
|
|
|
|
+ },500);
|
|
|
|
+
|
|
}
|
|
}
|
|
KeyWordDialog.AppendNode = function(dialogObj,value){
|
|
KeyWordDialog.AppendNode = function(dialogObj,value){
|
|
var getHtml = function(index,value){
|
|
var getHtml = function(index,value){
|
|
return '<div class="keyWordGroup">'
|
|
return '<div class="keyWordGroup">'
|
|
+'<lable style="white-space:nowrap;">关键词<font>'+index+'</font></lable>'
|
|
+'<lable style="white-space:nowrap;">关键词<font>'+index+'</font></lable>'
|
|
- +'<div><input type="text" onfocus="setFocus(this)" value="'+(value?value:"")+'" placeholder="示例:税务局 软件" maxlength="100"></div>'
|
|
|
|
|
|
+ +'<div><input type="text" onfocus="setFocus(this)" onblur="setBlur(this)" value="'+(value?value:"")+'" placeholder="示例:税务局 软件" maxlength="100"></div>'
|
|
+'<div><img src="/wxswordfish/images/delete.png" class="delete"'+(index==1?' style="display: none;"':'')+'></div>'
|
|
+'<div><img src="/wxswordfish/images/delete.png" class="delete"'+(index==1?' style="display: none;"':'')+'></div>'
|
|
+'</div>';
|
|
+'</div>';
|
|
}
|
|
}
|
|
@@ -459,8 +483,10 @@ function commonAjaxReq(object,module){
|
|
});
|
|
});
|
|
}
|
|
}
|
|
var winWidth=300;
|
|
var winWidth=300;
|
|
|
|
+var winHeight=0;
|
|
$(function(){
|
|
$(function(){
|
|
winWidth=$(window).width();
|
|
winWidth=$(window).width();
|
|
|
|
+ winHeight=$(window).height();
|
|
var turnOn = function(obj){
|
|
var turnOn = function(obj){
|
|
obj.addClass("open");
|
|
obj.addClass("open");
|
|
var liobj = obj.parents("li");
|
|
var liobj = obj.parents("li");
|