mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
446f04c775
|
@ -75,6 +75,7 @@ $(document).ready( function() {
|
|||
window.location.href = url;
|
||||
});
|
||||
|
||||
/*
|
||||
$('#changeowner').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var url = "";
|
||||
|
@ -89,6 +90,70 @@ $(document).ready( function() {
|
|||
url += '&'+$.param(values);
|
||||
window.location.href = url;
|
||||
});
|
||||
*/
|
||||
<?php if($this->getParam('theme') !== 'bootstrap4'): ?>
|
||||
$('body').on('click', 'a.change-owner-btn', function(ev){
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
||||
href = $(ev.currentTarget).attr('href');
|
||||
bootbox.dialog(confirmmsg, [{
|
||||
"label" : "<i class='fa fa-user'></i> <?= getMLText("batch_change_owner") ?>",
|
||||
"class" : "btn-danger",
|
||||
"callback": function() {
|
||||
var url = "";
|
||||
url = href+'&newowner='+($('#newowner').val());
|
||||
var inputs = $('input[name^=\"marks\"]');
|
||||
var values = {};
|
||||
inputs.each(function() {
|
||||
if(this.checked)
|
||||
values[this.name] = 1;
|
||||
});
|
||||
url += '&'+$.param(values);
|
||||
window.location.href = url;
|
||||
}
|
||||
}, {
|
||||
"label" : "<?= getMLText("cancel") ?>",
|
||||
"class" : "btn-cancel",
|
||||
"callback": function() {
|
||||
}
|
||||
}]);
|
||||
});
|
||||
<?php else: ?>
|
||||
$('body').on('click', 'a.change-owner-btn', function(ev){
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
||||
href = $(ev.currentTarget).attr('href');
|
||||
bootbox.confirm({
|
||||
"message": confirmmsg,
|
||||
"buttons": {
|
||||
"confirm": {
|
||||
"label" : "<i class='fa fa-user'></i> <?= getMLText("batch_change_owner") ?>",
|
||||
"className" : "btn-danger",
|
||||
},
|
||||
"cancel": {
|
||||
"label" : " <?= getMLText("cancel") ?>",
|
||||
"className" : "btn-secondary",
|
||||
}
|
||||
},
|
||||
"callback": function(result) {
|
||||
if(result) {
|
||||
var url = "";
|
||||
url = href+'&newowner='+($('#newowner').val());
|
||||
var inputs = $('input[name^=\"marks\"]');
|
||||
var values = {};
|
||||
inputs.each(function() {
|
||||
if(this.checked)
|
||||
values[this.name] = 1;
|
||||
});
|
||||
url += '&'+$.param(values);
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php endif; ?>
|
||||
});
|
||||
<?php
|
||||
// $this->printFolderChooserJs("form1");
|
||||
|
@ -857,9 +922,13 @@ function typeahead() { /* {{{ */
|
|||
'class'=>'chzn-select',
|
||||
'options'=>$options,
|
||||
'placeholder'=>getMLText('select_users'),
|
||||
'attributes'=>array(array('style', 'width: 100%;'))
|
||||
)
|
||||
);
|
||||
print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), "<i class=\"fa fa-user\"></i> ".getMLText("batch_change_owner"), false, true)."\n";
|
||||
// print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), "<i class=\"fa fa-user\"></i> ".getMLText("batch_change_owner"), false, true)."\n";
|
||||
|
||||
print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary change-owner-btn mt-4', 'confirmmsg'=>htmlspecialchars(getMLText("confirm_change_owner", array ()), ENT_QUOTES)), "<i class=\"fa fa-user\"></i> ".getMLText("batch_change_owner"), false, true)."\n";
|
||||
|
||||
$content = ob_get_clean();
|
||||
$this->printAccordion(getMLText('batch_change_owner'), $content);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ function initMost() {
|
|||
|
||||
$(".chzn-select").select2({
|
||||
theme: "bootstrap4",
|
||||
width: '100%',
|
||||
width: 'resolve',
|
||||
templateResult: chzn_template_func//,
|
||||
//templateSelection: chzn_template_func
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user