|
| 1 | +<style> |
| 2 | +.page-title { |
| 3 | + height: 50px; |
| 4 | + /*line-height: 50px;*/ |
| 5 | + font-size: 26px; |
| 6 | + display: inline-block; |
| 7 | + bac |
| 8 | +} |
| 9 | +.btn-lrs-add, .btn-lrs-del { |
| 10 | + float: right; |
| 11 | + padding: 0 0 0 15px; |
| 12 | +} |
| 13 | +table[class^="lrs-tbl-h"] { |
| 14 | + border: 1px solid #4F4D4D; |
| 15 | +} |
| 16 | +.lrs-tbl th:hover { |
| 17 | + cursor: pointer; |
| 18 | +} |
| 19 | +.tbl-ft { |
| 20 | + height: 20px; |
| 21 | + background: #D6D6D6; |
| 22 | + width: 100%; |
| 23 | +} |
| 24 | +.lrs-tbl { |
| 25 | + border-bottom: 2px solid #CDCBCB; |
| 26 | + border-left: 1px solid #CDCBCB; |
| 27 | + border-right: 1px solid #CDCBCB; |
| 28 | + border-radius-top-left: 20px; |
| 29 | + margin-bottom: 70px; |
| 30 | +} |
| 31 | +input#lrs-check { |
| 32 | + width: 20px; |
| 33 | + height: 20px; |
| 34 | + border: none !important; |
| 35 | +} |
| 36 | +.btn-lrs-add:hover { |
| 37 | + cursor: pointer; |
| 38 | +} |
| 39 | +.fa-plus { |
| 40 | + color: #4EC435; |
| 41 | +} |
| 42 | +.lrs-tbl>thead>tr>th, .lrs-tbl>tbody>tr>th, .lrs-tbl>tfoot>tr>th, .lrs-tbl>thead>tr>td, .lrs-tbl>tbody>tr>td, .lrs-tbl>tfoot>tr>td { |
| 43 | + padding: 12px 20px; |
| 44 | +} |
| 45 | +.table-curved { |
| 46 | + border-collapse: separate; |
| 47 | +} |
| 48 | +.table-curved { |
| 49 | + border: solid #ccc 1px; |
| 50 | + border-radius: 6px; |
| 51 | + border-left: 1px solid #ccc; |
| 52 | +} |
| 53 | +.table-curved td { |
| 54 | + /*border-left: 1px solid #ccc;*/ |
| 55 | + border-top: 1px solid #ccc; |
| 56 | +} |
| 57 | +.table-curved th { |
| 58 | + border-top: none; |
| 59 | +} |
| 60 | +.table-curved th:first-child { |
| 61 | + border-radius: 6px 0 0 0; |
| 62 | +} |
| 63 | +.table-curved th:last-child { |
| 64 | + border-radius: 0 6px 0 0; |
| 65 | +} |
| 66 | +.table-curved th:only-child{ |
| 67 | + border-radius: 6px 6px 0 0; |
| 68 | +} |
| 69 | +.table-curved tr:last-child td:first-child { |
| 70 | + border-radius: 0 0 0 6px; |
| 71 | +} |
| 72 | +.table-curved tr:last-child td:last-child { |
| 73 | + border-radius: 0 0 6px 0; |
| 74 | +} |
| 75 | +.btn-lrs-del:hover { |
| 76 | + cursor: pointer; |
| 77 | +} |
| 78 | +</style> |
1 | 79 | <div class="container"> |
2 | | - <h3>Learning Resources</h3> |
| 80 | +<span id="msg" class="btn"></span> |
| 81 | + <div class="content-head"> |
| 82 | + <div class="page-title">Learning Resources</div> |
| 83 | + <!-- Button trigger modal --> |
| 84 | + <span type="button" class="btn-lrs-del"><i class="fa fa-trash-o fa-2x"></i></span> |
| 85 | + <span type="button" class="btn-lrs-add"><i class="fa fa-plus fa-2x"></i></span> |
| 86 | + <!-- <span type="button" class="btn-lrs-add" data-toggle="modal" data-target="#myModal"><i class="fa fa-plus fa-2x"></i></span> --> |
| 87 | + <!-- <button id="add-button" type="button" class="btn btn-default" data-toggle="modal" data-target="#dialog">Add</button> --> |
| 88 | + </div> |
3 | 89 | <div class="table-responsive"> |
4 | | - <table class="lrs-tbl table table-bordered"> |
| 90 | + <table class="lrs-tbl table-curved"> |
5 | 91 | <tr class="lrs-tbl-header"> |
6 | | - <!-- <th class="lrs-tbl-h-n">#</th> --> |
7 | 92 | <th class="lrs-tbl-h-t"><a class="sortByTitle">Title</a></th> |
8 | 93 | <th class="lrs-tbl-h-rt"><a class="sortByResourceType">Type</a></th> |
9 | 94 | <th class="lrs-tbl-h-a"><a class="sortByAuthors">Authors</th> |
10 | 95 | <th class="lrs-tbl-h-d"><a class="sortByDescription">Description</th> |
| 96 | + <th class="lrs-tbl-h-de"><a class="delResource"></th> |
11 | 97 | </tr> |
12 | 98 | <% _.each( models, function( model ){ %> |
13 | 99 | <tr> |
14 | | - <!-- <td></td> --> |
15 | | - <td><%- model.attributes.title %></td> |
| 100 | + <td><a href="#learning-resources/<%- model.attributes.id %>"><%- model.attributes.title.substr(0,50) %></a></td> |
16 | 101 | <td><%- model.attributes.resourceType %></td> |
17 | 102 | <td><%- model.attributes.authors %></td> |
18 | | - <td><%- model.attributes.description %></td> |
| 103 | + <td><%- model.attributes.description.substr(0,60) %></td> |
| 104 | + <td><input type="checkbox" id="lrs-check" value="<% if (model.attributes.id) { %><%= model.attributes.id %><% } else { %><%= 'na' %><% } %>"></td> |
19 | 105 | </tr> |
20 | 106 | <% }); %> |
21 | 107 | </table> |
22 | 108 | </div> |
23 | 109 | </div> |
| 110 | + |
| 111 | +<!-- Modal No Backbone --> |
| 112 | +<!-- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
| 113 | + <div class="modal-dialog"> |
| 114 | + <div class="modal-content"> |
| 115 | + <div class="modal-header"> |
| 116 | + <button type="button" class="close" data-dismiss="modal">×<span class="sr-only">Close</span></button> |
| 117 | + <h4 class="modal-title">Add Learning Resource</h4> |
| 118 | + </div> |
| 119 | + <div class="modal-body"> |
| 120 | + <form role="form" class="form-horizontal"> |
| 121 | + <div class="form-group"> |
| 122 | + <label class="col-sm-2" for="title">Title</label> |
| 123 | + <div class="col-sm-10"> |
| 124 | + <input id="lrs-add-title" class="form-control" type="text" placeholder="Title" value=""> |
| 125 | + </div> |
| 126 | + </div> |
| 127 | + <div class="form-group"> |
| 128 | + <label class="col-sm-2" for="title">Resource Type</label> |
| 129 | + <div class="col-sm-10"> |
| 130 | + <select id="lrs-add-resourceType" class="form-control"> |
| 131 | + <option value="document">Document</option> |
| 132 | + <option value="link">Link</option> |
| 133 | + <option value="presentation">Presentation</option> |
| 134 | + </select> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + <div class="form-group"> |
| 138 | + <label class="col-sm-2" for="tags">Authors</label> |
| 139 | + <div class="col-sm-10"> |
| 140 | + <input id="lrs-add-authors" type="text" class="form-control" placeholder="Authors" value=""> |
| 141 | + </div> |
| 142 | + </div> |
| 143 | + <div class="form-group"> |
| 144 | + <label class="col-sm-2" for="description">Description</label> |
| 145 | + <div class="col-sm-10"> |
| 146 | + <textarea id="lrs-add-description" class="form-control" rows="3" placeholder="Description" value=""></textarea> |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + </form> |
| 150 | + </div> |
| 151 | + <div class="modal-footer"> |
| 152 | + <button type="button" class="btn btn-danger pull-left" data-dismiss="modal">Cancel</button> --> |
| 153 | + <!-- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> --> |
| 154 | +<!-- <button type="button" id="lrs-add-save" class="btn btn-primary">Add</button> |
| 155 | + <button type="button" id="lrs-dismiss" data-dismiss="modal" hidden></button> |
| 156 | + </div> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + </div> |
| 160 | + --> |
| 161 | +<script id="dialog-template" type="text/template"> |
| 162 | + <div class="modal-dialog"> |
| 163 | + <div class="modal-content"> |
| 164 | + <div class="modal-header"> |
| 165 | + <button type="button" class="close" data-dismiss="modal">×<span class="sr-only">Close</span></button> |
| 166 | + <h4 class="modal-title">Add Learning Resource</h4> |
| 167 | + </div> |
| 168 | + <div class="modal-body"> |
| 169 | + <form role="form" class="form-horizontal"> |
| 170 | + <div class="form-group"> |
| 171 | + <label class="col-sm-2" for="title">Title</label> |
| 172 | + <div class="col-sm-10"> |
| 173 | + <input id="lrs-add-title" class="form-control" type="text" placeholder="Title" value=""> |
| 174 | + </div> |
| 175 | + </div> |
| 176 | + <div class="form-group"> |
| 177 | + <label class="col-sm-2" for="title">Resource Type</label> |
| 178 | + <div class="col-sm-10"> |
| 179 | + <select id="lrs-add-resourceType" class="form-control"> |
| 180 | + <option value="document">Document</option> |
| 181 | + <option value="link">Link</option> |
| 182 | + <option value="presentation">Presentation</option> |
| 183 | + </select> |
| 184 | + </div> |
| 185 | + </div> |
| 186 | + <div class="form-group"> |
| 187 | + <label class="col-sm-2" for="tags">Authors</label> |
| 188 | + <div class="col-sm-10"> |
| 189 | + <input id="lrs-add-authors" type="text" class="form-control" placeholder="Authors" value=""> |
| 190 | + </div> |
| 191 | + </div> |
| 192 | + <div class="form-group"> |
| 193 | + <label class="col-sm-2" for="description">Description</label> |
| 194 | + <div class="col-sm-10"> |
| 195 | + <textarea id="lrs-add-description" class="form-control" rows="3" placeholder="Description" value=""></textarea> |
| 196 | + </div> |
| 197 | + </div> |
| 198 | + </form> |
| 199 | + </div> |
| 200 | + <div class="modal-footer"> |
| 201 | + <button type="button" class="btn btn-danger pull-left" data-dismiss="modal">Cancel</button> |
| 202 | + <!-- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> --> |
| 203 | + <button type="button" id="lrs-add-save" class="btn btn-primary">Add</button> |
| 204 | + <button type="button" id="lrs-dismiss" data-dismiss="modal" hidden></button> |
| 205 | + </div> |
| 206 | + </div> |
| 207 | + </div> |
| 208 | + </div> |
| 209 | + </script> |
0 commit comments