windy 8 years ago
parent
commit
be90ad125e
  1. 2
      Gruntfile.js
  2. 1
      demo/config.js
  3. 11
      demo/js/base/demo.button.js
  4. 8
      demo/js/config/base.js
  5. 8
      demo/js/config/case.js
  6. 14
      demo/js/config/layout.js
  7. 8
      demo/js/config/widget.js
  8. 4
      demo/js/main.js
  9. 2
      demo/js/north.js
  10. 7
      dist/base.js
  11. 16
      dist/core.js
  12. 7
      src/base/single/button/button.basic.js
  13. 2
      src/core/proto/date.js
  14. 14
      src/core/widget.js

2
Gruntfile.js

@ -74,7 +74,7 @@ module.exports = function (grunt) {
},
demoJs: {
src: ['demo/version.js', 'demo/config.js', 'demo/app.js', 'demo/js/**/*.js'],
src: ['demo/version.js', 'demo/app.js', 'demo/js/**/*.js', 'demo/config.js'],
dest: 'demo/dist/demo.js'
},
demoCss: {

1
demo/config.js

@ -0,0 +1 @@
Demo.CONFIG = Demo.LAYOUT_CONFIG.concat(Demo.BASE_CONFIG).concat(Demo.CASE_CONFIG).concat(Demo.WIDGET_CONFIG);

11
demo/js/base/demo.button.js

@ -0,0 +1,11 @@
Demo.Button = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-face"
},
render: function () {
return {
type: "bi.vertical",
}
}
});
$.shortcut("demo.button", Demo.Button);

8
demo/js/config/base.js

@ -0,0 +1,8 @@
Demo.BASE_CONFIG = [{
id: 2,
text: "基础控件"
}, {
pId: 2,
text: "bi.center_adapt",
value: "demo.center_adapt"
}];

8
demo/js/config/case.js

@ -0,0 +1,8 @@
Demo.CASE_CONFIG = [{
id: 3,
text: "基础控件"
}, {
pId: 3,
text: "bi.center_adapt",
value: "demo.center_adapt"
}];

14
demo/js/config.js → demo/js/config/layout.js

@ -1,18 +1,6 @@
Demo.CONFIG = [{
Demo.LAYOUT_CONFIG = [{
id: 1,
text: "布局"
}, {
id: 2,
text: "基础控件"
}, {
id: 3,
text: "实例控件"
}, {
id: 4,
text: "详细控件"
}, {
id: 5,
text: "通用组件"
}, {
pId: 1,
text: "bi.center_adapt",

8
demo/js/config/widget.js

@ -0,0 +1,8 @@
Demo.WIDGET_CONFIG = [{
id: 4,
text: "基础控件"
}, {
pId: 4,
text: "bi.center_adapt",
value: "demo.center_adapt"
}];

4
demo/js/main.js

@ -13,8 +13,8 @@ Demo.Main = BI.inherit(BI.Widget, {
type: "demo.north",
listeners: [{
eventName: Demo.North.EVENT_VALUE_CHANGE,
action: function () {
center.setValue(0);
action: function (v) {
center.setValue(v);
}
}]
}

2
demo/js/north.js

@ -13,7 +13,7 @@ Demo.North = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.Button.EVENT_CHANGE,
action: function () {
self.fireEvent(Demo.North.EVENT_VALUE_CHANGE, 0)
self.fireEvent(Demo.North.EVENT_VALUE_CHANGE, "demo.face")
}
}],
cls: "logo",

7
dist/base.js vendored

@ -21163,13 +21163,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
empty: function () {
destroyed: function () {
$(document).unbind("mouseup." + this.getName());
BI.BasicButton.superclass.empty.apply(this, arguments);
},
destroy: function () {
BI.BasicButton.superclass.destroy.apply(this, arguments);
}
});
BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/**

16
dist/core.js vendored

@ -14244,11 +14244,15 @@ BI.Widget = BI.inherit(BI.OB, {
if (o.invisible) {
this.element.hide();
}
if (o.disabled) {
this.element.addClass("base-disabled disabled");
}
if (o.invalid) {
this.element.addClass("base-invalid invalid");
if (o.disabled || o.invalid) {
BI.nextTick(BI.bind(function () {
if (this.options.disabled) {
this.setEnable(false);
}
if (this.options.invalid) {
this.setValid(false);
}
}, this));
}
},
@ -22746,7 +22750,7 @@ Date._DN = [BI.i18nText("BI-Sunday"),
BI.i18nText("BI-Sunday")];
// short day names
Date._SDN = ['',
Date._SDN = ['',
'',
'',
'',

7
src/base/single/button/button.basic.js

@ -284,13 +284,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
empty: function () {
destroyed: function () {
$(document).unbind("mouseup." + this.getName());
BI.BasicButton.superclass.empty.apply(this, arguments);
},
destroy: function () {
BI.BasicButton.superclass.destroy.apply(this, arguments);
}
});
BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";

2
src/core/proto/date.js

@ -9,7 +9,7 @@ Date._DN = [BI.i18nText("BI-Sunday"),
BI.i18nText("BI-Sunday")];
// short day names
Date._SDN = ['',
Date._SDN = ['',
'',
'',
'',

14
src/core/widget.js

@ -106,11 +106,15 @@ BI.Widget = BI.inherit(BI.OB, {
if (o.invisible) {
this.element.hide();
}
if (o.disabled) {
this.element.addClass("base-disabled disabled");
}
if (o.invalid) {
this.element.addClass("base-invalid invalid");
if (o.disabled || o.invalid) {
BI.nextTick(BI.bind(function () {
if (this.options.disabled) {
this.setEnable(false);
}
if (this.options.invalid) {
this.setValid(false);
}
}, this));
}
},

Loading…
Cancel
Save