Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add a refresh button to the member list for viewing additions made by…

… other users without refreshing. Fixes AEROGEAR-221
  • Loading branch information...
commit 27352601a6cd4ee40b18d2860e0c11e667de037e 1 parent f913200
Kris Borchers authored
7 kitchensink-html5-mobile/src/main/webapp/css/d.screen.css
@@ -157,9 +157,14 @@ legend {
157 157 #mem_tbl tfoot {
158 158 font-size: 10px;
159 159 background-color: #EAECEE;
  160 + text-align: center;
  161 +}
  162 +
  163 +#refreshButtonD {
  164 + float: right;
160 165 }
161 166
162 167 /* Hide Mobile Site Elements */
163   -.header, .footer, .mobileicon {
  168 +.header, .footer, .mobileicon, #refreshButtonM {
164 169 display: none;
165 170 }
6 kitchensink-html5-mobile/src/main/webapp/css/m.screen.css
@@ -161,6 +161,10 @@ a {
161 161 border: none;
162 162 }
163 163
  164 +#member-art .ui-content .ui-btn {
  165 + float: right;
  166 +}
  167 +
164 168 /* Hide column header rows if present */
165 169 .columnNames {
166 170 display: none;
@@ -231,6 +235,6 @@ a {
231 235 }
232 236
233 237 /* Hide Desktop Items */
234   -section > h1, article > h2, aside > h3, footer, .desktop-only {
  238 +section > h1, article > h2, aside > h3, footer, .desktop-only, #mem_tbl .ui-btn {
235 239 display: none;
236 240 }
1  kitchensink-html5-mobile/src/main/webapp/css/screen.css
@@ -61,7 +61,6 @@ span.success {
61 61 #mem_tbl tfoot {
62 62 height: 20px;
63 63 font-weight: bold;
64   - text-align: center;
65 64 }
66 65
67 66 /* Using new CSS3 selectors for styling*/
7 kitchensink-html5-mobile/src/main/webapp/index.html
@@ -138,6 +138,10 @@
138 138 $('span.invalid').remove();
139 139 $('span.success').remove();
140 140 });
  141 +
  142 + $("#refreshButtonD, #refreshButtonM").click(function(event) {
  143 + updateMemberTable();
  144 + });
141 145 });
142 146
143 147 $.fn.serializeObject = function() {
@@ -278,7 +282,7 @@
278 282
279 283 <div data-role="content">
280 284 <p class="desktop-only">This table is populated and constructed using restful GET calls to the server, and uses CSS3 based selectors for styling. When the page is requested jQuery is used to send the JAX-RS request for the current list of members. The table is them populated dynamically using JavaScript. See app.js for more details.</p>
281   -
  285 + <button id="refreshButtonM" data-role="button" data-inline="true" data-icon="refresh">Refresh Members</button>
282 286 <table id="mem_tbl">
283 287 <thead>
284 288 <tr>
@@ -295,6 +299,7 @@
295 299 <!-- Sets the JAX-RS URLs to retrieve all members either as XML or JSON data.-->
296 300 REST URL for all members:
297 301 <a href="rest/members" target="_blank" rel="external">JSON</a>
  302 + <button id="refreshButtonD">Refresh Members</button>
298 303 </td>
299 304 </tr>
300 305 </tfoot>
1  kitchensink-html5-mobile/src/main/webapp/js/app.js
@@ -43,6 +43,7 @@ function updateMemberTable() {
43 43 cache: false,
44 44 success: function(data) {
45 45 $('#members').empty().append(buildMemberRows(data));
  46 + if ($.mobile) $.mobile.fixedToolbars.show();
46 47 },
47 48 error: function(error) {
48 49 //console.log("error updating table -" + error.status);

0 comments on commit 2735260

Please sign in to comment.
Something went wrong with that request. Please try again.