Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos.core
Commits
0d0c819a
Commit
0d0c819a
authored
May 22, 2012
by
Thomas Lechauve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt unit tests to the new library
parent
772b9400
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
439 deletions
+162
-439
jquery.slapos/src/jquery.slapos.js
jquery.slapos/src/jquery.slapos.js
+3
-4
jquery.slapos/test/jquery.slapos.html
jquery.slapos/test/jquery.slapos.html
+1
-1
jquery.slapos/test/jquery.slapos_test.js
jquery.slapos/test/jquery.slapos_test.js
+155
-430
vifib/static/js/jquery.slapos.js
vifib/static/js/jquery.slapos.js
+3
-4
No files found.
jquery.slapos/src/jquery.slapos.js
View file @
0d0c819a
...
...
@@ -82,11 +82,10 @@
datatype
:
'
json
'
,
context
:
$
(
this
),
beforeSend
:
function
(
xhr
)
{
xhr
.
setRequestHeader
(
'
REMOTE_USER
'
,
'
test_vifib_customer
'
);
//
xhr.setRequestHeader('REMOTE_USER', 'test_vifib_customer');
xhr
.
setRequestHeader
(
'
Accept
'
,
'
application/json
'
);
if
(
$
(
this
).
slapos
(
'
access_token
'
)
&&
authentication
)
{
//xhr.setRequestHeader('Authorization', $(this).slapos('store', 'token_type') + ' ' + $(this).slapos('access_token'));
//xhr.setRequestHeader('Accept', 'application/json');
xhr
.
setRequestHeader
(
'
Authorization
'
,
$
(
this
).
slapos
(
'
store
'
,
'
token_type
'
)
+
'
'
+
$
(
this
).
slapos
(
'
access_token
'
));
}
}
};
...
...
@@ -120,7 +119,7 @@
beforeSend
:
function
(
xhr
)
{
xhr
.
setRequestHeader
(
'
Accept
'
,
'
application/json
'
);
},
success
:
callback
success
:
callback
,
});
});
},
...
...
jquery.slapos/test/jquery.slapos.html
View file @
0d0c819a
...
...
@@ -14,7 +14,7 @@
<!-- Load local SinonJs -->
<script
type=
"text/javascript"
src=
"../libs/sinon/sinon-1.3.2.js"
></script>
<script
type=
"text/javascript"
src=
"../libs/sinon/sinon-qunit-1.0.0.js"
></script>
<script
type=
"text/javascript"
src=
"../libs/sinon/sinon-server-1.3.2.js"
></script
>
<!--<script type="text/javascript" src="../libs/sinon/sinon-server-1.3.2.js"></script>--
>
<!-- Load local lib and tests. -->
<script
src=
"../src/jquery.slapos.js"
></script>
<script
src=
"jquery.slapos_test.js"
></script>
...
...
jquery.slapos/test/jquery.slapos_test.js
View file @
0d0c819a
This diff is collapsed.
Click to expand it.
vifib/static/js/jquery.slapos.js
View file @
0d0c819a
...
...
@@ -82,11 +82,10 @@
datatype
:
'
json
'
,
context
:
$
(
this
),
beforeSend
:
function
(
xhr
)
{
xhr
.
setRequestHeader
(
'
REMOTE_USER
'
,
'
test_vifib_customer
'
);
//
xhr.setRequestHeader('REMOTE_USER', 'test_vifib_customer');
xhr
.
setRequestHeader
(
'
Accept
'
,
'
application/json
'
);
if
(
$
(
this
).
slapos
(
'
access_token
'
)
&&
authentication
)
{
//xhr.setRequestHeader('Authorization', $(this).slapos('store', 'token_type') + ' ' + $(this).slapos('access_token'));
//xhr.setRequestHeader('Accept', 'application/json');
xhr
.
setRequestHeader
(
'
Authorization
'
,
$
(
this
).
slapos
(
'
store
'
,
'
token_type
'
)
+
'
'
+
$
(
this
).
slapos
(
'
access_token
'
));
}
}
};
...
...
@@ -120,7 +119,7 @@
beforeSend
:
function
(
xhr
)
{
xhr
.
setRequestHeader
(
'
Accept
'
,
'
application/json
'
);
},
success
:
callback
success
:
callback
,
});
});
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment