Changeset 4040:6f54ca9d1431
- Timestamp:
- 09/19/19 17:18:10 (5 years ago)
- Branch:
- 2.15
- Location:
- plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcCKEditor/js/popup_media.js
r4010 r4040 110 110 // Video media 111 111 const oplayer = $(`<div>${$('#public_player').val()}</div>`); 112 let flashvars = $('[name=FlashVars]', oplayer).val();113 112 114 113 const align_video = $('input[name="alignment"]:checked', insert_form).val(); 115 116 const title = insert_form.elements.title.value;117 if (title) {118 flashvars = `title=${encodeURI(title)}&${flashvars}`;119 }120 114 121 115 const vw = $('#video_w').val(); … … 125 119 $('video', oplayer).attr('width', vw); 126 120 $('object', oplayer).attr('width', vw); 127 flashvars = flashvars.replace(/(width=\d*)/, 'width=' + vw);128 121 } else { 129 122 $('video', oplayer).removeAttr('width'); 130 123 $('object', oplayer).removeAttr('width'); 131 flashvars = flashvars.replace(/(width=\d*)/, '');132 124 } 133 125 if (vh > 0) { 134 126 $('video', oplayer).attr('height', vh); 135 127 $('object', oplayer).attr('height', vh); 136 flashvars = flashvars.replace(/(height=\d*)/, 'height=' + vh);137 128 } else { 138 129 $('video', oplayer).removeAttr('height'); 139 130 $('object', oplayer).removeAttr('height'); 140 flashvars = flashvars.replace(/(height=\d*)/, '');141 131 } 142 132 143 $('[name=FlashVars]', oplayer).val(flashvars);144 133 let player_video = oplayer.html(); 145 134 -
plugins/dcLegacyEditor/js/jsToolBar/popup_media.js
r4010 r4040 69 69 { 70 70 var oplayer = $(`<div>${$('#public_player').val()}</div>`); 71 var flashvars = $('[name=FlashVars]', oplayer).val();72 71 73 72 align = $('input[name="alignment"]:checked', insert_form).val(); 74 75 var title = insert_form.elements.title.value;76 if (title) {77 flashvars = 'title=' + encodeURI(title) + '&' + flashvars;78 }79 73 80 74 var vw = $('#video_w').val(); … … 84 78 $('video', oplayer).attr('width', vw); 85 79 $('object', oplayer).attr('width', vw); 86 flashvars = flashvars.replace(/(width=\d*)/, 'width=' + vw);87 80 } else { 88 81 $('video', oplayer).removeAttr('width'); 89 82 $('object', oplayer).removeAttr('width'); 90 flashvars = flashvars.replace(/(width=\d*)/, '');91 83 } 92 84 if (vh > 0) { 93 85 $('video', oplayer).attr('height', vh); 94 86 $('object', oplayer).attr('height', vh); 95 flashvars = flashvars.replace(/(height=\d*)/, 'height=' + vh);96 87 } else { 97 88 $('video', oplayer).removeAttr('height'); 98 89 $('object', oplayer).removeAttr('height'); 99 flashvars = flashvars.replace(/(height=\d*)/, '');100 90 } 101 91 102 $('[name=FlashVars]', oplayer).val(flashvars);103 92 player = oplayer.html(); 104 93
Note: See TracChangeset
for help on using the changeset viewer.