Skip to content
Snippets Groups Projects
Commit b943910f authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #2801921: Updated [Varbase 8.x-4.x] profile : Have the codesnippet library with the profile.

parent 1bc41799
No related branches found
No related tags found
No related merge requests found
Showing
with 291 additions and 8 deletions
......@@ -286,11 +286,3 @@ projects[varbase_editor][subdir] = "contrib"
projects[varbase_editor][download][type] = git
projects[varbase_editor][download][url] = https://git.drupal.org/project/varbase_editor
projects[varbase_editor][download][tag] = 8.x-4.0-alpha3
;;;;;;;;;;;;;;;;;;;;;
;; Libraries
;;;;;;;;;;;;;;;;;;;;;
libraries[codesnippet][download][type] = "get"
libraries[codesnippet][download][url] = "http://download.ckeditor.com/codesnippet/releases/codesnippet_4.5.11.zip"
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
'use strict';
( function() {
CKEDITOR.dialog.add( 'codeSnippet', function( editor ) {
var snippetLangs = editor._.codesnippet.langs,
lang = editor.lang.codesnippet,
clientHeight = document.documentElement.clientHeight,
langSelectItems = [],
snippetLangId;
langSelectItems.push( [ editor.lang.common.notSet, '' ] );
for ( snippetLangId in snippetLangs )
langSelectItems.push( [ snippetLangs[ snippetLangId ], snippetLangId ] );
// Size adjustments.
var size = CKEDITOR.document.getWindow().getViewPaneSize(),
// Make it maximum 800px wide, but still fully visible in the viewport.
width = Math.min( size.width - 70, 800 ),
// Make it use 2/3 of the viewport height.
height = size.height / 1.5;
// Low resolution settings.
if ( clientHeight < 650 ) {
height = clientHeight - 220;
}
return {
title: lang.title,
minHeight: 200,
resizable: CKEDITOR.DIALOG_RESIZE_NONE,
contents: [
{
id: 'info',
elements: [
{
id: 'lang',
type: 'select',
label: lang.language,
items: langSelectItems,
setup: function( widget ) {
if ( widget.ready && widget.data.lang )
this.setValue( widget.data.lang );
// The only way to have an empty select value in Firefox is
// to set a negative selectedIndex.
if ( CKEDITOR.env.gecko && ( !widget.data.lang || !widget.ready ) )
this.getInputElement().$.selectedIndex = -1;
},
commit: function( widget ) {
widget.setData( 'lang', this.getValue() );
}
},
{
id: 'code',
type: 'textarea',
label: lang.codeContents,
setup: function( widget ) {
this.setValue( widget.data.code );
},
commit: function( widget ) {
widget.setData( 'code', this.getValue() );
},
required: true,
validate: CKEDITOR.dialog.validate.notEmpty( lang.emptySnippetError ),
inputStyle: 'cursor:auto;' +
'width:' + width + 'px;' +
'height:' + height + 'px;' +
'tab-size:4;' +
'text-align:left;',
'class': 'cke_source'
}
]
}
]
};
} );
}() );
libraries/codesnippet/icons/codesnippet.png

597 B

libraries/codesnippet/icons/hidpi/codesnippet.png

1.84 KiB

/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'ar', {
button: 'أدمج قصاصة الشيفرة',
codeContents: 'محتوى الشيفرة',
emptySnippetError: 'قصاصة الشيفرة لايمكن أن تكون فارغة.',
language: 'لغة',
title: 'قصاصة الشيفرة',
pathName: 'قصاصة الشيفرة'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'bg', {
button: 'Въвеждане на блок с код',
codeContents: 'Съдържание на кода',
emptySnippetError: 'Блока с код не може да бъде празен.',
language: 'Език',
title: 'Блок с код',
pathName: 'блок с код'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'ca', {
button: 'Insereix el fragment de codi',
codeContents: 'Contingut del codi',
emptySnippetError: 'El fragment de codi no pot estar buit.',
language: 'Idioma',
title: 'Fragment de codi',
pathName: 'fragment de codi'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'cs', {
button: 'Vložit úryvek kódu',
codeContents: 'Obsah kódu',
emptySnippetError: 'Úryvek kódu nemůže být prázdný.',
language: 'Jazyk',
title: 'Úryvek kódu',
pathName: 'úryvek kódu'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'da', {
button: 'Indsæt kodestykket her',
codeContents: 'Koden',
emptySnippetError: 'Kodestykket kan ikke være tomt.',
language: 'Sprog',
title: 'Kodestykke',
pathName: 'kodestykke'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'de-ch', {
button: 'Codeschnipsel einfügen',
codeContents: 'Codeinhalt',
emptySnippetError: 'Ein Codeschnipsel darf nicht leer sein.',
language: 'Sprache',
title: 'Codeschnipsel',
pathName: 'Codeschnipsel'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'de', {
button: 'Codeschnipsel einfügen',
codeContents: 'Codeinhalt',
emptySnippetError: 'Ein Codeschnipsel darf nicht leer sein.',
language: 'Sprache',
title: 'Codeschnipsel',
pathName: 'Codeschnipsel'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'el', {
button: 'Εισαγωγή Αποσπάσματος Κώδικα',
codeContents: 'Περιεχόμενο κώδικα',
emptySnippetError: 'Δεν γίνεται να είναι κενά τα αποσπάσματα κώδικα.',
language: 'Γλώσσα',
title: 'Απόσπασμα κώδικα',
pathName: 'απόσπασμα κώδικα'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'en-gb', {
button: 'Insert Code Snippet',
codeContents: 'Code content',
emptySnippetError: 'A code snippet cannot be empty.',
language: 'Language',
title: 'Code snippet',
pathName: 'code snippet'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'en', {
button: 'Insert Code Snippet',
codeContents: 'Code content',
emptySnippetError: 'A code snippet cannot be empty.',
language: 'Language',
title: 'Code snippet',
pathName: 'code snippet'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'eo', {
button: 'Enmeti kodaĵeron',
codeContents: 'Kodenhavo',
emptySnippetError: 'Kodaĵero ne povas esti malplena.',
language: 'Lingvo',
title: 'Kodaĵero',
pathName: 'kodaĵero'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'es', {
button: 'Insertar fragmento de código',
codeContents: 'Contenido del código',
emptySnippetError: 'Un fragmento de código no puede estar vacío.',
language: 'Lenguaje',
title: 'Fragmento de código',
pathName: 'fragmento de código'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'et', {
button: 'Koodilõigu sisestamine',
codeContents: 'Code content', // MISSING
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
language: 'Language', // MISSING
title: 'Code snippet', // MISSING
pathName: 'code snippet' // MISSING
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'eu', {
button: 'Txertatu kode zatia',
codeContents: 'Kode edukia',
emptySnippetError: 'Kode zatiak ezin du hutsik egon.',
language: 'Lengoaia',
title: 'Kode zatia',
pathName: 'kode zatia'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'fa', {
button: 'قرار دادن کد قطعه',
codeContents: 'محتوای کد',
emptySnippetError: 'کد نمی تواند خالی باشد.',
language: 'زبان',
title: 'کد قطعه',
pathName: 'کد قطعه'
} );
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'fi', {
button: 'Lisää koodileike',
codeContents: 'Koodisisältö',
emptySnippetError: 'Koodileike ei voi olla tyhjä.',
language: 'Kieli',
title: 'Koodileike',
pathName: 'koodileike'
} );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment