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>
 | 
			
		||||
    //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(){
 | 
			
		||||
      $('.isSetting').each(function(){
 | 
			
		||||
        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>
 | 
			
		||||
</head>
 | 
			
		||||
  <body>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										21
									
								
								lsp/pages.js
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								lsp/pages.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -787,26 +787,7 @@ function showTab(tabName,streamName) {
 | 
			
		|||
            }
 | 
			
		||||
            if (applyInput() === false) { return; }
 | 
			
		||||
            
 | 
			
		||||
            var destination = $('#limit-applies-to').val();
 | 
			
		||||
            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+';');
 | 
			
		||||
            }
 | 
			
		||||
            moveLimit($('#limit-applies-to').val(),streamName,objpath);
 | 
			
		||||
            
 | 
			
		||||
            saveAndReload('limits');
 | 
			
		||||
          })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,8 @@
 | 
			
		|||
    <script src='tablesort.js'></script>
 | 
			
		||||
    <link rel='stylesheet' href='main.css' />
 | 
			
		||||
      <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(){
 | 
			
		||||
          $('.isSetting').each(function(){
 | 
			
		||||
            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>
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue