本文整理汇总了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);
}
示例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');
}
示例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);
}
示例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);
}
示例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);
}
示例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);
};
}
示例7: function
this.appendWidgets = function(childWidgets) {
appendWidgets(childWidgets).to(domElement);
};
示例8: resetChildren
export function resetChildren(domElement, children) {
emptyDOMElement(domElement);
appendWidgets(children).to(domElement);
}
示例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() {
//.........这里部分代码省略.........