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
a3c44826
authored
Feb 20, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Reset pictos when there is no word in text field
parent
ea291d85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
sails/src/assets/scripts/modules/student/controllers/addpicto.js
sails/src/assets/scripts/modules/student/controllers/addpicto.js
View file @
a3c44826
...
@@ -316,9 +316,16 @@ dashboardControllers.controller('AddPictoCtrl', function (
...
@@ -316,9 +316,16 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope
.
search
=
function
()
{
$scope
.
search
=
function
()
{
$scope
.
page
=
1
;
// Reset pagination
$scope
.
page
=
1
;
// Reset pagination
var
length
=
$scope
.
srch_term_picto
==
undefined
?
0
:
$scope
.
srch_term_picto
.
length
;
var
length
=
$scope
.
srch_term_picto
==
undefined
?
0
:
$scope
.
srch_term_picto
.
length
;
if
(
length
<
2
){
//Check the word length
if
(
length
==
1
){
//Check the word length
$scope
.
alert
=
{
type
:
'warning'
,
msg
:
'warning_two_characters'
,
show
:
true
};
$scope
.
alert
=
{
type
:
'warning'
,
msg
:
'warning_two_characters'
,
show
:
true
};
}
else
if
(
length
==
0
){
// If there is no word, reset pictos
if
(
$scope
.
onlyOwn
||
$scope
.
source
==
"ownpictos"
){
$scope
.
load_own_pictos
();
}
else
{
$scope
.
open_category_from_bc
(
0
);
}
}
else
{
}
else
{
var
request
=
""
;
var
request
=
""
;
var
source
=
1
;
var
source
=
1
;
...
...
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