|
@@ -1,44 +1,49 @@
|
|
|
let ringo_save_data = '';
|
|
let ringo_save_data = '';
|
|
|
let ringo_open = 0;
|
|
let ringo_open = 0;
|
|
|
|
|
+let ringo_menu_list = [
|
|
|
|
|
+ 'recent_cel',
|
|
|
|
|
+ 'other_cel',
|
|
|
|
|
+ 'user_cel'
|
|
|
|
|
+];
|
|
|
|
|
|
|
|
function ringo_opening(data) {
|
|
function ringo_opening(data) {
|
|
|
- ringo_save_data = data;
|
|
|
|
|
-
|
|
|
|
|
- console.log(data);
|
|
|
|
|
let element = [data];
|
|
let element = [data];
|
|
|
|
|
|
|
|
- let menu_list = [
|
|
|
|
|
- 'recent_cel_in',
|
|
|
|
|
- 'other_cel_in',
|
|
|
|
|
- 'user_cel_in'
|
|
|
|
|
- ];
|
|
|
|
|
- for(for_a in menu_list) {
|
|
|
|
|
- if(menu_list[for_a] !== data) {
|
|
|
|
|
- element.push(menu_list[for_a]);
|
|
|
|
|
|
|
+ for(for_a in ringo_menu_list) {
|
|
|
|
|
+ if(ringo_menu_list[for_a] + '_in' !== data) {
|
|
|
|
|
+ element.push(ringo_menu_list[for_a] + '_in');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- console.log(element);
|
|
|
|
|
-
|
|
|
|
|
- if(document.getElementById(element[0]).style.display == 'none') {
|
|
|
|
|
|
|
+ if((document.getElementById(element[0]).style.display == 'none' && ringo_open == 0) || ringo_save_data !== data) {
|
|
|
document.getElementById(element[0]).style.display = 'block';
|
|
document.getElementById(element[0]).style.display = 'block';
|
|
|
|
|
|
|
|
for(for_a in element) {
|
|
for(for_a in element) {
|
|
|
- if(for_a !== '0') {
|
|
|
|
|
- console.log(for_a);
|
|
|
|
|
|
|
+ if(for_a !== '0') {
|
|
|
document.getElementById(element[for_a]).style.display = 'none';
|
|
document.getElementById(element[for_a]).style.display = 'none';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ ringo_open = 1;
|
|
|
|
|
+ ringo_save_data = data;
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(function() { ringo_open = 2; }, 100);
|
|
|
} else {
|
|
} else {
|
|
|
document.getElementById(element[0]).style.display = 'none';
|
|
document.getElementById(element[0]).style.display = 'none';
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- ringo_open = 1;
|
|
|
|
|
- setTimeout(function() { ringo_open = 0; }, 100);
|
|
|
|
|
|
|
+ ringo_open = 0
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
document.onclick = function(event) {
|
|
document.onclick = function(event) {
|
|
|
- if(ringo_save_data !== '' && ringo_open == 0) {
|
|
|
|
|
|
|
+ let cel_list = [];
|
|
|
|
|
+ for(for_a in ringo_menu_list) {
|
|
|
|
|
+ cel_list.push(document.getElementById(ringo_menu_list[for_a]));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(ringo_save_data !== '' && ringo_open == 2 && !cel_list.includes(event.path[1])) {
|
|
|
document.getElementById(ringo_save_data).style.display = 'none';
|
|
document.getElementById(ringo_save_data).style.display = 'none';
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(function() { ringo_open = 0; }, 100);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|