Commit 6cb5005baf990c345b6e36733c1bf71987f69010
Committed by
Paulo Meireles
1 parent
6f00a24a
Exists in
master
and in
22 other branches
[Mezuro] Draft to datePicker calendar icon.
Showing
1 changed file
with
11 additions
and
13 deletions
Show diff stats
plugins/mezuro/views/mezuro_plugin_project/_project_result.rhtml
| 1 | 1 | <% unless @content.errors[:base].nil? %> |
| 2 | 2 | <%= @content.errors[:base] %> |
| 3 | 3 | <% else %> |
| 4 | - <p> Choose a date to see specific project results: </p> | |
| 5 | - <div id="datepicker" data-date="<%= @project_result.date %>"> | |
| 6 | - <input id="datepicker_field" style="display:none"/> | |
| 7 | - </div> | |
| 8 | - | |
| 4 | + <p> Choose a date to see specific project results: <input type="image" id="datepicker" /> </p> | |
| 5 | + <div id="current_project_date" data-date="<%= @project_result.date %>"/> | |
| 6 | + | |
| 9 | 7 | <h4><%= _('Last Result') %></h4> |
| 10 | 8 | |
| 11 | 9 | <table> |
| ... | ... | @@ -25,15 +23,15 @@ |
| 25 | 23 | |
| 26 | 24 | |
| 27 | 25 | <script> |
| 28 | - jQuery(document).ready(function($) { | |
| 29 | - $("#datepicker").datepicker({ altField: '#datepicker_field', showOn: 'button', dateFormat: "yy-mm-dd", | |
| 30 | - buttonImageOnly: true, buttonImage: '/images/calendar_date_select/calendar.png', | |
| 31 | - onSelect: function(dateText, inst) { | |
| 32 | - reloadProjectWithDate(dateText) } }); | |
| 33 | - var date = jQuery("#datepicker").attr('data-date').substr(0,10); | |
| 34 | - $("#datepicker").datepicker( "setDate" , date ); | |
| 26 | + jQuery(document).ready(function($) { | |
| 27 | + $("#datepicker").datepicker({ showOn: 'button', dateFormat: "yy-mm-dd", | |
| 28 | + buttonImageOnly: true, buttonImage: '/images/calendar_date_select/calendar.png', | |
| 29 | + onSelect: function(dateText, inst) { | |
| 30 | + reloadProjectWithDate(dateText) } }); | |
| 31 | + var date = jQuery("#current_project_date").attr('data-date').substr(0,10); | |
| 32 | + $("#datepicker").datepicker( "setDate" , date ); | |
| 35 | 33 | |
| 36 | - }); | |
| 34 | + }); | |
| 37 | 35 | </script> |
| 38 | 36 | |
| 39 | 37 | <% end %> | ... | ... |