Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
8f13094d
Commit
8f13094d
authored
Apr 26, 2013
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #216
parent
0bf0c7c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
16 deletions
+33
-16
war/src/main/resources/b3log.properties
war/src/main/resources/b3log.properties
+2
-2
war/src/main/webapp/plugins/b3log-broadcast/lang_en_US.properties
...main/webapp/plugins/b3log-broadcast/lang_en_US.properties
+1
-1
war/src/main/webapp/plugins/b3log-broadcast/lang_zh_CN.properties
...main/webapp/plugins/b3log-broadcast/lang_zh_CN.properties
+1
-1
war/src/main/webapp/plugins/b3log-broadcast/plugin.ftl
war/src/main/webapp/plugins/b3log-broadcast/plugin.ftl
+29
-12
No files found.
war/src/main/resources/b3log.properties
View file @
8f13094d
...
@@ -20,5 +20,5 @@
...
@@ -20,5 +20,5 @@
# Author: Liang Ding
# Author: Liang Ding
#
#
rhythm.servePath
=
http://rhythm.b3log.org:80
81
rhythm.servePath
=
http://rhythm.b3log.org:80
symphony.servePath
=
http://symphony.b3log.org:80
84
symphony.servePath
=
http://symphony.b3log.org:80
war/src/main/webapp/plugins/b3log-broadcast/lang_en_US.properties
View file @
8f13094d
...
@@ -27,4 +27,4 @@ contentLabel1=Content:
...
@@ -27,4 +27,4 @@ contentLabel1=Content:
noEmptyLabel
=
No Empty
noEmptyLabel
=
No Empty
submitLabel
=
Submit
submitLabel
=
Submit
submitErrorLabel
=
Error
submitErrorLabel
=
Error
chanceBroadcastLabel
=
Second Chance
chanceBroadcastLabel
=
Time to post:
war/src/main/webapp/plugins/b3log-broadcast/lang_zh_CN.properties
View file @
8f13094d
...
@@ -27,4 +27,4 @@ contentLabel1=\u5185\u5bb9\uff1a
...
@@ -27,4 +27,4 @@ contentLabel1=\u5185\u5bb9\uff1a
noEmptyLabel
=
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
noEmptyLabel
=
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
submitLabel
=
\u
63d0
\u
4ea4
submitLabel
=
\u
63d0
\u
4ea4
submitErrorLabel
=
\u
63d0
\u
4ea4
\u
5f02
\u
5e38
submitErrorLabel
=
\u
63d0
\u
4ea4
\u
5f02
\u
5e38
chanceBroadcastLabel
=
\u
79d2
\u
673a
\u
4f1a
\u
8fdb
\u
884c
\u
5e7f
\u
64ad
chanceBroadcastLabel1
=
\u
5e7f
\u
64ad
\u5269\u
4f59
\u
65f6
\u
95f4
\u
ff1a
\ No newline at end of file
\ No newline at end of file
war/src/main/webapp/plugins/b3log-broadcast/plugin.ftl
View file @
8f13094d
...
@@ -80,9 +80,9 @@
...
@@ -80,9 +80,9 @@
$("#b3logBroadcastContent").val("");
$("#b3logBroadcastContent").val("");
$("#b3logBroadcastDialog").dialog("close");
$("#b3logBroadcastDialog").dialog("close");
$("#b3logBroadcastDialog > button").next().hide();
$("#b3logBroadcastDialog > button").next().hide();
$("#b3logBroadcast .module-header > button").hide();
$("#b3logBroadcastTitle").prev().hide();
$("#b3logBroadcastTitle").prev().hide();
$("#b3logBroadcastContent").prev().hide();
$("#b3logBroadcastContent").prev().hide();
broadcastChange();
} else {
} else {
$("#b3logBroadcastDialog > button").next().show();
$("#b3logBroadcastDialog > button").next().show();
}
}
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
// 获取广播
// 获取广播
$.ajax({
$.ajax({
type: "GET",
type: "GET",
url: "http://symphony.b3log.org
:8084
/apis/broadcasts",
url: "http://symphony.b3log.org/apis/broadcasts",
dataType: "jsonp",
dataType: "jsonp",
jsonp: "callback",
jsonp: "callback",
beforeSend: function() {
beforeSend: function() {
...
@@ -128,33 +128,50 @@
...
@@ -128,33 +128,50 @@
}
}
});
});
// 广播机会
// 广播机会
setInterval(function() {
var interval;
var broadcastChange = function() {
$.ajax({
$.ajax({
type: "GET",
type: "GET",
url: latkeConfig.servePath + "/console/plugins/b3log-broadcast/chance",
url: latkeConfig.servePath + "/console/plugins/b3log-broadcast/chance",
cache: false,
success: function(result) {
success: function(result) {
if (result.sc) {
if (result.sc) {
var
S
howCountDown = function() {
var
s
howCountDown = function() {
var now = new Date();
var now = new Date();
var leftTime = result.broadcastChanceExpirationTime - now.getTime();
var leftTime = result.broadcastChanceExpirationTime - now.getTime();
var leftsecond = parseInt(leftTime / 1000);
var leftsecond = parseInt(leftTime / 1000);
var minute = Math.floor(leftsecond / 60),
if (leftsecond < 0) {
second = Math.floor(leftsecond - minute * 60);
$("#b3logBroadcast .module-header > button").hide();
$("#b3logBroadcast .module-header > button").text("${chanceBroadcastLabel}:" + minute + ":" + second).show();
clearInterval(interval);
interval = undefined;
return;
} else {
var minute = Math.floor(leftsecond / 60),
second = Math.floor(leftsecond - minute * 60);
$("#b3logBroadcast .module-header > button").text("${chanceBroadcastLabel1}" + minute + ":" + second).show();
}
};
};
window.setInterval(function() {
if (!interval) {
ShowCountDown();
interval = window.setInterval(function() {
}, 1000);
showCountDown();
}, 1000);
}
} else {
} else {
$("#b3logBroadcast .module-header > button").hide();
$("#b3logBroadcast .module-header > button").hide();
clearInterval(interval);
interval = undefined;
}
}
}
}
});
});
};
setInterval(function() {
broadcastChange();
}, 10000);
}, 10000);
broadcastChange();
}
}
};
};
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment