|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @class FR.RHIframe |
|
|
|
|
* @extends FR.BaseEditor |
|
|
|
|
*/ |
|
|
|
|
(function($){ |
|
|
|
|
(function ($) { |
|
|
|
|
|
|
|
|
|
FR.RHIframe = FR.extend(FR.BaseEditor, { |
|
|
|
|
|
|
|
|
@ -31,8 +31,8 @@
|
|
|
|
|
o.iframeName = o.widgetName || this.createNoRepeatName(); |
|
|
|
|
this.$iframe = $("<iframe name=" + o.iframeName + " id=" |
|
|
|
|
+ o.iframeName + ">").addClass(o.baseClass).attr({ |
|
|
|
|
width : '100%', |
|
|
|
|
height : '100%', |
|
|
|
|
width: '100%', |
|
|
|
|
height: '100%', |
|
|
|
|
frameborder: 0, |
|
|
|
|
scrolling: !o.showOverFlowX && !o.showOverFlowY |
|
|
|
|
? 'no' |
|
|
|
@ -55,6 +55,7 @@
|
|
|
|
|
setOverflow($(doc.documentElement)); |
|
|
|
|
setOverflow($(doc.body)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function setOverflow(cc) { |
|
|
|
|
if (!o.showOverFlowX) { |
|
|
|
|
cc.css('overflow-x', 'hidden'); |
|
|
|
@ -68,7 +69,7 @@
|
|
|
|
|
console && console.log("error"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// IE里面需要设置rowspan为1才能正常显示....否则会跳过n行不显示,chrome应该是bug,一会儿好一会儿不好
|
|
|
|
|
if ($.browser.msie && (this.$iframe.parent()).is("div") |
|
|
|
@ -159,16 +160,15 @@
|
|
|
|
|
} |
|
|
|
|
// 模板
|
|
|
|
|
if (this.options.sourceType == 'tpl') { |
|
|
|
|
var cpParas = {}; |
|
|
|
|
$.each(paras, function (pName, pValue) { |
|
|
|
|
if (FR.isArray(pValue)) { |
|
|
|
|
paras[pName] = pValue; |
|
|
|
|
} else { |
|
|
|
|
paras[pName] = encodeURIComponent(pValue); |
|
|
|
|
} |
|
|
|
|
//后端没有encode,那就前端做
|
|
|
|
|
cpParas[encodeURIComponent(pName)] = encodeURIComponent(pValue); |
|
|
|
|
}); |
|
|
|
|
src += "__parameters__=" + FR.cjkEncode(FR.jsonEncode(paras)); |
|
|
|
|
src += "__parameters__=" + encodeURIComponent(FR.jsonEncode(cpParas)); |
|
|
|
|
} else { |
|
|
|
|
$.each(paras, function (name, value) { |
|
|
|
|
// web链接的参数不进行额外处理。
|
|
|
|
|
if (typeof(name) === 'string') { |
|
|
|
|
src += name + "=" + value + "&"; |
|
|
|
|
} |
|
|
|
@ -183,7 +183,7 @@
|
|
|
|
|
*/ |
|
|
|
|
_addDisableMask: function () { |
|
|
|
|
this.mask = $('<span/>').css({ |
|
|
|
|
backgroundColor : '#66B9FF', |
|
|
|
|
backgroundColor: '#66B9FF', |
|
|
|
|
height: this.options.height, |
|
|
|
|
width: this.options.width, |
|
|
|
|
left: this.element.offset().left |
|
|
|
@ -194,7 +194,7 @@
|
|
|
|
|
* 设置网页框控件的地址并重新加载页面(保留原参数) |
|
|
|
|
* @param {String} v 新的地址 |
|
|
|
|
*/ |
|
|
|
|
setValue : function(v) { |
|
|
|
|
setValue: function (v) { |
|
|
|
|
this.options.src = v; |
|
|
|
|
this._loadIframeByGet(); |
|
|
|
|
}, |
|
|
|
@ -225,7 +225,7 @@
|
|
|
|
|
* 加载指定的url |
|
|
|
|
* @param url 网页地址 |
|
|
|
|
*/ |
|
|
|
|
loadUrl : function(url) { |
|
|
|
|
loadUrl: function (url) { |
|
|
|
|
this.$iframe.attr("src", url); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|