WIP : Refactor contraint/rule becomes conditions (more generic)

This commit is contained in:
gmorel
2013-09-25 14:51:42 +02:00
parent cb389f126c
commit d6172f23cf
75 changed files with 582 additions and 2787 deletions

View File

@@ -90,12 +90,15 @@ $(function($){
// Save rules on click
$.couponManager.onClickSaveRule = function() {
$('#constraint-save-btn').on('click', function () {
if($('#category-rule').val() == 'thelia.constraint.rule.available_for_everyone') {
// @todo translate + modal
var r= confirm("Do you really want to set this coupon available to everyone ?");
console.log('constraint-save-btn');
if($('#category-rule').val() == 'thelia.condition.match_for_everyone') {
// // @todo translate + modal
var r = confirm("Do you really want to set this coupon available to everyone ?");
if (r == true) {
$.couponManager.createOrUpdateRuleAjax();
}
} else {
$.couponManager.createOrUpdateRuleAjax();
}
});