fix: password字段表头显示title而非******
- uitype.js: ViewBuilder检查user_data区分表头/数据行 - uitypesdef.js: passwordViewBuilder无rec时显示label/name - views.js: ViewPassword无row_data时显示value/label/name
This commit is contained in:
parent
a29fe0e923
commit
6f5e8fde9d
@ -34,7 +34,7 @@ bricks.add_ViewBuilder('code', function(opts){
|
|||||||
});
|
});
|
||||||
bricks.add_ViewBuilder('password', function(opts){
|
bricks.add_ViewBuilder('password', function(opts){
|
||||||
var options = bricks.extend({}, opts);
|
var options = bricks.extend({}, opts);
|
||||||
options.otext = '******';
|
options.otext = opts.user_data ? '******' : (opts.value || '******');
|
||||||
options.i18n = true;
|
options.i18n = true;
|
||||||
return new bricks.Text(options);
|
return new bricks.Text(options);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -87,6 +87,7 @@ var strInputBuilder = function(desc, rec) {
|
|||||||
bricks.uitypesdef.setInputBuilder('str', strInputBuilder);
|
bricks.uitypesdef.setInputBuilder('str', strInputBuilder);
|
||||||
|
|
||||||
var passwordViewBuilder = function(desc, rec){
|
var passwordViewBuilder = function(desc, rec){
|
||||||
|
if (!rec) return new buildText(desc.label || desc.name || '******');
|
||||||
return new buildText('******');
|
return new buildText('******');
|
||||||
}
|
}
|
||||||
bricks.uitypesdef.setViewBuilder('password', passwordViewBuilder);
|
bricks.uitypesdef.setViewBuilder('password', passwordViewBuilder);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ uitypesdef.setViewKlass('str', ViewStr);
|
|||||||
|
|
||||||
var ViewPassword = function(desc){
|
var ViewPassword = function(desc){
|
||||||
var w = Text({
|
var w = Text({
|
||||||
'text':"****",
|
'text': desc.row_data ? "****" : (desc.value || desc.label || desc.name || "****"),
|
||||||
'halign':'left'
|
'halign':'left'
|
||||||
})
|
})
|
||||||
if (desc.row_data)
|
if (desc.row_data)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user