@@ -137,13 +137,13 @@ $script = '';
137137
138138 function addCommand()
139139 {
140- var e = $('#command');
141- v = $.trim(e .val());
140+ var el = $('#command');
141+ v = $.trim(el .val());
142142 if (v) {
143143 commandLog.push(v);
144144 }
145145 var commandLogIndex = 0;
146- e .val('');
146+ el .val('');
147147 }
148148
149149 function addContent(c)
@@ -154,40 +154,40 @@ $script = '';
154154 }
155155
156156 var loading = false;
157- $('#command').keydown(function(e ) {
158- var e = $(this);
159- if(e .which == 40) { //up
157+ $('#command').keydown(function(event ) {
158+ var el = $(this);
159+ if(event .which == 40) { //up
160160 commandLogIndex--;
161161 if (commandLogIndex < 0) {
162162 commandLogIndex = 0;
163163 }
164164 showCommand();
165- } else if(e .which == 38) { //down
165+ } else if(event .which == 38) { //down
166166 showCommand();
167167 commandLogIndex++;
168168 if (commandLogIndex >= commandLog.length) {
169169 commandLogIndex = commandLog.length-1;
170170 }
171- } else if(e .which == 13) { //enter
171+ } else if(event .which == 13) { //enter
172172 if (loading) return;
173173 loading = true;
174174
175- if (!$.trim(e .val())) {
175+ if (!$.trim(el .val())) {
176176 addContent('<br/>');
177177 loading = false;
178178 return;
179179 }
180180
181181 $.ajax({
182182 url: ' " . $ block ->escapeUrl ($ block ->getUrl ('*/*/cli ' )) . "',
183- data : {command:e .val(),current_password:$('#user_current_password').val()},
183+ data : {command:el .val(),current_password:$('#user_current_password').val()},
184184 type: 'POST',
185185 dataType: 'json',
186186 showLoader: true
187187 }).done(function (data) {
188188 loading = false;
189189 if (data && data.message) {
190- addContent('<strong>$ </strong>' + e .val() + '<br/>');
190+ addContent('<strong>$ </strong>' + el .val() + '<br/>');
191191 addContent(data.message);
192192 } else {
193193 alert(' " . $ block ->escapeHtml (__ ('Unexpected error. Please refresh the page or try later. ' )) . "');
0 commit comments