aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/dispy
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-07 00:13:16 -0800
committerfriendica <info@friendica.com>2012-02-07 00:13:16 -0800
commitc6cdad946eac99ced15cd8fa294ab0fdaa05f3a5 (patch)
tree02840c9f80b87bc4fd480386cfbbb8f8871453b1 /view/theme/dispy
parent2b77002471fc9b2e1ad3e8dd69d373cc910e8834 (diff)
downloadvolse-hubzilla-c6cdad946eac99ced15cd8fa294ab0fdaa05f3a5.tar.gz
volse-hubzilla-c6cdad946eac99ced15cd8fa294ab0fdaa05f3a5.tar.bz2
volse-hubzilla-c6cdad946eac99ced15cd8fa294ab0fdaa05f3a5.zip
more fixes for textmode
Diffstat (limited to 'view/theme/dispy')
-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>