Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DAAExample
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Óscar Servia González
DAAExample
Commits
bea1ef7a
Commit
bea1ef7a
authored
Mar 15, 2018
by
Óscar Servia González
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dao/pet.js and view pet.js
parent
39fb00ce
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
pet.js
src/main/webapp/js/dao/pet.js
+47
-0
pet.js
src/main/webapp/js/view/pet.js
+0
-0
PetResourceTest.java
src/test/java/es/uvigo/esei/daa/rest/PetResourceTest.java
+0
-1
No files found.
src/main/webapp/js/dao/pet.js
0 → 100644
View file @
bea1ef7a
var
PetDAO
=
(
function
()
{
var
resourcePath
=
"rest/pet/"
;
var
requestByAjax
=
function
(
data
,
done
,
fail
,
always
)
{
done
=
typeof
done
!==
'undefined'
?
done
:
function
()
{};
fail
=
typeof
fail
!==
'undefined'
?
fail
:
function
()
{};
always
=
typeof
always
!==
'undefined'
?
always
:
function
()
{};
$
.
ajax
(
data
)
.
done
(
done
)
.
fail
(
fail
)
.
always
(
always
);
};
function
PetDAO
()
{
this
.
listPet
=
function
(
done
,
fail
,
always
)
{
requestByAjax
({
url
:
resourcePath
,
type
:
'GET'
},
done
,
fail
,
always
);
};
this
.
addPet
=
function
(
Pet
,
done
,
fail
,
always
)
{
requestByAjax
({
url
:
resourcePath
,
type
:
'POST'
,
data
:
Pet
},
done
,
fail
,
always
);
};
this
.
modifyPet
=
function
(
Pet
,
done
,
fail
,
always
)
{
requestByAjax
({
url
:
resourcePath
+
Pet
.
id
,
type
:
'PUT'
,
data
:
Pet
},
done
,
fail
,
always
);
};
this
.
deletePet
=
function
(
id
,
done
,
fail
,
always
)
{
requestByAjax
({
url
:
resourcePath
+
id
,
type
:
'DELETE'
,
},
done
,
fail
,
always
);
};
}
return
PetDAO
;
})();
\ No newline at end of file
src/main/webapp/js/view/pet.js
0 → 100644
View file @
bea1ef7a
src/test/java/es/uvigo/esei/daa/rest/PetResourceTest.java
View file @
bea1ef7a
...
@@ -36,7 +36,6 @@ import com.github.springtestdbunit.annotation.ExpectedDatabase;
...
@@ -36,7 +36,6 @@ import com.github.springtestdbunit.annotation.ExpectedDatabase;
import
es.uvigo.esei.daa.DAAExampleApplication
;
import
es.uvigo.esei.daa.DAAExampleApplication
;
import
es.uvigo.esei.daa.entities.Pet
;
import
es.uvigo.esei.daa.entities.Pet
;
import
es.uvigo.esei.daa.entities.Pet
;
import
es.uvigo.esei.daa.listeners.ApplicationContextBinding
;
import
es.uvigo.esei.daa.listeners.ApplicationContextBinding
;
import
es.uvigo.esei.daa.listeners.ApplicationContextJndiBindingTestExecutionListener
;
import
es.uvigo.esei.daa.listeners.ApplicationContextJndiBindingTestExecutionListener
;
import
es.uvigo.esei.daa.listeners.DbManagement
;
import
es.uvigo.esei.daa.listeners.DbManagement
;
...
...
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