function validate() {
		if (Helper.validation.isEmptyNull(NoticeInfo.title)) {
			Helper.errorToast('公告标题不得为空');
			return false;
		};

		if (Helper.validation.isEmptyNull(NoticeInfo.text)) {
			Helper.errorToast('公告内容不得为空');
			return false;
		};

		return true;
	};
Example #2
0
			}))["catch"](function(error) {
				if (error == "Not Logged In") {
					Helper.alert("请先登录!", {}, function() {
						window.location.href = Helper.pages.login + "?go=job|" + jobId;
					});
				} else {
					Helper.errorToast(error);
				}
			}).done(function() {
Example #3
0
			(JobService.getJob(jobId, session).then(function(data) {
				if (data && data.status == "OK") {
					data.recruitment.jobsTitle && (document.title = data.recruitment.jobsTitle);
					if (data.recruitment.stage == "drafting") {
						Helper.errorToast("招聘不存在");
						window.location.href = "/discovery/jobs";
					} else if (data.recruitment.stage == "archived") {
						Helper.errorToast("招聘已过期");
						window.location.href = "/discovery/jobs";
					} else {
						data.recruitment.descriptions = data.recruitment.description ? data.recruitment.description.split(/\r\n/g) : ["无职位介绍"];
						data.recruitment.application = moment(data.recruitment.application).format('MM-DD');
						data.share = true;
						data.fromApp = fromApp;
						$(".body").html(template("app/templates/discovery/job/job", data));
					}
				} else throw data;
			}))["catch"](function(error) {
Example #4
0
		}))["catch"](function(error) {
			Helper.errorToast(error);
			/**
			 * 加载失败且加载事件来自“加载更多”按钮,则需要处理该按钮
			 */
			if (!init) {
				pageIndex--;
				Helper.btnLoadingEnd($(".load-more-wrapper .btn"), "加载失败");
			}
		}).done(function() {
Example #5
0
		}))["catch"](function(error) {
			Helper.errorToast(error);
		}).done(function() {
		}).fail(function(error) {
			Helper.errorToast(error);
		}).always(function() {