Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3bf623a2
authored
Jan 09, 2018
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
search improvement
parent
320a5088
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
sails/src/assets/scripts/modules/student/controllers/addpicto.js
sails/src/assets/scripts/modules/student/controllers/addpicto.js
View file @
3bf623a2
...
...
@@ -398,6 +398,8 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope
.
page
=
1
;
// Reset pagination
$scope
.
pictos
=
[];
// Reset pictos
var
length
=
$scope
.
srch_term_picto
==
undefined
?
0
:
$scope
.
srch_term_picto
.
length
;
if
(
length
==
1
){
//Check the word length
$scope
.
alert
=
{
type
:
'warning'
,
msg
:
'warning_two_characters'
,
show
:
true
};
...
...
@@ -452,10 +454,20 @@ dashboardControllers.controller('AddPictoCtrl', function (
$http
.
get
(
request
)
.
success
(
function
(
data
)
{
// Load data into pictos
$scope
.
pictos
=
data
;
// Order by expression length
$scope
.
pictos
.
sort
(
function
(
a
,
b
){
return
a
.
expressions
[
0
].
text
.
length
>
b
.
expressions
[
0
].
text
.
length
;
});
// No data warning
if
(
data
.
length
==
0
){
$scope
.
alert
=
{
type
:
'warning'
,
msg
:
'warning_no_pictos_found'
,
show
:
true
};
}
$scope
.
loadingCatPictos
=
false
;
})
.
error
(
function
()
{
...
...
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