本文整理汇总了TypeScript中app/utils/appendWidgets.appendWidgets函数的典型用法代码示例。如果您正苦于以下问题:TypeScript appendWidgets函数的具体用法?TypeScript appendWidgets怎么用?TypeScript appendWidgets使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了appendWidgets函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: FieldLabel
export function FieldLabel(text, childWidgets) {
var domElement = createElement();
WidgetRole.apply(this, [domElement]);
var textSpan = createTextSpan(text);
appendWidgets(both(textSpan, childWidgets)).to(domElement);
}
开发者ID:gurdiga,项目名称:xo,代码行数:8,代码来源:FieldLabel.ts
示例2: DropdownButton
export function DropdownButton(labelText, options) {
var domElement = createElement();
WidgetRole.apply(this, [domElement]);
var toggleButton = createToggleButton(labelText);
var optionList = new OptionList(options);
appendWidgets([toggleButton, optionList]).to(domElement);
addEventListeners(toggleButton, optionList);
this.resetOptionList = delegateTo(optionList, 'setOptions');
}
开发者ID:gurdiga,项目名称:xo,代码行数:12,代码来源:DropdownButton.ts
示例3: IndividualFieldList
export function IndividualFieldList(fieldValues) {
var domElement = createDOMElement('person-field-list');
WidgetRole.apply(this, [domElement]);
var fields = [
createField(LabeledTextField, 'Nume', 'nume', fieldValues),
createField(LabeledTextField, 'IDNP', 'idnp', fieldValues),
createField(LabeledDateField, 'Data nașterii', 'data-nașterii', fieldValues),
createField(LabeledLargeTextField, 'Domiciliu', 'domiciliu', fieldValues),
createField(LabeledLargeTextField, 'Note', 'note', fieldValues)
];
appendWidgets(fields).to(domElement);
this.getFieldValues = getFieldValueCollector(fields);
}
开发者ID:gurdiga,项目名称:xo,代码行数:16,代码来源:IndividualFieldList.ts
示例4: CompanyFieldList
export function CompanyFieldList(fieldValues) {
var domElement = createDOMElement('company-field-list');
WidgetRole.apply(this, [domElement]);
var fields = [
createField(LabeledTextField, 'Denumire', 'denumire', fieldValues),
createField(LabeledTextField, 'IDNO', 'idno', fieldValues),
createField(LabeledLargeTextField, 'Sediu', 'sediu', fieldValues),
createField(LabeledTextField, 'Persoană de contact', 'persoană-de-contact', fieldValues),
createField(LabeledLargeTextField, 'Note', 'note', fieldValues)
];
appendWidgets(fields).to(domElement);
this.getFieldValues = getFieldValueCollector(fields);
}
开发者ID:gurdiga,项目名称:xo,代码行数:16,代码来源:CompanyFieldList.ts
示例5: UI
export function UI() {
var domElement = createElement();
var newCaseDialog = new NewCaseDialog({
creditorul: {},
debitorul: {}
});
newCaseDialog.appendTo(domElement);
var newCaseButton = new NewCaseButton();
newCaseButton.onClick(function() {
newCaseDialog.show();
});
appendWidgets([newCaseDialog, newCaseButton]).to(domElement);
this.appendTo = getAppenderOf(domElement);
}
开发者ID:gurdiga,项目名称:xo,代码行数:18,代码来源:UI.ts
示例6: Activity
export function Activity(widgetName, descriptionText) {
var domElement = createElement(widgetName);
WidgetRole.apply(this, [domElement]);
var detailsSection = new ActivityDetailsSection();
appendWidgets([
new ActivityTitle(descriptionText),
new ActivityDateField(),
detailsSection
]).to(domElement);
this.getDescription = function() {
return descriptionText;
};
this.setDetailWidgets = function(detailWidgets) {
detailsSection.setChildWidgets(detailWidgets);
};
}
开发者ID:gurdiga,项目名称:xo,代码行数:20,代码来源:Activity.ts
示例7: function
this.appendWidgets = function(childWidgets) {
appendWidgets(childWidgets).to(domElement);
};
开发者ID:gurdiga,项目名称:xo,代码行数:3,代码来源:LabeledContainer.ts
示例8: resetChildren
export function resetChildren(domElement, children) {
emptyDOMElement(domElement);
appendWidgets(children).to(domElement);
}
开发者ID:gurdiga,项目名称:xo,代码行数:4,代码来源:resetChildren.ts
示例9: NewCaseDialog
export function NewCaseDialog(data) {
var domElement = createElement();
WidgetRole.apply(this, [domElement]);
var valuableChildren = {
'persoane-terţe': []
};
appendWidgets([
createTitle(),
createCreditorSection(),
createFirstDebitorSection(),
createPersonSection2(data.creditor),
createAddPersonButton(),
createSentenceSection(),
createInquirySection(),
createActivitiesSection(data.activities),
createCloseButton()
]).to(domElement);
this.getValue = function() {
return rMap('getValue', valuableChildren);
};
function createTitle() {
var style = {
fontSize: '42px',
fontFamily: 'TitleFont',
fontWeight: 'bold',
marginTop: '0px'
};
var title = createDOMElement('h1', style);
title.textContent = 'Procedură de ordin general';
return title;
}
function createCreditorSection() {
var personSection = createPersonSection('Creditor', data['creditor']);
valuableChildren['creditor'] = personSection;
return personSection;
}
function createFirstDebitorSection() {
var personSection = createPersonSection('Debitor', data['debitori'][0]);
valuableChildren['debitori'] = [personSection];
return personSection;
}
function createPersonSection2(fieldValues) {
var style = {
'width': '380px',
'margin': '0 60px 40px 0'
};
var personSection = new PersonSection2('PersonSection2', fieldValues);
personSection.setStyle(style);
return personSection;
}
function createPersonSection(labelText, data) {
var style = {
width: '380px',
marginRight: '60px'
};
var personSection = new PersonSection(labelText, data);
personSection.setStyle(style);
return personSection;
}
function createAddPersonButton() {
var style = {
position: 'absolute',
marginLeft: '-200px',
marginTop: '360px'
};
var button = new DropdownButton('adaugă persoană', {
'debitor': addRemovablePersonSection('Debitor', 'debitori'),
'persoană terţă': addRemovablePersonSection('Persoană terţă', 'persoane-terţe')
});
button.setStyle(style);
return button;
}
function addRemovablePersonSection(labelText, personListInternalName) {
return function() {
//.........这里部分代码省略.........
开发者ID:gurdiga,项目名称:xo,代码行数:101,代码来源:NewCaseDialog.ts
注:本文中的app/utils/appendWidgets.appendWidgets函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论