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 May 6th 2014, 3:17 pm

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 May 11th 2014, 7:48 am; edited 1 time in total

udarsha45
Forumember

Male Posts : 470
Reputation : 2
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on May 7th 2014, 4:30 pm

Bump.

udarsha45
Forumember

Male Posts : 470
Reputation : 2
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on May 8th 2014, 5:48 pm

Bumping.

udarsha45
Forumember

Male Posts : 470
Reputation : 2
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on May 10th 2014, 5:33 pm

bump.

udarsha45
Forumember

Male Posts : 470
Reputation : 2
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by Niko on May 10th 2014, 6:42 pm

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");
            }
          });
      }
    })});

Niko
Hyperactive

Male Posts : 2296
Reputation : 97
Language : English, French, Italian, Spanish, Latin

https://www.translationscloud.com/?utm_source=forumotion&utm

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 on May 11th 2014, 7:47 am

Thanks alot mate! Very Happy

udarsha45
Forumember

Male Posts : 470
Reputation : 2
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by Niko on May 11th 2014, 11:15 pm

Nothing Wink

Have a nice day :rose:

Niko
Hyperactive

Male Posts : 2296
Reputation : 97
Language : English, French, Italian, Spanish, Latin

https://www.translationscloud.com/?utm_source=forumotion&utm

Back to top Go down

Solved Re: Auto Save Feature

Post by SLGray on May 12th 2014, 1:11 am

Topic Solved & Archived


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


SLGray
Administrator
Administrator

Male Posts : 36657
Reputation : 2443
Language : English
Location : United States

http://ztwds.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