Commit ea5d2621 authored by PkSM3's avatar PkSM3

[UPDATE] confirm|cancel new group, css stuff

parent c021d53d
...@@ -203,28 +203,30 @@ function save_groups() { ...@@ -203,28 +203,30 @@ function save_groups() {
var count = 0 var count = 0
var mainform = -1 var mainform = -1
var writeflag = ($("#group_box_content").children('span').length>1)?true:false var writeflag = ($("#group_box_content").children('span').length>1)?true:false
$(gcontent).children('span').each(function () { $(gcontent).children('span').each(function () {
var nid = $(this).data("id"); var nid = $(this).data("id");
if (count==0) { if (count==0) {
if(writeflag) { if(writeflag) {
// AjaxRecords[RecDict[nid]].name += "*" // AjaxRecords[RecDict[nid]].name += "*"
FlagsBuffer["group"][ nid ] = [] FlagsBuffer["group"][ nid ] = []
mainform = nid mainform = nid
AjaxRecords[RecDict[nid]].state = 1 AjaxRecords[RecDict[nid]].state = 1
var asterisk = (AjaxRecords[RecDict[nid]].name[0]=="*")?"":"*" var label = AjaxRecords[RecDict[nid]].name
AjaxRecords[RecDict[nid]].name = asterisk+AjaxRecords[RecDict[nid]].name AjaxRecords[RecDict[nid]].name = (label[0]=="*") ? label : ("*"+label)
} else { } else {
AjaxRecords[RecDict[nid]].state = 0; AjaxRecords[RecDict[nid]].state = 0;
} // var label = AjaxRecords[RecDict[nid]].name
} else { // AjaxRecords[RecDict[nid]].name = (label[0] == '*') ? label.slice(1) : label.name;
if(writeflag) { }
FlagsBuffer["group"][ mainform ].push( nid ) } else {
AjaxRecords[RecDict[nid]].state = -1 if(writeflag) {
} FlagsBuffer["group"][ mainform ].push( nid )
} AjaxRecords[RecDict[nid]].state = -1
count++ }
}); }
count++
});
$("#group_box").remove() $("#group_box").remove()
$("#group_flag").remove() $("#group_flag").remove()
GState=0 GState=0
...@@ -237,6 +239,8 @@ function cancel_groups() { ...@@ -237,6 +239,8 @@ function cancel_groups() {
$(gcontent).children('span').each(function () { $(gcontent).children('span').each(function () {
var nid = $(this).data("id"); var nid = $(this).data("id");
AjaxRecords[RecDict[nid]].state = 0 AjaxRecords[RecDict[nid]].state = 0
var label = AjaxRecords[RecDict[nid]].name
AjaxRecords[RecDict[nid]].name = (label[0] == '*') ? label.slice(1) : label;
}); });
$("#group_box").remove() $("#group_box").remove()
$("#group_flag").remove() $("#group_flag").remove()
......
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