Browse Source

Merge pull request #238 in ~GUY/fineui from ~WINDY/fineui:BI4.1 to BI4.1

* commit '46039bb8163cec09832730a51aeb3a5a9d53b22b':
  text处理
  树标签间距
  BI-10756 标红
master
windy 7 years ago
parent
commit
48c8b7803f
  1. 2
      bi/base.js
  2. 6
      bi/core.js
  3. 5
      bi/widget.js
  4. 1
      demo/js/widget/slider/demo.slider.js
  5. 2
      dist/base.js
  6. 13
      dist/bundle.js
  7. 80
      dist/bundle.min.js
  8. 6
      dist/core.js
  9. 1
      dist/demo.js
  10. 5
      dist/widget.js
  11. 2
      src/base/single/text.js
  12. 6
      src/core/func/dom.js
  13. 2
      src/widget/multiselecttree/multiselecttree.js
  14. 3
      src/widget/singleslider/singleslider.js

2
bi/base.js

@ -581,7 +581,7 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html((text + "").replaceAll(" ", " "));
this.text.element.html(( this[0] && this[0].ownerDocument || document ).createTextNode( (text + "").replaceAll(" ", " ") ));
}
});

6
bi/core.js

@ -19278,7 +19278,7 @@ BI.extend(jQuery.fn, {
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.html((text + "").replaceAll(" ", " "));
return this.html(( this[0] && this[0].ownerDocument || document ).createTextNode((text + "").replaceAll(" ", " ")));
}
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
@ -19301,7 +19301,7 @@ BI.extend(jQuery.fn, {
if (tidx >= 0) {
this.append(textLeft.substr(0, tidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;"))));
textLeft = textLeft.substr(tidx + keyword.length);
if (py != null) {
@ -19310,7 +19310,7 @@ BI.extend(jQuery.fn, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
this.append(textLeft.substr(0, pidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;"))));
if (py != null) {
py = py.substr(pidx + keyword.length);
}

5
bi/widget.js

@ -11836,7 +11836,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, {
element: this,
items: [{
el: this.searcher,
height: 30
height: 24
}, {
el: this.adapter,
height: "fill"
@ -17162,9 +17162,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
allowBlank: false,
validationChecker: function (v) {
return self._checkValidation(v);
},
quitChecker: function (v) {
return self._checkValidation(v);
}
});
this.label.element.hover(function () {

1
demo/js/widget/slider/demo.slider.js

@ -62,6 +62,7 @@ Demo.Slider = BI.inherit(BI.Widget, {
var intervalSlider = BI.createWidget({
type: "bi.interval_slider",
width: o.width,
digit: 0,
cls: "layout-bg-white"
});
intervalSlider.setMinAndMax({

2
dist/base.js vendored

@ -581,7 +581,7 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html((text + "").replaceAll(" ", "&nbsp;"));
this.text.element.html(( this[0] && this[0].ownerDocument || document ).createTextNode( (text + "").replaceAll(" ", "&nbsp;") ));
}
});

13
dist/bundle.js vendored

@ -19278,7 +19278,7 @@ BI.extend(jQuery.fn, {
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.html((text + "").replaceAll(" ", "&nbsp;"));
return this.html(( this[0] && this[0].ownerDocument || document ).createTextNode((text + "").replaceAll(" ", "&nbsp;")));
}
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
@ -19301,7 +19301,7 @@ BI.extend(jQuery.fn, {
if (tidx >= 0) {
this.append(textLeft.substr(0, tidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;"))));
textLeft = textLeft.substr(tidx + keyword.length);
if (py != null) {
@ -19310,7 +19310,7 @@ BI.extend(jQuery.fn, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
this.append(textLeft.substr(0, pidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;"))));
if (py != null) {
py = py.substr(pidx + keyword.length);
}
@ -26428,7 +26428,7 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html((text + "").replaceAll(" ", "&nbsp;"));
this.text.element.html(( this[0] && this[0].ownerDocument || document ).createTextNode( (text + "").replaceAll(" ", "&nbsp;") ));
}
});
@ -87028,7 +87028,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, {
element: this,
items: [{
el: this.searcher,
height: 30
height: 24
}, {
el: this.adapter,
height: "fill"
@ -92354,9 +92354,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
allowBlank: false,
validationChecker: function (v) {
return self._checkValidation(v);
},
quitChecker: function (v) {
return self._checkValidation(v);
}
});
this.label.element.hover(function () {

80
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/core.js vendored

@ -19278,7 +19278,7 @@ BI.extend(jQuery.fn, {
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.html((text + "").replaceAll(" ", "&nbsp;"));
return this.html(( this[0] && this[0].ownerDocument || document ).createTextNode((text + "").replaceAll(" ", "&nbsp;")));
}
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
@ -19301,7 +19301,7 @@ BI.extend(jQuery.fn, {
if (tidx >= 0) {
this.append(textLeft.substr(0, tidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;"))));
textLeft = textLeft.substr(tidx + keyword.length);
if (py != null) {
@ -19310,7 +19310,7 @@ BI.extend(jQuery.fn, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
this.append(textLeft.substr(0, pidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;"))));
if (py != null) {
py = py.substr(pidx + keyword.length);
}

1
dist/demo.js vendored

@ -13048,6 +13048,7 @@ Demo.Slider = BI.inherit(BI.Widget, {
var intervalSlider = BI.createWidget({
type: "bi.interval_slider",
width: o.width,
digit: 0,
cls: "layout-bg-white"
});
intervalSlider.setMinAndMax({

5
dist/widget.js vendored

@ -11836,7 +11836,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, {
element: this,
items: [{
el: this.searcher,
height: 30
height: 24
}, {
el: this.adapter,
height: "fill"
@ -17162,9 +17162,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
allowBlank: false,
validationChecker: function (v) {
return self._checkValidation(v);
},
quitChecker: function (v) {
return self._checkValidation(v);
}
});
this.label.element.hover(function () {

2
src/base/single/text.js

@ -114,7 +114,7 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html((text + "").replaceAll(" ", "&nbsp;"));
this.text.element.html(( this[0] && this[0].ownerDocument || document ).createTextNode( (text + "").replaceAll(" ", "&nbsp;") ));
}
});

6
src/core/func/dom.js

@ -20,7 +20,7 @@ BI.extend(jQuery.fn, {
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.html((text + "").replaceAll(" ", "&nbsp;"));
return this.html(( this[0] && this[0].ownerDocument || document ).createTextNode((text + "").replaceAll(" ", "&nbsp;")));
}
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
@ -43,7 +43,7 @@ BI.extend(jQuery.fn, {
if (tidx >= 0) {
this.append(textLeft.substr(0, tidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(tidx, keyword.length).replaceAll(" ", "&nbsp;"))));
textLeft = textLeft.substr(tidx + keyword.length);
if (py != null) {
@ -52,7 +52,7 @@ BI.extend(jQuery.fn, {
} else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length)) {
this.append(textLeft.substr(0, pidx));
this.append($("<span>").addClass("bi-keyword-red-mark")
.html(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;")));
.html(( this[0] && this[0].ownerDocument || document ).createTextNode(textLeft.substr(pidx, keyword.length).replaceAll(" ", "&nbsp;"))));
if (py != null) {
py = py.substr(pidx + keyword.length);
}

2
src/widget/multiselecttree/multiselecttree.js

@ -95,7 +95,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, {
element: this,
items: [{
el: this.searcher,
height: 30
height: 24
}, {
el: this.adapter,
height: "fill"

3
src/widget/singleslider/singleslider.js

@ -82,9 +82,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
allowBlank: false,
validationChecker: function (v) {
return self._checkValidation(v);
},
quitChecker: function (v) {
return self._checkValidation(v);
}
});
this.label.element.hover(function () {

Loading…
Cancel
Save