guy 8 years ago
parent
commit
589867a1e1
  1. 2
      bi/base.js
  2. 64
      bi/widget.js
  3. 2
      docs/base.js
  4. 64
      docs/widget.js
  5. 2
      src/base/combination/group.button.js
  6. 65
      src/widget/image/button/href/image.button.href.js

2
bi/base.js

@ -1114,7 +1114,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
deleted.push(i); deleted.push(i);
} }
}); });
BI.remove(this.buttons, deleted); BI.removeAt(this.buttons, deleted);
this.layouts.removeItemAt(deleted); this.layouts.removeItemAt(deleted);
}, },

64
bi/widget.js

@ -7121,6 +7121,70 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}); });
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/** BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/**
* Created by GameJian on 2016/1/28.
*/
BI.ImageButtonHref = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.ImageButtonHref.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-image-button-href",
title: BI.i18nText("BI-Add_Href")
})
},
_init: function () {
BI.ImageButtonHref.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget({
type: "bi.icon_button",
cls: "img-href-font",
title: o.title,
height: 24,
width: 24
});
this.input = BI.createWidget({
type: "bi.clear_editor",
watermark: BI.i18nText("BI-Input_Href"),
width: 255,
height: 30
});
this.input.on(BI.ClearEditor.EVENT_CONFIRM, function () {
self.combo.hideView();
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
direction: "bottom,left",
adjustYOffset: 3,
el: this.trigger,
popup: {
el: this.input,
stopPropagation: false,
minWidth: 255
}
});
this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {
self.input.focus()
});
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ImageButtonHref.EVENT_CHANGE, arguments)
})
},
getValue: function () {
return this.input.getValue();
},
setValue: function (url) {
this.input.setValue(url)
}
});
BI.ImageButtonHref.EVENT_CHANGE = "BI.ImageButtonHref.EVENT_CHANGE";
BI.shortcut("bi.image_button_href", BI.ImageButtonHref);/**
* 交互行为布局 * 交互行为布局
* *
* *

2
docs/base.js

@ -1114,7 +1114,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
deleted.push(i); deleted.push(i);
} }
}); });
BI.remove(this.buttons, deleted); BI.removeAt(this.buttons, deleted);
this.layouts.removeItemAt(deleted); this.layouts.removeItemAt(deleted);
}, },

64
docs/widget.js

@ -7121,6 +7121,70 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}); });
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/** BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/**
* Created by GameJian on 2016/1/28.
*/
BI.ImageButtonHref = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.ImageButtonHref.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-image-button-href",
title: BI.i18nText("BI-Add_Href")
})
},
_init: function () {
BI.ImageButtonHref.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget({
type: "bi.icon_button",
cls: "img-href-font",
title: o.title,
height: 24,
width: 24
});
this.input = BI.createWidget({
type: "bi.clear_editor",
watermark: BI.i18nText("BI-Input_Href"),
width: 255,
height: 30
});
this.input.on(BI.ClearEditor.EVENT_CONFIRM, function () {
self.combo.hideView();
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
direction: "bottom,left",
adjustYOffset: 3,
el: this.trigger,
popup: {
el: this.input,
stopPropagation: false,
minWidth: 255
}
});
this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {
self.input.focus()
});
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ImageButtonHref.EVENT_CHANGE, arguments)
})
},
getValue: function () {
return this.input.getValue();
},
setValue: function (url) {
this.input.setValue(url)
}
});
BI.ImageButtonHref.EVENT_CHANGE = "BI.ImageButtonHref.EVENT_CHANGE";
BI.shortcut("bi.image_button_href", BI.ImageButtonHref);/**
* 交互行为布局 * 交互行为布局
* *
* *

2
src/base/combination/group.button.js

@ -170,7 +170,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
deleted.push(i); deleted.push(i);
} }
}); });
BI.remove(this.buttons, deleted); BI.removeAt(this.buttons, deleted);
this.layouts.removeItemAt(deleted); this.layouts.removeItemAt(deleted);
}, },

65
src/widget/image/button/href/image.button.href.js

@ -0,0 +1,65 @@
/**
* Created by GameJian on 2016/1/28.
*/
BI.ImageButtonHref = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.ImageButtonHref.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-image-button-href",
title: BI.i18nText("BI-Add_Href")
})
},
_init: function () {
BI.ImageButtonHref.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget({
type: "bi.icon_button",
cls: "img-href-font",
title: o.title,
height: 24,
width: 24
});
this.input = BI.createWidget({
type: "bi.clear_editor",
watermark: BI.i18nText("BI-Input_Href"),
width: 255,
height: 30
});
this.input.on(BI.ClearEditor.EVENT_CONFIRM, function () {
self.combo.hideView();
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
direction: "bottom,left",
adjustYOffset: 3,
el: this.trigger,
popup: {
el: this.input,
stopPropagation: false,
minWidth: 255
}
});
this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {
self.input.focus()
});
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ImageButtonHref.EVENT_CHANGE, arguments)
})
},
getValue: function () {
return this.input.getValue();
},
setValue: function (url) {
this.input.setValue(url)
}
});
BI.ImageButtonHref.EVENT_CHANGE = "BI.ImageButtonHref.EVENT_CHANGE";
BI.shortcut("bi.image_button_href", BI.ImageButtonHref);
Loading…
Cancel
Save