비표준 그누보드4 첫커밋
This commit is contained in:
46
cheditor5/popup/js/media.js
Normal file
46
cheditor5/popup/js/media.js
Normal file
@ -0,0 +1,46 @@
|
||||
// ================================================================
|
||||
// CHEditor 5
|
||||
// ----------------------------------------------------------------
|
||||
// Homepage: http://www.chcode.com
|
||||
// Copyright (c) 1997-2011 CHSOFT
|
||||
// ================================================================
|
||||
var button = [
|
||||
{ alt : "", img : 'play.gif', cmd : play },
|
||||
{ alt : "", img : 'submit.gif', cmd : doSubmit },
|
||||
{ alt : "", img : 'cancel.gif', cmd : popupClose }
|
||||
];
|
||||
|
||||
var oEditor = null;
|
||||
|
||||
function init(dialog) {
|
||||
oEditor = this;
|
||||
oEditor.dialog = dialog;
|
||||
|
||||
var dlg = new Dialog(oEditor);
|
||||
dlg.showButton(button);
|
||||
|
||||
dlg.setDialogHeight();
|
||||
}
|
||||
|
||||
function play()
|
||||
{
|
||||
var file = document.getElementById("fm_linkurl");
|
||||
if (!file.value)
|
||||
return;
|
||||
|
||||
var mediaobj = "<embed src='"+file.value+"' autostart='true' loop='true'></embed>";
|
||||
var obj = document.getElementById("play");
|
||||
obj.innerHTML = mediaobj;
|
||||
}
|
||||
|
||||
function doSubmit()
|
||||
{
|
||||
var file = document.getElementById("fm_linkurl");
|
||||
var media = "<embed src='"+file.value+"' autostart='true' loop='true'></embed>";
|
||||
oEditor.insertHtmlPopup(media);
|
||||
popupClose();
|
||||
}
|
||||
|
||||
function popupClose() {
|
||||
oEditor.popupWinClose();
|
||||
}
|
||||
Reference in New Issue
Block a user