The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Auto Save Feature

View previous topic View next topic Go down

Solved Auto Save Feature

Post by udarsha45 on 6/5/2014, 15:17

Hello,

I've just read this tutorial and added it to my http://help.forumotion.com/t132804-automatically-save-posts-in-progress I have to say, it works perfectly! However is their a way to show that the post you were typing were saved? I mean after you type 5 words or so, an icon or a message pop ups and tells that our post is saved?


Last edited by udarsha45 on 11/5/2014, 07:48; edited 1 time in total
avatar
udarsha45
Forumember

Male Posts : 526
Reputation : 3
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on 7/5/2014, 16:30

Bump.
avatar
udarsha45
Forumember

Male Posts : 526
Reputation : 3
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on 8/5/2014, 17:48

Bumping.
avatar
udarsha45
Forumember

Male Posts : 526
Reputation : 3
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on 10/5/2014, 17:33

bump.
avatar
udarsha45
Forumember

Male Posts : 526
Reputation : 3
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by Niko on 10/5/2014, 18:42

Hello,

I'm happy that you enjoyed my resource Wink

Code:
  $(function(){$(function(){

      var saved = 1; 
 
    if($("#text_editor_textarea").length != 0){
          $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");     
          $(".sceditor-container").after("<br/><div id='div_minchars_info'></div></div>");
         
          var sceditor = $("#text_editor_textarea").sceditor("instance");                 
          var str = sceditor.val();
          var regex = new RegExp('\\w{' + saved + ',}\\b', 'g');
          var str_arr = str.match(regex);
          var str_len = str_arr == null ? 0 : str_arr.length;
         
          if(str_len >= 1) $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
         
          sceditor.keyUp(function(e) {
            str = sceditor.val();
            str_arr = str.match(regex);
            str_len = str_arr == null ? 0 : str_arr.length;
            if(str_len >= 1) {
                $("#div_minchars_info").html("Message saved"); 
            $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
            }else{
                $("#div_minchars_info").html("Message not saved");
                $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");
            }
          });
      }
    })});
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on 11/5/2014, 07:47

Thanks alot mate! Very Happy
avatar
udarsha45
Forumember

Male Posts : 526
Reputation : 3
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by Niko on 11/5/2014, 23:15

Nothing Wink

Have a nice day :rose:
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: Auto Save Feature

Post by SLGray on 12/5/2014, 01:11

Topic Solved & Archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 39648
Reputation : 2668
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum