bugfix
This commit is contained in:
parent
03afb3950e
commit
32305d3db7
@ -41,7 +41,7 @@ bricks.DataRow = class extends bricks.HBox {
|
||||
tools.push({
|
||||
name:'add',
|
||||
tip:'add new record',
|
||||
icon:this.editable.add_icon || bricks_resource('imgs/add.png')
|
||||
icon:editable.add_icon || bricks_resource('imgs/add.png')
|
||||
});
|
||||
tools.push({
|
||||
name:'blankicon'
|
||||
|
@ -79,6 +79,7 @@ bricks.BaseModal = class extends bricks.Layout {
|
||||
if (this.timeout > 0){
|
||||
this.timeout_task = schedule_once(this.dismiss.bind(this), this.timeout);
|
||||
}
|
||||
this.dispatch('opened');
|
||||
}
|
||||
dismiss(){
|
||||
this.dom_element.style.display = "none";
|
||||
@ -87,6 +88,7 @@ bricks.BaseModal = class extends bricks.Layout {
|
||||
this.timeout_task.cancel();
|
||||
this.timeout_task = null;
|
||||
}
|
||||
this.dispatch('dismissed');
|
||||
}
|
||||
}
|
||||
bricks.Modal = class extends bricks.BaseModal {
|
||||
|
@ -18,4 +18,26 @@ bricks.add_ViewBuilder('icon', function(opts){
|
||||
options.url = opts.value;
|
||||
return new bricks.Icon(options);
|
||||
});
|
||||
|
||||
bricks.add_ViewBuilder('code', function(opts){
|
||||
var textField = opts.textField || 'text';
|
||||
var valueField = opts.name;
|
||||
var txt = opts.useer_data[textField] || opts.user_data[valueField]||'';
|
||||
var options = bricks.extend({}, opts);
|
||||
options.otext = txt;
|
||||
options.i18n = True;
|
||||
return new bricks.Text(options);
|
||||
});
|
||||
bricks.add_ViewBuilder('password', function(opts){
|
||||
var options = bricks.extend({}, opts);
|
||||
options.otext = '******';
|
||||
options.i18n = True;
|
||||
return new bricks.Text(options);
|
||||
});
|
||||
bricks.add_ViewBuilder('hide', function(opts){
|
||||
return new bricks.JsWidget({});
|
||||
});
|
||||
bricks.add_ViewBuilder('audio', function(opts){
|
||||
var options = bricks.extend({}, opts);
|
||||
var url = options.value;
|
||||
return new bricks.AudioPlayer({url:url,autoplay:false});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user