Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
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
w2pext
plugin_dbui
Commits
8cf05193
Commit
8cf05193
authored
16 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete code.
Add the constant App.DB Add two new functions App.longFieldName and App.fieldString
parent
2b973d49
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
static/uijs/appbase.js
+10
-50
10 additions, 50 deletions
static/uijs/appbase.js
with
10 additions
and
50 deletions
static/uijs/appbase.js
+
10
−
50
View file @
8cf05193
/**
* Define name space and constants
* @author R. Le Gac
* @version $
i
d$
* @version $
I
d$
*
*/
Ext
.
namespace
(
'
App
'
,
'
App.factory
'
);
App
.
DB_URL
=
'
/mdvPostInstall/database
'
;
/*
App.factory.JsonStore
A JsonStore Factory customized for the application and related database.
configuration object is those of the EXt.data.JsonStore.
baseParams have to be completed by the steering keywords:
fields, q, ....
*/
Ext
.
namespace
(
'
App
'
);
App
.
factory
.
JsonStore
=
function
(
config
){
var
js
=
new
Ext
.
data
.
JsonStore
(
Ext
.
apply
({
baseParams
:
{
'
debug
'
:
false
,
'
service
'
:
'
select
'
,
},
root
:
'
data
'
,
url
:
App
.
DB_URL
,
},
config
));
return
js
;
};
/*
App.factory.ajax.request
config parameters param have to defined
More work need to decode properly errors.
*/
App
.
DB
=
'
db
'
App
.
DB_URL
=
'
/mdvPostInstall/database
'
;
App
.
factory
.
AjaxRequest
=
function
(
config
){
var
ar
=
Ext
.
Ajax
.
request
(
Ext
.
apply
({
failure
:
function
(
response
,
options
){
Ext
.
MessageBox
.
alert
(
'
Status
'
,
response
.
reponseText
);
},
method
:
'
POST
'
,
success
:
function
(
response
,
options
){
resp
=
Ext
.
util
.
JSON
.
decode
(
response
.
responseText
);
if
(
!
resp
.
success
){
Ext
.
MessageBox
.
alert
(
'
Status
'
,
resp
.
msg
);
}
//console.log(resp.msg);
},
url
:
App
.
DB_URL
},
config
));
App
.
longFieldName
=
function
(
table
,
field
){
return
App
.
DB
+
'
.
'
+
table
+
'
.
'
+
field
}
return
ar
;
};
\ No newline at end of file
App
.
fieldString
=
function
(
table
,
field
,
operator
,
value
){
return
App
.
longFieldName
(
table
,
field
)
+
operator
+
value
}
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