Permalink
Browse files

Fix bug with media types and addInputs

  • Loading branch information...
screeley committed Apr 11, 2013
1 parent 0a7ad04 commit 6f2396523639691df3032be0d18e5f94ad91a6f9
Showing with 9 additions and 11 deletions.
  1. +1 −1 demo/link.html
  2. +4 −5 dist/jquery.preview.js
  3. +1 −1 dist/jquery.preview.min.js
  4. +3 −4 src/hidden.js
View
@@ -8,7 +8,7 @@
<script src="../dist/jquery.preview.js" type="text/javascript"></script>
<link rel="stylesheet" href="common/css/foundation.min.css">
<link rel="stylesheet" href="common/css/font-awesome.min.css">
- <link rel="stylesheet" href="common/css/prettify.css" />
+ <link rel="stylesheet" href="../css/preview.css" />
<link rel="stylesheet" href="common/css/demo.css" />
<title>jQuery Preview - Link</title>
</head>
View
@@ -1,4 +1,4 @@
-/*! jQuery Preview - v0.3.0 - 2013-04-08
+/*! jQuery Preview - v0.3.1 - 2013-04-11
* https://github.com/embedly/jquery-preview
* Copyright (c) 2013 Sean Creeley; Licensed BSD */
;(function($){
@@ -205,7 +205,6 @@ var vsprintf = function(fmt, argv) {
'author_url',
'media_type',
'media_html',
- 'media_url',
'media_width',
'media_height'
];
@@ -221,10 +220,10 @@ var vsprintf = function(fmt, argv) {
$.each(args, function(i, key){
var value = '';
- if (key.indexOf('object') === 0){
+ if (key.indexOf('media') === 0){
var name = key.split('_')[1];
- if (data.object.hasOwnProperty(name)){
- value = data.object[name];
+ if (data.media.hasOwnProperty(name)){
+ value = data.media[name];
}
} else if (data.hasOwnProperty(key)){
value = data[key];

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -17,7 +17,6 @@
'author_url',
'media_type',
'media_html',
- 'media_url',
'media_width',
'media_height'
];
@@ -33,10 +32,10 @@
$.each(args, function(i, key){
var value = '';
- if (key.indexOf('object') === 0){
+ if (key.indexOf('media') === 0){
var name = key.split('_')[1];
- if (data.object.hasOwnProperty(name)){
- value = data.object[name];
+ if (data.media.hasOwnProperty(name)){
+ value = data.media[name];
}
} else if (data.hasOwnProperty(key)){
value = data[key];

0 comments on commit 6f23965

Please sign in to comment.