Browse Source

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

pull/39/head
friendica 10 years ago
parent
commit
75acc1ed96
  1. 4
      mod/editpost.php
  2. 2
      view/jot-header.tpl
  3. 5
      view/jot.tpl
  4. 2
      view/theme/dispy/jot.tpl
  5. 2
      view/theme/duepuntozero/jot.tpl
  6. 2
      view/theme/loozah/jot.tpl
  7. 2
      view/theme/testbubble/jot.tpl

4
mod/editpost.php

@ -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>';

2
view/jot-header.tpl

@ -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;
}

5
view/jot.tpl

@ -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 }}

2
view/theme/dispy/jot.tpl

@ -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 }}

2
view/theme/duepuntozero/jot.tpl

@ -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 }}

2
view/theme/loozah/jot.tpl

@ -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 }}

2
view/theme/testbubble/jot.tpl

@ -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 }}

Loading…
Cancel
Save