U4-855 Embed Media - allow inserting custom HTML into Source tab

This commit is contained in:
Tom Fulton
2012-10-25 17:52:50 +04:00
parent afafcfbb7a
commit 674923468d
2 changed files with 11 additions and 1 deletions

View File

@@ -76,7 +76,7 @@
<div id="source_panel" class="panel">
<fieldset>
<legend>{#embed_dlg.source}</legend>
<textarea id="source"></textarea>
<textarea id="source" onkeydown="UmbracoEmbedDialog.changeSource();"></textarea>
</fieldset>
</div>
</div>

View File

@@ -77,6 +77,16 @@ var UmbracoEmbedDialog = {
if ($('#url').val() != '') {
UmbracoEmbedDialog.showPreview();
}
},
changeSource: function (type) {
if ($('#source').val() != '') {
$('#insert').removeAttr('disabled');
}
else {
$('#insert').attr('disabled', 'disabled');
}
}
};