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
ea291d85
authored
Feb 20, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
onlyOwn search enabled
parent
c0558c4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
sails/src/assets/scripts/modules/student/controllers/addpicto.js
sails/src/assets/scripts/modules/student/controllers/addpicto.js
View file @
ea291d85
...
...
@@ -315,9 +315,6 @@ dashboardControllers.controller('AddPictoCtrl', function (
//
$scope
.
search
=
function
()
{
if
(
$scope
.
onlyOwn
)
return
;
$scope
.
page
=
1
;
// Reset pagination
var
length
=
$scope
.
srch_term_picto
==
undefined
?
0
:
$scope
.
srch_term_picto
.
length
;
if
(
length
<
2
){
//Check the word length
...
...
@@ -327,11 +324,16 @@ dashboardControllers.controller('AddPictoCtrl', function (
var
source
=
1
;
$scope
.
closeAlert
();
$scope
.
loadingCatPictos
=
true
;
//category to look in
var
category
=
$scope
.
breadcrumbs
[
$scope
.
breadcrumbs
.
length
-
1
].
id
;
if
(
category
==
999
){
category
=
$scope
.
breadcrumbs
[
$scope
.
breadcrumbs
.
length
-
2
].
id
var
category
;
if
(
!
$scope
.
onlyOwn
){
category
=
$scope
.
breadcrumbs
[
$scope
.
breadcrumbs
.
length
-
1
].
id
;
if
(
category
==
999
){
category
=
$scope
.
breadcrumbs
[
$scope
.
breadcrumbs
.
length
-
2
].
id
}
}
if
(
$scope
.
source
==
"ownpictos"
){
source
=
2
;
category
=
0
;
...
...
@@ -339,13 +341,16 @@ dashboardControllers.controller('AddPictoCtrl', function (
request
=
config
.
backend
+
'/sup/'
+
supervisor
.
id
+
'/pic_fromSearch/'
+
$scope
.
srch_term_picto
+
'/category/'
+
category
+
'/source/'
+
source
;
// Add Search to breadcrumbs
if
(
$scope
.
breadcrumbs
[
$scope
.
breadcrumbs
.
length
-
1
].
id
!=
999
){
$scope
.
breadcrumbs
.
push
({
id
:
999
,
exp
:
"filter"
,
glyphicon
:
'glyphicon glyphicon-chevron-right'
});
if
(
!
$scope
.
onlyOwn
){
if
(
$scope
.
breadcrumbs
[
$scope
.
breadcrumbs
.
length
-
1
].
id
!=
999
){
$scope
.
breadcrumbs
.
push
({
id
:
999
,
exp
:
"filter"
,
glyphicon
:
'glyphicon glyphicon-chevron-right'
});
}
}
$scope
.
symbolstxCats
=
[];
...
...
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