Commit 0cf49cd546b6c4dd6b9f91a4558fa770fc777373
1 parent
22a7e56f
Exists in
master
and in
5 other branches
Fix #281fix #282 fix #283
Showing
5 changed files
with
21 additions
and
4 deletions
Show diff stats
3.2 KB
2.89 KB
3.2 KB
js/main.js
| @@ -561,10 +561,11 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -561,10 +561,11 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
| 561 | } | 561 | } |
| 562 | }, 300); | 562 | }, 300); |
| 563 | }, | 563 | }, |
| 564 | - displaySuccess: function(container, text, timeout) { | 564 | + displaySuccess: function(container, text, timeout, iconClass) { |
| 565 | timeout = typeof timeout !== 'undefined' ? timeout : 2000; | 565 | timeout = typeof timeout !== 'undefined' ? timeout : 2000; |
| 566 | container.css('opacity', 0.1); | 566 | container.css('opacity', 0.1); |
| 567 | var successPanel = $('.success-panel').clone(); | 567 | var successPanel = $('.success-panel').clone(); |
| 568 | + successPanel.find('.icon').addClass(iconClass); | ||
| 568 | successPanel.find('.message').html(text); | 569 | successPanel.find('.message').html(text); |
| 569 | successPanel.appendTo(container.closest('.categories')); | 570 | successPanel.appendTo(container.closest('.categories')); |
| 570 | successPanel.show(); | 571 | successPanel.show(); |
| @@ -776,7 +777,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -776,7 +777,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
| 776 | $form.siblings('.success-sent').show(); | 777 | $form.siblings('.success-sent').show(); |
| 777 | $form.siblings('.subtitle').hide(); | 778 | $form.siblings('.subtitle').hide(); |
| 778 | $form.siblings('.info').hide(); | 779 | $form.siblings('.info').hide(); |
| 779 | - Main.displaySuccess($form.closest('.make-proposal .section-content'), 'Proposta enviada com sucesso', 2000); | 780 | + Main.displaySuccess($form.closest('.make-proposal .section-content'), 'Proposta enviada com sucesso', 2000, 'icon-proposal-sent'); |
| 780 | }) | 781 | }) |
| 781 | .fail(function( jqxhr, textStatus, error ) { | 782 | .fail(function( jqxhr, textStatus, error ) { |
| 782 | var err = textStatus + ', ' + error; | 783 | var err = textStatus + ', ' + error; |
| @@ -830,7 +831,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -830,7 +831,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
| 830 | } | 831 | } |
| 831 | }).done(function(data) { | 832 | }).done(function(data) { |
| 832 | Main.loginCallback(true, data.private_token); | 833 | Main.loginCallback(true, data.private_token); |
| 833 | - Main.displaySuccess(button.closest('.section-content'), 'Login efetuado com sucesso', 1000); | 834 | + Main.displaySuccess(button.closest('.section-content'), 'Login efetuado com sucesso', 1000, 'icon-login-success'); |
| 834 | }).fail(function( /*data*/ ) { | 835 | }).fail(function( /*data*/ ) { |
| 835 | message.show(); | 836 | message.show(); |
| 836 | message.text('Não foi possível logar'); | 837 | message.text('Não foi possível logar'); |
| @@ -889,7 +890,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -889,7 +890,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
| 889 | data: $(this).parents('.signup').serialize(), | 890 | data: $(this).parents('.signup').serialize(), |
| 890 | }).done(function(data) { | 891 | }).done(function(data) { |
| 891 | Main.loginCallback(true, data.private_token); | 892 | Main.loginCallback(true, data.private_token); |
| 892 | - Main.displaySuccess(button.closest('.section-content'), 'Cadastro efetuado com sucesso', 1000); | 893 | + Main.displaySuccess(button.closest('.section-content'), 'Cadastro efetuado com sucesso', 1000, 'icon-user-created'); |
| 893 | }).fail(function(data) { | 894 | }).fail(function(data) { |
| 894 | var msg = Main.responseToText(data.responseJSON.message); | 895 | var msg = Main.responseToText(data.responseJSON.message); |
| 895 | message.show(); | 896 | message.show(); |
sass/style.sass
| @@ -302,6 +302,21 @@ td | @@ -302,6 +302,21 @@ td | ||
| 302 | background-color: #32dbb5 | 302 | background-color: #32dbb5 |
| 303 | border-bottom: 3px solid darken(#32dbb5, $darken) !important | 303 | border-bottom: 3px solid darken(#32dbb5, $darken) !important |
| 304 | +hover(#32dbb5, $darken) | 304 | +hover(#32dbb5, $darken) |
| 305 | + &-user-created | ||
| 306 | + height: 71px | ||
| 307 | + width: 71px | ||
| 308 | + background: url(images/icons/icon-user-created.png) no-repeat 50% 50% | ||
| 309 | + border-radius: 0 | ||
| 310 | + &-login-success | ||
| 311 | + height: 71px | ||
| 312 | + width: 71px | ||
| 313 | + background: url(images/icons/icon-login-success.png) no-repeat 50% 50% | ||
| 314 | + border-radius: 0 | ||
| 315 | + &-proposal-sent | ||
| 316 | + height: 71px | ||
| 317 | + width: 71px | ||
| 318 | + background: url(images/icons/icon-proposal-sent.png) no-repeat 50% 50% | ||
| 319 | + border-radius: 0 | ||
| 305 | 320 | ||
| 306 | 321 | ||
| 307 | // ------------------------------------ | 322 | // ------------------------------------ |
| @@ -928,6 +943,7 @@ td | @@ -928,6 +943,7 @@ td | ||
| 928 | .success-panel | 943 | .success-panel |
| 929 | position: absolute | 944 | position: absolute |
| 930 | z-index: 100 | 945 | z-index: 100 |
| 946 | + text-align: center | ||
| 931 | 947 | ||
| 932 | // ------------------------------------ | 948 | // ------------------------------------ |
| 933 | // 7 - Modificadores | 949 | // 7 - Modificadores |