Rev 320 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 320 | Rev 360 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | /* |
|
- | 2 | * OIDplus 2.0 |
|
- | 3 | * Copyright 2019 Daniel Marschall, ViaThinkSoft |
|
- | 4 | * |
|
- | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
- | 6 | * you may not use this file except in compliance with the License. |
|
- | 7 | * You may obtain a copy of the License at |
|
- | 8 | * |
|
- | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
- | 10 | * |
|
- | 11 | * Unless required by applicable law or agreed to in writing, software |
|
- | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
- | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
- | 14 | * See the License for the specific language governing permissions and |
|
- | 15 | * limitations under the License. |
|
- | 16 | */ |
|
- | 17 | ||
1 | g_hue_shift = null; |
18 | g_hue_shift = null; |
2 | g_sat_shift = null; |
19 | g_sat_shift = null; |
3 | g_val_shift = null; |
20 | g_val_shift = null; |
4 | g_invcolors = null; |
21 | g_invcolors = null; |
5 | g_hue_shift_saved = null; |
22 | g_hue_shift_saved = null; |
Line 92... | Line 109... | ||
92 | 109 | ||
93 | document.getElementsByTagName("head").item(0).replaceChild(newlink, oldlink); |
110 | document.getElementsByTagName("head").item(0).replaceChild(newlink, oldlink); |
94 | } |
111 | } |
95 | 112 | ||
96 | function crudActionColorUpdate(name) { |
113 | function crudActionColorUpdate(name) { |
97 | if(!window.confirm("Are you sure that you want to permanently change the color? Please make sure you have tested the colors first, because if the contrast is too extreme, you might not be able to see the controls anymore, in order to correct the colors.")) return false; |
114 | if(!window.confirm(_L("Are you sure that you want to permanently change the color (for all users)? Please make sure you have tested the colors first, because if the contrast is too extreme, you might not be able to see the controls anymore, in order to correct the colors."))) return false; |
98 | 115 | ||
99 | $.ajax({ |
116 | $.ajax({ |
100 | url:"ajax.php", |
117 | url:"ajax.php", |
101 | method:"POST", |
118 | method:"POST", |
102 | data: { |
119 | data: { |
Line 106... | Line 123... | ||
106 | sat_shift:document.getElementById('sshift').value, |
123 | sat_shift:document.getElementById('sshift').value, |
107 | val_shift:document.getElementById('vshift').value, |
124 | val_shift:document.getElementById('vshift').value, |
108 | invcolors:document.getElementById('icolor').value, |
125 | invcolors:document.getElementById('icolor').value, |
109 | }, |
126 | }, |
110 | error:function(jqXHR, textStatus, errorThrown) { |
127 | error:function(jqXHR, textStatus, errorThrown) { |
111 | alert("Error: " + errorThrown); |
128 | alert(_L("Error: %1",errorThrown)); |
112 | }, |
129 | }, |
113 | success:function(data) { |
130 | success:function(data) { |
114 | if ("error" in data) { |
131 | if ("error" in data) { |
115 | alert("Error: " + data.error); |
132 | alert(_L("Error: %1",data.error)); |
116 | } else if (data.status == 0) { |
133 | } else if (data.status == 0) { |
117 | g_hue_shift_saved = g_hue_shift; |
134 | g_hue_shift_saved = g_hue_shift; |
118 | g_sat_shift_saved = g_sat_shift; |
135 | g_sat_shift_saved = g_sat_shift; |
119 | g_val_shift_saved = g_val_shift; |
136 | g_val_shift_saved = g_val_shift; |
120 | g_invcolors_saved = g_invcolors; |
137 | g_invcolors_saved = g_invcolors; |
121 | test_color_theme(); // apply visually |
138 | test_color_theme(); // apply visually |
122 | alert("Update OK"); |
139 | alert(_L("Update OK")); |
123 | } else { |
140 | } else { |
124 | alert("Error: " + data); |
141 | alert(_L("Error: %1",data)); |
125 | } |
142 | } |
126 | } |
143 | } |
127 | }); |
144 | }); |
128 | } |
145 | } |
129 | - |