From c37509cfeb93ced54c8c2c0f2719170874819150 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 25 Apr 2014 10:30:11 -0400 Subject: [PATCH] refactor(view) mediaBeforeShow -> view.css --- css/view.css | 4 ++++ html/view/media.html | 4 ++-- lib/client/view.js | 11 ----------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/css/view.css b/css/view.css index 855d7e41..d2cd482c 100644 --- a/css/view.css +++ b/css/view.css @@ -22,3 +22,7 @@ */ z-index: 1 } + +.media, video { + width: 100%; +} \ No newline at end of file diff --git a/html/view/media.html b/html/view/media.html index aa8ad654..313a5f2b 100644 --- a/html/view/media.html +++ b/html/view/media.html @@ -1,4 +1,4 @@ -
- <{{ type }} data-name="js-media" class="media" src="{{ src }}" controls autoplay> +
+ <{{ type }} data-name="js-media" src="{{ src }}" controls autoplay>

{{ name }}

\ No newline at end of file diff --git a/lib/client/view.js b/lib/client/view.js index fbb05634..afe7d207 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -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