Browse Source

верхнее меню на главной, отправка комментарий

anatoly 7 years ago
parent
commit
ad593486ad
4 changed files with 8 additions and 5 deletions
  1. 5 0
      README.MD
  2. 1 3
      src/app/assets/scripts/comments.js
  3. 2 2
      src/app/assets/scripts/main.js
  4. 0 0
      src/app/www/js/all.min.js

+ 5 - 0
README.MD

@@ -0,0 +1,5 @@
+cd src/app
+npm install gulp-cli -g
+npm install gulp -D
+npm install browser-sync
+npm install gulp-sass

+ 1 - 3
src/app/assets/scripts/comments.js

@@ -112,14 +112,12 @@ var Comments;
                     this.formData[data[i].name] = data[i].value;
                 }
             }
-            console.dir({ UserComments: this.formData });
             $.ajax({
                 url: this.owner.postEndpointUrl,
                 data: { UserComments: this.formData },
                 dataType: 'json',
                 type: 'post'
             }).done((function (data) {
-                console.dir(data);
                 if (data.errors) {
                     for (var fieldName in data.errors) {
                         if (data.errors.hasOwnProperty(fieldName))
@@ -137,7 +135,7 @@ var Comments;
             }).bind(this)).fail((function (xhr) {
                 console.dir(xhr.responseText);
             }).bind(this)).always((function () {
-                this.formData = [];
+                //this.formData = [];
             }).bind(this));
             return true;
         };

+ 2 - 2
src/app/assets/scripts/main.js

@@ -191,9 +191,9 @@
     });
 
     $(window).scroll(function () {
-        if ($(this).scrollTop() > 750 && $('.header, .content').hasClass('loading')) {
+        if ($(this).scrollTop() > 60 && $('.header, .content').hasClass('loading')) {
             $('.header, .content').removeClass('loading').addClass('scrolling');
-        } else if ($(this).scrollTop() <= 750 && $('.header, .content').hasClass('scrolling')) {
+        } else if ($(this).scrollTop() <= 60 && $('.header, .content').hasClass('scrolling')) {
             $('.header, .content').removeClass('scrolling').addClass('loading');
         }
     });

File diff suppressed because it is too large
+ 0 - 0
src/app/www/js/all.min.js


Some files were not shown because too many files changed in this diff