RSSList.js 717 Bytes
define(["utils"], function (_u) {
    'use strict';

    function RSSList() {
        this.store = { };
    }

    RSSList.prototype = {
        transferToVM: function (dm) {
            var titlefield = dm.titlefield.fielddesc ? _u.delHtmlTag(dm.titlefield.fielddesc) : '';
            return {
                d: {
                    img: dm.imgfield.fielddesc,
                    title: titlefield || "",
                    others: dm.otherfields.map(function (o) {
                        return o.map(function (v) {
                            return _u.delHtmlTag(v.fielddesc) || "";
                        });
                    })
                }
            }
        }
    };

    return RSSList;
});