src/Topxia/AdminBundle/Resources/public/js/controller/theme/theme-manage.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
define(function(require, exports, module) {
var Widget = require('widget');
var ThemeManage = Widget.extend({
attrs: {
config: {},
allConfig: {},
currentIframe: null
},
setup: function() {
this._initEvent();
},
_initEvent: function() {
var self = this;
this.getElement().on('save_config', function(e, data){
self._saveConfig(data)
});
},
getElement: function() {
return $(this.element);
},
_saveConfig: function(data) {
var configs = this.get('config'), $iframe = this.get('currentIframe'), self = this;
configs = $.extend(configs, data);
this.set('config', configs, {override: true});
$.post(this.element.data('url'), {config: this.get('config')}, function(){
self._flushIframe();
});
},
_flushIframe: function(){
var time = Date.parse(new Date());
var $iframe = this.get('currentIframe');
if (!this.get('iframeSrc')) {
this.set('iframeSrc', $iframe.attr('src'));
}
var src = this.get('iframeSrc') + "?t=" + time;
$iframe.attr('src', src);
}
})
module.exports = ThemeManage;
})
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。