|
@@ -758,6 +758,31 @@ func setAttributeViewColHidden(operation *Operation) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func (tx *Transaction) doSetAttrViewColumnIcon(operation *Operation) (ret *TxErr) {
|
|
|
+ err := setAttributeViewColIcon(operation)
|
|
|
+ if nil != err {
|
|
|
+ return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: err.Error()}
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+func setAttributeViewColIcon(operation *Operation) (err error) {
|
|
|
+ attrView, err := av.ParseAttributeView(operation.AvID)
|
|
|
+ if nil != err {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, keyValues := range attrView.KeyValues {
|
|
|
+ if keyValues.Key.ID == operation.ID {
|
|
|
+ keyValues.Key.Icon = operation.Data.(string)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ err = av.SaveAttributeView(attrView)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
func (tx *Transaction) doSortAttrViewRow(operation *Operation) (ret *TxErr) {
|
|
|
err := sortAttributeViewRow(operation)
|
|
|
if nil != err {
|