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

@@ -54,23 +54,36 @@
// -- Confirm Box --
if($('[data-toggle="confirm"]').length){
$('[data-toggle="confirm"]').click(function(e){
$('[data-toggle="confirm"]').click(function(e){
var $link = $(this);
var modal = $(this).data('target');
var $this = $(this);
var $modal = $($this.data('target'));
$(modal).modal('show');
$modal.modal('show');
$(modal).on('shown', function () {
$('[data-confirm]').attr('href', $link.attr('href'));
$modal.on('shown', function () {
if($this.data('script')){
$('[data-confirm]').click(function(){
eval($this.data('script'));
$modal.modal('hide');
return false;
});
}
else{
$('[data-confirm]').attr('href', $this.attr('href'));
}
});
if($(modal).is(':hidden')){
if($modal.is(':hidden')){
e.preventDefault();
}
});
}
}
// -- Mini browser --
miniBrowser = function (root, url){