Browse Source

fixed add song modal postion / reduced toast message duration for adding songs

Akira Laine 9 years ago
parent
commit
ab33b93745
2 changed files with 7 additions and 7 deletions
  1. 3 3
      app/client/scripts/events.js
  2. 4 4
      app/client/scripts/onCreated.js

+ 3 - 3
app/client/scripts/events.js

@@ -1462,16 +1462,16 @@ Template.room.events({
             Materialize.toast($toastContent, 8000);
         } else if (Queues.find({"id": songData.id}).count() > 0) {
             var $toastContent = $('<span><strong>Song not added.</strong> This song has already been requested.</span>');
-            Materialize.toast($toastContent, 8000);
+            Materialize.toast($toastContent, 3000);
         } else {
             Meteor.call("addSongToQueue", songData, function (err, res) {
                 console.log(err, res);
                 if (err) {
                     var $toastContent = $('<span><strong>Song not added.</strong> ' + err.reason + '</span>');
-                    Materialize.toast($toastContent, 8000);
+                    Materialize.toast($toastContent, 3000);
                 } else {
                     var $toastContent = $('<span><strong>Song added.</strong> Your song has succesfully been added to the queue.</span>');
-                    Materialize.toast($toastContent, 8000);
+                    Materialize.toast($toastContent, 3000);
                     $('#add_song_modal').closeModal();
                     Session.set("editingSong", false);
                 }

+ 4 - 4
app/client/scripts/onCreated.js

@@ -352,9 +352,9 @@ Template.room.onCreated(function () {
                 $("#chat-slideout").sideNav("hide");
             }
             var marginRightWidth = ($(document).width() - $(".container").width()) / 2 + "px";
-            $(".container").css("margin-right", "370px")
+            $(".room-container").css("margin-right", "370px")
             if($("#playlist-slide-out").css("right") === "0px"){
-                $(".container").css("margin-right", marginRightWidth);
+                $(".room-container").css("margin-right", marginRightWidth);
             }
         });
         $("#chat-slideout").on("click", function(){
@@ -363,9 +363,9 @@ Template.room.onCreated(function () {
             }
             var marginRightWidth = ($(document).width() - $(".container").width()) / 2 + "px";
             $(".chat-ul").scrollTop(1000000);
-            $(".container").css("margin-right", "370px")
+            $(".room-container").css("margin-right", "370px")
             if($("#chat-slide-out").css("right") === "0px"){
-                $(".container").css("margin-right", marginRightWidth);
+                $(".room-container").css("margin-right", marginRightWidth);
             }
         });
         $("body").on("click", function(e){