refactor(view) mediaBeforeShow -> view.css

This commit is contained in:
coderaiser 2014-04-25 10:30:11 -04:00
parent 124fb53ff5
commit c37509cfeb
3 changed files with 6 additions and 13 deletions

View file

@ -22,3 +22,7 @@
*/
z-index: 1
}
.media, video {
width: 100%;
}

View file

@ -1,4 +1,4 @@
<div id="js-audio">
<{{ type }} data-name="js-media" class="media" src="{{ src }}" controls autoplay></{{ type }}>
<div class="media">
<{{ type }} data-name="js-media" src="{{ src }}" controls autoplay></{{ type }}>
<p class="reduce-text"><strong>{{ name }}</strong></p>
</div>

View file

@ -110,7 +110,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
parent : Overlay,
beforeShow : function() {
Config.beforeShow();
mediaBeforeShow();
Events.addKey(onKey);
},
beforeClose : function() {
@ -210,16 +209,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
}
}
function mediaBeforeShow() {
var $media = $('[data-name="js-media"'),
width = $media.width() +'px',
$parent = $media.parent();
$parent.width(width);
Key.unsetBind();
}
/**
* function loads css and js of FancyBox
* @callback - executes, when everything loaded