summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/pkg.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-17 08:12:30 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-17 08:12:30 -0500
commit2ef13b6cd37a6d99c1402b25812fc30481e42930 (patch)
tree1689c8f9886c8ad67fd0734983b5be0e48f42580 /src/usr/local/www/pkg.php
parent38e2552e8d265a10ef28a5e68f4cfbc9ea6730f9 (diff)
downloadpfsense-2ef13b6cd37a6d99c1402b25812fc30481e42930.zip
pfsense-2ef13b6cd37a6d99c1402b25812fc30481e42930.tar.gz
Fix "Save" button jQuery
Diffstat (limited to 'src/usr/local/www/pkg.php')
-rwxr-xr-xsrc/usr/local/www/pkg.php85
1 files changed, 46 insertions, 39 deletions
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index 4468708..93b911a 100755
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -206,53 +206,60 @@ include("head.inc");
<script type="text/javascript">
//<![CDATA[
events.push(function() {
+
function setFilter(filtertext) {
jQuery('#pkg_filter').val(filtertext);
document.pkgform.submit();
}
- <?php
- if ($pkg['adddeleteeditpagefields']['movable']) {
- ?>
- $('#mainarea table tbody').sortable({
- items: 'tr.sortable',
- cursor: 'move',
- distance: 10,
- opacity: 0.8,
- helper: function(e, ui) {
- ui.children().each(function() {
- jQuery(this).width(jQuery(this).width());
- });
- return ui;
- },
+<?php
+ if ($pkg['adddeleteeditpagefields']['movable']) {
+?>
+ $('#mainarea table tbody').sortable({
+ items: 'tr.sortable',
+ cursor: 'move',
+ distance: 10,
+ opacity: 0.8,
+ helper: function(e, ui) {
+ ui.children().each(function() {
+ jQuery(this).width(jQuery(this).width());
});
+ return ui;
+ },
+ });
+<?php
+ }
+?>
+});
-
- function save_changes_to_xml(xml) {
- var ids = $('#mainarea table tbody').sortable('serialize', {key:"ids[]"});
- var strloading="<?=gettext('Saving changes...')?>";
- if (confirm("<?=gettext("Do you really want to save changes?")?>")) {
- $.ajax({
- type: 'get',
- cache: false,
- url: "<?=$_SERVER['SCRIPT_NAME']?>",
- data: {xml:'<?=$xml?>', act:'update', ids: ids},
- beforeSend: function() {
- $('#savemsg').empty().html(strloading);
- },
- error: function(data) {
- $('#savemsg').empty().html('Error:' + data);
- },
- success: function(data) {
- $('#savemsg').empty().html(data);
- }
- });
+<?php
+if ($pkg['adddeleteeditpagefields']['movable']) {
+?>
+ function save_changes_to_xml(xml) {
+ var ids = $('#mainarea table tbody').sortable('serialize', {key:"ids[]"});
+ var strloading="<?=gettext('Saving changes...')?>";
+ if (confirm("<?=gettext("Do you really want to save changes?")?>")) {
+ $.ajax({
+ type: 'get',
+ cache: false,
+ url: "<?=$_SERVER['SCRIPT_NAME']?>",
+ data: {xml:'<?=$xml?>', act:'update', ids: ids},
+ beforeSend: function() {
+ $('#savemsg').empty().html(strloading);
+ },
+ error: function(data) {
+ $('#savemsg').empty().html('Error:' + data);
+ },
+ success: function(data) {
+ $('#savemsg').empty().html(data);
}
- }
- <?php
+ });
}
- ?>
-});
+ }
+<?php
+}
+?>
+
//]]>
</script>
@@ -412,7 +419,7 @@ if ($savemsg) {
echo "</table>";
echo "</th></tr>";
}
-
+
$cols = 0;
if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
OpenPOWER on IntegriCloud