Qartvela™ Posted April 20, 2019 Share Posted April 20, 2019 Здравствуйте IPB 3.4.9 globalTemplate :<script> jQuery(document).ready(function($) { $('#forTest').keyup(function() { alert('Test'); }); }); </script> /public/js/3rd_party/ckeditor/ckeditor.js:'</td></tr></tbody></table><style>.'Вставляю:'<input type="text" id="forTest"></td></tr></tbody></table><style>.'Как или что сделать штобы код заработал? Link to comment Share on other sites More sharing options...
siv1987 Posted April 20, 2019 Share Posted April 20, 2019 Что это и зачем? Link to comment Share on other sites More sharing options...
Qartvela™ Posted April 20, 2019 Author Share Posted April 20, 2019 Эст код и кнопка для загрузки видео на форум: <form id="videoForm" method="post" enctype="multipart/form-data"> <div id="video_browse_wrapper">Upload Video <input type="file" id="vfile_browse" name="vFile" accept="video/mp4, video/x-m4v" size="0" /> </div> </form>videoUpload.js:jQuery(function($) { $('#videoForm').on('change', function(e) { $.ajaxSetup({ cache: false }); e.preventDefault(); var size = $('#videoForm')["0"]["0"].files["0"].size / 1048576; var ext = $('#vfile_browse').val().split('.').pop().toLowerCase(); if ($.inArray(ext, ['mp4', 'm4v']) == -1 || size > '101') { alert('Error: blablabla'); } else { //Some data } }); }) Кнопку вставляю через шаблон, Но хочется вставить везде где есть ckeditor, По этому кнопку вставляю в сам ckeditor.js Link to comment Share on other sites More sharing options...
Qartvela™ Posted April 21, 2019 Author Share Posted April 21, 2019 <body onload="Func_forTest()" id='ipboard_body'> <script> function forTest() { jQuery(document).ready(function($) { $("input#forTest").click(function() { alert('Test'); }); }); } function Func_forTest() { setTimeout("forTest()", 2000); } </script> <input id="forTest" type="button" value="Click me"> В ckeditor.js вставлении "Click me" заработал, но с videoUpload.js не мог уладить :( Link to comment Share on other sites More sharing options...
newbie Posted April 21, 2019 Share Posted April 21, 2019 Создайте плагин для ckeditor и добавьте его в \public\js\3rd_party\ckeditor\ips_config.js Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now