Skip to content

Commit

Permalink
refs #514 : merged with 2.0 tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Jun 15, 2011
2 parents 455c3a9 + 53e02d9 commit 47219e7
Show file tree
Hide file tree
Showing 109 changed files with 126 additions and 23,910 deletions.
4 changes: 2 additions & 2 deletions library/view/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,8 @@ function getEntryContentView($blogid, $id, $content, $formatter, $keywords = arr
}

$attributes = preg_match('/(style="cursor: pointer;" onclick="open_img\((.[^"]+)\); return false;")/si', $images[$i][2], $matches) ? ' '.$matches[1] : '';
$attributes .= preg_match('/(alt="(.[^"]+)")/si', $images[$i][2], $matches) ? ' '.$matches[1] : ' alt="resize"';
$attributes .= preg_match('/(title="(.[^"]+)")/si', $images[$i][2], $matches) ? $title = ' '.$matches[1] : '';
$attributes .= preg_match('/(alt="([^"]*)")/si', $images[$i][2], $matches) ? ' '.$matches[1] : ' alt="resize"';
$attributes .= preg_match('/(title="([^"]*)")/si', $images[$i][2], $matches) ? $title = ' '.$matches[1] : '';

$tempFileName = array_pop(explode('/', $images[$i][1]));
if (preg_match('/(.+)\.w(\d{1,})\-h(\d{1,})\.(.+)/', $tempFileName, $matches))
Expand Down
Binary file removed plugins/ED_tinyMCE/.DS_Store
Binary file not shown.
16 changes: 9 additions & 7 deletions plugins/ED_tinyMCE/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ function tinyMCE_editorinit(&$editor) {
<?php
if($config['editormode'] == 'simple') {
?>
plugins : "autolink,lists,style,advimage,advlink,emotions,inlinepopups,preview,media,contextmenu,fullscreen,noneditable,visualchars,xhtmlxtras,wordcount,advlist,TTMLsupport",
plugins : "autolink,autoresize,lists,style,advimage,advlink,emotions,inlinepopups,preview,media,contextmenu,fullscreen,noneditable,visualchars,xhtmlxtras,wordcount,advlist,TTMLsupport",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,|,preview,fullscreen",
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,blockquote,hr,|,undo,redo,|,link,unlink,anchor,image,media,code,|,forecolor,backcolor,|,charmap,emotions,|,visualchars,restoredraft",
theme_advanced_buttons1 : "tcsave,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,|,preview,fullscreen",
theme_advanced_buttons2 : "undo,redo,|,bullist,numlist,|,outdent,indent,blockquote,hr,|,tcattach,link,unlink,anchor,image,media,code,|,forecolor,backcolor,|,charmap,emotions,|,visualchars,restoredraft",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
<?php
} else {
?>
plugins : "autolink,lists,pagebreak,style,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount,advlist,TTMLsupport",
plugins : "autolink,autoresize,lists,pagebreak,style,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount,advlist,TTMLsupport",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking,pagebreak,restoredraft,|,styleprops,|,code,cleanup,|,preview,fullscreen",
theme_advanced_buttons2 : "undo,redo,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,|,link,unlink,anchor,image,charmap,media,advhr,|,forecolor,backcolor,|,tablecontrols,|,hr,removeformat,visualaid,|,ltr,rtl",
theme_advanced_buttons1 : "tcsave,save,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking,pagebreak,restoredraft,|,styleprops,|,code,cleanup,|,preview,fullscreen",
theme_advanced_buttons2 : "undo,redo,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,|,tcattach,link,unlink,anchor,image,charmap,media,advhr,|,forecolor,backcolor,|,tablecontrols,|,hr,removeformat,visualaid,|,ltr,rtl",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
<?php
Expand Down Expand Up @@ -79,7 +79,8 @@ function tinyMCE_editorinit(&$editor) {
};
editor.onKeyUp.add(editorChanged);
editor.onMouseDown.add(editorChanged);
editor.propertyFilePath = "<?php echo $context->getProperty('service.path');?>/attach/<?php echo $context->getProperty('blog.id');?>/";
editor.propertyFilePath = "<?php echo $context->getProperty('uri.service');?>/attach/<?php echo $context->getProperty('blog.id');?>/";
editor.fixPosition = <?php echo Setting::getBlogSettingGlobal('editorPropertyPositionFix', 0);?>;
return editor;
<?php
$result = ob_get_contents();
Expand All @@ -92,6 +93,7 @@ function tinyMCE_adminheader($target, $mother) {

if ($suri['directive'] == '/owner/entry/post' || $suri['directive'] == '/owner/entry/edit') {
$target .= "\t<script type=\"text/javascript\" src=\"$pluginURL/tiny_mce/tiny_mce.js\"></script>\n";
$target .= "\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"$pluginURL/upload-section.css\" />\n";
}
return $target;
}
Expand Down
37 changes: 25 additions & 12 deletions plugins/ED_tinyMCE/tiny_mce/plugins/TTMLsupport/editor_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,13 @@
* Released under LGPL License.
*
*/

(function() {
// Load plugin specific language pack
// tinymce.PluginManager.requireLangPack('TTMLsupport');

tinymce.create('tinymce.plugins.TTMLsupport', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
var t = this;
t.propertyFilePath = ed.propertyFilePath;
ed.onBeforeSetContent.add(function(ed, o) {
Expand All @@ -36,6 +27,28 @@
});
ed.onNodeChange.add(function(ed, cm, e) {
t.showProperty(e);
});
ed.addCommand('textcubeToggleUploadDlg', function() {
var uploadDlg = document.getElementById('upload-section');
if (uploadDlg.style.display == "block") {
uploadDlg.style.display = "none";
} else {
uploadDlg.style.display = "block";
}
});
ed.addCommand('textcubeSavePost', function() {
entryManager.save();
return false;
});
ed.addButton('tcattach', {
title : 'Upload and insert files',
cmd : 'textcubeToggleUploadDlg',
image : url + '/toolbar/attach.gif'
});
ed.addButton('tcsave', {
title : 'Save current post',
cmd : 'textcubeSavePost',
image : url + '/toolbar/save.gif'
});
var div = document.createElement('div');
div.id = 'tinyMCEeditor-textbox';
Expand Down Expand Up @@ -649,7 +662,7 @@
getObject(t.id + "propertyHyperLink").style.display = "none";
return false;
}
t.setPropertyPosition();
// t.setPropertyPosition();
return true;
},
setProperty : function() {
Expand Down Expand Up @@ -889,9 +902,9 @@
},
getEditorProperty : function(/*$alt*/) {
//$fixPosition = getUserSetting('editorPropertyPositionFix', 0);
// var fixPosition = t.fixPosition, hasGD = t.hasGD;
var fixPosition = true, hasGD = true;
var t = this;
var fixPosition = editor.fixPosition;
var hasGD = true;
// hyperlink
var html = ////
'<div id="__ID__propertyHyperLink" class="entry-editor-property" style="display: none;">' +
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 0 additions & 57 deletions plugins/ED_tinyMCE/tiny_mce/plugins/advhr/editor_plugin_src.js

This file was deleted.

50 changes: 0 additions & 50 deletions plugins/ED_tinyMCE/tiny_mce/plugins/advimage/editor_plugin_src.js

This file was deleted.

10 changes: 5 additions & 5 deletions plugins/ED_tinyMCE/tiny_mce/plugins/advimage/js/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ var ImageDialog = {
},

init : function(ed) {
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList');

tinyMCEPopup.resizeToInnerSize();
this.fillClassList('class_list');
this.fillFileList('src_list', 'tinyMCEImageList');
this.fillFileList('over_list', 'tinyMCEImageList');
this.fillFileList('out_list', 'tinyMCEImageList');
this.fillFileList('src_list', fl);
this.fillFileList('over_list', fl);
this.fillFileList('out_list', fl);
TinyMCE_EditableSelects.init();

if (n.nodeName == 'IMG') {
Expand Down Expand Up @@ -287,7 +287,7 @@ var ImageDialog = {
fillFileList : function(id, l) {
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;

l = window[l];
l = typeof(l) === 'function' ? l() : window[l];
lst.options.length = 0;

if (l && l.length > 0) {
Expand Down
61 changes: 0 additions & 61 deletions plugins/ED_tinyMCE/tiny_mce/plugins/advlink/editor_plugin_src.js

This file was deleted.

Loading

0 comments on commit 47219e7

Please sign in to comment.