Commit 5add38d1f4137c05e09da889bde7d6f70c7ea2bf

Authored by Pedro de Lyra Pereira
1 parent 13cde793

Adding tooltips to use report page

Showing 2 changed files with 27 additions and 8 deletions   Show diff stats
style.css
... ... @@ -3241,7 +3241,7 @@ input[type=checkbox] {
3241 3241 }
3242 3242  
3243 3243 #content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments input {
3244   - margin-top: 5px;
  3244 + margin-top: 3px;
3245 3245 padding: 4px 3px 3px 3px;
3246 3246 width: 366px;
3247 3247 }
... ... @@ -3292,6 +3292,16 @@ input[type=checkbox] {
3292 3292 margin-top: 4px;
3293 3293 }
3294 3294  
  3295 +#content .star-rate-form .star-comment-container .star-tooltip {
  3296 + content: '?';
  3297 + border-radius: 90%;
  3298 + font-size: 12px;
  3299 + font-weight: 700;
  3300 + background: #3867b7;
  3301 + color: #fff;
  3302 + margin-left: 4px;
  3303 + padding: 0px 6px;
  3304 +}
3295 3305  
3296 3306 .star-rate-data {
3297 3307 background-image: url('images/validacao_frontend_relato_de_uso.jpg');
... ...
theme.js
... ... @@ -121,10 +121,10 @@ $('#link-buscar').click(function(e) {
121 121 function insert_notice_div(){
122 122 var notice = $('.display-content-block').find('li');
123 123 notice.each(function(){
124   - var $set = $(this).children();
  124 + var $set = $(this).children();
125 125 for(var i=1, len = $set.length; i < len; i+=5){
126 126 $set.slice(i, i+5).wrapAll('<div class="notice-item"/>');
127   - }
  127 + }
128 128 for(var i=2, len = $set.length; i < len; i+=3){
129 129 $set.slice(i, i+3).wrapAll('<div class="notice-info"/>');
130 130 }
... ... @@ -136,12 +136,16 @@ $(&#39;#link-buscar&#39;).click(function(e) {
136 136  
137 137 /* Finds all uploaded files from manuals page and sets its names on the right format */
138 138 function set_uploaded_files_names() {
139   - var article = document.getElementById('article');
140   - var folderList = article.getElementsByClassName('folder-content')[0];
141   - var folderItens = folderList.getElementsByClassName('item-description');
  139 + try {
  140 + var article = document.getElementById('article');
  141 + var folderList = article.getElementsByClassName('folder-content')[0];
  142 + var folderItens = folderList.getElementsByClassName('item-description');
  143 +
  144 + for(var i = 0; i < folderItens.length; i++) {
  145 + split_file_extension(folderItens[i].getElementsByTagName('a')[0]);
  146 + }
  147 + } catch(e) {
142 148  
143   - for(var i = 0; i < folderItens.length; i++) {
144   - split_file_extension(folderItens[i].getElementsByTagName('a')[0]);
145 149 }
146 150 }
147 151  
... ... @@ -155,11 +159,16 @@ $(&#39;#link-buscar&#39;).click(function(e) {
155 159 }
156 160 }
157 161  
  162 + function set_tooltip_content() {
  163 + $('.star-tooltip').html("?");
  164 + }
  165 +
158 166 $(document).ready(function(){
159 167 set_events();
160 168 move_article_buttons();
161 169 add_link_to_article_div();
162 170 insert_notice_div();
163 171 set_uploaded_files_names();
  172 + set_tooltip_content();
164 173 });
165 174 })(jQuery);
... ...