diff options
Diffstat (limited to 'widgets/iframe')
-rw-r--r-- | widgets/iframe/iframe.coffee | 7 | ||||
-rw-r--r-- | widgets/iframe/iframe.html | 1 | ||||
-rw-r--r-- | widgets/iframe/iframe.scss | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/widgets/iframe/iframe.coffee b/widgets/iframe/iframe.coffee new file mode 100644 index 0000000..e674e6b --- /dev/null +++ b/widgets/iframe/iframe.coffee @@ -0,0 +1,7 @@ +class Dashing.Iframe extends Dashing.Widget + +ready: -> + $(@node).find(".iframe").attr('src', @get('src')) + +onData: (data) -> + $(@node).find(".iframe").attr('src', data.src) diff --git a/widgets/iframe/iframe.html b/widgets/iframe/iframe.html new file mode 100644 index 0000000..c626d10 --- /dev/null +++ b/widgets/iframe/iframe.html @@ -0,0 +1 @@ +<iframe class="iframe" data-bind-src="src" frameborder=0></iframe> diff --git a/widgets/iframe/iframe.scss b/widgets/iframe/iframe.scss new file mode 100644 index 0000000..6827a1b --- /dev/null +++ b/widgets/iframe/iframe.scss @@ -0,0 +1,8 @@ +.widget-iframe { + padding: 3px 0px 0px 0px !important; + + iframe { + width: 100%; + height: 100%; + } +} |