mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-28 03:27:36 +01:00
Add 'sidebaropened: pinned' option to allow sidebar to be pre-pinned but support unpinning
This commit is contained in:
parent
974cd33853
commit
7e37817b86
@ -20,7 +20,7 @@ public class ClientConfigurationComponent extends Component {
|
||||
s(t, "spammessage", c.getString("spammessage", "You may only chat once every %interval% seconds."));
|
||||
s(t, "webprefix", unescapeString(c.getString("webprefix", "[WEB] ")));
|
||||
s(t, "defaultzoom", c.getInteger("defaultzoom", 0));
|
||||
s(t, "sidebaropened", c.getBoolean("sidebaropened", false));
|
||||
s(t, "sidebaropened", c.getString("sidebaropened", "false"));
|
||||
|
||||
DynmapWorld defaultWorld = null;
|
||||
String defmap = null;
|
||||
|
@ -260,7 +260,7 @@ updaterate: 2000
|
||||
|
||||
showplayerfacesinmenu: true
|
||||
|
||||
# Set sidebaropened: true to pin menu sidebar opened
|
||||
# Set sidebaropened: 'true' to pin menu sidebar opened permanently, 'pinned' to default the sidebar to pinned, but allow it to unpin
|
||||
#sidebaropened: true
|
||||
|
||||
joinmessage: "%playername% joined"
|
||||
|
@ -145,10 +145,15 @@ DynMap.prototype = {
|
||||
var panel;
|
||||
var sidebar;
|
||||
var pinbutton;
|
||||
if(!me.options.sidebaropened) {
|
||||
|
||||
if(me.options.sidebaropened != 'true') { // false or pinned
|
||||
var pincls = 'pinned'
|
||||
if(me.options.sidebaropened == 'false')
|
||||
pincls = '';
|
||||
|
||||
sidebar = me.sidebar = $('<div/>')
|
||||
.addClass('sidebar')
|
||||
.appendTo(container);
|
||||
.addClass('sidebar ' + pincls)
|
||||
.appendTo(container);
|
||||
|
||||
panel = $('<div/>')
|
||||
.addClass('panel')
|
||||
@ -271,7 +276,7 @@ DynMap.prototype = {
|
||||
.append(link=$('<input type="text" />'))
|
||||
.data('link', link)
|
||||
.appendTo(container);*/
|
||||
if(!me.options.sidebaropened) {
|
||||
if(me.options.sidebaropened != 'true') {
|
||||
$('<div/>')
|
||||
.addClass('hitbar')
|
||||
.appendTo(panel);
|
||||
|
Loading…
Reference in New Issue
Block a user