Authored by 陶雨

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

Conflicts:
	client/js/sourceManage/resourceContentManage.js
... ... @@ -41,7 +41,6 @@ components.prototype={
var __self = this;
this.__fileRender();
this.__dropDownRender();
this.__datePickerRender();
this.__checkboxRadioRender();
return this;
},
... ... @@ -55,7 +54,7 @@ components.prototype={
.add("input:hidden", that.el)
.add("textarea", that.el)
.each(function() {
var name = $(this).attr("name") || $(this).attr("placeholder") || $(this).parents(".form-group").find("label").text();
var name = $(this).attr("prompt") || $(this).attr("placeholder");
var value = $.trim($(this).val());
if ($(this).attr("required")) {
... ... @@ -68,15 +67,6 @@ components.prototype={
});
return false;
}
if (name && $(this).attr("match") && $.trim($(this).val())) {
new Validator.init($(this)[0], {
rules: {
match: $(this).attr("match")
}
}).validate(function(obj) {
err.push("<p>" + name + "请输入正确的格式</p>");
});
}
});
//文件上传
... ... @@ -194,39 +184,6 @@ components.prototype={
}
});
},
__datePickerRender:function() {
var that=this;
var fdatepicker = {};
$("input[jsaction]", that.el)
.add("input[jsaction]", that.el)
.each(function() {
var $this = $(this);
var name = $this.attr("id"),
arr = String.prototype.split.call($this.attr("jsaction"), ':');
var obj = $("#" + name).fdatepicker({
format: arr[0] == "date" ? 'yyyy-mm-dd' : 'yyyy-mm-dd hh:ii:ss',
pickTime: arr[0] == "date" ? false : true
}).data("datepicker");
fdatepicker[name] = {
obj: obj,
action: arr[1] ? (arr[1] === "end" ? "setEndDate" : "setStartDate") : false,
target: arr[2] ? "#" + arr[2] : false
};
});
for (var key in fdatepicker) {
var obj = fdatepicker[key].obj;
var action = fdatepicker[key].action;
var target = fdatepicker[key].target;
if (action) {
(function(obj, action, target) {
$("#" + key).click(function() {
obj[action]($(target).val().replace(/\s.*/, ''));
});
})(obj, action, target);
}
}
},
__checkboxRadioRender:function() {
var that=this;
$("input:hidden", that.el).each(function() {
... ...
... ... @@ -308,6 +308,10 @@ $(document).on("click", ".delBtn", function () {
Bll.renderDialog(arr[0] + "-template");
});
$(document).on("change", ".chkbox", function() {
});
//获取品牌
Bll.getBrands();
/*渲染品牌*/
... ... @@ -354,6 +358,8 @@ $(document).on("click", '.is_show_name', function () {
//*****************************************************************//
/*推荐(标题 + 12张图)*/
$(document).on("change", '#recommendContentFive-is_show', function () {
var fn = new Function("console.log(111)");
fn();
Bll.module.contentData.data.title.is_show = 1 - Bll.module.contentData.data.title.is_show;
Bll.renderDialog("recommendContent-template");
});
... ...