Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-core
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
project-open
sencha-core
Commits
2ac2bc68
Commit
2ac2bc68
authored
Dec 05, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Beautified source code
parent
7357f5b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
CategoryStore.js
www/store/CategoryStore.js
+6
-0
No files found.
www/store/CategoryStore.js
View file @
2ac2bc68
...
...
@@ -42,7 +42,9 @@ Ext.define('PO.store.CategoryStore', {
if
(
rec
==
null
||
typeof
rec
==
"undefined"
)
{
return
result
;
}
return
rec
.
get
(
'category_translated'
);
},
cat
:
function
(
category_id
)
{
return
this
.
category_from_id
(
category_id
);
},
fill_tree_category_translated
:
function
(
store
)
{
// Concat the tree category names. It is useful to order by name and level
store
.
each
(
function
(
record
){
var
tree_sortkey
=
record
.
get
(
'tree_sortkey'
);
...
...
@@ -55,6 +57,7 @@ Ext.define('PO.store.CategoryStore', {
record
.
set
(
'tree_category_translated'
,
tree_category
);
});
},
validateLevel
:
function
(
value
,
nullvalid
)
{
//Validate the combo value. No level with sublevel is permitted.
if
(
nullvalid
&&
Ext
.
isEmpty
(
value
))
{
return
true
;
...
...
@@ -82,11 +85,13 @@ Ext.define('PO.store.CategoryStore', {
return
'Obligatorio'
;
}
},
addBlank
:
function
()
{
// Add blank value to the store. It is used to white selecction in comboboxes
var
categoryVars
=
{
category_id
:
''
,
category_translated
:
null
,
sort_order
:
'0'
};
var
category
=
Ext
.
ModelManager
.
create
(
categoryVars
,
'TicketBrowser.Category'
);
this
.
add
(
category
);
},
getParent
:
function
(
value
)
{
// Get category parent ID
if
(
!
Ext
.
isEmpty
(
value
))
{
var
record
=
this
.
getById
(
value
);
...
...
@@ -100,5 +105,6 @@ Ext.define('PO.store.CategoryStore', {
}
return
''
;
}
});
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