Merge pull request 'bema/func/#54' (#56) from bema/func/#52 into dev
Reviewed-on: R11/release11-tools-web#56
This commit is contained in:
		@@ -34,17 +34,15 @@
 | 
			
		||||
                            <!-- status -->
 | 
			
		||||
                            <div class="max-width  small-vertical-margin">
 | 
			
		||||
                                <label for="httpStatus">Http Status</label>
 | 
			
		||||
                                <!--
 | 
			
		||||
                                <select id="httpStatus" class="bordered-field max-width data-field" value="200">
 | 
			
		||||
                                    <option value="200">200</option>
 | 
			
		||||
                                    <option value="300">300</option>
 | 
			
		||||
                                    <option value="400">400</option>
 | 
			
		||||
                                    <option value="403">403</option>
 | 
			
		||||
                                    <option value="404">404</option>
 | 
			
		||||
                                    <option value="500">500</option>
 | 
			
		||||
                                </select>
 | 
			
		||||
                                -->
 | 
			
		||||
                                <input id="httpStatus" type="number" class="bordered-field max-width data-field" value="200"/>
 | 
			
		||||
                                <input id="httpStatus" type="number" class="bordered-field max-width data-field" value="200" list="httpStatusSuggestion"/>
 | 
			
		||||
                                <datalist id="httpStatusSuggestion">
 | 
			
		||||
                                    <option value="200">
 | 
			
		||||
                                    <option value="300">
 | 
			
		||||
                                    <option value="400">
 | 
			
		||||
                                    <option value="403">
 | 
			
		||||
                                    <option value="404">
 | 
			
		||||
                                    <option value="500">
 | 
			
		||||
                                </datalist>
 | 
			
		||||
 | 
			
		||||
                            </div>
 | 
			
		||||
                            <!-- content type -->
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,10 @@ const removeMessageName = 'removeMessage';
 | 
			
		||||
const C_UUID = 'mock-uuid';
 | 
			
		||||
const C_ID = 'last-displayed-id';
 | 
			
		||||
const C_ADV = 'advanced-mode';
 | 
			
		||||
 | 
			
		||||
const color_red = "#ff8f8f";
 | 
			
		||||
const color_grey = "#6b6b6b";
 | 
			
		||||
 | 
			
		||||
const setModified = function(){
 | 
			
		||||
    setDataModified();
 | 
			
		||||
}
 | 
			
		||||
@@ -61,16 +65,16 @@ function httpStatusInvalid(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setDataModified(){
 | 
			
		||||
    console.log("dupadupagówno")
 | 
			
		||||
    if(dataModified) return;
 | 
			
		||||
    if(httpStatusInvalid()){
 | 
			
		||||
        $('#btn-save').removeClass('active');
 | 
			
		||||
        $('#btn-save').off();
 | 
			
		||||
        document.getElementById("httpStatus").style.backgroundColor = color_red;
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    dataModified = true;
 | 
			
		||||
    $('#btn-save').addClass('active');
 | 
			
		||||
    $('#btn-save').click(getUpdate);
 | 
			
		||||
    document.getElementById("httpStatus").style.backgroundColor = null;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//Adding change listener to fields
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user