]> git.mxchange.org Git - friendica.git/commitdiff
support plaintext on editpost, editorinit called before all buttons laid out
authorfriendica <info@friendica.com>
Fri, 17 Feb 2012 19:49:27 +0000 (11:49 -0800)
committerfriendica <info@friendica.com>
Fri, 17 Feb 2012 19:49:27 +0000 (11:49 -0800)
mod/editpost.php
view/jot-header.tpl
view/jot.tpl
view/theme/dispy/jot.tpl
view/theme/duepuntozero/jot.tpl
view/theme/loozah/jot.tpl
view/theme/testbubble/jot.tpl

index f23b305f0ec3c9be8761903c4c15477f34503058..778ac3dccd5e8343bdab20315c151dc723a8c5c2 100755 (executable)
@@ -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>';
 
index 02662d2d4b17ecec89712066ed164c11bf5e2717..007f639b671a00d0886bf31c10c268d26cef519d 100755 (executable)
@@ -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;
                }       
index f116dc0f022c3821804c5fba9c0a7b3ac82cc923..1c19dd6fac0a8891c5e93a9a68f926ceb5f3ab6b 100755 (executable)
@@ -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 }}
 
 
 
index 0ceddb3b7be39aeaeddd143974114c29afe8047b..c312d221a1e89d5a22442ed883e3665f2f647d44 100755 (executable)
@@ -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 }}
index ade1614b7190b879f71f9eab2f29eb099989b4ef..e356d1d8f86bd23aca05e9e886dd60aacef25cb8 100755 (executable)
@@ -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 }}
index 9bda1868e5dfb6849031bb0f3f6b74e6e171541d..ac64223fb0cb41d41c41c82537af16f4487848ab 100755 (executable)
@@ -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 }}
index e2fd7132a33d4321e9e6529fc79b6495cb89d671..5bb5b46736893070ff4497218f4c2ed546843159 100755 (executable)
@@ -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 }}