app.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <require from="./scss/styles.css"></require>
  3. <require from="./sampler-visual"></require>
  4. <require from="./sampler-textual.html"></require>
  5. <require from="./sampling-info.html"></require>
  6. <main class="${samplers.length === 2 ? 'two-samplers' : 'single-sampler'} ${format.name}">
  7. <header>
  8. <h1 class="factbox-title">${title[lang]}
  9. <a href="#" click.delegate="toggleSource($event)"><i class="demo-icon ${modal.icon.class}" innerhtml.bind="modal.icon.glyph"></i></a>
  10. </h1>
  11. <h4 class="factbox-description">
  12. ${description[lang]}
  13. <select id="period-selector"
  14. value.bind="selectedPeriod"
  15. change.delegate="periodChanged()"
  16. class="period-selectors form-item">
  17. <option repeat.for="period of periods" model.bind="period">${period.value} ${labels.period[lang]}</option>
  18. </select>
  19. </h4>
  20. <div as-element="sampling-info" id="source-modal" css="visibility: ${modal.visibility}">
  21. </div>
  22. </header>
  23. <section class="samplers">
  24. <div repeat.for="sampler of samplers"
  25. class="sampler sampler-wrapper-${samplers.indexOf(sampler)}">
  26. <div class="reference-group">
  27. <h4 class="reference-group-title">
  28. ${referenceClasses[sampler.id].prefix[lang]} ${sampler.samples.length} ${referenceClasses[sampler.id].infix[lang]}
  29. </h4>
  30. <div class="investment-options-ratio">
  31. <div class="investment-option-selector investment-option-selector-left">
  32. <select id="investment-option-selector"
  33. value.bind="selectedOption1"
  34. change.delegate="investmentOptionChanged()"
  35. class="form-item">
  36. <option repeat.for="iopt of investmentOptions"
  37. disabled.bind="isComparism($index, 0)"
  38. model.bind="iopt">${iopt.desc}</option>
  39. </select>
  40. </div>
  41. <div class="investment-option-range">
  42. <div class="investment-options-range-labels">
  43. <span class="range-label-left">${sampler.stockRatioRepr}</span>
  44. <span class="range-label-right">${sampler.depositRatioRepr}</span>
  45. </div>
  46. <input type="range" id="ratio-sampler-${sampler.id}" min="0" max="1.0" step="0.01" value.bind="sampler.depositRatio" change.delegate="ratioChanged()" />
  47. </div>
  48. <div class="investment-option-selector investment-option-selector-right">
  49. <select id="investment-option-selector"
  50. value.bind="selectedOption2"
  51. change.delegate="investmentOptionChanged()"
  52. class="form-item">
  53. <option repeat.for="iopt of investmentOptions"
  54. disabled.bind="isComparism($index, 1)"
  55. model.bind="iopt">${iopt.desc}</option>
  56. </select>
  57. </div>
  58. </div>
  59. </div>
  60. <sampler-visual
  61. class="visual-${sampler.id}"
  62. sampler.bind="sampler"
  63. soffsets.bind="soffsets"
  64. colours.bind="colours"
  65. lang.bind="lang"
  66. max-samples.bind="maxSamples"
  67. sort-method-id.bind="format.sortId"
  68. if.bind="createVisualisation"
  69. show.bind="format.showVisualisation">
  70. </sampler-visual>
  71. </div>
  72. </section>
  73. <aside>
  74. <div class="buttons size-selectors">
  75. <div repeat.for="gsize of groupSizes" class="size-input">
  76. <input id="size-${gsize.id}" type="radio" class="input-radio" model.bind="gsize.id" checked.bind="format.sizeId" change.delegate="groupSizeChanged" />
  77. <label for="size-${gsize.id}" class="form-item">
  78. ${gsize.name}</label>
  79. </div>
  80. </div>
  81. <sampler-textual
  82. show.bind="format.showText"
  83. class="textual-0"
  84. colours.bind="colours"
  85. sampler.bind="samplers[0]"
  86. textual.bind="textual"
  87. lang.bind="lang"
  88. group-size-id.bind="format.sizeId">
  89. </sampler-textual>
  90. <button class="sample form-item"
  91. if.bind="format.showSampleButton"
  92. click.delegate="sampleButtonClicked($event)"
  93. disabled.bind="maximumSamplesDrawn">
  94. <a href="#"> ${labels.sample[lang]}</a>
  95. </button>
  96. <sampler-textual
  97. show.bind="format.showText"
  98. class="textual-1"
  99. colours.bind="colours"
  100. sampler.bind="samplers[1]"
  101. textual.bind="textual"
  102. lang.bind="lang"
  103. group-size-id.bind="format.sizeId">
  104. </sampler-textual>
  105. <div class="buttons">
  106. <button id="export" class="form-item export-button">
  107. <a href.bind="pdfDownloadURL" id="exportPDF" class="export button"
  108. download.bind="pdfFilename">
  109. <i class="demo-icon icon-download">&#xe801;</i>Faktenbox
  110. </a>
  111. </button>
  112. <button class="form-item"
  113. if.bind="format.showSampleButton"
  114. click.delegate="reset($event)"
  115. disabled.bind="resetEnabled">
  116. <a href="#"><i class="demo-icon icon-ccw">&#xe802;</i>${labels.reset[lang]}</a>
  117. </button>
  118. </div>
  119. </aside>
  120. </main>
  121. </template>