FancyUpload и Яндекс-карты
Приветствую всех, подскажите пожалуйста.
имеется Яндекс карта, при клике на которой всплывает облачко с html-кодом в котором лежит FancyUpload (массовый загрузчик изображенийна на аяксе). в таком виде всё криво отображается и ничего не работает, вытаскиваю этот код просто в тело странички - всё работает... в чем может быть проблема? вот скрипт FancyUpload'a: <script type="text/javascript"> //<![CDATA[ window.addEvent('domready', function() { var up = new FancyUpload2($('demo-status'), $('demo-list'), { verbose: true, url: $('form-demo').action, path: 'source/Swiff.Uploader.swf', typeFilter: { 'Images (*.jpg, *.jpeg)': '*.jpg; *.jpeg' }, target: 'demo-browse', onLoad: function() { $('demo-status').removeClass('hide'); $('demo-fallback').destroy(); this.target.addEvents({ click: function() { return false; }, mouseenter: function() { this.addClass('hover'); }, mouseleave: function() { this.removeClass('hover'); this.blur(); }, mousedown: function() { this.focus(); } }); $('demo-clear').addEvent('click', function() { up.remove(); var action = "../../modules/backend/clear_list.php/?str="+jQuery('#fotos').attr('value')+""; sendRequest(action, "displ_none", getRequest); jQuery('#fotos').attr('value',';'); jQuery('.miniatures').html(''); jQuery('.medium').attr('src','../../images/noimage.gif'); return false; }); $('demo-upload').addEvent('click', function() { up.start(); return false; }); }, onSelectFail: function(files) { files.each(function(file) { new Element('li', { 'class': 'validation-error', html: file.validationErrorMessage || file.validationError, title: MooTools.lang.get('FancyUpload', 'removeTitle'), events: { click: function() { this.destroy(); } } }).inject(this.list, 'top'); }, this); }, onFileSuccess: function(file, response) { var json = new Hash(JSON.decode(response, true) || {}); if (json.get('status') == '1') { file.element.addClass('file-success'); file.element.setStyle('background-image','url('+json.get('min')+')'); jQuery('#fotos').attr('value',jQuery('#fotos').attr('value')+';'+json.get('photo_name')+';'); jQuery('.miniatures').html( jQuery('.miniatures').html()+'<img src="../../upload/min-'+json.get('photo_name')+'">'); if(jQuery('.medium').attr('src','../../images/noimage.gif')) { jQuery('.medium').attr('src','../../upload/medium-'+json.get('photo_name')) }; file.info.set('html', '<strong>Фотография загружена</strong>'); } else { file.element.addClass('file-failed'); file.info.set('html', '<strong>Произошла ошибка:</strong> ' + (json.get('error') ? (json.get('error') + ' #' + json.get('code')) : response)); } }, onFail: function(error) { switch (error) { case 'hidden': // works after enabling the movie and clicking refresh alert('To enable the embedded uploader, unblock it in your browser and refresh (see Adblock).'); break; case 'blocked': // This no *full* fail, it works after the user clicks the button alert('To enable the embedded uploader, enable the blocked Flash movie (see Flashblock).'); break; case 'empty': // Oh oh, wrong path alert('A required file was not found, please be patient and we fix this.'); break; case 'flash': // no flash 9+ :( alert('To enable the embedded uploader, install the latest Adobe Flash plugin.') } } }); }); //]]> </script> |
появилась мысль объеденить весь этот скрипт в функцию и привязать её к вызову того самого окошка html кода с FancyUpload... фух сейчас попробую
|
Часовой пояс GMT +3, время: 01:57. |