-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
100 lines (76 loc) · 2.91 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
notes:
=============================================
get all files and absolute positions on www2:
=============================================
$jq('.browse-file').each( function(n, e){var ofst = $jq('#'+e.id).offset(); console.log(n, e);console.log('left', ofst.left, 'top', ofst.top);})
====================
inject the video div
====================
var loadingVideoAnimation = $('<div style=\"margin: 25px 0px; background-color:black; z-index:65000; height:112px; width:150px;"><img id=\"deleteThis\" src=\"dbx_animation.gif\"');
//also include video with display:none;
$jq('#main-nav').append(divVarThing).append("<div id=\"container\" style=\"position:absolute; z-index:-1; top:20%; width:10%; height:10%;\"><div id=\"canvasCont\"><div id=\"depthCan\"><canvas style=\"width:100%; height:100%;\" id=\"depth\" width=\"150\" height=\"112\"></canvas></div></div></div>");
$jq("#depthCan").hide()
//after
loadingVideoAnimation.detach();
$jq("#depthCan").show();
======================
generate a click event at coordinates
======================
c.addEventListener('click', function(c) {
var xpos = c.x * window.innerWidth;
var ypos = c.y * window.innerHeight;
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 1, xpos, ypos, xpos, ypos, false, false, false, false, 0, null);
elt.dispatchEvent(evt);
});
=============
chris - how to do the actions
=============
//delete selection
FileOps.do_bulk_delete(BrowseSelection.get_selected_files())
//cut
to_copy = BrowseSelection.get_selected_files()
//paste (when a folder is selected)
//What about pasting into the current folder?? hmmm
FileOps.do_bulk_move(to_copy, BrowseSelection.get_selected_files()[0].fq_path)
//open
//this simulates a click on the file name.
//makes use of the prototype extension I also added to the end of chris_dropbox_inject.js (which is really a fork of yours)
jQuery(BrowseSelection.get_selected_files()[0].get_div()).find('.filename-link')[0].simulate('click')
===========
dan notes
===========
BrowseSeletion
FINAL OBJECT is the BrowseSelection public API
set_selected_files takes JS objects
Browse.files gets you all files
Browse.scrollTo
BrowseUtil.get_files_in_view --> only shows files in the view port!
I drew a thingy
/\ /\
/ \ / \
/ \ / \
/ \ / \
/ \ / \
\ /|\ /
\ / | \ /
\ / | \ /
\ / | \ /
\/ | \/
/\ | /\
/ \ | / \
/ \ | / \
/ \ | / \
/ \|/ \
\ /I\ /
\ / I \ /
\ / I \ /
\ / I \ /
\/ I \/
| I |
\ I /
\ I /
\ I /
\ I /
\ I /
\I/