Skip to content

Commit d1d3479

Browse files
committed
fix bug
1 parent ee34668 commit d1d3479

3 files changed

Lines changed: 21 additions & 9 deletions

File tree

‎ajax.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
break;
9797
//更新默认桌面
9898
case 'setDesk':
99-
if($desk != '' && $_POST['desk'] >= 1 && $_POST['desk'] <= 5){
99+
if($_POST['desk'] != '' && $_POST['desk'] >= 1 && $_POST['desk'] <= 5){
100100
$db->update('tb_member', array(
101101
'desk' => $_POST['desk']
102102
), array(

‎js/hros.appmanage.js‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ HROS.appmanage = (function(){
2424
//加载应用码头应用
2525
var dock_append = '';
2626
if(HROS.VAR.dock != ''){
27-
var manageDockGrid = HROS.grid.getManageDockAppGrid();
2827
$(HROS.VAR.dock).each(function(i){
2928
dock_append += appbtnTemp({
30-
'top' : 10,
31-
'left' : manageDockGrid[i]['startX'] + 6,
3229
'title' : this.name,
3330
'type' : this.type,
3431
'id' : 'd_' + this.appid,
@@ -42,12 +39,9 @@ HROS.appmanage = (function(){
4239
//加载桌面应用
4340
for(var j = 0; j < 5; j++){
4441
var desk_append = '', desk = eval('HROS.VAR.desk' + (j + 1));
45-
var manageAppGrid = HROS.grid.getManageAppGrid();
4642
if(desk != ''){
4743
$(desk).each(function(i){
4844
desk_append += appbtnTemp({
49-
'top' : manageAppGrid[i]['startY'] + 5,
50-
'left' : 0,
5145
'title' : this.name,
5246
'type' : this.type,
5347
'id' : 'd_' + this.appid,
@@ -59,8 +53,26 @@ HROS.appmanage = (function(){
5953
}
6054
$('#amg_folder_container .folderItem:eq(' + j + ') .folderInner').html(desk_append);
6155
}
56+
HROS.appmanage.setPos();
6257
HROS.appmanage.getScrollbar();
6358
},
59+
setPos : function(){
60+
var manageDockGrid = HROS.grid.getManageDockAppGrid(), manageAppGrid = HROS.grid.getManageAppGrid();
61+
$('#amg_dock_container li').each(function(i){
62+
$(this).css({
63+
'top' : 10,
64+
'left' : manageDockGrid[i]['startX'] + 6
65+
});
66+
});
67+
for(var j = 0; j < 5; j++){
68+
$('#amg_folder_container .folderItem:eq(' + j + ') .folderInner li').each(function(i){
69+
$(this).css({
70+
'top' : manageAppGrid[i]['startY'] + 5,
71+
'left' : 0
72+
});
73+
});
74+
}
75+
},
6476
move : function(){
6577
$('#amg_dock_container').on('mousedown', 'li', function(e){
6678
e.preventDefault();

‎js/hros.popupMenu.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ HROS.popupMenu = (function(){
7171
$('.app-menu a[menu="moveto"]').off('click').on('click', function(){
7272
var id = obj.attr('appid'),
7373
from = obj.index(),
74-
to = -1,
74+
to = 99999,
7575
todesk = $(this).attr('desk'),
7676
fromdesk = HROS.CONFIG.desk,
7777
fromfolderid = obj.parents('.folder-window').attr('appid') || obj.parents('.quick_view_container').attr('appid');
@@ -89,7 +89,7 @@ HROS.popupMenu = (function(){
8989
});
9090
}
9191
}else if(obj.parent().hasClass('desktop-apps-container')){
92-
if(HROS.app.dataDeskToOtherdesk(id, from, to, todesk, fromdesk)){
92+
if(HROS.app.dataDeskToOtherdesk(id, from, to, 'a', todesk, fromdesk)){
9393
$.ajax({
9494
type : 'POST',
9595
url : ajaxUrl,

0 commit comments

Comments
 (0)