Example #1
0
	Model.prototype.modelParamsReceive = function(event) {
		if (IM.isLoggedIn()) {
			this.init();
			// 注册关闭本页面的事件
			justep.Shell.on("onCloseContactPage", this.closeSelf, this);
		} else {
			justep.Shell.on("onLoggedIn", this.init, this);
		}
	};
Example #2
0
	Model.prototype.modelModelConstruct = function(event) {
		if (IM.isLoggedIn()) {
			this.init();
		} else {
			justep.Shell.on('onLoggedIn', this.init, this);
		}
	};
Example #3
0
	Model.prototype.createShellImpl = function() {
		this.callParent();

		justep.Shell.on('onGroupInfoPage', function(event) {
			justep.Shell.showPage('groupmembers', {
				id : event.id,
				type : event.type
			});
		});
		justep.Shell.on('onContactInfoPage', function(event) {
			justep.Shell.showPage("contact", {
				contactId : event.contactId
			});
		});

	};
Example #4
0
	Model.prototype.modelModelConstruct = function(event) {
		if (IM.isLoggedIn()) {
			this.init();
		} else {
			justep.Shell.on('onLoggedIn', this.init, this);
		}
		justep.Shell.on("onSendMessagePage", function(event) {
			var id = event.id;
			var pid = event.pid;
			var type = event.type;
			this.showMessagePage(id, type, pid);
		}, this);
		var self = this;
		this.on('statusTap',function(){
			self.comp('scrollView1').scrollTo(0);
		});
	};
Example #5
0
	var Model = function() {
		this.callParent();
		this.dialogs = {}; // 会话列表
		this.currentDialogID = justep.Bind.observable();
		justep.Shell.on('onSendMessagePage', function(event) {
			this.showMessagePage(event.id, event.type);
		}, this);
		justep.Shell.on('onGroupSendMessagePage', function(event) {
			// var rows = this.comp("dialogData").find([ "fID" ], [ event.id ],
			// true);
			// if (rows && rows.length > 0)
			// this.showMessagePage(rows[0].val("fID"), rows[0].val("fType"));
			this.showMessagePage(event.id, event.type);
		}, this);
		this.pageTitle = $(document).attr("title");
		this.filterVal = justep.Bind.observable();
		this.isGroup = justep.Bind.observable(false);
	};
Example #6
0
	Model.prototype.createShellImpl = function() {
		this.callParent();
		justep.Shell.on("onSendMessagePage", this.toChats, this);
		justep.Shell.on("onGroupSendMessagePage", this.toChats, this);
	};
Example #7
0
	Model.prototype.modelLoad = function(event) {
		// 通过Shell的消息总线,挂接分类改变的消息,接收到后加载改变后的分类数据
		justep.Shell.on("onClassChanged", this.onClassChanged, this);
	};
Example #8
0
	Model.prototype.modelLoad = function(event) {
		justep.Shell.on("onRestoreContent", this.onRestoreContent, this);
		justep.Shell.on("onShoppingContent", this.onShoppingContent, this);
		justep.Shell.on("onHomeContent", this.onHomeContent, this);
	};