Browse Source

Improved audio player directive

master
Igor Zhukov 10 years ago
parent
commit
1d26e46a5a
  1. 5
      app/js/directives.js
  2. 2
      app/partials/desktop/message.html
  3. 3
      app/partials/desktop/message_attach_audio.html
  4. 4
      app/partials/mobile/message.html
  5. 3
      app/partials/mobile/message_attach_audio.html

5
app/js/directives.js

@ -203,11 +203,6 @@ angular.module('myApp.directives', ['myApp.filters'])
} }
}; };
}) })
.directive('myMessageAudio', function() {
return {
templateUrl: templateUrl('message_attach_audio')
};
})
.directive('myMessageMap', function() { .directive('myMessageMap', function() {
return { return {
templateUrl: templateUrl('message_attach_map') templateUrl: templateUrl('message_attach_map')

2
app/partials/desktop/message.html

@ -53,7 +53,7 @@
<div ng-switch-when="messageMediaPhoto" my-message-photo></div> <div ng-switch-when="messageMediaPhoto" my-message-photo></div>
<div ng-switch-when="messageMediaVideo" my-message-video></div> <div ng-switch-when="messageMediaVideo" my-message-video></div>
<div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media.document" message-id="historyMessage.id"></div> <div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media.document" message-id="historyMessage.id"></div>
<div ng-switch-when="messageMediaAudio" my-message-audio></div> <div ng-switch-when="messageMediaAudio" class="im_message_audio" my-audio-player audio="historyMessage.media.audio"></div>
<div ng-switch-when="messageMediaGeo" my-message-map></div> <div ng-switch-when="messageMediaGeo" my-message-map></div>
<div ng-switch-when="messageMediaContact" my-message-contact></div> <div ng-switch-when="messageMediaContact" my-message-contact></div>
<div ng-switch-when="messageMediaPending" my-message-pending></div> <div ng-switch-when="messageMediaPending" my-message-pending></div>

3
app/partials/desktop/message_attach_audio.html

@ -1,3 +0,0 @@
<div class="im_message_audio">
<div my-audio-player audio="historyMessage.media.audio"></div>
</div>

4
app/partials/mobile/message.html

@ -42,8 +42,8 @@
<div ng-switch-when="messageMediaPhoto" my-message-photo></div> <div ng-switch-when="messageMediaPhoto" my-message-photo></div>
<div ng-switch-when="messageMediaVideo" my-message-video></div> <div ng-switch-when="messageMediaVideo" my-message-video></div>
<div ng-switch-when="messageMediaDocument" my-message-document></div> <div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media.document" message-id="historyMessage.id"></div>
<div ng-switch-when="messageMediaAudio" my-message-audio></div> <div ng-switch-when="messageMediaAudio" class="im_message_audio" my-audio-player audio="historyMessage.media.audio"></div>
<div ng-switch-when="messageMediaGeo" my-message-map></div> <div ng-switch-when="messageMediaGeo" my-message-map></div>
<div ng-switch-when="messageMediaContact" my-message-contact></div> <div ng-switch-when="messageMediaContact" my-message-contact></div>
<div ng-switch-when="messageMediaPending" my-message-pending></div> <div ng-switch-when="messageMediaPending" my-message-pending></div>

3
app/partials/mobile/message_attach_audio.html

@ -1,3 +0,0 @@
<div class="im_message_audio">
<div my-audio-player audio="historyMessage.media.audio"></div>
</div>
Loading…
Cancel
Save