aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/dispy/jot-header.tpl
diff options
context:
space:
mode:
authorMichael <icarus@dabo.de>2012-02-19 20:09:42 +0100
committerMichael <icarus@dabo.de>2012-02-19 20:09:42 +0100
commitcafd4003522a472d2709569ea5eb5f80b817af23 (patch)
treebbd512126515afc929de06dce79ba847b9681092 /view/theme/dispy/jot-header.tpl
parent73e0e4d78341cb96ef9665a0ee4fb7e7ee2a701f (diff)
parenta9ed5915cebcf51347acaad51d0c252e57bceaff (diff)
downloadvolse-hubzilla-cafd4003522a472d2709569ea5eb5f80b817af23.tar.gz
volse-hubzilla-cafd4003522a472d2709569ea5eb5f80b817af23.tar.bz2
volse-hubzilla-cafd4003522a472d2709569ea5eb5f80b817af23.zip
Merge remote branch 'upstream/master'
Conflicts: view/theme/vier/style.css
Diffstat (limited to 'view/theme/dispy/jot-header.tpl')
-rwxr-xr-xview/theme/dispy/jot-header.tpl52
1 files changed, 44 insertions, 8 deletions
diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl
index 79db0ec5a..8dccf71ed 100755
--- a/view/theme/dispy/jot-header.tpl
+++ b/view/theme/dispy/jot-header.tpl
@@ -9,6 +9,33 @@ function initEditor(cb) {
if (editor==false) {
$("#profile-jot-text-loading").show();
$("#jot-title-desc").show();
+ if(plaintext == 'none') {
+ $("#profile-jot-text-loading").hide();
+ $("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
+ $(".jothidden").show();
+ editor = true;
+ $("a#jot-perms-icon").fancybox({
+ 'transitionIn' : 'elastic',
+ 'transitionOut' : 'elastic'
+ });
+ $("#profile-jot-submit-wrapper").show();
+ {{ if $newpost }}
+ $("#profile-upload-wrapper").show();
+ $("#profile-attach-wrapper").show();
+ $("#profile-link-wrapper").show();
+ $("#profile-video-wrapper").show();
+ $("#profile-audio-wrapper").show();
+ $("#profile-location-wrapper").show();
+ $("#profile-nolocation-wrapper").show();
+ $("#profile-title-wrapper").show();
+ $("#profile-jot-plugin-wrapper").show();
+ $("#jot-preview-link").show();
+ {{ endif }}
+
+
+ if (typeof cb!="undefined") cb();
+ return;
+ }
tinyMCE.init({
theme : "advanced",
mode : "specific_textareas",
@@ -132,7 +159,7 @@ function initEditor(cb) {
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
- tinyMCE.execCommand('mceInsertRawHTML',false,response);
+ addeditortext(response);
$('#profile-rotator').hide();
}
}
@@ -143,7 +170,7 @@ function initEditor(cb) {
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
- tinyMCE.execCommand('mceInsertRawHTML',false,response);
+ addeditortext(response);
$('#profile-rotator').hide();
}
}
@@ -190,7 +217,7 @@ function initEditor(cb) {
reply = bin2hex(reply);
$('#profile-rotator').show();
$.get('parse_url?binurl=' + reply, function(data) {
- tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ addeditortext(data);
$('#profile-rotator').hide();
});
}
@@ -199,21 +226,21 @@ function initEditor(cb) {
function jotGetVideo() {
reply = prompt("$utubeurl");
if(reply && reply.length) {
- tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]');
+ addeditortext('[youtube]' + reply + '[/youtube]');
}
}
function jotVideoURL() {
reply = prompt("$vidurl");
if(reply && reply.length) {
- tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]');
+ addeditortext('[video]' + reply + '[/video]');
}
}
function jotAudioURL() {
reply = prompt("$audurl");
if(reply && reply.length) {
- tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]');
+ addeditortext('[audio]' + reply + '[/audio]');
}
}
@@ -237,7 +264,7 @@ function initEditor(cb) {
$.get('share/' + id, function(data) {
if (!editor) $("#profile-jot-text").val("");
initEditor(function(){
- tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ addeditortext(data);
$('#like-rotator-' + id).hide();
$(window).scrollTop(0);
});
@@ -260,7 +287,7 @@ function initEditor(cb) {
$.get('parse_url?binurl=' + reply, function(data) {
if (!editor) $("#profile-jot-text").val("");
initEditor(function(){
- tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ addeditortext(data);
$('#profile-rotator').hide();
});
});
@@ -272,6 +299,15 @@ function initEditor(cb) {
$('#profile-nolocation-wrapper').hide();
}
+ function addeditortext(data) {
+ if(plaintext == 'none') {
+ var currentText = $("#profile-jot-text").val();
+ $("#profile-jot-text").val(currentText + data);
+ }
+ else
+ tinyMCE.execCommand('mceInsertRawHTML',false,data);
+ }
+
$geotag
</script>