Sha256: d8d269741af09e8827cea74b758261716d226c057e10ee51fc2e8740908b75c7

Contents?: true

Size: 889 Bytes

Versions: 1

Compression:

Stored size: 889 Bytes

Contents

// console.log('Loading DateField...')
Spontaneous.Field.WebVideo = (function($, S) {
	var dom = S.Dom;
	var WebVideoField = new JS.Class(Spontaneous.Field.String, {
		// get_input: function() {
		// 	this.input = $(dom.textarea, {'id':this.css_id(), 'name':this.form_name(), 'rows':10, 'cols':30}).text(this.unprocessed_value());
		// 	return this.input;
		// },
		// edit: function() {
		// 	return this.get_input();
		// }
		preview: function() {
			var value = this.get('value')
			, iframe = dom.iframe({src:value, frameborder: 0, border: 0}).css({position: "absolute", top:0, left:0, height: "100%", width: "100%"});
			if (!value) { // don't fill up the page with empty iframes...
				return dom.div();
			}
			return dom.div().css({width: "100%", position: "relative", "padding-bottom":"56.25%", height: 0}).append(iframe)
		}
	});

	return WebVideoField;
})(jQuery, Spontaneous);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta1 application/js/field/webvideo.js