Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
7f12a65c
Commit
7f12a65c
authored
12 years ago
by
Michael Gapczynski
Browse files
Options
Downloads
Patches
Plain Diff
Show access granted label immediately after granting access
parent
0e6d22e2
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_external/js/dropbox.js
+4
-1
4 additions, 1 deletion
apps/files_external/js/dropbox.js
apps/files_external/js/google.js
+7
-4
7 additions, 4 deletions
apps/files_external/js/google.js
with
11 additions
and
5 deletions
apps/files_external/js/dropbox.js
+
4
−
1
View file @
7f12a65c
...
...
@@ -9,6 +9,7 @@ $(document).ready(function() {
}
else
{
var
pos
=
window
.
location
.
search
.
indexOf
(
'
oauth_token
'
)
+
12
var
token
=
$
(
this
).
find
(
'
.configuration [data-parameter="token"]
'
);
var
access
=
true
;
if
(
pos
!=
-
1
&&
window
.
location
.
search
.
substr
(
pos
,
$
(
token
).
val
().
length
)
==
$
(
token
).
val
())
{
var
token_secret
=
$
(
this
).
find
(
'
.configuration [data-parameter="token_secret"]
'
);
var
tr
=
$
(
this
);
...
...
@@ -18,10 +19,12 @@ $(document).ready(function() {
$
(
token_secret
).
val
(
result
.
access_token_secret
);
OC
.
MountConfig
.
saveStorage
(
tr
);
}
else
{
access
=
false
;
OC
.
dialogs
.
alert
(
result
.
data
.
message
,
'
Error configuring Dropbox storage
'
);
}
});
}
else
if
(
$
(
this
).
find
(
'
.configuration #granted
'
).
length
==
0
)
{
}
if
(
access
&&
$
(
this
).
find
(
'
.configuration #granted
'
).
length
==
0
)
{
$
(
this
).
find
(
'
.configuration input
'
).
attr
(
'
disabled
'
,
'
disabled
'
);
$
(
this
).
find
(
'
.configuration
'
).
append
(
'
<span id="granted">Access granted</span>
'
);
}
...
...
This diff is collapsed.
Click to expand it.
apps/files_external/js/google.js
+
7
−
4
View file @
7f12a65c
$
(
document
).
ready
(
function
()
{
$
(
'
#externalStorage tbody tr
'
).
each
(
function
()
{
if
(
$
(
this
).
find
(
'
.backend
'
).
data
(
'
class
'
)
==
'
OC_Filestorage_Google
'
)
{
var
token
=
$
(
this
).
find
(
'
[data-parameter="token"]
'
);
...
...
@@ -11,6 +11,7 @@ $(document).ready(function() {
window
.
location
.
href
.
replace
(
/
[
?&
]
+
([^
=&
]
+
)
=
([^
&
]
*
)
/gi
,
function
(
m
,
key
,
value
)
{
params
[
key
]
=
value
;
});
var
access
=
true
;
if
(
params
[
'
oauth_token
'
]
!==
undefined
&&
params
[
'
oauth_verifier
'
]
!==
undefined
&&
decodeURIComponent
(
params
[
'
oauth_token
'
])
==
$
(
token
).
val
())
{
var
tr
=
$
(
this
);
$
.
post
(
OC
.
filePath
(
'
files_external
'
,
'
ajax
'
,
'
google.php
'
),
{
step
:
2
,
oauth_verifier
:
params
[
'
oauth_verifier
'
],
request_token
:
$
(
token
).
val
(),
request_token_secret
:
$
(
token_secret
).
val
()
},
function
(
result
)
{
...
...
@@ -19,16 +20,18 @@ $(document).ready(function() {
$
(
token_secret
).
val
(
result
.
access_token_secret
);
OC
.
MountConfig
.
saveStorage
(
tr
);
}
else
{
access
=
false
;
OC
.
dialogs
.
alert
(
result
.
data
.
message
,
'
Error configuring Google Drive storage
'
);
}
});
}
else
if
(
$
(
this
).
find
(
'
.configuration #granted
'
).
length
==
0
)
{
}
if
(
access
&&
$
(
this
).
find
(
'
.configuration #granted
'
).
length
==
0
)
{
$
(
this
).
find
(
'
.configuration
'
).
append
(
'
<span id="granted" style="padding-left:0.5em;">Access granted</span>
'
);
}
}
}
});
$
(
'
.google
'
).
live
(
'
click
'
,
function
(
event
)
{
event
.
preventDefault
();
var
tr
=
$
(
this
).
parent
().
parent
();
...
...
@@ -45,5 +48,5 @@ $(document).ready(function() {
}
});
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment