mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:10:11 +00:00
Merge branch 'develop' into issue/#3062
* develop: (68 commits) Added documentation update to the translation update to the translations translation docs now contain basic usage of the Transifex client - Replace TinyMCE-enabled filebrowser.tpl by filebrowser_plain.tpl content - Remove misc TinyMCE mentions in docs and minifyjs - Remove $theme_richtext_editor boot var - Remove "richtext" feature - Remove fix_mce_lf() function - Remove nomce parameter - Remove TinyMCE mentions in themes - Remove tinyMCE mentions or convert to addeditortext() - Remove $editselect template value Remove tinyMCE libraries limit the description of the meta tag to 160 characters in /mod/display Improved handling of non string values in the config Bugfix: Caching of non string cache values now works. Reformatted stuff, improved query Auto-focus first input field of modal when shown Use cache instead of config for storing last proc_run time Some added logging Bugfix for masses of php warnings Rearranged the logging Some changed logging ... # Conflicts: # view/theme/frost-mobile/js/theme.js # view/theme/frost/js/theme.js
This commit is contained in:
commit
c38a5e443d
438 changed files with 108865 additions and 144355 deletions
|
@ -12,7 +12,7 @@ $(document).ready(function() {
|
|||
'#system-menu-list-closing': false
|
||||
};
|
||||
|
||||
/* enable tinymce on focus and click */
|
||||
/* enable editor on focus and click */
|
||||
$("#profile-jot-text").focus(enableOnUser);
|
||||
$("#profile-jot-text").click(enableOnUser);
|
||||
|
||||
|
@ -384,249 +384,52 @@ function hideNavMenu(menuID) {
|
|||
|
||||
|
||||
/*
|
||||
* TinyMCE/Editor
|
||||
* Editor
|
||||
*/
|
||||
|
||||
function InitMCEEditor(editorData) {
|
||||
var tinyMCEInitConfig = {
|
||||
theme : "advanced",
|
||||
//mode : // SPECIFIC
|
||||
//editor_selector: // SPECIFIC
|
||||
//elements: // SPECIFIC
|
||||
plugins : "bbcode,paste,autoresize,inlinepopups",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true, // COUPLED WITH paste PLUGIN
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
//force_p_newlines : false,
|
||||
//force_br_newlines : true,
|
||||
forced_root_block : 'div',
|
||||
//convert_urls: false, //SPECIFIC?
|
||||
content_css: baseurl + "/view/custom_tinymce.css",
|
||||
theme_advanced_path : false,
|
||||
file_browser_callback : "fcFileBrowser",
|
||||
//setup : // SPECIFIC
|
||||
};
|
||||
|
||||
if (window.editSelect != 'none') {
|
||||
$.extend(tinyMCEInitConfig, editorData);
|
||||
tinyMCE.init(tinyMCEInitConfig);
|
||||
} else if (typeof editorData.plaintextFn == 'function') {
|
||||
(editorData.plaintextFn)();
|
||||
}
|
||||
}
|
||||
|
||||
var editor = false;
|
||||
var textlen = 0;
|
||||
|
||||
function initEditor(cb) {
|
||||
if (editor==false) {
|
||||
editor = true;
|
||||
function initEditor(callback) {
|
||||
if(editor == false) {
|
||||
$("#profile-jot-text-loading").show();
|
||||
|
||||
var editorData = {
|
||||
mode : "specific_textareas",
|
||||
editor_selector : "profile-jot-text",
|
||||
auto_focus : "profile-jot-text",
|
||||
//plugins : "bbcode,paste,autoresize,inlinepopups",
|
||||
//paste_text_sticky : true,
|
||||
convert_urls : false,
|
||||
setup : function(ed) {
|
||||
cPopup = null;
|
||||
ed.onKeyDown.add(function(ed,e) {
|
||||
if (cPopup !== null)
|
||||
cPopup.onkey(e);
|
||||
});
|
||||
|
||||
ed.onKeyUp.add(function(ed, e) {
|
||||
var txt = tinyMCE.activeEditor.getContent();
|
||||
match = txt.match(/@([^ \n]+)$/);
|
||||
if (match!==null) {
|
||||
if (cPopup === null) {
|
||||
cPopup = new ACPopup(this,baseurl+"/acl");
|
||||
}
|
||||
if (cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]);
|
||||
if (! cPopup.ready) cPopup = null;
|
||||
} else {
|
||||
if (cPopup !== null) { cPopup.close(); cPopup = null; }
|
||||
}
|
||||
|
||||
textlen = txt.length;
|
||||
if (textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
|
||||
$('#profile-jot-desc').html(window.isPublic);
|
||||
} else {
|
||||
$('#profile-jot-desc').html(' ');
|
||||
}
|
||||
|
||||
//Character count
|
||||
|
||||
if (textlen <= 140) {
|
||||
$('#character-counter').removeClass('red');
|
||||
$('#character-counter').removeClass('orange');
|
||||
$('#character-counter').addClass('grey');
|
||||
}
|
||||
if ((textlen > 140) && (textlen <= 420)) {
|
||||
$('#character-counter').removeClass('grey');
|
||||
$('#character-counter').removeClass('red');
|
||||
$('#character-counter').addClass('orange');
|
||||
}
|
||||
if (textlen > 420) {
|
||||
$('#character-counter').removeClass('grey');
|
||||
$('#character-counter').removeClass('orange');
|
||||
$('#character-counter').addClass('red');
|
||||
}
|
||||
$('#character-counter').text(textlen);
|
||||
});
|
||||
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$(".jothidden").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
});
|
||||
|
||||
},
|
||||
plaintextFn : function() {
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
||||
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
|
||||
$(".jothidden").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
}
|
||||
};
|
||||
InitMCEEditor(editorData);
|
||||
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
||||
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
|
||||
$(".jothidden").show();
|
||||
// setup acl popup
|
||||
$("a#jot-perms-icon").colorbox({
|
||||
'inline' : true,
|
||||
'transition' : 'elastic'
|
||||
});
|
||||
} else {
|
||||
if (typeof cb!="undefined") cb();
|
||||
|
||||
editor = true;
|
||||
}
|
||||
if (typeof callback != "undefined") {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
function enableOnUser() {
|
||||
if (editor) return;
|
||||
if (editor) {
|
||||
return;
|
||||
}
|
||||
$(this).val("");
|
||||
initEditor();
|
||||
}
|
||||
|
||||
|
||||
function msgInitEditor() {
|
||||
var editorData = {
|
||||
mode : "specific_textareas",
|
||||
editor_selector : "prvmail-text",
|
||||
//plugins : "bbcode,paste",
|
||||
//paste_text_sticky : true,
|
||||
convert_urls : false,
|
||||
//theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
cPopup = null;
|
||||
ed.onKeyDown.add(function(ed,e) {
|
||||
if (cPopup !== null)
|
||||
cPopup.onkey(e);
|
||||
});
|
||||
|
||||
ed.onKeyUp.add(function(ed, e) {
|
||||
var txt = tinyMCE.activeEditor.getContent();
|
||||
match = txt.match(/@([^ \n]+)$/);
|
||||
if (match!==null) {
|
||||
if (cPopup === null) {
|
||||
cPopup = new ACPopup(this,baseurl+"/acl");
|
||||
}
|
||||
if (cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]);
|
||||
if (! cPopup.ready) cPopup = null;
|
||||
} else {
|
||||
if (cPopup !== null) { cPopup.close(); cPopup = null; }
|
||||
}
|
||||
|
||||
textlen = txt.length;
|
||||
if (textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
|
||||
$('#profile-jot-desc').html(window.isPublic);
|
||||
} else {
|
||||
$('#profile-jot-desc').html(' ');
|
||||
}
|
||||
});
|
||||
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
var editorId = ed.editorId;
|
||||
var textarea = $('#'+editorId);
|
||||
if (typeof(textarea.attr('tabindex')) != "undefined") {
|
||||
$('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
|
||||
textarea.attr('tabindex', null);
|
||||
}
|
||||
});
|
||||
},
|
||||
plaintextFn : function() {
|
||||
$("#prvmail-text").editor_autocomplete(baseurl+"/acl");
|
||||
}
|
||||
}
|
||||
InitMCEEditor(editorData);
|
||||
$("#prvmail-text").editor_autocomplete(baseurl+"/acl");
|
||||
}
|
||||
|
||||
|
||||
function contactInitEditor() {
|
||||
var editorData = {
|
||||
mode : "exact",
|
||||
elements : "contact-edit-info",
|
||||
//plugins : "bbcode"
|
||||
}
|
||||
InitMCEEditor(editorData);
|
||||
}
|
||||
|
||||
|
||||
function eventInitEditor() {
|
||||
var editorData = {
|
||||
mode : "textareas",
|
||||
//plugins : "bbcode,paste",
|
||||
//paste_text_sticky : true,
|
||||
//theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
InitMCEEditor(editorData);
|
||||
}
|
||||
|
||||
|
||||
function profInitEditor() {
|
||||
var editorData = {
|
||||
mode : "textareas",
|
||||
//plugins : "bbcode,paste",
|
||||
//paste_text_sticky : true,
|
||||
//theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
InitMCEEditor(editorData);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Jot
|
||||
*/
|
||||
|
||||
function addeditortext(textElem, data) {
|
||||
if (window.editSelect == 'none') {
|
||||
var currentText = $(textElem).val();
|
||||
$(textElem).val(currentText + data);
|
||||
} else {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
}
|
||||
var currentText = $(textElem).val();
|
||||
$(textElem).val(currentText + data);
|
||||
}
|
||||
|
||||
function jotVideoURL() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue