nyx_server
Version:
Node内容发布
32 lines (27 loc) • 741 B
JavaScript
(function ($, lib, conf) {
'use strict';
var map = {
isSortBanner: false,
bodyList: '',
// [bannerEdit, fragmentEdit, fragmentDesign]
pageModel: 'fragmentEdit',
isListShow: false,
isBannerChange: true,
isFragmentChange: true,
isDesign: true,
isUploadShow: false,
isDialogOpen: false
};
var state = {
get: function (stateName) {
return map[stateName];
},
set: function (stateName, newValue) {
var oldValue = map[stateName];
map[stateName] = newValue;
state.trigger(stateName + 'Change', oldValue, newValue);
}
};
topic.Events.mixTo(state);
lib.ns('topic').state = state;
}(topicJquery, topic.utils, topic.conf));