rjs_gadget_erp5_listbox_html.html 6.49 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, user-scalable=no" />
    <title>ERP5 Listbox</title>

    <!-- renderjs -->
    <script src="rsvp.js" type="text/javascript"></script>
    <script src="renderjs.js" type="text/javascript"></script>
11
    <script src="jiodev.js" type="text/javascript"></script>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    <script src="handlebars.js" type="text/javascript"></script>

    <!-- custom script -->
    <script src="gadget_erp5_field_listbox.js" type="text/javascript"></script>

    <script id="listbox-hidden-thead-template" type="text/x-handlebars-template">
      <table>
       <thead class="ui-bar-inherit head">
         <tr>
           {{#if show_anchor}}
             <th data-i18n="Jump">Jump</th>
           {{/if}}
           {{#each head_value}}
              <th  data-i18n="{{data-i18n}}" class="{{class_value}}">{{text}}</th>
           {{/each}}
27 28 29
           {{#if line_icon}}
             <th></th>
           {{/if}}
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
         </tr>
       </thead>
      </table>
    </script>

    <script id="listbox-show-thead-template" type="text/x-handlebars-template">
      <table>
       <thead class="ui-bar-inherit head">
         <tr>
           {{#if show_anchor}}
             <th data-i18n="Jump">Jump</th>
           {{/if}}
           <th></th>
           {{#each head_value}}
              <th  data-i18n="{{data-i18n}}" class="{{class_value}}">{{text}}</th>
           {{/each}}
46 47 48
           {{#if line_icon}}
             <th></th>
           {{/if}}
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
         </tr>
       </thead>
      </table>
    </script>
    
    <script id="listbox-hidden-tbody-template" type="text/x-handlebars-template">
     <table>
       <tbody class="tbody">
        {{#each body_value}}
          <tr>
           {{#if ../show_anchor}}
             <th>
               <a class="ui-link ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext" href="{{jump}}" </a>
             </th>
           {{/if}}
           {{#each tr_value}}
              <th>
                {{#if type}}
                  {{#if editable}}
                    <div class="editable_div" column="{{column}}" line="{{line}}"></div>
                  {{else}}
                    <a href="{{href}}" class="ui-link">
                      <div class="editable_div" column="{{column}}" line="{{line}}"></div>
                    </a>
                  {{/if}}
                {{else}}
                  <a href="{{href}}" class="ui-link" >{{text}}</a>
                {{/if}}
              </th>
           {{/each}}
79 80 81 82 83
           {{#if line_icon}}
             <th>
               <a href ="{{jump}}" class="ui-body-inherit ui-btn-icon-right ui-link ui-btn ui-corner-all ui-icon-mail-forward"></a>
            </th>
           {{/if}}
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
         </tr>
        {{/each}}
       </tbody>
      </table>
    </script>


    <script id="listbox-show-tbody-template" type="text/x-handlebars-template">
       <table>
       <tbody class="tbody">
        {{#each body_value}}
           <tr>
             {{#if ../show_anchor}}
                <th>
                  <a class="ui-link ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext" href="{{jump}}" </a>
                </th>
             {{/if}}
             <th>
               <input value="{{value}}" type="checkbox" checked="true" class="hide_element">
              </th>
           {{#each tr_value}}
              <th>
                {{#if type}}
                  {{#if editable}}
                    <div class="editable_div" column="{{column}}" line="{{line}}"></div>
                  {{else}}
                    <a href="{{href}}" class="ui-link">
                      <div class="editable_div" column="{{column}}" line="{{line}}"></div>
                    </a>
                  {{/if}}
                {{else}}
                  <a href="{{href}}" class="ui-link" >{{text}}</a>
                {{/if}}
              </th>
           {{/each}}
119 120 121 122 123
           {{#if line_icon}}
             <th>
               <a href ="{{jump}}" class="ui-body-inherit ui-btn-icon-right ui-link ui-btn ui-corner-all ui-icon-mail-forward"></a>
             </th>
            {{/if}}
124 125 126 127 128 129 130 131 132 133 134 135 136 137
         </tr>
        {{/each}}
       </tbody>
      </table>
    </script>

    <script id="listbox-tfoot-template" type="text/x-handlebars-template">
      <table>
       <tfoot class="ui-bar-inherit tfoot">
        <th colspan="{{colspan}}">
          <div class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all ui-paging-menu">
            <div class="ui-controlgroup-controls">
              <a class="{{previous_classname}}" data-i18n="Previous" href="{{previous_url}}">Previous</a>
              <a class="{{next_classname}}" data-i18n="Next" href="{{next_url}}">Next</a>
138
              <span class="ui-btn ui-disabled" data-i18n="{{record}}">{{record}}</span>
139 140 141 142 143 144 145 146 147
            </div>
          </div>
        </th>
       </tfoot>
      </table>
    </script>

    <script id="listbox-template" type="text/x-handlebars-template">
      <div class="ui-table-header ui-header ui-bar-c ui-corner-all">
148 149 150
        <h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}</h1>
        <!--div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
          <div class="ui-controlgroup-controls"-->
151
            <button data-rel="hide" data-i18n="Hide Rows" name="Hide" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">Hide Rows</button>
152
          <!--/div>
153 154
        </div>
        <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
155
          <div class="ui-controlgroup-controls"-->
156
            <button data-rel="Sort" data-i18n="Sort" name="Sort" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-sort-amount-desc ui-btn-icon-left {{hide_sort}}">Sort</button>
157 158
          <!--/div>
        </div-->
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
      </div>
      <table class="ui-responsive ui-body-c ui-table-inset">
        <thead class="ui-bar-inherit thead"></thead>
        <tbody></tbody>
        <tfoot class="ui-bar-inherit tfoot"></tfoot>
      </table>
    </div>
  </script>
  
  
  
  <script id="error-message-template" type="text/x-handlebars-template">
    <div class="ui-listbox-error">
		   <a class="ui-btn ui-corner-all ui-btn-inline" href="{{reset_url}}">
		     <span style="color:red" data-i18n="Invalid Search Criteria">Invalid Search Criteria</span>
		     <span>-</span>
         <span data-i18n="Reset">Reset</span>
       </a>
    </div>
  </script>

  </head>
  <body>
    <div class="document_table">
    </div>
  </body>
</html>