support plaintext on editpost, editorinit called before all buttons laid out

This commit is contained in:
friendica 2012-02-17 11:49:27 -08:00
parent 184f6165fc
commit 75acc1ed96
7 changed files with 11 additions and 8 deletions

View File

@ -28,6 +28,10 @@ function editpost_content(&$a) {
return;
}
$plaintext = false;
if(local_user() && intval(get_pconfig(local_user(),'system','plaintext')))
$plaintext = true;
$o .= '<h2>' . t('Edit post') . '</h2>';

View File

@ -11,12 +11,12 @@ function initEditor(cb){
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'
});
$(".jothidden").show();
if (typeof cb!="undefined") cb();
return;
}

View File

@ -13,9 +13,7 @@
<input type="hidden" name="preview" id="jot-preview" value="0" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }}
<ul id="jot-tools" class="jothidden" style="display:none">
<li><a href="#" onclick="return false;" id="wall-image-upload" title="$upload">$shortupload</a></a></li>
<li><a href="#" onclick="return false;" id="wall-file-upload" title="$attach">$shortattach</a></li>
@ -45,6 +43,7 @@
</form>
{{ if $content }}<script>initEditor();</script>{{ endif }}

View File

@ -24,7 +24,6 @@
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-jot-submit-wrapper" style="display:none">
@ -73,3 +72,4 @@
<div id="profile-jot-end"></div>
</form>
</div>
{{ if $content }}<script>initEditor();</script>{{ endif }}

View File

@ -18,7 +18,6 @@
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-jot-submit-wrapper" class="jothidden">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
@ -81,3 +80,4 @@
<div id="profile-jot-end"></div>
</form>
</div>
{{ if $content }}<script>initEditor();</script>{{ endif }}

View File

@ -19,7 +19,6 @@
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-jot-submit-wrapper" style="display:none" class="jothidden">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
@ -82,3 +81,4 @@
<div id="profile-jot-end"></div>
</form>
</div>
{{ if $content }}<script>initEditor();</script>{{ endif }}

View File

@ -20,7 +20,6 @@
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-upload-wrapper" class="jot-tool" style="display: none;" >
<div id="wall-image-upload-div" ><a onclick="return false;" id="wall-image-upload" class="icon border camera" title="$upload"></a></div>
@ -72,3 +71,4 @@
<div id="profile-jot-end"></div>
</form>
</div>
{{ if $content }}<script>initEditor();</script>{{ endif }}