當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript appendWidgets.appendWidgets函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。