Sponsored Content
The Lounge What is on Your Mind? A Choice: Draggable Editors or Smilie Box on Quick Editor Post 303026982 by Neo on Thursday 6th of December 2018 09:02:17 AM
Old 12-06-2018
Update:

I have set up "draggable" for three areas. This is experimental but it works for these three areas:
  • Quick Reply Editor
  • New Reply (Advanced) Editor
  • Advanced Forum Stats (Home Page)

Because it is experimental, you will need to use web dev tools to set the boolean as follows:
  • Open web dev tools in your browser (normally CMD+OPTION+I) from your browser menu.
  • Go to Application->Storage->Local Storage -> www.unix.com
  • Change the value of "draggable" to yes
  • Reload page

This will enable the jQuery UI draggable (and resizable) feature for the three areas above and at the same time, hide the smilie and color picker in the Quick Reply Editor.

Of course, setting the draggable var to no will reverse the change and draggable will be disabled and the buttons in QRE will return on reload.

Here is some example jQuery code that makes this happen in showthread:


Code:
$(function() {
if(localStorage.getItem('draggable') == 'yes')
{
 $("#neo-quickreply-wrapper").css({"overflow":"hidden"}).resizable();
 $("#neo-quickreply-wrapper").draggable({"cursor":"pointer"});
 $("#{$editorid}_popup_smilie, #{$editorid}_popup_smilie_seperator").hide();
}
else{
$("#{$editorid}_popup_smilie, #{$editorid}_popup_smilie_seperator").show();
localStorage.setItem('draggable','no');
}
});


There is no need to hide any broken buttons on the stats page or the advanced editor page, so at code is even more simple. For example, for the advanced editor, it is only:

Code:
$(function() {
if(localStorage.getItem('draggable') == 'yes')
{
document.cookie = "draggable=" + 'yes';
 $("#draggable-stats").css({"overflow-x":"auto","overflow-y":"hidden"}).resizable();
 $("#draggable-stats").draggable({"cursor":"pointer"});
}
else{
 $("#draggable-stats").css({"overflow-x":"auto","overflow-y":"hidden"});
localStorage.setItem('draggable','no');
};


It's experimental, so I have not created any easy button on the editors to toggle this on and off yet, but if anyone likes this feature and needs a toggle switch, let me know.

Or, if there are any other areas of the forums you want to make draggable and resizable, let me know in this thread.
 

6 More Discussions You Might Find Interesting

1. Programming

editors?

Just started out with C and are looking for a good editor in *nix that marks the code with colors. This is maybe a newbie thing to have the C code in colors but i like it and you can almost always se when you are typing wrong. :) Ive heard that emacs should have that option but i havent... (3 Replies)
Discussion started by: hexdoctor
3 Replies

2. UNIX for Dummies Questions & Answers

Editors for UNIX

Where can i find editors for UNIX? thanks (5 Replies)
Discussion started by: Inbal
5 Replies

3. UNIX for Dummies Questions & Answers

Mail utilities and editors.

I was wondering what other mail utilities besides 'mutt, unix mail, PINE and elm' are available for unix. Also, what other editors are around besides 'VI, pico, vim and emacs'... I've been searching the net looking for some answers, but nothing much has come up.. thanx! (1 Reply)
Discussion started by: Shonnie
1 Replies

4. UNIX and Linux Applications

opinions on video editors

What is everyones opinions on these video editors? PiTiVi Avidemux Cinelerra Kdenlive Kino Linux Video Editing: Top Five Linux Video Editors (0 Replies)
Discussion started by: cokedude
0 Replies

5. What is on Your Mind?

Small bug in the Quick Editor function in postbit

Hey, There was a small bug in the Quick Editor function in postbit, but I fixed it (basically a double quote was missing from an element id): <div id="post_message_$post" class="neo-message-area">$post</div> Was <div id="post_message_$post class="neo-message-area">$post</div> Should... (1 Reply)
Discussion started by: Neo
1 Replies

6. Web Development

New Font Awesome Icons in Quick Reply Editor

Working on the Quick Reply Editor, I have replaced a number of icons (see image below) with Font Awesome Icons. Was planning to replace all of them, but for some reason, replacing a few of them causes the script / template to break (which is odd) so I left them for now. ... (6 Replies)
Discussion started by: Neo
6 Replies
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy