LSP: bugfix - limit moving was broken in the minimized version
This commit is contained in:
parent
f2dabd962f
commit
2189072f85
3 changed files with 49 additions and 22 deletions
|
@ -1,5 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
//this is placed here because the compression compiler does not deal with the eval function properly.
|
//these are placed here because the compression compiler does not deal with the eval function properly.
|
||||||
|
//enter the values of the settings object into their input fields
|
||||||
function enterSettings(){
|
function enterSettings(){
|
||||||
$('.isSetting').each(function(){
|
$('.isSetting').each(function(){
|
||||||
var objpath = findObjPath($(this));
|
var objpath = findObjPath($(this));
|
||||||
|
@ -16,6 +17,28 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//this function is for moving limits (LTS only)
|
||||||
|
function moveLimit(destination,streamName,objpath) {
|
||||||
|
if ((streamName == '_new_') || (destination != streamName[0])) {
|
||||||
|
var target;
|
||||||
|
if (destination == 'server') {
|
||||||
|
if (!settings.settings.config.limits) {
|
||||||
|
settings.settings.config.limits = [];
|
||||||
|
}
|
||||||
|
target = settings.settings.config.limits;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
destination = destination.replace('stream-','');
|
||||||
|
if (!settings.settings.streams[destination].limits) {
|
||||||
|
settings.settings.streams[destination].limits = [];
|
||||||
|
}
|
||||||
|
target = settings.settings.streams[destination].limits;
|
||||||
|
}
|
||||||
|
|
||||||
|
eval('target.push(settings.'+objpath+');');
|
||||||
|
eval('delete settings.'+objpath+';');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
21
lsp/pages.js
21
lsp/pages.js
|
@ -787,26 +787,7 @@ function showTab(tabName,streamName) {
|
||||||
}
|
}
|
||||||
if (applyInput() === false) { return; }
|
if (applyInput() === false) { return; }
|
||||||
|
|
||||||
var destination = $('#limit-applies-to').val();
|
moveLimit($('#limit-applies-to').val(),streamName,objpath);
|
||||||
if ((streamName == '_new_') || (destination != streamName[0])) {
|
|
||||||
var target;
|
|
||||||
if (destination == 'server') {
|
|
||||||
if (!settings.settings.config.limits) {
|
|
||||||
settings.settings.config.limits = [];
|
|
||||||
}
|
|
||||||
target = settings.settings.config.limits;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
destination = destination.replace('stream-','');
|
|
||||||
if (!settings.settings.streams[destination].limits) {
|
|
||||||
settings.settings.streams[destination].limits = [];
|
|
||||||
}
|
|
||||||
target = settings.settings.streams[destination].limits;
|
|
||||||
}
|
|
||||||
|
|
||||||
eval('target.push(settings.'+objpath+');');
|
|
||||||
eval('delete settings.'+objpath+';');
|
|
||||||
}
|
|
||||||
|
|
||||||
saveAndReload('limits');
|
saveAndReload('limits');
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<script src='tablesort.js'></script>
|
<script src='tablesort.js'></script>
|
||||||
<link rel='stylesheet' href='main.css' />
|
<link rel='stylesheet' href='main.css' />
|
||||||
<script>
|
<script>
|
||||||
//this is placed here because the compression compiler does not deal with the eval function properly.
|
//these are placed here because the compression compiler does not deal with the eval function properly.
|
||||||
|
//enter the values of the settings object into their input fields
|
||||||
function enterSettings(){
|
function enterSettings(){
|
||||||
$('.isSetting').each(function(){
|
$('.isSetting').each(function(){
|
||||||
var objpath = findObjPath($(this));
|
var objpath = findObjPath($(this));
|
||||||
|
@ -28,6 +29,28 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//this function is for moving limits (LTS only)
|
||||||
|
function moveLimit(destination,streamName,objpath) {
|
||||||
|
if ((streamName == '_new_') || (destination != streamName[0])) {
|
||||||
|
var target;
|
||||||
|
if (destination == 'server') {
|
||||||
|
if (!settings.settings.config.limits) {
|
||||||
|
settings.settings.config.limits = [];
|
||||||
|
}
|
||||||
|
target = settings.settings.config.limits;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
destination = destination.replace('stream-','');
|
||||||
|
if (!settings.settings.streams[destination].limits) {
|
||||||
|
settings.settings.streams[destination].limits = [];
|
||||||
|
}
|
||||||
|
target = settings.settings.streams[destination].limits;
|
||||||
|
}
|
||||||
|
|
||||||
|
eval('target.push(settings.'+objpath+');');
|
||||||
|
eval('delete settings.'+objpath+';');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue