Updating oembed to version 1.11 + adding missing files inside the ckeditor package.

skala
Julio Montoya 13 years ago
parent fb5a8985e6
commit d1174a7209
  1. 10
      main/inc/lib/javascript/ckeditor/adapters/jquery.js
  2. 5
      main/inc/lib/javascript/ckeditor/lang/id.js
  3. 5
      main/inc/lib/javascript/ckeditor/lang/si.js
  4. 10
      main/inc/lib/javascript/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js
  5. 9
      main/inc/lib/javascript/ckeditor/plugins/a11yhelp/dialogs/lang/id.js
  6. 8
      main/inc/lib/javascript/ckeditor/plugins/a11yhelp/dialogs/lang/si.js
  7. 9
      main/inc/lib/javascript/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js
  8. 9
      main/inc/lib/javascript/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js
  9. BIN
      main/inc/lib/javascript/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png
  10. BIN
      main/inc/lib/javascript/ckeditor/plugins/icons_hidpi.png
  11. 22
      main/inc/lib/javascript/ckeditor/plugins/oembed/lang/pl.js
  12. 42
      main/inc/lib/javascript/ckeditor/plugins/oembed/lang/ru.js
  13. 124
      main/inc/lib/javascript/ckeditor/plugins/oembed/libs/jquery.oembed.js
  14. 2
      main/inc/lib/javascript/ckeditor/plugins/oembed/libs/jquery.oembed.min.js
  15. 236
      main/inc/lib/javascript/ckeditor/plugins/oembed/plugin.js
  16. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/icons_hidpi.png
  17. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/hidpi/close.png
  18. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/hidpi/lock-open.png
  19. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/hidpi/lock.png
  20. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/hidpi/refresh.png
  21. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/lock-open.png
  22. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/lock.png
  23. BIN
      main/inc/lib/javascript/ckeditor/skins/moono/images/refresh.png
  24. 7
      src/ChamiloLMS/Component/Editor/Toolbar/Basic.php

@ -0,0 +1,10 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b=
a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",
!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();
return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee,
100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise());
return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,10 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","gl",{title:"Instrucións de accesibilidade",contents:"Axuda. Para pechar este diálogo prema ESC.",legend:[{name:"Xeral",items:[{name:"Barra de ferramentas do editor",legend:"Prema ${toolbarFocus} para navegar pola barra de ferramentas. Para moverse polos distintos grupos de ferramentas use as teclas TAB e MAIÚS+TAB. Para moverse polas distintas ferramentas use FRECHA DEREITA ou FRECHA ESQUERDA. Prema ESPAZO ou INTRO para activar o botón da barra de ferramentas."},
{name:"Editor de diálogo",legend:"Dentro dun cadro de diálogo, prema a tecla TAB para desprazarse ao campo seguinte do cadro de diálogo, prema MAIÚS + TAB para desprazarse ao campo anterior, prema INTRO para presentar o cadro de diálogo, prema a tecla ESC para cancelar o diálogo. Para os diálogos que teñen varias páxinas, prema ALT + F10 para navegar á lapela da lista. Despois pasar á seguinte lapela con TAB ou FRECHA DEREITA. Para ir á lapela anterior con SHIFT + TAB ou FRECHA ESQUERDA. Prema ESPAZO ou INTRO para seleccionar a lapela da páxina."},
{name:"Editor do menú contextual",legend:"Prema ${contextMenu} ou a TECLA MENÚ para abrir o menú contextual. A seguir móvase á seguinte opción do menú con TAB ou FRECHA ABAIXO. Móvase á opción anterior con MAIÚS + TAB ou FRECHA ARRIBA. Prema ESPAZO ou INTRO para seleccionar a opción do menú. Abra o submenú da opción actual con ESPAZO ou INTRO ou FRECHA DEREITA. Regrese ao elemento principal do menú con ESC ou FRECHA ESQUERDA. Peche o menú contextual con ESC."},{name:"Lista do editor",legend:"Dentro dunha lista, móvase ao seguinte elemento da lista con TAB ou FRECHA ABAIXO. Móvase ao elemento anterior da lista con MAIÚS + TAB ou FRECHA ARRIBA. Prema ESPAZO ou INTRO para escoller a opción da lista. Prema ESC para pechar a lista."},
{name:"Barra da ruta ao elemento no editor",legend:"Prema ${elementsPathFocus} para navegar ata os elementos da barra de ruta. Móvase ao seguinte elemento botón con TAB ou FRECHA DEREITA. Móvase ao botón anterior con MAIÚS + TAB ou FRECHA ESQUERDA. Prema ESPAZO ou INTRO para seleccionar o elemento no editor."}]},{name:"Ordes",items:[{name:"Orde «desfacer»",legend:"Prema ${undo}"},{name:"Orde «refacer»",legend:"Prema ${redo}"},{name:"Orde «negra»",legend:"Prema ${bold}"},{name:"Orde «cursiva»",legend:"Prema ${italic}"},
{name:"Orde «subliñar»",legend:"Prema ${underline}"},{name:"Orde «ligazón»",legend:"Prema ${link}"},{name:"Orde «contraer a barra de ferramentas»",legend:"Prema ${toolbarCollapse}"},{name:"Orde «acceder ao anterior espazo en foco»",legend:"Prema ${accessPreviousSpace} para acceder ao espazo máis próximo de foco inalcanzábel anterior ao cursor, por exemplo: dous elementos HR adxacentes. Repita a combinación de teclas para chegar a espazos de foco distantes."},{name:"Orde «acceder ao seguinte espazo en foco»",
legend:"Prema ${accessNextSpace} para acceder ao espazo máis próximo de foco inalcanzábel posterior ao cursor, por exemplo: dous elementos HR adxacentes. Repita a combinación de teclas para chegar a espazos de foco distantes."},{name:"Axuda da accesibilidade",legend:"Prema ${a11yHelp}"}]}]});

@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","id",{title:"Accessibility Instructions",contents:"Bantuan. Tekan ESC untuk menutup dialog ini.",legend:[{name:"Umum",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});

@ -0,0 +1,8 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","si",{title:"ළඟයහ ",contents:"උදව සඳහ අනතරගතය.නමයමට ESC බතම ඔබනන",legend:[{name:"ප කර",items:[{name:"සකරණ මවලම ",legend:"ඔබනන ${මවලම අවධනය} මවලම එහමට.ඉදයට යමට හ ආපසමට මවලමඩය හ TAB හ SHIFT-TAB .ඉදයට යමට හ ආපසමට මවලමතම සමග RIGHT ARROW හ LEFT ARROW.මවලමතම සකය කර ගමට SPACE හ ENTER බතම ඔබනන."},{name:"සකරණ ",legend:"දබසකළ, ඊළඟ දබසසට යමට TAB බතම ඔබනන, කලසට යමට SHIFT + TAB බතම ද, දබස ඉදපතමට ENTER බතම ද, දබසවතමට ESCබතම ද, දබස සහත ග, පයයවක ලබමට,ගළ එහමට ALT + F10 බතම ද, ඊළඟ ගවට යමට TAB හ RIGTH ARROW බතම ඔබනන. පර ගවට යමට SHIFT + TAB හ LEFT ARROW බතම ද ,ගමට SPACE හ ENTER බතම ද ඔබනන."},
{name:"සකරණ අඩවට ",legend:"ඔබනන ${අනතරගත මව} හ APPLICATION KEY අනතරගත-මව වරතකමට. ඊළඟ මව-වකලපයනට යමට TAB හ DOWN ARROW බතම ද, පර වකලපයනටයමට SHIFT+TAB හ UP ARROW බතම ද, මව-වකලපයනමට SPACE හ ENTER බතම ද, දනට වතව ඇත උප-මවක වකලප තමට SPACE හ ENTER හ RIGHT ARROW ද, නවත පර පරධන මවට යමට ESC හ LEFT ARROW බතම ද. අනතරගත-මව වමට ESC බතම ද ඔබනන."},{name:"සකරණ ත ",legend:"තව තළ , ඊළඟ අයතමයට යමට TAB හ DOWN ARROW , පර අයතමයට යමට SHIFT + TAB හ UP ARROW . අයතම වකලපයනමට SPACE හ ENTER ,තව වමට ESC බතම ද ඔබනන."},
{name:"සකරණ අග සහත ",legend:"ඔබනන ${මවලම අවධනය} මවලම එහමට.ඉදයට යමට හ ආපසමට මවලමඩය හ TAB හ SHIFT-TAB .ඉදයට යමට හ ආපසමට මවලමතම සමග RIGHT ARROW හ LEFT ARROW.මවලමතම සකය කර ගමට SPACE හ ENTER බතම ඔබනන."}]},{name:"වන",items:[{name:"වනය වනස ",legend:"ඔබනන ${වනසම}"},{name:"වන නවතර පරම වනසකර ගම.",legend:"ඔබනන ${නවතර පරම වනසකර ගම}"},{name:"තද අකන",legend:"ඔබනන ${තද }"},
{name:"බ අකන",legend:"ඔබනන ${බ අක }"},{name:"යට ඉර ඇද ඇතන.",legend:"ඔබනන ${යට ඉර ඇද ඇත}"},{name:"සමබනත වන",legend:"ඔබනන ${සමබනධ }"},{name:"මවලමන",legend:"ඔබනන ${මවලම }"},{name:"යමට පර වදගතන",legend:"ඔබනන ${යමට ඊළඟ }"},{name:"යමට ඊළග වදගතන",legend:"ඔබනන ${යමට ඊළඟ }"},{name:"පරවශ ",legend:"ඔබනන ${a11y }"}]}]});

@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","sr-latn",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Opšte",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});

@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","sr",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Опште",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

@ -7,17 +7,17 @@
url: "URL:",
width: "szerokość:",
height: "wysokość:",
widthTitle: "Width for the embeded Content",
heightTitle: "Height for the embeded Content",
widthTitle: "Szerokość osadzanej zawartości",
heightTitle: "Wysokość osadzanej zawartości",
maxWidth: "Maks. szerokość:",
maxHeight: "Maks. wysokość:",
maxWidthTitle: "Maximum Width for the embeded Content",
maxHeightTitle: "Maximum Height for the embeded Content",
resizeType: "Resize Type (Only Video's):",
noresize: "No Resize (use default)",
responsive: "Responsive Resize",
custom: "Specific Resize",
autoClose: "Automatically Close Dialog after Code is Embeded",
noVimeo: "The owner of this video has set domain restrictions and you will not be able to embed it on your website.",
Error: "Media Content could not been retrieved, please try a different URL."
maxWidthTitle: "Maksymalna szerokość osadzanej zawartości",
maxHeightTitle: "Maksymalna wysokość osadzanej zawartości",
resizeType: "Typ zmiany rozmiaru (tylko nagrania wideo):",
noresize: "Bez zmiany rozmiaru (domyślne)",
responsive: "Responsywna zmiana rozmiaru",
custom: "Narzucona zmiana rozmiaru",
autoClose: "Zamykaj okno dialogowe automatycznie po osadzeniu kodu",
noVimeo: "Właściciel nagrania wideo nałożył ograniczenia domenowe, nagrania nie można osadzić w witrynie.",
Error: "Nie można uzyskać zawartości multimedialnej, proszę spróbować inny adres URL."
});

@ -1,23 +1,23 @@
CKEDITOR.plugins.setLang('oembed', 'ru', {
title : "Внедрить медиа-контент (Фото, Видео и т.д.)",
button : "Внедрить медиа-контент с различных сайтов",
pasteUrl : "Вставьте ссылку на страницы с медиа-контентом (e.g. YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, etc.)",
invalidUrl : "Вы ввели некорректный URL",
noEmbedCode : "Не обнаружен код для вставки. Возможно, вы ввели ссылку с неподдерживаемого сайта.",
url : "URL:",
width: ирина:",
height: ысота:",
widthTitle: "Width for the embeded Content",
heightTitle: "Height for the embeded Content",
maxWidth: "Макс. ширина:",
maxHeight: "Макс. высота:",
maxWidthTitle: "Maximum Width for the embeded Content",
maxHeightTitle: "Maximum Height for the embeded Content",
resizeType: "Resize Type (Only Video's):",
noresize: "No Resize (use default)",
responsive: "Responsive Resize",
custom: "Specific Resize",
autoClose: "Automatically Close Dialog after Code is Embeded",
noVimeo: "The owner of this video has set domain restrictions and you will not be able to embed it on your website.",
Error: "Media Content could not been retrieved, please try a different URL."
title: "Внедрить медиа-контент (видео, аудио, фото и т.д.)",
button: "Внедрить медиа-контент с различных сайтов",
pasteUrl: "Вставьте ссылку на страницу с медиа-контентом (например YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, и т.д.)",
invalidUrl: "Вы ввели некорректный URL",
noEmbedCode: "Не обнаружен код для вставки. Возможно, вы ввели ссылку с неподдерживаемого сайта.",
url: "URL:",
width: ирина:",
height: ысота:",
widthTitle: "Ширина внедряемого медиа-контента",
heightTitle: "Высота внедряемого медиа-контента",
maxWidth: "Макс. ширина:",
maxHeight: "Макс. высота:",
maxWidthTitle: "Максимальная ширина внедряемого медиа-контента",
maxHeightTitle: "Максимальная высота внедряемого медиа-контента",
resizeType: "Изменение размера (только для видео):",
noresize: "Без изменения (стандартный размер)",
responsive: "Задать максимальный размер",
custom: "Задать конкретный размер",
autoClose: "Автоматически закрыть диалог после внедрения кода",
noVimeo: "Владелец этого видео установил ограничения на домен, и вы не можете его встроить на ваш сайт.",
Error: "Невозможно получить медиа-контент. Попробуйте другой URL."
});

@ -260,11 +260,10 @@
if(!embedProvider.nocache) src += '&jqoemcache='+rand(5);
if (embedProvider.apikey) src = src.replace('_APIKEY_', settings.apikeys[embedProvider.name]);
//
if (settings.maxHeight && settings.maxWidth) {
if (settings.useResponsiveResize) {
var ratio = 0; // Used for aspect ratio
var newWidth = width;
@ -301,7 +300,6 @@
}
}
var code = $('<'+tag+'/>')
.attr('src',src)
.attr('width',width)
@ -317,8 +315,7 @@
if(tag=='iframe')
code
.attr('scrolling',embedProvider.embedtag.scrolling || "no")
.attr('frameborder',embedProvider.embedtag.frameborder || "0");
.attr('frameborder',embedProvider.embedtag.frameborder || "0");
var oembedData = {code: code};
success(oembedData, externalUrl,container);
@ -439,11 +436,18 @@
}
};
$.fn.oembed.getPhotoCode = function(url, oembedData) {
$.fn.oembed.getPhotoCode = function (url, oembedData) {
var code, alt = oembedData.title ? oembedData.title : '';
alt += oembedData.author_name ? ' - ' + oembedData.author_name : '';
alt += oembedData.provider_name ? ' - ' + oembedData.provider_name : '';
code = '<div><a href="' + url + '" target=\'_blank\'><img src="' + oembedData.url + '" alt="' + alt + '"/></a></div>';
if (oembedData.url) {
code = '<div><a href="' + url + '" target=\'_blank\'><img src="' + oembedData.url + '" alt="' + alt + '"/></a></div>';
} else if (oembedData.thumbnail_url) {
var newURL = oembedData.thumbnail_url.replace('_s', '_b');
code = '<div><a href="' + url + '" target=\'_blank\'><img src="' + newURL + '" alt="' + alt + '"/></a></div>';
} else {
code = '<div>Error loading this picture</div>';
}
if (oembedData.html) code += "<div>" + oembedData.html + "</div>";
return code;
};
@ -491,10 +495,65 @@
extraSettings.yql = {from:'json'
, apiendpoint: this.apiendpoint
, url: function(externalurl){return this.apiendpoint+'?format=json&url='+externalurl; }
, datareturn:function(results){
, datareturn: function (results) {
if (results.json.type != 'video' && (results.json.url || results.json.thumbnail_url)) {
return '<img src="' + (results.json.url || results.json.thumbnail_url) + '" />';
}
} else if (results.json.html.indexOf("iframe")) {
// Quick fix to handle attribute less html5 properties in ckeditor
if (results.json.html.indexOf("allowfullscreen>")) {
results.json.html = results.json.html.replace('allowfullscreen>', 'allowfullscreen="false">');
}
var html = $.parseHTML(results.json.html);
var width = html[0].width;
var height = html[0].height;
if (settings.maxHeight && settings.maxWidth) {
if (settings.useResponsiveResize) {
var ratio;
var newWidth = width;
var newHeight = height;
// Check if the current width is larger than the max
if (width > settings.maxWidth) {
ratio = settings.maxWidth / width;
newWidth = settings.maxWidth;
newHeight = height * ratio;
// reset
height = height * ratio;
width = width * ratio;
}
// Check if current height is larger than max
if (height > settings.maxHeight) {
ratio = settings.maxHeight / height;
newHeight = settings.maxHeight;
newWidth = width * ratio;
}
height = newHeight;
width = newWidth;
} else {
height = settings.maxHeight;
width = settings.maxWidth;
}
}
html[0].width = width;
html[0].height = height;
return html[0].outerHTML;
}
return results.json.html || '';
}
};
@ -513,18 +572,51 @@
};
/*
* Function to update existing providers
*
* @param {String} name The name of the provider
* @param {String} type The type of the provider can be "file", "photo", "video", "rich"
* @param {String} urlshemesarray Array of url of the provider
* @param {String} apiendpoint The endpoint of the provider
* @param {String} extraSettings Extra settings of the provider
*/
$.fn.updateOEmbedProvider = function (name, type, urlschemesarray, apiendpoint, extraSettings) {
for (var i = 0; i < $.fn.oembed.providers.length; i++) {
if ($.fn.oembed.providers[i].name === name) {
if (type !== null) {
$.fn.oembed.providers[i].type = type;
}
if (urlschemesarray !== null) {
$.fn.oembed.providers[i].urlschemes = urlschemesarray;
}
if (apiendpoint !== null) {
$.fn.oembed.providers[i].apiendpoint = apiendpoint;
}
if (extraSettings !== null) {
$.fn.oembed.providers[i].extraSettings = extraSettings;
for (var property in extraSettings) {
if (extraSettings[property] !== null) {
$.fn.oembed.providers[i][property] = extraSettings[property];
}
}
}
}
}
};
/* Native & common providers */
$.fn.oembed.providers = [
//Video
new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+", "youtube.com/embed"], checkProtocol() + 'www.youtube.com/embed/$1?wmode=transparent', {
templateRegex: /.*(?:v\=|be\/|embed\/)([\w\-]+)&?.*/,embedtag: {tag: 'iframe',width: '425',height: '349'}
}),
//new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+", "youtube.com/embed"], checkProtocol() + 'www.youtube.com/embed/$1?wmode=transparent', {
// templateRegex: /.*(?:v\=|be\/|embed\/)([\w\-]+)&?.*/,embedtag: {tag: 'iframe',width: '425',height: '349'}
//}),
//new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+"], checkProtocol() + 'www.youtube.com/oembed', {useYQL:'json'}),
//new $.fn.oembed.OEmbedProvider("youtubeiframe", "video", ["youtube.com/embed"], "$1?wmode=transparent",
// {templateRegex:/(.*)/,embedtag : {tag: 'iframe', width:'425',height: '349'}}),
new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+"], checkProtocol() + 'www.youtube.com/oembed', {useYQL:'json'}),
new $.fn.oembed.OEmbedProvider("youtubeiframe", "video", ["youtube.com/embed"], "$1?wmode=transparent",
{templateRegex:/(.*)/,embedtag : {tag: 'iframe', width:'425',height: '349'}}),
new $.fn.oembed.OEmbedProvider("wistia", "video", ["wistia.com/m/.+", "wistia.com/embed/.+","wi.st/m/.+","wi.st/embed/.+"], 'http://fast.wistia.com/oembed', {useYQL:'json'}),
new $.fn.oembed.OEmbedProvider("xtranormal", "video", ["xtranormal\\.com/watch/.+"], "http://www.xtranormal.com/xtraplayr/$1/$2", {
templateRegex: /.*com\/watch\/([\w\-]+)\/([\w\-]+).*/,embedtag: {tag: 'iframe',width: '320',height: '269'}}),
@ -586,7 +678,7 @@
new $.fn.oembed.OEmbedProvider("official.fm", "rich", ["official.fm/.+"], 'http://official.fm/services/oembed',{useYQL:'json'}),
new $.fn.oembed.OEmbedProvider("chirbit", "rich", ["chirb.it/.+"], 'http://chirb.it/oembed.json',{useYQL:'json'}),
new $.fn.oembed.OEmbedProvider("Huffduffer", "rich", ["huffduffer.com/[-.\\w@]+/\\d+"], "http://huffduffer.com/oembed"),
new $.fn.oembed.OEmbedProvider("Spotify", "rich", ["open.spotify.com/(track|album)/"], "https://embed.spotify.com/oembed/"),
new $.fn.oembed.OEmbedProvider("Spotify", "rich", ["open.spotify.com/(track|album|user)/"], "https://embed.spotify.com/oembed/"),
new $.fn.oembed.OEmbedProvider("shoudio", "rich", ["shoudio.com/.+","shoud.io/.+"], "http://shoudio.com/api/oembed"),
new $.fn.oembed.OEmbedProvider("mixcloud", "rich", ["mixcloud.com/.+"], checkProtocol() + 'www.mixcloud.com/oembed/', { useYQL: 'json' }),
new $.fn.oembed.OEmbedProvider("rdio.com", "rich", ["rd.io/.+", "rdio.com"], checkProtocol() + "www.rdio.com/api/oembed/"),

File diff suppressed because one or more lines are too long

@ -1,34 +1,92 @@
/*
/**
* oEmbed Plugin plugin
* Copyright (c) Ingo Herbote
* Licensed under the MIT license
* jQuery Embed Plugin: http://code.google.com/p/jquery-oembed/ (MIT License)
* Plugin for: http://ckeditor.com/license (GPL/LGPL/MPL: http://ckeditor.com/license)
*/
(function() {
(function () {
CKEDITOR.plugins.add('oembed', {
requires: ['dialog'],
lang: ['de', 'en', 'fr', 'nl', 'pl', 'ru'],
init: function(editor) {
// Check if content filter is disabled
if (CKEDITOR.version >= 4.1) {
if (editor.config.allowedContent != true) {
return;
afterInit: function (editor) {
var dataProcessor = editor.dataProcessor,
dataFilter = dataProcessor && dataProcessor.dataFilter;
if (editor.config.oembed_ShowIframePreview) {
if (dataFilter._.elements.iframe) {
delete dataFilter._.elements.iframe;
}
}
return;
}
if (dataFilter && dataFilter._.elements.iframe == 'undefined') {
dataFilter.addRules({
elements: {
iframe: function (element) {
return editor.createFakeParserElement(element, 'cke_iframe', 'iframe', true);
}
}
});
}
},
init: function(editor) {
if (editor.config.oembed_ShowIframePreview == null || editor.config.oembed_ShowIframePreview == 'undefined') {
editor.config.oembed_ShowIframePreview = false;
}
if (!editor.plugins.iframe && !editor.config.oembed_ShowIframePreview) {
CKEDITOR.addCss('img.cke_iframe' +
'{' +
'background-image: url(' + CKEDITOR.getUrl(CKEDITOR.plugins.getPath('oembed') + 'images/placeholder.png') + ');' +
'background-position: center center;' +
'background-repeat: no-repeat;' +
'border: 1px solid #a9a9a9;' +
'width: 80px;' +
'height: 80px;' +
'}'
);
}
// Load jquery?
if (typeof(jQuery) == 'undefined') {
CKEDITOR.scriptLoader.load('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', function() {
if (typeof(jQuery.fn.oembed) == 'undefined') {
CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(CKEDITOR.plugins.getPath('oembed') + 'libs/jquery.oembed.min.js'));
// Load jquery?
loadjQueryLibaries();
CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {
oEmbed: function (url, maxWidth, maxHeight, responsiveResize) {
if (url.length < 1 || url.indexOf('http') < 0) {
alert(editor.lang.oembed.invalidUrl);
return false;
}
});
} else if (typeof(jQuery.fn.oembed) == 'undefined') {
CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(CKEDITOR.plugins.getPath('oembed') + 'libs/jquery.oembed.min.js'));
}
if (typeof (jQuery.fn.oembed) === 'undefined') {
CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(CKEDITOR.plugins.getPath('oembed') + 'libs/jquery.oembed.min.js'), function () {
embed();
});
} else {
embed();
}
function embed() {
if (maxWidth == null || maxWidth == 'undefined') {
maxWidth = null;
}
if (maxHeight == null || maxHeight == 'undefined') {
maxHeight = null;
}
if (responsiveResize == null || responsiveResize == 'undefined') {
responsiveResize = false;
}
embedCode(url, editor, false, maxWidth, maxHeight, responsiveResize);
}
return true;
}
});
editor.addCommand('oembed', new CKEDITOR.dialogCommand('oembed'));
editor.ui.addButton('oembed', {
@ -37,7 +95,7 @@
icon: this.path + 'images/icon.png'
});
var resizeTypeChanged = function() {
var resizeTypeChanged = function () {
var dialog = this.getDialog(),
resizetype = this.getValue(),
maxSizeBox = dialog.getContentElement('general', 'maxSizeBox').getElement(),
@ -63,19 +121,63 @@
return (this.indexOf(string) === 0);
};
function embedCode(url, instance, closeDialog, wrapperHtml, maxWidth, maxHeight, responsiveResize) {
function loadjQueryLibaries() {
if (typeof (jQuery) === 'undefined') {
CKEDITOR.scriptLoader.load('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', function () {
if (typeof (jQuery.fn.oembed) === 'undefined') {
CKEDITOR.scriptLoader.load(
CKEDITOR.getUrl(CKEDITOR.plugins.getPath('oembed') + 'libs/jquery.oembed.min.js')
);
}
});
} else if (typeof (jQuery.fn.oembed) === 'undefined') {
CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(CKEDITOR.plugins.getPath('oembed') + 'libs/jquery.oembed.min.js'));
}
}
function embedCode(url, instance, closeDialog, maxWidth, maxHeight, responsiveResize) {
jQuery('body').oembed(url, {
onEmbed: function(e) {
if (typeof e.code === 'string') {
instance.insertHtml(wrapperHtml.html());
instance.insertHtml(e.code);
onEmbed: function (e) {
var divWrapper = new CKEDITOR.dom.element('div'),
codeElement,
codeIframe;
if (typeof e.code === 'string') {
if (editor.config.oembed_WrapperClass != null) {
divWrapper.addClass(editor.config.oembed_WrapperClass);
}
codeElement = CKEDITOR.dom.element.createFromHtml(e.code);
if (codeElement.$.tagName == "IFRAME" && editor.config.oembed_ShowIframePreview === false) {
codeIframe = editor.createFakeElement(codeElement, 'cke_iframe', 'iframe', true);
codeIframe.appendTo(divWrapper);
} else {
codeElement.appendTo(divWrapper);
}
instance.insertElement(divWrapper);
if (closeDialog) {
CKEDITOR.dialog.getCurrent().hide();
}
} else if (typeof e.code[0].outerHTML === 'string') {
instance.insertHtml(wrapperHtml.html());
instance.insertHtml(e.code[0].outerHTML);
if (editor.config.oembed_WrapperClass != null) {
divWrapper.addClass(editor.config.oembed_WrapperClass);
}
codeElement = CKEDITOR.dom.element.createFromHtml(e.code[0].outerHTML);
if (codeElement.$.tagName == "IFRAME" && editor.config.oembed_ShowIframePreview === false) {
codeIframe = editor.createFakeElement(codeElement, 'cke_iframe', 'iframe', true);
codeIframe.appendTo(divWrapper);
} else {
codeElement.appendTo(divWrapper);
}
instance.insertElement(divWrapper);
if (closeDialog) {
CKEDITOR.dialog.getCurrent().hide();
@ -99,12 +201,12 @@
});
}
CKEDITOR.dialog.add('oembed', function(editor) {
CKEDITOR.dialog.add('oembed', function (editor) {
return {
title: editor.lang.oembed.title,
minWidth: CKEDITOR.env.ie && CKEDITOR.env.quirks ? 568 : 550,
minHeight: 155,
onShow: function() {
onShow: function () {
var resizetype = this.getContentElement('general', 'resizeType').getValue(),
maxSizeBox = this.getContentElement('general', 'maxSizeBox').getElement(),
sizeBox = this.getContentElement('general', 'sizeBox').getElement();
@ -122,48 +224,54 @@
sizeBox.hide();
}
},
onOk: function() {
var inputCode = this.getValueOf('general', 'embedCode');
onOk: function () {
var inputCode = this.getValueOf('general', 'embedCode'),
resizetype = this.getContentElement('general', 'resizeType').
getValue(),
maxWidth = null,
maxHeight = null,
responsiveResize = false,
editorInstance = this.getParentEditor(),
closeDialog = this.getContentElement('general', 'autoCloseDialog').
getValue();
if (inputCode.length < 1 || inputCode.indexOf('http') < 0) {
alert(editor.lang.oembed.invalidUrl);
return false;
}
var resizetype = this.getContentElement('general', 'resizeType').getValue();
var maxWidth = null;
var maxHeight = null;
var responsiveResize = false;
var wrapperHtml = jQuery('<div />').append(editor.config.oembed_WrapperClass != null ? '<div class="' + editor.config.oembed_WrapperClass + '" />' : '<div />');
if (resizetype == "noresize") {
responsiveResize = false;
} else {
if (resizetype == "responsive") {
maxWidth = this.getContentElement('general', 'maxWidth').getInputElement().getValue();
maxHeight = this.getContentElement('general', 'maxHeight').getInputElement().getValue();
maxWidth = this.getContentElement('general', 'maxWidth').
getInputElement().
getValue();
maxHeight = this.getContentElement('general', 'maxHeight').
getInputElement().
getValue();
responsiveResize = true;
} else if (resizetype == "custom") {
maxWidth = this.getContentElement('general', 'width').getInputElement().getValue();
maxHeight = this.getContentElement('general', 'height').getInputElement().getValue();
maxWidth = this.getContentElement('general', 'width').
getInputElement().
getValue();
maxHeight = this.getContentElement('general', 'height').
getInputElement().
getValue();
responsiveResize = false;
}
}
var editorInstance = this.getParentEditor();
var closeDialog = this.getContentElement('general', 'autoCloseDialog').getValue();
}
// support for multiple urls
if (inputCode.indexOf(";") > 0) {
var urls = inputCode.split(";");
for (var i = 0; i < urls.length; i++) {
var url = urls[i];
if (url.length > 1 && url.beginsWith('http')) {
embedCode(url, editorInstance, false, wrapperHtml, maxWidth, maxHeight, responsiveResize);
embedCode(url, editorInstance, false, maxWidth, maxHeight, responsiveResize);
}
// close after last
if (i == urls.length -1) {
@ -172,7 +280,7 @@
}
} else {
// single url
embedCode(inputCode, editorInstance, closeDialog, wrapperHtml, maxWidth, maxHeight, responsiveResize);
embedCode(inputCode, editorInstance, closeDialog, maxWidth, maxHeight, responsiveResize);
}
return false;
@ -187,13 +295,14 @@
}, {
type: 'text',
id: 'embedCode',
focus: function() {
focus: function () {
this.getElement().focus();
},
label: editor.lang.oembed.url,
title: editor.lang.oembed.pasteUrl
}, {
type: 'hbox',
widths: ['50%', '50%'],
children: [{
id: 'resizeType',
type: 'select',
@ -208,34 +317,42 @@
}, {
type: 'hbox',
id: 'maxSizeBox',
widths: ['120px', '120px'],
style: 'float:left;position:absolute;left:58%;width:200px',
children: [{
type: 'text',
id: 'maxWidth',
type: 'text',
width:'100px',
id: 'maxWidth',
'default': editor.config.oembed_maxWidth != null ? editor.config.oembed_maxWidth : '560',
label: editor.lang.oembed.maxWidth,
title: editor.lang.oembed.maxWidthTitle,
title: editor.lang.oembed.maxWidthTitle
}, {
type: 'text',
id: 'maxHeight',
width: '120px',
'default': editor.config.oembed_maxHeight != null ? editor.config.oembed_maxHeight : '315',
label: editor.lang.oembed.maxHeight,
title: editor.lang.oembed.maxHeightTitle,
title: editor.lang.oembed.maxHeightTitle
}]
}, {
type: 'hbox',
id: 'sizeBox',
widths: ['120px', '120px'],
style: 'float:left;position:absolute;left:58%;width:200px',
children: [{
type: 'text',
id: 'width',
width: '100px',
'default': editor.config.oembed_maxWidth != null ? editor.config.oembed_maxWidth : '560',
label: editor.lang.oembed.width,
title: editor.lang.oembed.widthTitle,
title: editor.lang.oembed.widthTitle
}, {
type: 'text',
id: 'height',
width: '120px',
'default': editor.config.oembed_maxHeight != null ? editor.config.oembed_maxHeight : '315',
label: editor.lang.oembed.height,
title: editor.lang.oembed.heightTitle,
title: editor.lang.oembed.heightTitle
}]
}]
}, {
@ -250,4 +367,7 @@
});
}//
});
})();
}
)();

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

@ -74,6 +74,10 @@ class Basic
//$config['extraPlugins'] = 'oembed,video,wordcount';
$config['extraPlugins'] = 'oembed,video';
//$config['oembed_maxWidth'] = '560';
//$config['oembed_maxHeight'] = '315';
$config['allowedContent'] = true;
/*$config['wordcount'] = array(
// Whether or not you want to show the Word Count
@ -86,12 +90,15 @@ class Basic
'wordLimit' => 'unlimited'
);*/
//$config['skins'] = 'moono';
if (isset($this->config)) {
$this->config = array_merge($config, $this->config);
} else {
$this->config = $config;
}
//$config['width'] = '100';
//$config['height'] = '200';
return $this->config;

Loading…
Cancel
Save