summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/Speedometer/resources/flightjs-example-app/app/templates.js
blob: 99625bd83049b787327d0e76dc05fcb44c923a6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
'use strict';

define(
  function() {
    var mailItem =
      '{{#mailItems}}\
        <tr id="{{id}}" class="mail-item">\
        {{#important}}\
          <td class="span1"><span class="label label-important">Important</span></td>\
        {{/important}}\
        {{^important}}\
          <td class="span1"><span>&nbsp;</span></td>\
        {{/important}}\
          <td class="span2 mailContact">{{name}}</td>\
          <td class="span8">\
            <span class="mailSubject">\
              {{formattedSubject}}\
            </span>\
            <span class="mailMessage">\
              - <a href="#">{{formattedMessage}}</a>\
            </span>\
          </td>\
        </tr>\
      {{/mailItems}}';

    var composeBox =
      '<div id="compose_to" class="modal-header compose-header">\
        To: <select id="recipient_select">\
          {{^reply}}<option id="recipient_hint" class="hint" style="color:#CACACA" >[Select Recipient]</option>{{/reply}}\
          {{#contacts}}\
           <option id="{{id}}"{{#recipient}} selected{{/recipient}}>{{firstName}} {{lastName}}</option>\
          {{/contacts}}\
        </select>\
      </div>\
      <div class="modal-body compose-body">\
        <div id="compose_subject" class="{{#newMail}}hint{{/newMail}}{{^newMail}}compose-header{{/newMail}}" contentEditable="true">\
          {{subject}}\
        </div>\
        <div id="compose_message" class="hint" contentEditable="true">\
          {{message}}\
        </div>\
      </div>\
      <div class="modal-footer">\
        <button id="send_composed" {{^reply}}disabled="disabled"{{/reply}} class="btn btn-primary">Send</button>\
        <button id="cancel_composed" class="btn">Cancel</button>\
      </div>';

    var moveToSelector =
      '<ul class="nav nav-list">\
      {{#moveToItems}}\
        <li id="{{.}}" class="move-to-item">{{.}}</li>\
      {{/moveToItems}}\
      </ul>';

    return {
      mailItem: mailItem,
      composeBox: composeBox,
      moveToSelector: moveToSelector
    }
  }

);