$(function(){
    $("#notification-form input[type=submit]").click(function()
        {
            return confirm("Are you sure you want to send this message?");
        });
    $("#notification-form").bind('submit', function()
       {

           var form = this;

<<<<<<< HEAD
           // Loading animation on click
           var $submitBtn = $('button', form).ladda();
           $submitBtn.ladda( 'start' );
=======
           if ($('input[type=submit]', form).hasClass("loadingAnimation")) {
               var oldValue = $('input[type=submit]', form).attr("value");
               $('input[type=submit]', form).attr("value", "Loading...")
           }
>>>>>>> ce2109833c6326ea8b0e1ef65a442438ddb9f014

           $('input[type=submit]', form).prop('disabled', true);
           var sns = new AWS.SNS(),
           publisher_name = s3AuthObj.rootDirectory,
           app_name = storage.getItem(config.storageAppNameKey),
           msg = $('#message-textarea').val();

           if(!app_name)
           {
               alert("Please select application before sending notification");
           }
           else if(msg == '' || msg.length > 300)
           {
               alert("Message box is empty or is to long, "+
                     "it should be less or equal than 300");
           }
           else
           {
               sns.publish({
                   TargetArn: 'arn:aws:sns:eu-west-1:105216790221:' + 
                       publisher_name + '_' + app_name + '_all',
                   MessageStructure: 'json',
                   Message: JSON.stringify({
                       "default": msg,
                       "APNS": JSON.stringify({
                           "aps": {
                               "alert": msg,
                               "sound": "default"
                           }
                       }),
                       "GCM": JSON.stringify({
                           "data": {
                               "message": msg
                           }
                       }),
                       
                   })
               }, function(err, res)
                  {
                      if(err)
                          alert(err);
                      else
                          alert("Message sent!");
                      $('input[type=submit]', form).prop('disabled', false);

<<<<<<< HEAD
                      // Stop loading animation
                      $submitBtn.ladda( 'stop' );
=======
                      if ($('input[type=submit]', form).hasClass("loadingAnimation")) {
                          $('input[type=submit]', form).attr("value", oldValue);
                      }
>>>>>>> ce2109833c6326ea8b0e1ef65a442438ddb9f014
                  });
           }
           return false;
       });
});

@@ -261,29 +261,16 @@
  this;%0A%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
         
@@ -400,303 +400,8 @@
 ' );
-%0A=======%0A           if ($('input%5Btype=submit%5D', form).hasClass(%22loadingAnimation%22)) %7B%0A               var oldValue = $('input%5Btype=submit%5D', form).attr(%22value%22);%0A               $('input%5Btype=submit%5D', form).attr(%22value%22, %22Loading...%22)%0A           %7D%0A%3E%3E%3E%3E%3E%3E%3E ce2109833c6326ea8b0e1ef65a442438ddb9f014
 %0A%0A  
@@ -1120,17 +1120,16 @@
 0221:' +
- 
 %0A       
@@ -1740,32 +1740,9 @@
 %7D),%0A
-                       
 %0A
+
     
@@ -2043,21 +2043,8 @@
 );%0A%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
     
@@ -2087,16 +2087,16 @@
 imation%0A
+
         
@@ -2141,258 +2141,8 @@
  );%0A
-=======%0A                      if ($('input%5Btype=submit%5D', form).hasClass(%22loadingAnimation%22)) %7B%0A                          $('input%5Btype=submit%5D', form).attr(%22value%22, oldValue);%0A                      %7D%0A%3E%3E%3E%3E%3E%3E%3E ce2109833c6326ea8b0e1ef65a442438ddb9f014%0A
     

Update push.js