test
This commit is contained in:
parent
06b806532e
commit
3c0ea8f40d
|
@ -58,10 +58,10 @@ function show() {
|
||||||
mdCheck()
|
mdCheck()
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function () {
|
||||||
$('#post-box').draggable({
|
$('#post-box').draggable({
|
||||||
handle: '#post-bar',
|
handle: '#post-bar',
|
||||||
stop: function() {
|
stop: function () {
|
||||||
var left = $('#post-box').offset().left
|
var left = $('#post-box').offset().left
|
||||||
if (left > $('body').width() - $('#post-box').width()) {
|
if (left > $('body').width() - $('#post-box').width()) {
|
||||||
left = $('body').width() - $('#post-box').width()
|
left = $('body').width() - $('#post-box').width()
|
||||||
|
@ -76,15 +76,15 @@ $(function() {
|
||||||
}
|
}
|
||||||
localStorage.setItem('postbox-left', left)
|
localStorage.setItem('postbox-left', left)
|
||||||
localStorage.setItem('postbox-top', top)
|
localStorage.setItem('postbox-top', top)
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
$('#post-box').resizable({
|
$('#post-box').resizable({
|
||||||
minHeight: 150,
|
minHeight: 150,
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
stop: function(event, ui) {
|
stop: function (event, ui) {
|
||||||
$('#textarea').blur()
|
$('#textarea').blur()
|
||||||
localStorage.setItem('postbox-width', ui.size.width)
|
localStorage.setItem('postbox-width', ui.size.width)
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -101,7 +101,9 @@ if (location.search) {
|
||||||
$('.mini-btn').text('expand_less')
|
$('.mini-btn').text('expand_less')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#posttgl').click(function(e) {
|
window.onload = initPostbox
|
||||||
|
function initPostbox() {
|
||||||
|
$('#posttgl').click(function (e) {
|
||||||
if (!$('#post-box').hasClass('appear')) {
|
if (!$('#post-box').hasClass('appear')) {
|
||||||
show()
|
show()
|
||||||
} else {
|
} else {
|
||||||
|
@ -110,9 +112,9 @@ $('#posttgl').click(function(e) {
|
||||||
$('.cvo').removeClass('selectedToot')
|
$('.cvo').removeClass('selectedToot')
|
||||||
selectedColumn = 0
|
selectedColumn = 0
|
||||||
selectedToot = 0
|
selectedToot = 0
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#timeline-container,#group').click(function(e) {
|
$('#timeline-container,#group').click(function (e) {
|
||||||
if (localStorage.getItem('box') != 'absolute') {
|
if (localStorage.getItem('box') != 'absolute') {
|
||||||
if ($('#post-box').hasClass('appear') && !localStorage.getItem('nohide')) {
|
if ($('#post-box').hasClass('appear') && !localStorage.getItem('nohide')) {
|
||||||
hide()
|
hide()
|
||||||
|
@ -123,19 +125,20 @@ $('#timeline-container,#group').click(function(e) {
|
||||||
selectedToot = 0
|
selectedToot = 0
|
||||||
localStorage.removeItem('nohide')
|
localStorage.removeItem('nohide')
|
||||||
srcBox('close')
|
srcBox('close')
|
||||||
})
|
})
|
||||||
$('#contextWrap').click(function(e) {
|
$('#contextWrap').click(function (e) {
|
||||||
$('#contextWrap').addClass('hide')
|
$('#contextWrap').addClass('hide')
|
||||||
$('.contextMenu').addClass('hide')
|
$('.contextMenu').addClass('hide')
|
||||||
$('.act-icon').text('expand_more')
|
$('.act-icon').text('expand_more')
|
||||||
})
|
})
|
||||||
$('#textarea,#cw-text').focusout(function(e) {
|
$('#textarea,#cw-text').focusout(function (e) {
|
||||||
localStorage.setItem('nohide', true)
|
localStorage.setItem('nohide', true)
|
||||||
var countup = function() {
|
var countup = function () {
|
||||||
localStorage.removeItem('nohide')
|
localStorage.removeItem('nohide')
|
||||||
}
|
}
|
||||||
//setTimeout(remove, 100);
|
//setTimeout(remove, 100);
|
||||||
$('.cvo').removeClass('selectedToot')
|
$('.cvo').removeClass('selectedToot')
|
||||||
selectedColumn = 0
|
selectedColumn = 0
|
||||||
selectedToot = 0
|
selectedToot = 0
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user