Commit 58243ce7 authored by 神楽坂玲奈's avatar 神楽坂玲奈

new rooms

parent 5ec90d81
...@@ -103,6 +103,7 @@ login = -> ...@@ -103,6 +103,7 @@ login = ->
# else # else
# alert msg # alert msg
# true # true
Candy.Util.setCookie('candy-nostatusmessages', '1', 365);
Candy.init('http://122.0.65.70:5280/http-bind/', Candy.init('http://122.0.65.70:5280/http-bind/',
core: core:
debug: false, debug: false,
...@@ -124,7 +125,6 @@ login = -> ...@@ -124,7 +125,6 @@ login = ->
CandyShop.InlineImages.init(); CandyShop.InlineImages.init();
Candy.View.Template.Login.form = $('#login_form_template').html() Candy.View.Template.Login.form = $('#login_form_template').html()
Candy.Util.setCookie('candy-nostatusmessages', '1', 365);
Candy.Core.connect(Candy.Util.getCookie('jid'), Candy.Util.getCookie('password')) Candy.Core.connect(Candy.Util.getCookie('jid'), Candy.Util.getCookie('password'))
Candy.View.Pane.Roster.joinAnimation = (elementId)-> Candy.View.Pane.Roster.joinAnimation = (elementId)->
...@@ -137,10 +137,12 @@ login = -> ...@@ -137,10 +137,12 @@ login = ->
candy_height = $('#candy').outerHeight true candy_height = $('#candy').outerHeight true
$('.card_center').css('margin-bottom', -candy_height) $('.card_center').css('margin-bottom', -candy_height)
$('.card_center').css('padding-bottom', candy_height) $('.card_center').css('padding-bottom', candy_height)
#window.onunload = window.onbeforeunload #window.onunload = window.onbeforeunload
window.onbeforeunload = null window.onbeforeunload = null
@after_login = -> @after_login = ->
$('#rooms').css('padding-right', 225)
$('.online_list').show() $('.online_list').show()
$('#current_username').html(Candy.Util.getCookie('username')) $('#current_username').html(Candy.Util.getCookie('username'))
...@@ -159,8 +161,11 @@ announcement_scroll = (obj)-> ...@@ -159,8 +161,11 @@ announcement_scroll = (obj)->
,500,-> ,500,->
$(this).css({marginTop:"0px"}).find("li:first").appendTo(this) $(this).css({marginTop:"0px"}).find("li:first").appendTo(this)
announcement_scrolling = null announcement_scrolling = null
setRosterHeight = ->
pageHight = (document.documentElement.clientHeight)-430
$("#roster").height(pageHight)
$(document).ready -> $(document).ready ->
#stroll.bind( '.online_list ul' );
if Candy.Util.getCookie('jid') if Candy.Util.getCookie('jid')
login() login()
...@@ -258,6 +263,9 @@ $(document).ready -> ...@@ -258,6 +263,9 @@ $(document).ready ->
announcement_scrolling = setInterval(announcement_scroll, 5000) if !announcement_scrolling announcement_scrolling = setInterval(announcement_scroll, 5000) if !announcement_scrolling
announcement_scrolling = null announcement_scrolling = null
setRosterHeight();
$(window).resize(setRosterHeight);
$.getJSON '/announcements.json', (data)-> $.getJSON '/announcements.json', (data)->
for announcement in data for announcement in data
$('<li />').append($('<a />', $('<li />').append($('<a />',
...@@ -273,3 +281,7 @@ $(document).ready -> ...@@ -273,3 +281,7 @@ $(document).ready ->
Server.fetch() Server.fetch()
// Generated by CoffeeScript 1.4.0 // Generated by CoffeeScript 1.4.0
(function() { (function() {
var Room, Rooms, Server, Servers, announcement_scroll, announcement_scrolling, login, logout, var Room, Rooms, Server, Servers, announcement_scroll, announcement_scrolling, login, logout, setRosterHeight,
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
...@@ -199,6 +199,7 @@ ...@@ -199,6 +199,7 @@
login = function() { login = function() {
var candy_height; var candy_height;
Candy.Util.setCookie('candy-nostatusmessages', '1', 365);
Candy.init('http://122.0.65.70:5280/http-bind/', { Candy.init('http://122.0.65.70:5280/http-bind/', {
core: { core: {
debug: false, debug: false,
...@@ -227,7 +228,6 @@ ...@@ -227,7 +228,6 @@
}; };
CandyShop.InlineImages.init(); CandyShop.InlineImages.init();
Candy.View.Template.Login.form = $('#login_form_template').html(); Candy.View.Template.Login.form = $('#login_form_template').html();
Candy.Util.setCookie('candy-nostatusmessages', '1', 365);
Candy.Core.connect(Candy.Util.getCookie('jid'), Candy.Util.getCookie('password')); Candy.Core.connect(Candy.Util.getCookie('jid'), Candy.Util.getCookie('password'));
Candy.View.Pane.Roster.joinAnimation = function(elementId) { Candy.View.Pane.Roster.joinAnimation = function(elementId) {
return $('#' + elementId).show().css('opacity', 1); return $('#' + elementId).show().css('opacity', 1);
...@@ -243,6 +243,7 @@ ...@@ -243,6 +243,7 @@
}; };
this.after_login = function() { this.after_login = function() {
$('#rooms').css('padding-right', 225);
$('.online_list').show(); $('.online_list').show();
$('#current_username').html(Candy.Util.getCookie('username')); $('#current_username').html(Candy.Util.getCookie('username'));
$('.log_reg.not_logged').hide(); $('.log_reg.not_logged').hide();
...@@ -268,6 +269,12 @@ ...@@ -268,6 +269,12 @@
announcement_scrolling = null; announcement_scrolling = null;
setRosterHeight = function() {
var pageHight;
pageHight = document.documentElement.clientHeight - 430;
return $("#roster").height(pageHight);
};
$(document).ready(function() { $(document).ready(function() {
var new_room, rooms, servers; var new_room, rooms, servers;
if (Candy.Util.getCookie('jid')) { if (Candy.Util.getCookie('jid')) {
...@@ -378,6 +385,8 @@ ...@@ -378,6 +385,8 @@
return announcement_scrolling = null; return announcement_scrolling = null;
} }
}); });
setRosterHeight();
$(window).resize(setRosterHeight);
$.getJSON('/announcements.json', function(data) { $.getJSON('/announcements.json', function(data) {
var announcement, _i, _len; var announcement, _i, _len;
for (_i = 0, _len = data.length; _i < _len; _i++) { for (_i = 0, _len = data.length; _i < _len; _i++) {
......
This diff is collapsed.
filter = 房间筛选
new = 建立房间
chat = 聊天工具
mode[0] = 单局模式
mode[1] = 比赛模式
mode[2] = TAG
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment