diff options
author | Jose Antonio Marquez | 2012-05-10 14:54:38 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-10 14:54:38 -0700 |
commit | fb7a3aa9ce0d9b99dca79cfb89951b5c51523250 (patch) | |
tree | 3fdda43c5f4fc7d83bab9de16f5b02c1155aec20 /js/document/views/design.js | |
parent | 254e2f8ee3e915c7dafe445c724b88434fb52f28 (diff) | |
download | ninja-fb7a3aa9ce0d9b99dca79cfb89951b5c51523250.tar.gz |
Adding partial close functionality
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-x | js/document/views/design.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index 765099e6..1a8f4986 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -289,6 +289,37 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
289 | value: function(x, y) { | 289 | value: function(x, y) { |
290 | return this.iframe.contentWindow.getElement(x,y); | 290 | return this.iframe.contentWindow.getElement(x,y); |
291 | } | 291 | } |
292 | }, | ||
293 | //////////////////////////////////////////////////////////////////// | ||
294 | // | ||
295 | pauseVideos:{ | ||
296 | value:function(){ | ||
297 | var i, videos = this.document.getElementsByTagName("video"); | ||
298 | for(i = 0; i < videos.length; i++){ | ||
299 | if(!videos[i].paused) videos[i].pause(); | ||
300 | } | ||
301 | } | ||
302 | }, | ||
303 | //////////////////////////////////////////////////////////////////// | ||
304 | // | ||
305 | stopVideos:{ | ||
306 | value:function(){ | ||
307 | var i, videos = this.document.getElementsByTagName("video"); | ||
308 | for(i = 0; i < videos.length; i++){ | ||
309 | videos[i].src = ""; | ||
310 | } | ||
311 | } | ||
312 | }, | ||
313 | //////////////////////////////////////////////////////////////////// | ||
314 | // | ||
315 | pauseAndStopVideos:{ | ||
316 | value:function(){ | ||
317 | var i, videos = this.document.getElementsByTagName("video"); | ||
318 | for(i = 0; i < videos.length; i++){ | ||
319 | if(!videos[i].paused) videos[i].pause(); | ||
320 | videos[i].src = ""; | ||
321 | } | ||
322 | } | ||
292 | } | 323 | } |
293 | //////////////////////////////////////////////////////////////////// | 324 | //////////////////////////////////////////////////////////////////// |
294 | //////////////////////////////////////////////////////////////////// | 325 | //////////////////////////////////////////////////////////////////// |