sbd-npm 1.4.30 → 1.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/status.js +25 -2
package/package.json
CHANGED
package/status.js
CHANGED
@@ -637,14 +637,19 @@ $(function () {
|
|
637
637
|
},
|
638
638
|
|
639
639
|
handle_word: function() {
|
640
|
+
let is_init = 0;
|
640
641
|
if (!document.getElementById("word_process_div")) {
|
642
|
+
is_init = 1;
|
641
643
|
let word_html = [];
|
642
644
|
if (Util.is_mobile()) {
|
643
645
|
word_html.push('<form class="form-inline" style="margin-bottom: 5px;">');
|
644
646
|
} else {
|
645
647
|
word_html.push('<form class="form-inline">');
|
646
648
|
}
|
647
|
-
word_html.push('<
|
649
|
+
word_html.push('<div class="form-group">');
|
650
|
+
word_html.push('<select id="word_day_num" class="form-control"><option value="">Loading...</option></select>');
|
651
|
+
word_html.push('</div>');
|
652
|
+
word_html.push(' <a href="#" data-toggle="modal" data-target=".word_modal" id="word_random" class="btn btn-warning">RANDOM</a>');
|
648
653
|
word_html.push('</form>');
|
649
654
|
word_html.push('<div id="word_process_div"></div>');
|
650
655
|
$("#word_div").html(word_html.join(""));
|
@@ -661,7 +666,12 @@ $(function () {
|
|
661
666
|
});
|
662
667
|
Status.init_word_modal();
|
663
668
|
}
|
664
|
-
|
669
|
+
Status.fetch_word_data(is_init, "");
|
670
|
+
},
|
671
|
+
|
672
|
+
fetch_word_data: function(is_init, day) {
|
673
|
+
Util.show_loading();
|
674
|
+
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, day: day}, function (j) {
|
665
675
|
let html = [], index = 0;
|
666
676
|
let is_mobile = Util.is_mobile();
|
667
677
|
j["data"].forEach(function (item) {
|
@@ -680,6 +690,19 @@ $(function () {
|
|
680
690
|
});
|
681
691
|
Util.render_table_html("word_process_div_body", html);
|
682
692
|
$("#word_num").html("共 <span class='label label-info'>" + index + "</span> 条");
|
693
|
+
if (j["day_num"]) {
|
694
|
+
let day_num_html = [];
|
695
|
+
day_num_html.push('<option value="">全部</option>');
|
696
|
+
j["day_num"].forEach(function (item) {
|
697
|
+
day_num_html.push('<option value="', item["day"], '">', item["day"], '(', item["num"], ')</option>');
|
698
|
+
});
|
699
|
+
let wdn_obj = $("#word_day_num");
|
700
|
+
wdn_obj.html(day_num_html.join(""));
|
701
|
+
wdn_obj.change(function() {
|
702
|
+
let day = $("#word_day_num").val();
|
703
|
+
Status.fetch_word_data(0, day);
|
704
|
+
});
|
705
|
+
}
|
683
706
|
$(".word_del").each(function () {
|
684
707
|
$(this).click(function () {
|
685
708
|
let tr_obj = $(this).parent().parent();
|