diff --git a/scripts/ckeditor-config.js b/scripts/ckeditor-config.js index 6ab242ec..a42fefbf 100755 --- a/scripts/ckeditor-config.js +++ b/scripts/ckeditor-config.js @@ -8,4 +8,23 @@ CKEDITOR.editorConfig = function( config ) { // config.language = 'fr'; // config.uiColor = '#AADC6E'; config.extraPlugins = 'timestamp,dndfiles,eqneditor,fileupload'; + + // Toolbar configuration + config.toolbar = [ + { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] }, + { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, + { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, + { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, + '/', + { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }, + { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] }, + { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, + { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe', 'FileUpload', 'Timestamp', 'EqnEditor' ] }, + '/', + { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }, + { name: 'colors', items: [ 'TextColor', 'BGColor' ] }, + { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] }, + { name: 'others', items: [ '-' ] }, + { name: 'about', items: [ 'About' ] } + ]; }; diff --git a/scripts/ckeditor/plugins/dndfiles/plugin.js b/scripts/ckeditor/plugins/dndfiles/plugin.js index 66c69802..c2a6335b 100755 --- a/scripts/ckeditor/plugins/dndfiles/plugin.js +++ b/scripts/ckeditor/plugins/dndfiles/plugin.js @@ -80,8 +80,6 @@ CKEDITOR.plugins.add( 'dndfiles', { // End the progress bar progressJs().end(); - console.log(data); - var html = ''; for(var idx = 0; idx < data.attachments.length; idx++) { var att = data.attachments[idx]; diff --git a/scripts/ckeditor/plugins/fileupload/dialogs/fileupload.js b/scripts/ckeditor/plugins/fileupload/dialogs/fileupload.js index e67f1667..9f36e56f 100644 --- a/scripts/ckeditor/plugins/fileupload/dialogs/fileupload.js +++ b/scripts/ckeditor/plugins/fileupload/dialogs/fileupload.js @@ -11,8 +11,6 @@ CKEDITOR.dialog.add( 'fileuploadDialog', function( editor ) { var lang = editor.lang.image2; var commonLang = editor.lang.common - console.log(commonLang); - return { // Basic properties of the dialog window: title, minimum size. @@ -107,7 +105,7 @@ CKEDITOR.dialog.add( 'fileuploadDialog', function( editor ) { fail: function() { // End the progress bar progressJs().end(); - console.log("error"); + console.log("Error while uploading file..."); } }); diff --git a/scripts/ckeditor/plugins/fileupload/icons/fileupload.png b/scripts/ckeditor/plugins/fileupload/icons/fileupload.png index 14092372..2a2164de 100644 Binary files a/scripts/ckeditor/plugins/fileupload/icons/fileupload.png and b/scripts/ckeditor/plugins/fileupload/icons/fileupload.png differ diff --git a/scripts/ckeditor/plugins/timestamp/icons/timestamp.png b/scripts/ckeditor/plugins/timestamp/icons/timestamp.png old mode 100755 new mode 100644 index e2672c20..e3ef692a Binary files a/scripts/ckeditor/plugins/timestamp/icons/timestamp.png and b/scripts/ckeditor/plugins/timestamp/icons/timestamp.png differ diff --git a/scripts/load-ckeditor.js b/scripts/load-ckeditor.js index 3354e3fd..5338c785 100755 --- a/scripts/load-ckeditor.js +++ b/scripts/load-ckeditor.js @@ -7,8 +7,12 @@ $(document).ready(function() { // if you try to use it immediately after CKEDITOR.replace('editor'); CKEDITOR.on('instanceReady', function (ev) { - // Create a new command with the desired exec function var editor = ev.editor; + + // Make the editor bigger + editor.resize("100%", "500"); + + // Create a new command with the desired exec function var overridecmd = new CKEDITOR.command(editor, { exec: function(editor){ // Replace this with your desired save button code @@ -37,6 +41,8 @@ $(document).ready(function() { var dialogObj = dialogDefinition.dialog; dialogObj.on("show", function() { + // This code will open the Upload tab. + this.selectPage('Upload'); // replace the submit function with something useless dialogObj.getContentElement( 'Upload', 'upload' ).submit = function() { return false; @@ -104,7 +110,6 @@ $(document).ready(function() { // add all the other attachments that were previously added $( "input[name^='attachment']" ).each(function(idx, el) { formData.append($(el).attr('name'), $(el).attr('value')); - // console.log(el); }); formData.append('drop-count', files.length); // number of files dropped that should be sent diff --git a/xcode/elogd.xcodeproj/project.xcworkspace/xcuserdata/dmilicic.xcuserdatad/UserInterfaceState.xcuserstate b/xcode/elogd.xcodeproj/project.xcworkspace/xcuserdata/dmilicic.xcuserdatad/UserInterfaceState.xcuserstate index 3ba28062..07f550b6 100644 Binary files a/xcode/elogd.xcodeproj/project.xcworkspace/xcuserdata/dmilicic.xcuserdatad/UserInterfaceState.xcuserstate and b/xcode/elogd.xcodeproj/project.xcworkspace/xcuserdata/dmilicic.xcuserdatad/UserInterfaceState.xcuserstate differ