mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixed #5911
This commit is contained in:
parent
44c30eb309
commit
2ccf2ede9e
24
src/usr/local/www/jquery/pfSenseHelpers.js
vendored
24
src/usr/local/www/jquery/pfSenseHelpers.js
vendored
@ -621,3 +621,27 @@ $('.container .panel-heading a[data-toggle="collapse"]').each(function (idx, el)
|
||||
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||
}
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
// Select every option in the specified multiselect
|
||||
function AllServers(id, selectAll) {
|
||||
for (i = 0; i < id.length; i++) {
|
||||
id.eq(i).prop('selected', selectAll);
|
||||
}
|
||||
}
|
||||
|
||||
// Move all selected options from one multiselect to another
|
||||
function moveOptions(From, To) {
|
||||
var len = From.length;
|
||||
var option;
|
||||
|
||||
if (len > 0) {
|
||||
for (i=0; i<len; i++) {
|
||||
if (From.eq(i).is(':selected')) {
|
||||
option = From.eq(i).val();
|
||||
value = From.eq(i).text();
|
||||
To.append(new Option(value, option));
|
||||
From.eq(i).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -477,30 +477,6 @@ print $form;
|
||||
//<![CDATA[
|
||||
events.push(function() {
|
||||
|
||||
// Select every option in the specified multiselect
|
||||
function AllServers(id, selectAll) {
|
||||
for (i = 0; i < id.length; i++) {
|
||||
id.eq(i).prop('selected', selectAll);
|
||||
}
|
||||
}
|
||||
|
||||
// Move all selected options from one multiselect to another
|
||||
function moveOptions(From, To) {
|
||||
var len = From.length;
|
||||
var option, value;
|
||||
|
||||
if (len > 1) {
|
||||
for (i=0; i<len; i++) {
|
||||
if (From.eq(i).is(':selected')) {
|
||||
option = From.eq(i).val();
|
||||
value = From.eq(i).text();
|
||||
To.append(new Option(value, option));
|
||||
From.eq(i).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make buttons plain buttons, not submit
|
||||
$("#movetodisabled").prop('type','button');
|
||||
$("#movetoenabled").prop('type','button');
|
||||
|
||||
@ -847,30 +847,6 @@ print $form;
|
||||
//<![CDATA[
|
||||
events.push(function() {
|
||||
|
||||
// Select every option in the specified multiselect
|
||||
function AllServers(id, selectAll) {
|
||||
for (i = 0; i < id.length; i++) {
|
||||
id.eq(i).prop('selected', selectAll);
|
||||
}
|
||||
}
|
||||
|
||||
// Move all selected options from one multiselect to another
|
||||
function moveOptions(From, To) {
|
||||
var len = From.length;
|
||||
var option;
|
||||
|
||||
if (len > 0) {
|
||||
for (i=0; i<len; i++) {
|
||||
if (From.eq(i).is(':selected')) {
|
||||
option = From.eq(i).val();
|
||||
value = From.eq(i).text();
|
||||
To.append(new Option(value, option));
|
||||
From.eq(i).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make buttons plain buttons, not submit
|
||||
$("#movetodisabled").prop('type','button');
|
||||
$("#movetoenabled").prop('type','button');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user