Skip to content

Commit e1b9d53

Browse files
committed
js ftp user bugfix
1 parent 16ca690 commit e1b9d53

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

web/js/events.js

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ var VE = { // Vesta Events object
88
keypress: {}
99
},
1010
helpers: {}, // simple handy methods
11-
tmp: {}
11+
tmp: {
12+
sort_par: 'sort-name',
13+
sort_direction: -1,
14+
sort_as_int: 0,
15+
form_changed: 0,
16+
search_activated: 0,
17+
search_display_interval: 0,
18+
search_hover_interval: 0
19+
}
1220
};
1321

1422
/*
@@ -138,7 +146,7 @@ VE.helpers.initAdditionalPasswordFieldElements = function(ref) {
138146
if (enabled) {
139147
VE.helpers.hidePasswordFieldText(ref);
140148
}
141-
149+
142150
$(ref).prop('autocomplete', 'off');
143151

144152
var enabled_html = enabled ? '' : 'show-passwords-enabled-action';
@@ -167,4 +175,56 @@ VE.helpers.toggleHiddenPasswordText = function(ref, triggering_elm) {
167175
}
168176
}
169177

178+
VE.helpers.refresh_timer = {
179+
speed: 50,
180+
degr: 180,
181+
right: 0,
182+
left: 0,
183+
periodical: 0,
184+
first: 1,
185+
186+
start: function(){
187+
this.periodical = setInterval(function(){VE.helpers.refresh_timer.turn()}, this.speed);
188+
},
189+
190+
stop: function(){
191+
clearTimeout(this.periodical);
192+
},
193+
194+
turn: function(){
195+
this.degr += 1;
196+
197+
if (this.first && this.degr >= 361){
198+
this.first = 0;
199+
this.degr = 180;
200+
this.left.css({'-webkit-transform': 'rotate(180deg)'});
201+
this.left.css({'transform': 'rotate(180deg)'});
202+
this.left.children('.loader-half').addClass('dark');
203+
}
204+
if (!this.first && this.degr >= 360){
205+
this.first = 1;
206+
this.degr = 180;
207+
this.left.css({'-webkit-transform': 'rotate(0deg)'});
208+
this.right.css({'-webkit-transform': 'rotate(180deg)'});
209+
this.left.css({'transform': 'rotate(0deg)'});
210+
this.right.css({'transform': 'rotate(180deg)'});
211+
this.left.children('.loader-half').removeClass('dark');
212+
213+
this.stop();
214+
location.reload();
215+
}
216+
217+
if (this.first){
218+
this.right.css({'-webkit-transform': 'rotate('+this.degr+'deg)'});
219+
this.right.css({'transform': 'rotate('+this.degr+'deg)'});
220+
}
221+
else{
222+
this.left.css({'-webkit-transform': 'rotate('+this.degr+'deg)'});
223+
this.left.css({'transform': 'rotate('+this.degr+'deg)'});
224+
}
225+
}
226+
}
227+
228+
229+
170230
VE.helpers.extendPasswordFields();

web/js/pages/add.web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
33
$(elm).parent().find('.hint').html('');
44
}
55

6-
hint = hint.replace(/[^\w\d]/gi, '');
6+
//hint = hint.replace(/[^\w\d]/gi, '');
77

88
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
99
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);

web/js/pages/edit.web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
33
$(elm).parent().find('.hint').html('');
44
}
55

6-
hint = hint.replace(/[^\w\d]/gi, '');
6+
//hint = hint.replace(/[^\w\d]/gi, '');
77

88
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
99
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);

0 commit comments

Comments
 (0)