Commit 0cf49cd546b6c4dd6b9f91a4558fa770fc777373

Authored by Leonardo Merlin
1 parent 22a7e56f

Fix #281fix #282 fix #283

images/icons/icon-login-success.png 0 → 100644

3.2 KB

images/icons/icon-proposal-sent.png 0 → 100644

2.89 KB

images/icons/icon-user-created.png 0 → 100644

3.2 KB

js/main.js
... ... @@ -561,10 +561,11 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
561 561 }
562 562 }, 300);
563 563 },
564   - displaySuccess: function(container, text, timeout) {
  564 + displaySuccess: function(container, text, timeout, iconClass) {
565 565 timeout = typeof timeout !== 'undefined' ? timeout : 2000;
566 566 container.css('opacity', 0.1);
567 567 var successPanel = $('.success-panel').clone();
  568 + successPanel.find('.icon').addClass(iconClass);
568 569 successPanel.find('.message').html(text);
569 570 successPanel.appendTo(container.closest('.categories'));
570 571 successPanel.show();
... ... @@ -776,7 +777,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
776 777 $form.siblings('.success-sent').show();
777 778 $form.siblings('.subtitle').hide();
778 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 782 .fail(function( jqxhr, textStatus, error ) {
782 783 var err = textStatus + ', ' + error;
... ... @@ -830,7 +831,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
830 831 }
831 832 }).done(function(data) {
832 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 835 }).fail(function( /*data*/ ) {
835 836 message.show();
836 837 message.text('Não foi possível logar');
... ... @@ -889,7 +890,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
889 890 data: $(this).parents('.signup').serialize(),
890 891 }).done(function(data) {
891 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 894 }).fail(function(data) {
894 895 var msg = Main.responseToText(data.responseJSON.message);
895 896 message.show();
... ...
sass/style.sass
... ... @@ -302,6 +302,21 @@ td
302 302 background-color: #32dbb5
303 303 border-bottom: 3px solid darken(#32dbb5, $darken) !important
304 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 943 .success-panel
929 944 position: absolute
930 945 z-index: 100
  946 + text-align: center
931 947  
932 948 // ------------------------------------
933 949 // 7 - Modificadores
... ...