mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(view) mediaBeforeShow -> view.css
This commit is contained in:
parent
124fb53ff5
commit
c37509cfeb
3 changed files with 6 additions and 13 deletions
|
|
@ -22,3 +22,7 @@
|
|||
*/
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
.media, video {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue