-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added source edit dialog to inline editor - Finally fixed the temperamental textcolor and background color buttons of the inline editor - Better Font-Awesome support
- Loading branch information
Showing
82 changed files
with
854 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
editor/js/vendor/ckeditor/plugins/fontawesome/dialogs/fontawesome.js
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
editor/js/vendor/ckeditor/plugins/sourcedialog/dialogs/sourcedialog.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.dialog.add( 'sourcedialog', function( editor ) { | ||
var size = CKEDITOR.document.getWindow().getViewPaneSize(); | ||
|
||
// Make it maximum 800px wide, but still fully visible in the viewport. | ||
var width = Math.min( size.width - 70, 800 ); | ||
|
||
// Make it use 2/3 of the viewport height. | ||
var height = size.height / 1.5; | ||
|
||
// Store old editor data to avoid unnecessary setData. | ||
var oldData; | ||
|
||
return { | ||
title: editor.lang.sourcedialog.title, | ||
minWidth: 100, | ||
minHeight: 100, | ||
|
||
onShow: function() { | ||
this.setValueOf( 'main', 'data', oldData = editor.getData() ); | ||
}, | ||
|
||
onOk: ( function() { | ||
function setData( dialog, newData ) { | ||
// [IE8] Focus editor before setting selection to avoid setting data on | ||
// locked selection, because in case of inline editor, it won't be | ||
// unlocked before editable's HTML is altered. (#11585) | ||
editor.focus(); | ||
editor.setData( newData, function() { | ||
dialog.hide(); | ||
|
||
// Ensure correct selection. | ||
var range = editor.createRange(); | ||
range.moveToElementEditStart( editor.editable() ); | ||
range.select(); | ||
} ); | ||
} | ||
|
||
return function( event ) { | ||
// Remove CR from input data for reliable comparison with editor data. | ||
var newData = this.getValueOf( 'main', 'data' ).replace( /\r/g, '' ), | ||
that = this; | ||
|
||
// Avoid unnecessary setData. Also preserve selection | ||
// when user changed his mind and goes back to wysiwyg editing. | ||
if ( newData === oldData ) | ||
return true; | ||
|
||
setTimeout( function() { | ||
setData( that, newData ); | ||
} ); | ||
|
||
// Don't let the dialog close before setData is over, to hide | ||
// from user blinking caused by selection restoring and setting new data. | ||
return false; | ||
}; | ||
} )(), | ||
|
||
contents: [ { | ||
id: 'main', | ||
label: editor.lang.sourcedialog.title, | ||
elements: [ { | ||
type: 'textarea', | ||
id: 'data', | ||
dir: 'ltr', | ||
inputStyle: 'cursor:auto;' + | ||
'width:' + width + 'px;' + | ||
'height:' + height + 'px;' + | ||
'tab-size:4;' + | ||
'text-align:left;', | ||
'class': 'cke_source' | ||
} ] | ||
} ] | ||
}; | ||
} ); |
Binary file added
BIN
+1.92 KB
editor/js/vendor/ckeditor/plugins/sourcedialog/icons/hidpi/sourcedialog-rtl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.95 KB
editor/js/vendor/ckeditor/plugins/sourcedialog/icons/hidpi/sourcedialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+762 Bytes
editor/js/vendor/ckeditor/plugins/sourcedialog/icons/sourcedialog-rtl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+764 Bytes
editor/js/vendor/ckeditor/plugins/sourcedialog/icons/sourcedialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'af', { | ||
toolbar: '', | ||
title: 'Bron' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'ar', { | ||
toolbar: '', | ||
title: 'المصدر' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'bg', { | ||
toolbar: '', | ||
title: 'Източник' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'bn', { | ||
toolbar: '', | ||
title: 'সোর্স' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'bs', { | ||
toolbar: '', | ||
title: 'HTML kôd' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'ca', { | ||
toolbar: '', | ||
title: 'Codi font' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'cs', { | ||
toolbar: '', | ||
title: 'Zdroj' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'cy', { | ||
toolbar: '', | ||
title: 'HTML' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'da', { | ||
toolbar: '', | ||
title: 'Kilde' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'de', { | ||
toolbar: '', | ||
title: 'Quellcode' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'el', { | ||
toolbar: '', | ||
title: 'Κώδικας' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-au', { | ||
toolbar: '', | ||
title: 'Source' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-ca', { | ||
toolbar: '', | ||
title: 'Source' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-gb', { | ||
toolbar: '', | ||
title: 'Source' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'en', { | ||
toolbar: '', | ||
title: 'Source' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'eo', { | ||
toolbar: '', | ||
title: 'Fonto' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'es', { | ||
toolbar: '', | ||
title: 'Fuente HTML' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'et', { | ||
toolbar: '', | ||
title: 'Lähtekood' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'eu', { | ||
toolbar: '', | ||
title: 'HTML Iturburua' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'fa', { | ||
toolbar: '', | ||
title: 'منبع' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'fi', { | ||
toolbar: '', | ||
title: 'Koodi' | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.md or http://ckeditor.com/license | ||
*/ | ||
|
||
CKEDITOR.plugins.setLang( 'sourcedialog', 'fo', { | ||
toolbar: '', | ||
title: 'Kelda' | ||
} ); |
Oops, something went wrong.