|
|
|
@ -145,7 +145,7 @@ var mainWrapperInit = function () {
|
|
|
|
|
$('.sw_action_row').hover(
|
|
|
|
|
function() { $(this).find('.sw_actions').css('visibility','visible'); },
|
|
|
|
|
function() { $(this).find('.sw_actions').css('visibility','hidden'); }
|
|
|
|
|
);
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$('a[data-confirm]').live("click", function(ev) {
|
|
|
|
|
var href = $(this).attr('href');
|
|
|
|
@ -154,15 +154,15 @@ var mainWrapperInit = function () {
|
|
|
|
|
$('body').append(
|
|
|
|
|
'<div id="dataConfirmModal" class="modal" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true">'+
|
|
|
|
|
'<div class="modal-header">'+
|
|
|
|
|
'<h3 id="dataConfirmLabel">[% c.loc('Are you sure?') %]</h3>'+
|
|
|
|
|
'<h3 id="dataConfirmLabel">[% c.escape_js(c.loc('Are you sure?')) %]</h3>'+
|
|
|
|
|
'</div>'+
|
|
|
|
|
'<div class="modal-footer">'+
|
|
|
|
|
'<button class="btn" data-dismiss="modal" aria-hidden="true" id="dataConfirmCancel">[% c.loc('Cancel') %]</button>'+
|
|
|
|
|
'<a class="btn btn-primary" id="dataConfirmOK">[% c.loc('OK') %]</a>'+
|
|
|
|
|
'<button class="btn" data-dismiss="modal" aria-hidden="true" id="dataConfirmCancel">[% c.escape_js(c.loc('Cancel')) %]</button>'+
|
|
|
|
|
'<a class="btn btn-primary" id="dataConfirmOK">[% c.escape_js(c.loc('OK')) %]</a>'+
|
|
|
|
|
'</div>'+
|
|
|
|
|
'</div>'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$('#dataConfirmOK').attr('href', href);
|
|
|
|
|
if( href.search(/^javascript:/i ) > -1 ){
|
|
|
|
|
$('#dataConfirmOK').attr('onclick', href);
|
|
|
|
@ -205,7 +205,7 @@ var mainWrapperInit = function () {
|
|
|
|
|
var backuri = $(this).data('backuri') ? $(this).data('backuri') : '[%- backuri | uri -%]';
|
|
|
|
|
var _back = 'back='+backuri;
|
|
|
|
|
if(_href == null || _href.match(/[&\?]back=/)) {
|
|
|
|
|
// ignore
|
|
|
|
|
// ignore
|
|
|
|
|
} else if(_href.match(/\?/)) {
|
|
|
|
|
$(this).attr('href', _href + '&' + _back);
|
|
|
|
|
} else {
|
|
|
|
|